Alepsh Loriya

Web Developer and Demandware development Consultant 

Posted by alpeshloriya on April 18, 2009 at 9:07 AM

Enabling Image Uploading in FCKEditor for PHP

FCKEditor is one of the most feature rich web based WYSWYG editors. I use it for almost all my projects. However, if you wish to enable image uploading in it, you have to jump through some hoops. This is a small tutorial on how to enable image uploading in FCKEditor. This tutorial is aimed at FCKEditor 2.3.2 - but the principle works in other versions of FCKEditor as well

Configuration

fckconfig.js

Open the file FCKEditor/fckconfig.js

Make sure that the default php connector is selected.

Line : 143 - Approx.

var _FileBrowserLanguage = 'php' ; // asp | aspx | cfm | lasso | perl | php | py  var _QuickUploadLanguage = 'php' ; // asp | aspx | cfm | lasso | php

By default, the ASP connector is enabled. If any FCKEditor developer is reading this, please make the default connector PHP as it is more commonly used than ASP.

Connector

Open FCKeditor/editor/filemanager/browser/default/connectors/php/config.php

Enable the connector

Line : 24
// SECURITY: You must explicitelly enable this "connector". (Set it to "true";).  $Config['Enabled'] = true ;

Make sure that the given 'UserFilesPath' folder exists in the server and has write permission.

$Config['UserFilesPath'] = '/UserFiles/' ;

Uploader

Open file FCKeditor/editor/filemanager/upload/php/config.php

Enable the uploader

Line : 24
// SECURITY: You must explicitelly enable this "uploader".   $Config['Enabled'] = true ;

All configurations are done.

Test the Editor

Now open up the url : http://www.yoursite.com/FCKeditor/editor/filemanager/browser/default/connectors/test.html in the browser

Select PHP from the 'Connector:' drop down and click the 'Get Folders and Files' link.

If the files and folders of your 'UserFiles' folder is shown in the XML format, all is fine.

Categories: None

Post a Comment

Oops!

Oops, you forgot something.

Oops!

The words you entered did not match the given text. Please try again.

Already a member? Sign In

0 Comments