Hey
I would like to update the editor used in the CMS I use (phpwcms) from v. 1.5 to version 2 RC1 - but I have tried without succes . Now I hope you can help.
The old one was call in the template file via this code:
//////////////////START
//load FCKeditor
case 2: include(PHPWCMS_ROOT."/include/inc_lib/fckeditor.editor.inc.php") ;
$oFCKeditor = new FCKeditor ;
$oFCKeditor->ToolbarSet = 'phpwcms' ;
$oFCKeditor->Value = $content["text"] ;
$oFCKeditor->CreateFCKeditor( 'ctext', '100%', '500' ) ;
break;
//////////////////END
//////////////////START
/////////fckeditor.editor.inc.php looked like this:
<?php /* *the FCKEDITOR copyright DATA here */ // The editor base path // You have to update it with you web site configuration $FCKeditorBasePath = "/".$phpwcms["root"]."include/inc_ext/FCKeditor/" ; class FCKeditor { var $ToolbarSet ; var $Value ; var $CanUpload ; var $CanBrowse ; function FCKeditor() { $this->ToolbarSet = '' ; $this->Value = '' ; $this->CanUpload = 'none' ; $this->CanBrowse = 'none' ; } function CreateFCKeditor($instanceName, $width, $height) { echo $this->ReturnFCKeditor($instanceName, $width, $height) ; } function ReturnFCKeditor($instanceName, $width, $height) { $grstr = htmlentities( $this->Value ) ; $strEditor = "" ; if ( $this->IsCompatible() ) { global $FCKeditorBasePath ; $sLink = $FCKeditorBasePath . "phpwcms_fckeditor.php?FieldName=$instanceName" ; if ( $this->ToolbarSet != '' ) $sLink = $sLink . "&Toolbar=$this->ToolbarSet" ; if ( $this->CanUpload != 'none' ) { if ($this->CanUpload == true) $sLink = $sLink . "&Upload=true" ; else $sLink = $sLink . "&Upload=false" ; } if ( $this->CanBrowse != 'none' ) { if ($this->CanBrowse == true) $sLink = $sLink . "&Browse=true" ; else $sLink = $sLink . "&Browse=false" ; } $strEditor .= "<IFRAME src=\"$sLink\" width=\"$width\" height=\"$height\" frameborder=\"no\" scrolling=\"no\"></IFRAME>" ; $strEditor .= "<INPUT type=\"hidden\" name=\"$instanceName\" value=\"$grstr\">" ; } else { $strEditor .= "<TEXTAREA name=\"$instanceName\" rows=\"4\" cols=\"40\" style=\"WIDTH: $width; HEIGHT: $height\" wrap=\"virtual\">$grstr</TEXTAREA>" ; } return $strEditor; } function IsCompatible() { $sAgent = $_SERVER['HTTP_USER_AGENT'] ; if ( is_integer( strpos($sAgent, 'MSIE') ) && is_integer( strpos($sAgent, 'Windows') ) && !is_integer( strpos($sAgent, 'Opera') ) ) { $iVersion = (int)substr($sAgent, strpos($sAgent, 'MSIE') + 5, 1) ; return ($iVersion >= 5) ; } else { return FALSE ; } } } ?>
RE: update from 1.5 -> 2.0 in a CMS/phpwcms
solved....
http://www.phpwcms.de/forum/viewtopic.php?p=27357#27357