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.

CommentFileSizeAuthor
#4 colorbox-921090-4.patch617 byteshutch
colorbox-slideshow.js_.txt318 byteshutch
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

frjo’s picture

I 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.

<a href="path/to/something?slideshow=true" class="colorbox-load" …

Would that work for you?

hutch’s picture

Just 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.

hutch’s picture

Copying 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.

hutch’s picture

FileSize
617 bytes

While 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.

frjo’s picture

Status: Active » Fixed

Committed #4 to 6-dev, thanks hutch!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.