I am using CKEditor with KCFinder – i’d like to have personal upload files based on a dynamic value.
I’d like to dynamically change the folder that users can upload based on a SESSION value once they are logged in.
Once logged in i’d like to restrict the folder that a user can access via the KCFinder plugin
So eg..
User abc their path would be abc/images
User foo their path would be foo/images
User abc cannot see foo's images & vice-versa
I had the same issue and to make things worse it depends on who logged in, administrator or a standard member.
Granted I integrated it into TinyMCE but I think the principles are the same
Here is my solution to the problem
My folder structure is
Initialise the php session at the top of the config.php file
session_start()
Edit the ‘types’ => array and comment out all the different ‘types’
Add the following ‘type’ to the array
$_SESSION[‘fold_type’] => “*img swf flv avi mpg mpeg qt mov wmv asf rm”,
Save your config.php file
Open your application page where you initialise your editor and call KCFinder
Before initialising your editor, add the following lines declaring the various KCFinder variables
or
7 Leave the line where you call the uploader like this;
Set upload folder dynamically for KCFinder