Question

When you click on the image icon and then "browse server" button , i get only one folder ( the images folder ). But when i click on the "Link" button , i get all the folders.

I want when i click on the Link button to see only a particular folder

As you will see below on the picture , the time when i get only the images folder is when in the url there is a type=Images.

So i see a possible solution to my problem by trying to add a type=folder name or some type defined in the config.php in the kcfinder folder.

But then again , i can't seem to find where the link is generated. I looked in ckeditor/plugins/image/dialogs/images.js and ckeditor/plugins/link/dialogs/link.js

the only clue i got is this

{
    type : 'button',
    id : 'browse',
    hidden : 'true',
    filebrowser : 'info:url',
    label : commonLang.browseServer
}

but no matter what i changed , it didn't work. ( i tried to change the 'info:url' to some url but to no success )

Here is the picture , maybe i will update my question when i get back home ( in 15-20min ). And sorry about the caps in the picture , was trying to make the text easier to read. Ask any questions , i know that my problem may sound confusing , i will answer when i get back. Now the picture

hope this helps

EDIT: Thank you AlfonsoML. Your answer drove me in the right direction, i had a custom plugin named Link2 that was supposed to point to the folder "Files"

here is how i did it

$ckeditor->config['filebrowserLink2BrowseUrl'] = '/ckfinder/ckfinder.html?type=Files';

At first i didn't think this would work with custom plugins, but as it turns out , it does ! Again thank you and hope my edit helps other people with the same problem :)

Was it helpful?

Solution

You can change the Type sent by using a manual integration of CKFinder instead of using the helper functions. Just look at this doc and adjust it to your needs:

$ckeditor = new CKEditor();
$ckeditor->basePath = '/ckeditor/';
$ckeditor->config['filebrowserBrowseUrl'] = '/ckfinder/ckfinder.html';
$ckeditor->config['filebrowserImageBrowseUrl'] = '/ckfinder/ckfinder.html?type=Images';
$ckeditor->config['filebrowserFlashBrowseUrl'] = '/ckfinder/ckfinder.html?type=Flash';
$ckeditor->config['filebrowserUploadUrl'] = '/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Files';
$ckeditor->config['filebrowserImageUploadUrl'] = '/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Images';
$ckeditor->config['filebrowserFlashUploadUrl'] = '/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Flash';
$ckeditor->editor('CKEditor1');
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top