I see everyone struggling around with FCKEditor which is partly supported by etomite, but not completely, and not included as well. This gives some problems for some of you.
Apart from that: Etomite as well as FCKEditor are improving fast, and coming up with new releases very frequently. This may make things a little complicated, and that is where I wrote this howto. Please reply with your comments, appreciations or questions when you try this!
NOTE: This HOWTO will not give you a working combination in either an older version of Etomite or an older version of FCKeditor. Make sure that you have the latest versions! (well... they were the latest versions at the moment I wrote this article)
HOW TO IMPLEMENT FCKEDITOR 2.2 IN ETOMITE 0.6.1 RTM.
Integrating FCKEditor 2.2 into Etomite 0.6.1 RTM
1. Download the FCKEditor package from http://www.fckeditor.net
2. Extract the package to your local computer
3. Rename the folder FCKeditor to fckeditor (read: remove the capitals)
4. Upload the fckeditor-folder to your manager/media folder
5. Make the following edits in manager/media/fckeditor/fckconfig.js
a. Look up the lines similar to these two, and set their values to php, just like this:
var _FileBrowserLanguage = 'php'; // asp | aspx | cfm | lasso | perl | php | py var _QuickUploadLanguage = 'php'; // asp | aspx | cfm | lasso | php
b. I switched off the flash-browser and the link-browser. I don't need them, but if you do, read the bottom appendix of this howto. So for now: set them to false. (Find the lines similar to the ones below, and set them to false.)
FCKConfig.LinkBrowser = false; ... FCKConfig.FlashBrowser = false;
c. Switch off all the upload-functions; uploading will be handled whitin the serverbrowser-window. (This because of Etomite's assets-folder system)
FCKConfig.LinkUpload = false; ... FCKConfig.ImageUpload = false; ... FCKConfig.FlashUpload = false;
6. Make the following edits in manager/media/fckeditor/editor/filemanager/browser/default/connectors/php/config.php
a. Switch the browser on :) (Find this line, and set the value to 'true')
$Config['Enabled'] = true;
b. Set the UserFilesPath
// Path to user files relative to the document root, patched in a universal way. $Config['UserFilesPath'] = $ETOMITE_PAGE_BASE['relative'].'/[MySite]/assets/';
Note: Edited by Ralph to use $ETOMITE_PAGE_BASE['relative'] as assigned in the manager/includes/config.inc.php file for handling relative paths automatically.
Note: Edited by pelleke to use [MySite] for taking care of cases where Etomite is not installed in the document root. Thanks to Tony Benci (tbenci)
7. We should fix some things in manager/actions/dynamic/mutate_content.dynamic.action.php. Open the file.
a. Find the line containing the following comment:
# Start - FCKeditor
(In my case it turned out to be line 430, so it should be somewhere there.) One or a few lines below, you find a line containing the text:
prepContent();
DELETE this line. This command is depricated, and will give you an error.
b. A few lines below the in step 7a deleted line, you will find a line that should be patched in the following way:
Original line: $oFCKeditor->Value = $newcontent; Patched line: $oFCKeditor->Value = $content['content'];
c. The default heigth of an FCKeditor instance is 200px, this turns out to be rather small for page editing in Etomite. If you want to raise this to 400px (which I recommend you) write the following line above the line you just patched in step 7B
$oFCKeditor->Height = '400';
8. Now we should make some other patches to make the imagebrowser work well. Make sure you don't miss one!
a. Look up this line in manager/media/fckeditor/fckconfig.js and replace 'Type=Image' by 'Type=images'
Original line: FCKConfig.ImageBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Type=Image&Connector=connectors/' + _FileBrowserLanguage + '/connector.' + _FileBrowserExtension; Our patched line: FCKConfig.ImageBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Type=images&Connector=connectors/' + _FileBrowserLanguage + '/connector.' + _FileBrowserExtension;
b. Look up this line in manager/media/fckeditor/editor/filemanager/browser/default/frmresourcetype.html and patch it like this:
Original line: ['Image','Image'],
Our patched line: ['images','Image'],
c. Look up these two lines in manager/media/fckeditor/editor/filemanager/browser/default/connectors/php/config.php and patch them in a similar way:
Original lines:
$Config['AllowedExtensions']['Image'] = array('jpg','gif','jpeg','png');
$Config['DeniedExtensions']['Image'] = array();
Our patched lines:
$Config['AllowedExtensions']['images'] = array('jpg','gif','jpeg','png');
$Config['DeniedExtensions']['images'] = array();d. Look up this line in manager/media/fckeditor/editor/filemanager/browser/default/connectors/php/connector.php and patch it also like this:
Original line:
if ( !in_array( $sResourceType, array('File','Image','Flash','Media') ) )
Our patched line:
if ( !in_array( $sResourceType, array('File','images','Flash','Media') ) )9. Make sure (with your FTP-client) that the folder assets/images is chmodded to 777. (In a valid etomite-installation this should already be the case.)
10. Go to your etomite manager, and select the FCKeditor in your Interface&Editor Settings in the Etomite Configuration.
... And then you should have a working FCKeditor 2.2 with Etomite 0.6.1 RTM with a working image-browser and upload-function! Happy FCKing!
Appendix:
If you also plan to use the flash-browser and/or the link-browser (which I wanted you to disable in step 5b), you should take care of creating the folders. This is rather easy, but quite annoying if you forget it.
1. Switch on these functions again by setting their properties (back) to true. (Look at step 5b)
2. in the asset/ -folder, create a folder named 'Flash' and chmod it to 777. Create another folder named File and also chmod it to 777. (If you plan to use only one of these browser-functions, you need only one folder of course. :))
This post has been edited by pelleke: 18 April 2006 - 10:07 AM


Help
Back to top
MultiQuote










