Skip to content
This repository has been archived by the owner on Nov 20, 2024. It is now read-only.

Upload problems.. #3

Open
ghost opened this issue Jan 11, 2014 · 4 comments
Open

Upload problems.. #3

ghost opened this issue Jan 11, 2014 · 4 comments

Comments

@ghost
Copy link

ghost commented Jan 11, 2014

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?

@deadpool010
Copy link

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/

@ghost
Copy link
Author

ghost commented Jan 11, 2014

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

@deadpool010
Copy link

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

@ghost
Copy link
Author

ghost commented Jan 11, 2014

[email protected]

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant