Hello, I have just recently started using CKFInder and CKEditor (Wonderful program I might add) and I ran into an issue. There is one thing I am trying to do that I can't quite figure out how to do. For what I am needing..I need each "user" to have a different folder. So basically what I am doing is setting up a new folder for each user as their accounts are created. These are all being loaded under ckfinder/userfiles/idofuser where idofuser
is the user id. So when a user is logged in I was using their session data to create an instance of CKFinder as shown below:
The following code accomplishes a few things that I need. First off when they are looking at the download tab, and then upload a file to server like that it defaults to the right folder. However there are some issues with this.
1) When they go to "browser server" instead it starts them at the root...not at their folder.
2) I want to also restrict them to ONLY see their folder. Meaning they can only upload stuff to the folder of their ID as well as not be able to run through the rest of the folders and/or delete files.
Is this possible? Any advice would be greatly appreciated.
is the user id. So when a user is logged in I was using their session data to create an instance of CKFinder as shown below:
<label for="home_editable"><b>Home Page:</b></label>
<textarea name="home_editable" id="home_editable"><?php echo $home_editable; ?></textarea>
<script type="text/javascript">
// CKEditor + The configuration options.
CKEDITOR.replace( 'home_editable',
{
filebrowserBrowseUrl : '/ckfinder/ckfinder.html',
filebrowserImageBrowseUrl : '/ckfinder/ckfinder.html?Type=Images',
filebrowserFlashBrowseUrl : '/ckfinder/ckfinder.html?Type=Flash',
filebrowserUploadUrl : '/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Files¤tFolder=<?php echo $this->session->userdata('funeralhome_id'); ?>',
filebrowserImageUploadUrl : '/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Images¤tFolder=<?php echo $this->session->userdata('funeralhome_id'); ?>',
filebrowserFlashUploadUrl : '/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Flash¤tFolder=<?php echo $this->session->userdata('funeralhome_id'); ?>',
toolbar : 'FuneralWebsite'
});</script>
<br />
The following code accomplishes a few things that I need. First off when they are looking at the download tab, and then upload a file to server like that it defaults to the right folder. However there are some issues with this.
1) When they go to "browser server" instead it starts them at the root...not at their folder.
2) I want to also restrict them to ONLY see their folder. Meaning they can only upload stuff to the folder of their ID as well as not be able to run through the rest of the folders and/or delete files.
Is this possible? Any advice would be greatly appreciated.

Re: Question concerning folder restriction
I changed my call to
<label for="home_editable"><b>Home Page:</b></label> <textarea name="home_editable" id="home_editable"><?php echo $home_editable; ?></textarea> <script type="text/javascript"> // CKEditor + The configuration options. CKEDITOR.replace( 'home_editable', { filebrowserBrowseUrl : '/ckfinder/ckfinder.html', filebrowserImageBrowseUrl : '/ckfinder/ckfinder.html?Type=Images', filebrowserFlashBrowseUrl : '/ckfinder/ckfinder.html?Type=Flash', filebrowserUploadUrl : '/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Files', filebrowserImageUploadUrl : '/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Images', filebrowserFlashUploadUrl : '/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Flash', toolbar : 'FuneralWebsite' });</script>Then in the config file I have set these up:
$baseUrl = '/ckfinder_userfiles/' . $CI->session->userdata('funeralhome_id'); $baseDir = resolveUrl($baseUrl);I am trying to setup the base directory and baseurl based off of that. Any advice on how to make this work? Is this the correct way to setup basedirectory and base_url?
Re: Question concerning folder restriction
Took me a little digging but I got it. Doing that in the config file worked. Thanks again.