I've been reading round for a while and i can't seem to find anything.
I am using FCK in my CMS. When a user uses the file browser to select a file I need the file browser to goto each users individual home area. This is based on a session variable. How can i set a different path for each user? I am using ASP.
Thanks
I am using FCK in my CMS. When a user uses the file browser to select a file I need the file browser to goto each users individual home area. This is based on a session variable. How can i set a different path for each user? I am using ASP.
Thanks

RE: Different user paths in File Browser
This is where I create the FCKeditor in PHP, should be similar in ASP:
include_once("path_to_fckeditor/fckeditor.php") ;
$oFCKeditor = new FCKeditor("editorname");
//don't use the default/config path
if (isset($oFCKeditor->Config['UserFilesPath']))
unset($oFCKeditor->Config['UserFilesPath']);
$userPath = "path/from/your/session/variable";
//THIS WILL REPLACE THE SETTINGS IN YOUR fckconfig.js!
$oFCKeditor->Config['ImageBrowserURL'] = $oFCKeditor->BasePath."editor/filemanager/browser/default/browser.html?Type=Image&Connector=connectors/php/connector.php&ServerPath=".$userPath;
$oFCKeditor->Config['LinkBrowserURL'] = $oFCKeditor->BasePath."editor/filemanager/browser/default/browser.html?Connector=connectors/php/connector.php&ServerPath=".$userPath;
$oFCKeditor->Config['LinkUploadURL'] = $oFCKeditor->BasePath."editor/filemanager/upload/php/upload.php?ServerPath=".$userPath;
$oFCKeditor->Config['LinkUploadURL'] = $oFCKeditor->BasePath."editor/filemanager/upload/php/upload.php?Type=Image&ServerPath=".$userPath;
...
...
...
Then, in editor/filemanager/browser/default/connectors/php/config.php (.../asp/config.asp in your case) comment the UserFilesPath setting:
//$Config['UserFilesPath'] = '/UserFiles/' ;
and also in editor/filemanager/upload/php/config.php (.../asp/config.asp in your case):
//$Config['UserFilesPath'] = '/UserFiles/' ;
I think that's all I do.
If there is an easier way I'd certainly be happy (anyone?). I really think the FCKeditor needs to implement a simple method to handle this.
RE: Different user paths in File Browser
I am a newbie at configuring FCKeditor. Anyway I cut and paste your code to the following but it doesn't work. Please help. My intention is to have the upload file resides in a folder outside the FCKeditor Folder. I have both Linux and Windows becasue my development PC is Windows and the web server is Linux.
The folder directory path in Linux are:
/public_html/admin/FCKeditor/fckeditor.php
The file using the FCKeditor resides on the directory path /public_html/admin/
The upload image file should reside on the directory path /public_html/uploadFiles/
----------
The folder directory path in Window are:
C:\folderName\folderName\folderName\public_html\admin\FCKeditor\fckeditor.php
The file using the FCKeditor resides on the directory path
C:\folderName\folderName\folderName\public_html\admin\
The upload image file should reside on the directory path
C:\folderName\folderName\folderName\public_html\uploadFiles\
------------------------------------------
include_once("FCKeditor/fckeditor.php") ;
$oFCKeditor = new FCKeditor("editorname");
//don't use the default/config path
if (isset($oFCKeditor->Config['UserFilesPath']))
unset($oFCKeditor->Config['UserFilesPath']);
$userPath = "C:\\folderName\\folderName\\folderName\\public_html\\UploadFiles\\";
//THIS WILL REPLACE THE SETTINGS IN YOUR fckconfig.js!
$oFCKeditor->Config['ImageBrowserURL'] = $oFCKeditor->BasePath."editor/filemanager/browser/default/browser.html?Type=Image&Connector=connectors/php/connector.php&ServerPath=".$userPath;
$oFCKeditor->Config['LinkBrowserURL'] = $oFCKeditor->BasePath."editor/filemanager/browser/default/browser.html?Connector=connectors/php/connector.php&ServerPath=".$userPath;
$oFCKeditor->Config['LinkUploadURL'] = $oFCKeditor->BasePath."editor/filemanager/upload/php/upload.php?ServerPath=".$userPath;
$oFCKeditor->Config['LinkUploadURL'] = $oFCKeditor->BasePath."editor/filemanager/upload/php/upload.php?Type=Image&ServerPath=".$userPath;
-----------------
In editor/filemanager/browser/default/connectors/php/config.php
Do I also comment this next line of code out? beside
//$Config['UserFilesPath'] = '/UserFiles/' ;
//$Config['UserFilesAbsolutePath'] = '' ;
?
Please help.
Much appreciated, Thank you
RE: Different user paths in File Browser
http://www.fckeditor.net
http://www.fckeditor.net