Needs work
Project:
CKEditor 4 - WYSIWYG HTML editor
Version:
7.x-1.6
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
10 May 2010 at 06:51 UTC
Updated:
1 Mar 2012 at 12:54 UTC
An open source alternative to CKfinder
http://kcfinder.sunhater.com/#overview
Will this work with CKeditor ?
Comments
Comment #1
mephir commentedYes. You should extract archive, for an example into sites/all/libraries/kcfinder and then go through with instruction.
Configuration setting can be set into ckeditor.config.js or Advanced javascript configuration in profile settings.
Configuration for an example should look:
If you have any lack of clarity about issue, feel free to reopen it. I don't think so if we provide closer solution for kcfinder, this is 3rd part project, i don't have so much time to test it for security issues.
Comment #2
mephir commentedComment #3
gooddesignusa commentedsub
Comment #5
ikeigenwijs commentedsub
Comment #6
laogui commentedsubscribe.
kcfinder is opensource.
ckfinder is commercial.
Comment #7
Mamoun commentedSubscribe
Comment #8
Maroli commentedAnyone got thsi working on drupal 7? I Urgently need it. I did all of the above, without any result. Searched the website of KCfinder with no result.
Anyone?
Comment #9
xandeadx commented+1 for kcfinder
Comment #10
kondrat commentedSe my blog http://code201.net/blog/ckeditor.html
I use KCFinder with CKEditor
Comment #11
espirates commentedYour site doesn't even load.
Comment #12
Niremizov commentedLook like there is a way of useing KCFinder with Ckeditor in Drupal, but probably it isn't the best.
1. Make changes like in #1 was told.
2. Go inside KCFinder/core and edit autoload.php.
Add before
function __autoload($class)this:spl_autoload_register('__autoload');3. Go inside KCFinder folder and edit browse.php and upload.php by inserting this line first:
require '../modules/ckeditor/includes/filemanager.config.php';Well, actually you just need to require filemanager.config.php inside includes folder in CKEditor module.
4. Now go inside CKEditor/includes folder and make some changes in filemanager.config.php:
After
$authenticated = user_access('allow CKFinder file uploads');Place something like that:
Surely it is better to change uploadDir to
$_SESSION['ckeditor']['UserFilesPath']."/kcfinder"but there is some security issue that i do not understand for now.Comment #13
danyalejandro commented(My case is: Drupal 7 + WYSIWG module + CKeditor installed)
You can create a small module with the "wysiwyg_editor_settings_alter" hook; that's where you configure the settings that the WYSIWYG module uses for ckEditor. In the module, you can use the following:
Notice how my module was called "drupal_kc". No other code was required (just to see it work; remember to set your settings according to the SESSION stuff or everyone will be able to use kcfinder!!)
Just in case, my .info file was like this:
now... I wonder how to make this SECURE...
Comment #14
Niremizov commenteddanyalejandro<
I just don’t really understood< how did you want to set SESSION vars... and transport them to KCFinder?
By the way, there is a better way then #12.
You still need to put kcfinder folder inside ckeditor module's folder.(Code written below was tested if KCF folder was there)
It is possible to use #13 after what you should place to the end of core/autoload.php:
and to the beginning of core/autoload.php
Be careful when useing $_SESSION['KCFINDER']['uploadURL'] or uploadDir... you should not to forget to create folder like kcfinder inside /sites/default/files/ ..... of course if only you will use this variable like written above...
Also, if you will use code above, there is no need to change any ini_session vars and you should also comment line 66 inside core/uploader.php for not getting any notices...
And that is all... i suppose now it is SECURE, or not? Such function is used by CkFinder...
Comment #15
danyalejandro commentedNiremizov, I did exactly as you said (did #13 and #14, ignored everything else), and it seems like the bootstrap process was succesfull (I can print nodes and stuff). The problem is, it looks like the session isn't being shared between Drupal and ckfinder; just after the bootstrap, if I write:
it writes "0", even tough I have a session started as the drupal admin...
btw, my kcfinder/config.php contains the following:
maybe kcfinder and drupal can't share the session because of my settings? how could you make it work?
Comment #16
danyalejandro commentedNiremizov, I created a file called "sessiontest.php" in my Drupal root folder with the content:
when I run it, it successfully shows the data of the current user session. So I guess my problem described above has to do with domain names or something like that... what do you think?
Comment #17
danyalejandro commentedFinally did it!
Based on your code, I made a version of the function that works out-of-box and you can place the kcfinder folder anywhere you want... I don't really understand much of it tough (I combined stuff from many sources) but at least it works now.
The only extra configuration required for kcfinder is setting the upload url...
Hey... how about we publish this as a module?
Comment #18
danyalejandro commentedI published the module in http://drupal.org/project/kcfinder , the problem is, I've never used GIT before and I want to turn it into a dev relase... oh well.
Could you please take a look in the code? this needs some serious testing...
Comment #19
Niremizov commentedOk. I'am in.
Comment #20
Wolfgang Reszel commentedThis issues seems to be fixed, but I still can't select KCFinder in the CKEditor profiles. The linked module is just for the WYSIWYG module only, but not the standalone CKEditor module.
Comment #21
Wolfgang Reszel commented