I am hosting multiple sites on a single codebase (via DNS tricks) using FCK as the editor. I have created objects in PHP5 that hold DB connection info and root paths for the current site being edited, but for some reason they are not recognized by the time FCK gets to the config.php file in the file manager.
For example, in the config.php file I have something like this:
// Path to user files relative to the document root.
$Config['UserFilesPath'] = "http://www." . $site->get('url') . '/UserFiles/';
// Fill the following value it you prefer to specify the absolute path for the
// user files directory. Usefull if you are using a virtual directory, symbolic
// link or alias. Examples: 'C:\\MySite\\UserFiles\\' or '/root/mysite/UserFiles/'.
// Attention: The above 'UserFilesPath' must point to the same directory.
$Config['UserFilesAbsolutePath'] = $site->get('rootPath') . '/UserFiles/';
I can't get this to work for the life of me. If I hard code the values stored in these objects, it works fine. I am certain the objects have been instantiated, as I make a call from the $site object right before the FCK editor is invoked and it is fine.
I am guessing this is a problem with scope. That prompted me to declare the object variable as global just after the Config variable, i.e.:
global $Config ;
This didn't help either. Any suggestions would be greatly appreciated as this is my final hold up for rolling out my new and improved CMS.
PHP Objects in connector config