I tried to ask how to give different users different folders but to no avail. it took a while but i was able to solve this. im not good with javascript but i know php and figured out a solution so i hope this helps.
heres the situation:
admin = /assets/userfiles
user1 = /assets/userfiles/user1folder
user2 = /assets/userfiles/user2folder
etc...
basically i want each user to have thier own folders. to add a little flavor. i want my admin account to be able to access all folders of my user so my folder access is "higher".
the solution:
while tinkering around i found that everything gets started when the "index.html" is called. depending on your version you may find this in a different folder but i found mine here -> /filemanager/trunk/
open that html file and you will see that near the bottom of the source all the neccessary js file are being loaded 1 by 1.
i made a copy of my index.html page then turned it into index.php.
then i commented out the line -> <script type="text/javascript" src="scripts/filemanager.config.js"></script>. if you want you can just delete it.
then in place of that script put these php code:
<?php
$folder = $_SESSION['userfoldername']."/";
echo "<script type='text/javascript'>";
echo "var lang = 'php';";
echo "var fileRoot = '/assets/userfiles/".$folder."';";
echo "var showThumbs = true;";
echo "</script>";
?>
now instead of calling the function as:
CKEDITOR.replace('instancename', {
filebrowserBrowseUrl: '[Path to Filemanager]/index.html',
...other configuration options...
});
do this:
CKEDITOR.replace('instancename', {
filebrowserBrowseUrl: '[Path to Filemanager]/index.php',
...other configuration options...
});
the same applies if you are using it as a standalone file manager or as a file picker. just change the .html extension to .php when initializing it.
In my case i pulled the data from my session variables and built the "fileRoot" variable accordingly to give each user a unique folder. using this i can now give each user their own folder and even set the depth of their folder. ex: admin folder is /assets/userfiles/ while a regular users folder is /assets/userfiles/somename1/somename2/somename3/regularuserfolder/.
If you will use session, dont forget to start it or else it wont work.
PEACE!