Hello,
I've got trouble to understand how to set up fckeditor in the case where multiply users can use the editor and where each user 's got his own /userfiles/ directory.
My configuration:
/www/server/fckeditor/
Userfiles:
/www/aafx/userfiles/
/www/retrometro/userfiles/
So I need different configuration for my filemanager, but I dunno how to do that. Is there a simple way to pass some variables to each config.php (I use PHP ^^) when starting fckeditor in the code ?
Thank you for your help.
Swann
I've got trouble to understand how to set up fckeditor in the case where multiply users can use the editor and where each user 's got his own /userfiles/ directory.
My configuration:
/www/server/fckeditor/
Userfiles:
/www/aafx/userfiles/
/www/retrometro/userfiles/
So I need different configuration for my filemanager, but I dunno how to do that. Is there a simple way to pass some variables to each config.php (I use PHP ^^) when starting fckeditor in the code ?
Thank you for your help.
Swann

Re: One fckeditor, different /uSerFiles/, how do it ?
$oFCKeditor = new FCKeditor('FCKeditor1'); $oFCKeditor->BasePath = $site.'fckeditor/'; $oFCKeditor->Height = '500' ; $oFCKeditor->Value = $func->getText(); $oFCKeditor->ToolbarSet='perso';Re: One fckeditor, different /uSerFiles/, how do it ?
Re: One fckeditor, different /uSerFiles/, how do it ?
I think I would do it this way (I assume that before allowing user to edit files, user must log in somehow):
in config.php files for file browser, replace $Config['UserFilesPath'], $Config['UserFilesAbsolutePath'] and all other values which you need with $_SESSION array, e.g. $_SESSION['UserFilesPath'].
Then simply set this values while logging user in.
When user opens file browser and $_SESSION['UserFilesPath'] is not set, redirect user to the login page.
Of course you would also have to add session_start(); at the beginning of each executed PHP file (or set session.auto_start to 1 in php.ini);
Hidden fields might not be the best solution, because it may cause security issues when user change this hidden field and you don't perform aditional checks.
Wiktor Walc
CTO, CKSource - http://cksource.com
--
Follow CKEditor on: Twitter | Facebook | Google+
Re: One fckeditor, different /uSerFiles/, how do it ?
$fckphp_config['UserFilesPath'] = "/wp-content/blogs.dir/2/UserFiles"
<?php
global $Config ;
// SECURITY: You must explicitelly enable this "uploader".
$Config['Enabled'] = true ;
// Path to uploaded files relative to the document root.
$Config['UserFilesPath'] = '/UserFiles/' ;
$Config['AllowedExtensions']['File'] = array() ;
$Config['DeniedExtensions']['File'] = array('php','php3','php5','phtml','asp','aspx','ascx','jsp','cfm','cfc','pl','bat','exe','dll','reg','cgi') ;
$Config['AllowedExtensions']['Image'] = array('jpg','gif','jpeg','png') ;
$Config['DeniedExtensions']['Image'] = array() ;
$Config['AllowedExtensions']['Flash'] = array('swf','fla') ;
$Config['DeniedExtensions']['Flash'] = array() ;
?>
Re: One fckeditor, different /uSerFiles/, how do it ?
It seems a really good idea, I'll try to set up something like that.
See ya
Swann
Re: One fckeditor, different /uSerFiles/, how do it ?
For example, FCKeditor is run from site1.com and I want to connect to site2.com/username/userfiles etc.
Anyone know how to set this?
Thanks,
Alex