0

I have a multi-domain site setup with domain access module. In each domain users are allowed to post their own contents with media upload settings. I am using CKEditor and CKFinder together.

Now, I want to disable the "Browse Server" Button but the local Browse button will be there.

I am unable to find the settings(which I think not in Drupal admin) or the code to edit to fixup this. https://stackoverflow.com/questions/3610041/ckeditor-with-ckfinder-disable-filebrowser-keep-upload-functionality This one didn't helped my either. Any help on this?

1 Answer 1

1

Well I have found that patch solution. So just answering my own question. In sites/all/modules/ckeditor/includes/ckeditor.lib.inc file,

There is a section as


if (user_access('allow CKFinder file uploads')) {
                $ckfinder_full_path = $host . ckfinder_path();
                //$settings['filebrowserBrowseUrl'] = $ckfinder_full_path . '/ckfinder.html?id=' . $profile_name;
                //$settings['filebrowserImageBrowseUrl'] = $ckfinder_full_path . '/ckfinder.html?Type=Images&id=' . $profile_name;
                //$settings['filebrowserFlashBrowseUrl'] = $ckfinder_full_path . '/ckfinder.html?Type=Flash&id=' . $profile_name;
                $settings['filebrowserBrowseUrl'] = '';
                $settings['filebrowserImageBrowseUrl'] = '';
                $settings['filebrowserFlashBrowseUrl'] = '';
                $settings['filebrowserUploadUrl'] = $ckfinder_full_path . '/core/connector/php/connector.php?command=QuickUpload&type=Files&id=' . $profile_name;
                $settings['filebrowserImageUploadUrl'] = $ckfinder_full_path . '/core/connector/php/connector.php?command=QuickUpload&type=Images&id=' . $profile_name;
                $settings['filebrowserFlashUploadUrl'] = $ckfinder_full_path . '/core/connector/php/connector.php?command=QuickUpload&type=Flash&id=' . $profile_name;
            }

So I commented the actual filebrowserBrowseUrl, filebrowserImageBrowseUrl & filebrowserFlashBrowseUrl settings and made those as blank. That did the trick.

2
  • Is there no alternative without hacking the code?
    – Gokul N K
    Commented Aug 25, 2013 at 13:14
  • as of now I haven't. :( Commented Aug 25, 2013 at 13:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.