multi-gallery-example icon indicating copy to clipboard operation
multi-gallery-example copied to clipboard

Upload problems..

Open ghost opened this issue 12 years ago • 4 comments

I see a problem. I basically have my website setup so an admin can upload files which the php will create the folder, but if I am correct for the lightbox feature to work you have to change this code each time you add a folder?

" $(document).ready(function() { $("a[rel='flyers']").colorbox({maxWidth: "90%", maxHeight: "90%", opacity: ".5"}); } ); " Is there anyway to automate this instead of me having to come in and add it every time a new photo album is created?

ghost avatar Jan 11 '14 21:01 ghost

Hi,

I have a similar set up where admins can create and delete photos and galleries using Uber Gallery. This is how I accomplished the task:

$(document).ready(function(){ <?php

  chdir('galleries');
$dirs =  glob('*', GLOB_ONLYDIR);

  foreach($dirs as $val)   

    {
      echo('$("a[rel=\''.$val.'\']").colorbox({maxWidth: "90%", maxHeight: "90%", opacity: ".5"});');
    }
  chdir('../');
  ?> 
}

);

I know there is probably a "cleaner" way to do this but hey, it works. I have a working example if you would like to test it out. Let me know and I will email you the log in. http://trend-source.com/multi-gallery-example/

deadpool010 avatar Jan 11 '14 21:01 deadpool010

That works great. Sure I would like to check it out, anything that makes it easier for my users and admins.

ghost avatar Jan 11 '14 21:01 ghost

sure, what is your email and I will give you the log in info.

deadpool010 avatar Jan 11 '14 21:01 deadpool010

[email protected]

ghost avatar Jan 11 '14 21:01 ghost