Big thanks for your work. I'm very like it, but I have а problem. Unfortunately right now I can't give the link because I developing locally in Denwer, but I'll try to describe my problem thoroughly.
For my product I need to change path for galleries dynamically. So your code was modified:
1. All occurences of '/galleries/' in *.js changed to variable current_gallery_path.
2. All occurences of '/galleries/' in *.php changed to $settings (maybe it's not beautyful decision, but I have not found another way)
Of course changed only path strings, not function and variable names - chechked thoroughly.
3. current_gallery_path connected with $settings :
var current_gallery_path = <?php echo printValue($settings['current_gallery_path'])?>;
Now I have strange situation:
$settings['current_gallery_path'] = 'mygallerypath' ;
(actually in settings.php, but I tried in anoter places) works well and shows the galleries by needed path, but
$var_from_outside = 'mygallerypath';
$settings['current_gallery_path'] = $var_from_outside;
shows me the contents of parent(to mygallerypath) directory and "no images" message.
mygallerypath is on the same level as "stock" galleries directory, all slashes in code is on their places (checked very many times). The scope of $var_from_outside is global, php-debugger shows correct values for $var_from_outside and $settings till whole script executed.
After 3 days of debugging I have no idea what happens. So could you please tell me what goes wrong?
Thanks for your answer and sorry for poor English - it's not my native language.