Hi,
I want to use CKFinder to manage separately generated folders full of images, so I need to be able to set the base folder from within the page that calls the ckfinder instance. Is it possible to do this? I'm using PHP.
Also, I don't want all the automatically generated sub-directories. Is it possible to turn these off?
I tried looking through the docs but ended up tying my brain in knots and getting nowhere!
I want to use CKFinder to manage separately generated folders full of images, so I need to be able to set the base folder from within the page that calls the ckfinder instance. Is it possible to do this? I'm using PHP.
Also, I don't want all the automatically generated sub-directories. Is it possible to turn these off?
I tried looking through the docs but ended up tying my brain in knots and getting nowhere!
Re: set baseURL outside config.php, also turning off sub-fol
In such case, simply comment out definitions of "Images" and "Flash" resource types and configure the following resource type according to your needs:
Wiktor Walc
CTO, CKSource - http://cksource.com
--
Follow CKEditor on: Twitter | Facebook | Google+
Re: set baseURL outside config.php, also turning off sub-fol
Thanks, but I'm still confused. This looks like it needs to go into my config.php file (I tried putting in the file that calls ckfinder but it just broke).
What I really need is to be able to set the base directory from outside of config.php, because it's variable.
I have a file called ckfinder.php, which I call with something like 'server/admin/ckfinder.php?folder=foldername' and I want to be able to pass that folder name with a set path before it to ckfinder, eg /server/images/galleries/foldername.
I did think of trying out setting a session variable to pass the foldername on to config.php, but this could cause problems with another instance of ckfinder which is integrated into ckeditor on the same admin site, so hopefully it's something I can set within this code:
I hope that makes sense. It's to go within an admin site for a photographer to administer a set of galleries, so he can add and remove images from them.
(the turning off sub-folders was a separate query, which is less important for now and doesn't look too hard from what you've said. I probably shouldn't have asked both at the same time!)
Re: set baseURL outside config.php, also turning off sub-fol
to make use of the session variable I set. (of course also putting session_start(); at the top of config.php and my page that calls ckfinder)
for some reason this kills the baseURL variable so I end up with the entire server root in there.... I don't think there's anything wrong with my session variable - I have this very simple piece of code to generate it:
An example output of $_SESSION['ckfolder'] would be '/images/galleries/test/'.
Any ideas why it's misbehaving?
Re: set baseURL outside config.php, also turning off sub-fol
Another thing I'd like to add is that you should avoid constructing sever side path using a value taken from the url ($_GET['folder']).
Wiktor Walc
CTO, CKSource - http://cksource.com
--
Follow CKEditor on: Twitter | Facebook | Google+