Please find attached the javascript to allow a group of files to be shown as a slideshow by using
class="colorbox-slideshow" instead of applying it globally in admin configuration.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | colorbox-921090-4.patch | 617 bytes | hutch |
| colorbox-slideshow.js_.txt | 318 bytes | hutch |
Comments
Comment #1
frjo commentedI think I would prefer to add this to the existing colorbox-load script. Via the query string you can already make width, eight and iframe settings. It would be easy to add slideshow as an option.
It would look something like this when used.
Would that work for you?
Comment #2
hutch commentedJust looking at the code in colorbox-load.js I would have thought it would work.
I have also got it to work by copying the code in colorbox-slideshow.js_.txt into my theme's script.js, tested on bluemarine.
Comment #3
hutch commentedCopying the code in colorbox-slideshow.js_.txt into my theme's script.js had one unintended side-effect, it overrode the original colorbox.js, this was easily cured by changing Drupal.behaviors.initColorbox to Drupal.behaviors.initColorbox1. Obvious really once I stopped to think about it.
Comment #4
hutch commentedWhile I'm on a roll, here is a patch on colorbox_load.js that does as you suggest in #1
Tested in a page already containing a regular gallery as well as the script.js method described earlier, all 3 work on the same page.
Comment #5
frjo commentedCommitted #4 to 6-dev, thanks hutch!