10 Steps to implement FCKEditor in Etomite
Started by Jim Browski, Jun 14 2007 03:15 PM
24 replies to this topic
#16
Posted 13 January 2010 - 06:03 PM
I downloaded the fckeditor from the Etomite downloads page, uploaded it into /manager/assets/fckeditor and it works fantastically! Thank you!
#17
Posted 14 January 2010 - 03:52 PM
Since a few key Xinha plugins have been messed up with the advent of IE8, I will give this a try too, thank you all for your walkthroughs!
#19
Posted 04 April 2010 - 02:41 AM
I just integrated ckeditor V3.2 and it wasn't that hard actually.
This method is NOT a FCKeditor upgrade, it's integration of another editor (CKEditor 3.2)- I was not sure how many issues would be caused by an upgrade rather so I opted for this relatively low impact (and easily reversable) method.
1. Upload the contents of the new standard ckeditor V3.2 to your manager/media/ folder (you will need to point to the file manager/media/ckeditor/ckeditor.php)
Note: I have not overwritten the old FCKEditor installation so you can actually have both editors to select from if having problems.
2. Edit the manager/actions/dynamic/ mutate_settings.dynamic.action.php file to include the new editor option (approx line 869)- or overwrite the old one with the new file below:
3. Upload the new file below called ckeditor_mutate_settings.php to the manager/actions/dynamic folder in your site.
4. Edit the mutate_content.dynamic.action.php file and add an initiation of the new editor (at aprox line 650) - or overwrite the old one with the new file below.
Done.
CKEditor has made it much easier to integrate with fewer steps instead of the old 10 steps and there's heaps of config settings and the best bit- it's a stock standard CKeditor installation making future upgrades way easy... I've tested this in FF 3.6.2 and IE8 only.
This method is NOT a FCKeditor upgrade, it's integration of another editor (CKEditor 3.2)- I was not sure how many issues would be caused by an upgrade rather so I opted for this relatively low impact (and easily reversable) method.
1. Upload the contents of the new standard ckeditor V3.2 to your manager/media/ folder (you will need to point to the file manager/media/ckeditor/ckeditor.php)
Note: I have not overwritten the old FCKEditor installation so you can actually have both editors to select from if having problems.
2. Edit the manager/actions/dynamic/ mutate_settings.dynamic.action.php file to include the new editor option (approx line 869)- or overwrite the old one with the new file below:
<?php if(file_exists('media/ckeditor/')){ ?>
<option value="6" <?php echo $which_editor==6 ? "selected='selected'" : "" ;?>>CKeditor3+</option>
<?php } ?>
3. Upload the new file below called ckeditor_mutate_settings.php to the manager/actions/dynamic folder in your site.
4. Edit the mutate_content.dynamic.action.php file and add an initiation of the new editor (at aprox line 650) - or overwrite the old one with the new file below.
<!-- START::WYSIWYG Editor Startup Section -->
<?php
if(($content['richtext']==1 || $_GET['a']==4) && $use_doc_editor==1)
{
# Start - CKeditor
if($which_editor==6)
{
include('ckeditor_mutate_settings.php');
}
#End CKeditor
# Start - RTE
elseif($which_editor==5)
{
include('./media/rte/rte.php');
}
# Start - Xinha
elseif($which_editor==4)
{
include('xhina_mutate_settings.php');
}
# Start - FCKeditor
elseif($which_editor==3)
{
$sBasePath = "./media/fckeditor/";
include($sBasePath."fckeditor.php");
$oFCKeditor = new FCKeditor('ta');
$oFCKeditor->BasePath = $sBasePath;
$oFCKeditor->Value = $content['content'];
$oFCKeditor->Height = '420';
$oFCKeditor->Create();
}
#End FCKeditor
# HTMLArea Editor
elseif($which_editor==2)
{
include('HTMLArea_mutate_settings.php');
}
#tinyMCE Editor
elseif($which_editor==1)
{
include('tinyMCE_mutate_settings.php');
}
}
else
{
?>
<!-- END::WYSIWYG Editor Startup Section -->
Done.
CKEditor has made it much easier to integrate with fewer steps instead of the old 10 steps and there's heaps of config settings and the best bit- it's a stock standard CKeditor installation making future upgrades way easy... I've tested this in FF 3.6.2 and IE8 only.
Attached Files
Edited by Cris D., 04 April 2010 - 02:44 AM.
#20
Posted 04 April 2010 - 10:03 PM
I gotta try this...
#21
Posted 04 April 2010 - 10:15 PM
Wow, easy. Tested working in FF, IE8 and Google chrome!
#23
Posted 05 April 2010 - 06:34 AM
cathode, on 04 April 2010 - 10:35 PM, said:
Ug. They removed the image upload portion of it... now it's about worthless. The image upload portion of it (Ckfinder) is expensive too...
I've integrated the image browser by:
1) Download ckfinder 1.4.3 and upload it to your site to a manager/media/ckfinder folder.
2) Modify the ckfinder/ config.php file according to the installation and configuration documentation and make the CheckAuthentication() function return true;, change the $baseURL to point to your files (this is easist if you point to the userfiles/files , userfiles/images, userfiles/flash folders - but you will need to create them and CHMOD them to 755 or 777 depending your server, and finally point to the $baseDir (server relative path) - this can be left to auto resolve - it worked for me on IIS.
3) Modify the ckeditor_mutate_settings.php from the above post above to incude a javascript implementation of ckfinder plugin:
<? php // ckeditor_mutate_settings.php // etomited by Cris D 2010/04/04 for eto 1.1 ckeditor 3.2 // added javascript integration of ckfinder 2010/04/05 ?> <script type="text/javascript" src="./media/ckeditor/ckeditor.js"></script> <script type="text/javascript" src="./media/ckfinder/ckfinder.js"></script> <textarea id="ta" rows="25" cols="80" name="ta" style="width:80%; margin:0;" onchange="documentDirty=true;"><?php echo htmlspecialchars($content['content']); ?></textarea> <script type="text/javascript"> //<![CDATA[ var editor = CKEDITOR.replace( 'ta' ); CKFinder.SetupCKEditor( editor, './media/ckfinder/' ); //]]> </script> <?php /* END */ ?>
The Browse button should now appear when you click to add an image. See the ckfinder user manual for more on it's use.
The issue with this implementation is the CheckAuthentication() function which as you will see, means anyone who knows the URL to ckfinder can upload and manipulate the files in the site - quite a security hole and probably similar to the iBrowser issue of years ago. Now I tried about 3 hours to get an etomite authentication session variable to go across to ckfinder from the manager session but without success- so it's quite easy to implement and plug into CKEditor, but I'm not sure even a paid subsription could be easily added securely.
Perhaps Ralph knows a way to grab a manager session variable and pass it to an out-of-etomite system script...
Edited by Cris D., 07 April 2010 - 04:12 AM.
#24
Posted 05 April 2010 - 01:35 PM
I can look into the authentication issue in the near future to see if I can utilize the same method used in Xinha or one of their built-in methods... I have the CKeditor integration working in my dev install, aside from CKfinder...
#25
Posted 13 April 2010 - 07:46 PM
Just wanted to post a quick thanks for the above advice I've got it working on my etomite install very quickly! Thanks
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users












