[eluser]valajbeg[/eluser]
There is much easier way to do that.
Open config.php in CKFinder and there is $config array variable $config['ResourceType'][]
Adjust settings as you need and when you load.
Example config, you can add as much different configs as you wish
Code:
$config['ResourceType'][] = Array(
'name' => 'DEFINE-YOUR-NAME',
'url' => $baseUrl . 'images',
'directory' => $baseDir . 'images',
'maxSize' => "20M",
'allowedExtensions' => 'bmp,gif,jpeg,jpg,png',
'deniedExtensions' => '');
and when you call popup with button call it OnClick =
Code:
BrowseServer( 'DEFINE-YOUR-NAME:/', 'field_name' );
If you want to automatically select specific folder inside just add path after DEFINE-YOUR-NAME:/FURTHER-PATH
and that is it
p.s. you have to define
$baseUrl behind as "deep as possible
that is obvious but just in case