Hi, Im using the latest development release, due to some needs our site has.
To ease the work of publishing authors, we've activated the module so it will work on any link pointing to an image. It works beautifully through out the site, however there is one side-effect which is making us reconsider this option:
We use views_galleriffic to present galleries to our users, and it ends up that the thumbnails use a href="#number", where #number is the css ID of the image to switch to in the gallery. Shadowbox picks up these links as if they were direct file links to images, opens up them in the shadowbox, and includes it in the shadowbox gallery.
This is unacceptable in this context of course, and I was wondering if it was at all possible to provide a css selector to exclude from the shadowbox functionality, but keep the rest of the site auto.
I haven't found a way, but perhaps it is doable through some custom coding. Any pointers as to how it's best to approach this?
Comments
Comment #1
nicholas.alipaz commentedI somehow doubt the href on those items is actually set to
href="#number"since the code in shadowbox is set to do$("a[href$='jpg'], a[href$='png'], a[href$='gif'], a[href$='jpeg'], a[href$='bmp'], a[href$='JPG'], a[href$='PNG'], a[href$='GIF'], a[href$='JPEG'], a[href$='BMP']").That being said, if those links have a particular class set on them then you could easily put something in your theme's js file or a separate custom module to fight off the "automatic" function.
Something like:
This is a simple alteration of the regular shadowbox_auto.js file's function. You will need to change the class on line 5 of course. But if you put that in your own js file then it should override the original.
--
Los Angeles Web Design and development for Drupal.
Comment #2
manuel garcia commentedOutstanding nicholas.alipaz thanks very much for your reply.
I will test out if this fixes our problemm, in any case that code or a variation of it will probably get us there.
Thanks again!
Comment #3
nicholas.alipaz commentedYou're welcome and please reopen this issue if you have issues.
--
Los Angeles Web Design and development for Drupal.