Hi,
I'm the maintainer of Field Slideshow, and one of the options is to open images in Colorbox.
Everything is working fine, but I'm trying to add an option to start the slideshow in Colorbox when an image is opened in Colorbox.
For now, links look like this:
<a href="/sites/default/files/japart.png" class="colorbox" rel="field-slideshow[2]">
so perhaps it should be somethink like:
<a href="/sites/default/files/japart.png?slideshow=true" class="colorbox" rel="field-slideshow[2]">
Tell me.
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | colorbox_load_bug_fix_ 1161342_9.patch | 1.4 KB | frjo |
| #7 | colorbox_load_bug_fix.patch | 801 bytes | frjo |
| #1 | colorbox_load_parameters.patch | 4.23 KB | frjo |
Comments
Comment #1
frjo commentedThere is settings for it on Configuration -> Colorbox. See under Styles and options -> Custom -> Slideshow settings. The settings makes this however a global option, not what you are looking for perhaps.
The attached patch make the colorbox-load feature accepts any Colorbox settings as url queries. You can see all the options at http://colorpowered.com/colorbox/.
Could you test the patch and see how it works for you? It's against the latest 7-dev code?
A link could look like this:
The class would need to change from "colorbox" to "colorbox-load". You would also need to enable Colorbox load in the Colorbox configurations.
My tips is that you run "variable_set('colorbox_load', 1)" in your module when users select to use the Colorbox function.
Comment #2
frjo commentedField Slideshow is a quite neat module! Believe I will use it on one of my current projects, thanks for developing it!
Comment #3
jdanthinne commentedThanks, and thanks again for the patch, I'll have a try this week-end.
Comment #4
frjo commentedCommitted patch #1 to 7-dev.
Comment #5
jdanthinne commentedMany Thanks.
Updated my module to use that, and it's working fine!
Comment #6
jdanthinne commentedMmm.
Just added an option in my module to choose between auto or manual slideshow, but it's not working.
If I choose Auto (and then adds
&slideshowAuto=true), it's ok, but Manual (&slideshowAuto=false) goes automatic as well…What's wrong?
Comment #7
frjo commentedDo you happen to have more than one colorbox-load link on the page? I have found a bug in my #1 patch. The bug make all settings the same as for the last link on the page. Sloppy testing by me.
Here are a patch that I believe will fix this bug.
Would be glad if you could test it.
Comment #8
jdanthinne commentedI've tested that with multiple links on the page, and it seems ok.
But #6 bug is still there… but I don't know if it's your module that's faulty or Colorbox itself…
Comment #9
frjo commentedAnother bug you found, thank you! It it wasn't so lame I would blame the hot climate I'm in at the moment ;-).
"false" (string) is not the same thing as false (bool).
This patch adds code that makes sure true/false values are sent to the Colorbox modules as bool.
Comment #10
frjo commentedCommitted patch #9 to 7-dev.
Comment #11
frjo commentedBetter title.
Comment #12
frjo commented