I use version 2.3.1, with php. I haven't upgraded yet because I had to alter the code because my server can't use $_GET but still uses $HTTP_GET_VARS.
I've got it working for month now on 1 site and now and want to use it on another site. I use multiple sites on one domein, but I don't want to use a new copy of the editor over and over again.
So my site root is:
[site1]
[userfiles]
[Image]
*.jpg
[File]
*.pdf
[site2]
[userfiles]
[Image]
*.jpg
[File]
*.pdf
[site3]
[userfiles]
[Image]
*.jpg
[File]
*.pdf
[fckeditor]
So when creating the form I use one instance of FCKEditor. This works create, only the browse and upload if images isn't working.
To create the editor I use:
[php]
$oFCKeditor = new FCKeditor($name);
$oFCKeditor->Width = "80%";
$oFCKeditor->Height = "480";
$oFCKeditor->ToolbarSet = "NWPCS";
$oFCKeditor->BasePath = "/FCKeditor/";
$oFCKeditor->Config['BaseHref'] = constant("oFCKeditor_BaseHref");
$oFCKeditor->Config['UserFilesPath'] = "/" . strtolower(constant("sitename")) . "/UserFiles/";
$oFCKeditor->Value = $value;
$oFCKeditor->Create();
[/php]
where
constant("oFCKeditor_BaseHref") and
constant("sitename")
are set in the sites config file.
But $oFCKeditor->Config['UserFilesPath'] isn't used when I go to the config file of the browser/upload I've got:
$Config['Enabled'] = true ;
// Path to user files relative to the document root.
$Config['UserFilesPath'] = '/site1/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'] = '/localDir' . $Config['UserFilesPath'];
But I keep getting to browse to /site1/UserFiles/ even if I've set
$oFCKeditor->Config['UserFilesPath'] = "/site2/UserFiles/";
when creating the editor.
If I comment
$Config['UserFilesPath'] and
$Config['UserFilesAbsolutePath']
nothing changes.
Is this problem solved in the latest version or do I have to set something else?
It would also be nice if the latest version would be backwards compatible with older versions of PHP though.
Thanks
Paul
Sun, 11/26/2006 - 06:32
#1
RE: $oFCKeditor->Config['UserFilesPath'] isn
$oFCKeditor->Config['CustomConfigurationsPath'] = "./../../site2/includes/FCKeditorConfig.php";
with:
[php]
global $Config ;
// Path to user files relative to the document root.
$Config['UserFilesPath'] = '/site2/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'] = '/localDir' . $Config['UserFilesPath'];
[/php]
but no luck.
I'm out of options now. I've made a bug report as well on this topic. Hopefully somebody can help me.
--
Thanks
Paul