Jump to content


10 Steps to implement FCKEditor in Etomite


24 replies to this topic

#21 cathode

    Loves Etomite Forums!

  • Staff
  • 648 posts
  • Gender:Male

Posted 04 April 2010 - 10:15 PM

Wow, easy. Tested working in FF, IE8 and Google chrome!

#22 cathode

    Loves Etomite Forums!

  • Staff
  • 648 posts
  • Gender:Male

Posted 04 April 2010 - 10:35 PM

Ug. They removed the image upload portion of it... now it's about worthless. The image upload portion of it (Ckfinder) is expensive too...

#23 Cris D.

    Loves Etomite Forums!

  • Developers
  • PipPipPipPip
  • 1,104 posts
  • Gender:Male

Posted 05 April 2010 - 06:34 AM

View Postcathode, 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...
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...

Edited by Cris D., 07 April 2010 - 04:12 AM.


#24 Ralph

    Loves Etomite Forums!

  • Admin
  • 6,524 posts
  • Gender:Male

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 Gordy

    Etomite Forum Newbie

  • Member
  • 1 posts

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