Log in or register to post comments
Last post
Problem with CKfinder integration to FCKeditor
Hi there,

First of all FCKeditor and CKFinder are 2 great products. But I have problems integrating the CKfinder with FCKeditor
below i will paste some code maybe I've done something wrong there...
here is what I did:
1) I've placed the CKFinder folder into FCKeditor/editor/ folder.
2) Changed config.php to make CKFinder work in standalone mode.
3) Changed fckconfig.js with the following values.

FCKConfig.LinkBrowser = true ;
FCKConfig.ImageBrowserURL = FCKConfig.BasePath + 'ckfinder/ckfinder.html' ;FCKConfig.LinkBrowserWindowWidth   = FCKConfig.ScreenWidth * 0.7 ;   // 70%
FCKConfig.LinkBrowserWindowHeight   = FCKConfig.ScreenHeight * 0.7 ;   // 70%

FCKConfig.ImageBrowser = true ;
FCKConfig.ImageBrowserURL = FCKConfig.BasePath + 'ckfinder/ckfinder.html?type=Images' ;
FCKConfig.ImageBrowserWindowWidth  = FCKConfig.ScreenWidth * 0.7 ;   // 70% ;
FCKConfig.ImageBrowserWindowHeight = FCKConfig.ScreenHeight * 0.7 ;   // 70% ;

FCKConfig.FlashBrowser = true ;
FCKConfig.FlashBrowserURL = FCKConfig.BasePath + 'ckfinder/ckfinder.html?type=Flash' ;FCKConfig.FlashBrowserWindowWidth  = FCKConfig.ScreenWidth * 0.7 ;//70% ;
FCKConfig.FlashBrowserWindowHeight = FCKConfig.ScreenHeight * 0.7 ;   //70% ;

FCKConfig.LinkUpload = true ;
FCKConfig.LinkUploadURL = FCKConfig.BasePath + 'ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Files' ;
FCKConfig.LinkUploadAllowedExtensions   = ".(7z|aiff|asf|avi|bmp|csv|doc|fla|flv|gif|gz|gzip|jpeg|jpg|mid|mov|mp3|mp4|mpc|mpeg|mpg|ods|odt|pdf|png|ppt|pxd|qt|ram|rar|rm|rmi|rmvb|rtf|sdc|sitd|swf|sxc|sxw|tar|tgz|tif|tiff|txt|vsd|wav|wma|wmv|xls|xml|zip)$" ;         // empty for all
FCKConfig.LinkUploadDeniedExtensions   = "" ;   // empty for no one

FCKConfig.ImageUpload = true ;
FCKConfig.ImageUploadURL = FCKConfig.BasePath + 'ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Images' ;
FCKConfig.ImageUploadAllowedExtensions   = ".(jpg|gif|jpeg|png|bmp)$" ;      // empty for all
FCKConfig.ImageUploadDeniedExtensions   = "" ;                     // empty for no one

FCKConfig.FlashUpload = true ;
FCKConfig.FlashUploadURL = FCKConfig.BasePath + 'ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Flash' ;
FCKConfig.FlashUploadAllowedExtensions   = ".(swf|flv)$" ;      // empty for all
FCKConfig.FlashUploadDeniedExtensions   = "" ;               // empty for no one

FCKConfig.SmileyPath   = FCKConfig.BasePath + 'images/smiley/msn/' ;
FCKConfig.SmileyImages   = ['regular_smile.gif','sad_smile.gif','wink_smile.gif','teeth_smile.gif','confused_smile.gif','tounge_smile.gif','embaressed_smile.gif','omg_smile.gif','whatchutalkingabout_smile.gif','angry_smile.gif','angel_smile.gif','shades_smile.gif','devil_smile.gif','cry_smile.gif','lightbulb.gif','thumbs_down.gif','thumbs_up.gif','heart.gif','broken_heart.gif','kiss.gif','envelope.gif'] ;
FCKConfig.SmileyColumns = 8 ;
FCKConfig.SmileyWindowWidth      = 320 ;
FCKConfig.SmileyWindowHeight   = 240 ;
(sorry for pasting all of it, but now we are sure everything is here...)

4) Tested FCKeditor and still loads the default filemanager.
5) Here is what I have in the .php file that loads FCKeditor
<?php
   include_once("fckeditor/fckeditor.php") ;
   /* require_once('fckeditor/editor/ckfinder/ckfinder.php'); */
   $oFCKeditor          = new FCKeditor('content') ;
   $oFCKeditor->Height    = '500' ;   
   $oFCKeditor->BasePath    = 'fckeditor/' ;
   //$oFCKeditor->Config['SkinPath'] = '/EzionGate/admin/fckeditor/editor/skins/office2003/' ;
   $oFCKeditor->Value       = $blockcontent;
   /* CKFinder::SetupFCKeditor( $fckeditor, 'fckeditor/editor/ckfinder/' ) ;*/
   $buff.= $oFCKeditor->CreateHtml();
?>

