Drupal + Ckfinder + multisites + Muliuser

nikkelei - September 24, 2009 - 18:16
Project:FCKeditor - WYSIWYG HTML editor
Version:6.x-1.4
Component:Code
Category:support request
Priority:normal
Assigned:Unassigned
Status:active
Issue tags:ckfinder, Drupal, multisite, multiuser
Description

Hello!

Ok so right now I have a working install of FCKeditor and CKfinder under Drupal 6.14. My setup is like this:

Drupal 6.14
Fckeditor module 1.4
fckeditor 2.6.5
ckfinder 1.4

So far everything works great, and I have to say that I'm very pleased with the performance and capabilities of the little Ckfinder plugin, but now I want to take it a step further.

What I want to do is to enable CKfinder to work in a multisite setup with multiple users who will have their own directory where they can place their own files, make their own directories and so on. By multisite setup I refer to running several different domains off the same codebase/same installation of Drupal.

My solution to this problem would be something like this:

First for the sake of simplicity lets assume that I wish to keep ALL user files in the /sites/default/files/ directory within the Drupal installation. Further lets also assume that I want to use 2 different domains each with one unique user: http://www.mydomain.com and http://www.yourdomain.com and the the users "me" and "You".

So in our Drupal instalation we'd have a directory structure that looks like this:

/sites/default/files/mydomain/me/
/sites/default/files/yourdomain/you/

Now I have considered many solution, but I'll start of with what I think would be he simplest. It seems like setting the $baseUrl variable in the config.php overrides the path set in the Drupal FCKeditor module under administer>site configuration>FCKeditor>---choose some profile--->file browser settings

The line in question is underneath the ckfinder directory in the config.php file. Right now it looks like this:

$baseUrl = '/sites/default/files/';

How would I go about making CKfinder honour the FCKeditor path?

#1

AntoineSolutions - September 29, 2009 - 21:08

Hi nikkelei,

I haven't looked into this specific use of the CKfinder, but I noticed your multisite setup is different then how I have seen it done and how I use it. With your given scenario, I would setup multisite with the following file/folder structure:

- drupal
  - sites
    - mydomain.com
      - files
    - yourdomain.com
      - files

With this setup, you shouldn't have to set the $base_url variable which is known to have undesired side effects. Hope this helps some.

Cheers,

Antoine

 
 

Drupal is a registered trademark of Dries Buytaert.