10 Steps to implement FCKEditor in Etomite Cleaned up and updated version of Pelleke's famous How to
#16
Posted 13 January 2010 - 06:03 PM
#17
Posted 14 January 2010 - 03:52 PM
#18
Posted 14 January 2010 - 04:05 PM
#19
Posted 04 April 2010 - 02:41 AM
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 File(s)
-
ckeditor_mutate_settings.php (485bytes)
Number of downloads: 12 -
mutate_settings.dynamic.action.php (79.09K)
Number of downloads: 4 -
mutate_content.dynamic.action.php (49.12K)
Number of downloads: 6
This post has been edited by Cris D.: 04 April 2010 - 02:44 AM
#21
Posted 04 April 2010 - 10:15 PM
#23
Posted 05 April 2010 - 06:34 AM
cathode, on 04 April 2010 - 10:35 PM, said:
The site says you can use the demo version for non commercial purposes free of charge.
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...
This post has been edited by Cris D.: 07 April 2010 - 04:12 AM
#24
Posted 05 April 2010 - 01:35 PM
#25
Posted 13 April 2010 - 07:46 PM


Help
Back to top
MultiQuote