*NOTE $buff is loaded into a template and works fine.
I've tested the above code with and without the quoted lines but still I get to see the default filemanager...

I hope a solution can be provided..

Thanks in advance!
Re: Problem with CKfinder integration to FCKeditor
I have followed your instruction step by step and everything works fine on my computer.
Did you clear your browsers cache after changing the fckconfig.js file?

Wiktor Walc
CTO
--
CKSource - http://cksource.com
--
Follow CKEditor on: Twitter | Facebook | Google+

Re: Problem with CKfinder integration to FCKeditor
Hi wiktor,

Cleaning my cache did the trick.. thanks for helping out, it works like a charm now, anyway I'm probably going to use this in a project i'm building, the project is great and is future rich!! thanks for the support for now.

Cheers!
Re: Problem with CKfinder integration to FCKeditor
Hi,

i´have integrated the CKFinder in FCKEditor, too.

CKfinder 1.1/ FCKEditor 2.5.1 / Coldfusion

I change the Userfilespaths dynamically, works fine.

I use absolue http://-Path for the config.baseURL and a absolute Path like D:\... for config.BaseURL.

I´ve got one little Problem left: I open the Image-Dialog --> Search Server --> Filemanager opens --> choose a Picture dblklick --> Filemanager closed --> return to Imagedialog with Image URL. This Image URL is like "/http://www.test.com/...". I need the URL without the "/" at the first Position. What do I have to change?

Greets Mario
Re: Problem with CKfinder integration to FCKeditor
Hi,

There are few minor issues in the ColdFusion 1.1 connector, until we release the improved version publicly, could you try it and let me know whether it solved your problem?

ckfinder.cfc: (lines 101-102)
Replace
   <cfset this.editorObj.config['ImageBrowserURL'] = url & '?type=' & iif( Len( this.imageType ), this.imageType, De('Images'))>
   <cfset this.editorObj.config['FlashBrowserURL'] = url & '?type=' & iif( Len( this.flashType ), this.flashType, De('Flash'))>

With:
   <cfset this.editorObj.config['ImageBrowserURL'] = url & urlencodedformat('?type=' & iif( Len( this.imageType ), this.imageType, De('Images')))>
   <cfset this.editorObj.config['FlashBrowserURL'] = url & urlencodedformat('?type=' & iif( Len( this.flashType ), this.flashType, De('Flash')))>


core\connector\cfm\CommandHandler\XmlCommandHandlerBase.cfc: (line 43)
Replace
   nodeCurrentFolder.xmlAttributes["url"] = fileSystem.FixPath(THIS.currentFolder.getUrl());

With:
   nodeCurrentFolder.xmlAttributes["url"] = THIS.currentFolder.getUrl();


core\connector\cfm\CommandHandler\Init.cfc: (line 56)
Replace
   nodeResourceType.xmlAttributes["url"] = fileSystem.FixPath(THIS.config.resourceType[i].url);

With:
   nodeResourceType.xmlAttributes["url"] = THIS.config.resourceType[i].url;


Add (line 51)
   
   if (not isDefined("URL.type") or URL.type eq THIS.config.resourceType[i].name) {

Before:
   aclMask = acl.getComputedMask(THIS.config.resourceType[i].name, "/");

(straight after <cfscript>)

Add (line 73)
   
   }

After:
   ArrayAppend(nodeResourceTypes.xmlChildren, nodeResourceType);

(straight before </cfscript>)

I have attached the corrected files here: .

Attachments: 

AttachmentSize
ckfindercoldfusion1.1fixedfiles.zip4.65 KB

Wiktor Walc
CTO
--
CKSource - http://cksource.com
--
Follow CKEditor on: Twitter | Facebook | Google+

Re: Problem with CKfinder integration to FCKeditor
Hi Wiktor,

i´ve made all the changes, cleared the cache, reload, filemanager --> Nothing happens, shows me an empty filemanager, nor directories, no files.

Then I´ve changed the modified Lines in iit.cfc back to the old Stuff.

Reload, Filemanager Function IO, except the old error, i wrote about (/http).

Next Try: init.cfc Only Changing Line 56 without the IF-Statement --> Reload Everything works Fine!!! IE 7 IO, FF 2 IO, Coldfusion 8 Platform Win2K3

Thanx a Lot

Greets MArio
Re: Problem with CKfinder integration to FCKeditor
That's great!

One more question - if I may ask - could you try to replace the Init.cfc with the fixed file that is in attachment?

Thanks,

Wiktor Walc
CTO
--
CKSource - http://cksource.com
--
Follow CKEditor on: Twitter | Facebook | Google+

Re: Problem with CKfinder integration to FCKeditor
I´ve tried your Init.cfc - Same Error --> Empty Filemanager.

Greets
Re: Problem with CKfinder integration to FCKeditor
Thanks again for your help! I'll take a look at it.

Wiktor Walc
CTO
--
CKSource - http://cksource.com
--
Follow CKEditor on: Twitter | Facebook | Google+