*
* Name : infopopup
* Description : Infopopup Plug-In for FCKeditor and Replacement Tag for phpWCMS
* Part of : phpwcms-XT
* Author : Horst-D. Kroeller
* Version : 1.0.0
* Date : 09.07.2006 12:39
* Copyright : 2006 by Author
*
#############################################################################*/
Sample -> here
Installation:
download the ->Zip
extract the Zip-Archive and do the following Steps
---------------------------------------------------------------------------------
Step 1:
---------------------------------------------------------------------------------
copy the Folders to the Base-Folder of your phpwcms installation
---------------------------------------------------------------------------------
Step 2:
---------------------------------------------------------------------------------
open ../include/inc_ext/FCKeditor2/fckconfig.js
search ------------------------
Code: Select all
FCKConfig.PluginsPath = FCKConfig.BasePath + 'plugins/' ;
Code: Select all
FCKConfig.Plugins.Add( 'InfoPopUp','en' );
Code: Select all
FCKConfig.ToolbarSets["phpwcms"]
Code: Select all
FCKConfig.ToolbarSets["default"]
add 'InfoPopUp' somewhere in the Toolbarstructure - please Notice
don't forget to keep the Syntax of the Toolbar
Sample before
Code: Select all
['Link','Unlink','Anchor']
Code: Select all
['Link','Unlink','Anchor','InfoPopUp']
Step 3:
---------------------------------------------------------------------------------
open ../include/inc_front/front.func.inc.php
search -------------------
Code: Select all
function html_parser($string) {
Code: Select all
// this tags out a Mailaddress with an predifined subject (by Florian, 21-11-2003)
$search[24] = '/\[MAILSUB (.*?) (.*?)\](.*?)\[\/MAILSUB\]/i';
$replace[24] = '<a href="mailto:$1?subject=$2">$3</a>';
// added simple [br] -> <br />
$search[25] = '/\[br\]/i';
$replace[25] = '<br />';
// create "make bookmark" javascript code
$search[26] = '/\[BOOKMARK\s{0,}(.*)\](.*?)\[\/BOOKMARK\]/i';
$replace[26] = '<a href="#" onClick="BookMark_Page();return false;" title="$1">$2</a>';
Code: Select all
// Infopopup
$search[xx] = '/\[POPUP (.*?)\](.*?)\[\/POPUP\]/i';
$replace[xx] = "<a onmouseover=\"show_infopopup('$1')\" onmouseout=\"hide_infopopup()\" class=\"infopopup_highlight\"> $2</a>";
Code: Select all
// this tags out a Mailaddress with an predifined subject (by Florian, 21-11-2003)
$search[24] = '/\[MAILSUB (.*?) (.*?)\](.*?)\[\/MAILSUB\]/i';
$replace[24] = '<a href="mailto:$1?subject=$2">$3</a>';
// added simple [br] -> <br />
$search[25] = '/\[br\]/i';
$replace[25] = '<br />';
// create "make bookmark" javascript code
$search[26] = '/\[BOOKMARK\s{0,}(.*)\](.*?)\[\/BOOKMARK\]/i';
$replace[26] = '<a href="#" onClick="BookMark_Page();return false;" title="$1">$2</a>';
// Infopopup
$search[27] = '/\[POPUP (.*?)\](.*?)\[\/POPUP\]/i';
$replace[27] = "<a onmouseover=\"show_infopopup('$1')\" onmouseout=\"hide_infopopup()\" class=\"infopopup_highlight\"> $2</a>";
$string = preg_replace($search, $replace, $string);
$string = str_replace('\'', ''', $string);
$string = str_replace('"', '"', $string);
return $string;
}
Step 4
---------------------------------------------------------------------------------
copy this or the Content of frontend.css to you frontend.css
Code: Select all
#infopopup_box{
position: absolute;
left: -300px;
width: 150px;
border: 1px solid black;
padding: 2px;
background-color: lightyellow;
visibility: hidden;
z-index: 100;
/*Remove below line to remove shadow. Below line should always appear last within this CSS*/
filter: progid:DXImageTransform.Microsoft.Shadow(color=gray,direction=135);
}
#infopopup_pointer{
position:absolute;
left: -300px;
z-index: 101;
visibility: hidden;
}
.infopopup_highlight{
background-color: #FFF36F;
border: 1px dotted green;
}
Step 5
---------------------------------------------------------------------------------
add the following Line into your Template/HTML-Head
<script type="text/javascript"
Code: Select all
src="/phpwcms_template/inc_js/infopopup.js"></script>
search ----------
Code: Select all
$content['page_start'] .= '<script src="'.TEMPLATE_PATH.'inc_js/frontend.js" type="text/javascript"></script>'."\n";
Code: Select all
$content['page_start'] .= '<script src="'.TEMPLATE_PATH.'inc_js/infopopups.js" type="text/javascript"></script>'."\n";
Usage:
---------------------------------------------------------------------------------
in HTML you can use this Notation:
this is how
Code: Select all
[POPUP Text for the Popup] it works [/POPUP]
in FCKeditor you have a new Button in Toolbar.
Write your Text, mark the Word or Aerea for the Popup and click on the Button,
a new Window opens where you can insert the Text for the Popup..
in Popup-Text are <b>text</b> <i>text</i> <u>text</u> and <br> allowed
have Fun Horst