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 ?
Re: One fckeditor, different /uSerFiles/, how do it ?
Good day !
Nobody has never tryied to do what I'm trying to do ???
I'm thinking adding some hidden field with the path to the userfile when createHTML is called. But I don't know yet which javascript function I have to change to send the content of the field to the filemanager... Any help would be appreciate
Swann
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 ?
can you please help me ... i'm a bit confused

i use fckeditor 2.0 ... and i have 2 config.php files
first one is in /browser/mcpuk/connectors/php/ directory ... in which one there aren't any $Config[] codes at all
there is only 1 line ... which point to userfiles directory:
$fckphp_config['UserFilesPath'] = "/wp-content/blogs.dir/2/UserFiles"
another config.php file is in /upload/php/ directory ... in which i tried to change $Config with $_SESSION ... but it still didn't work well:
<?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() ;
?>
what should i do ... to allow user only access to their own directory
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