Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
flashvars are supported on the Lightbox settings page, but they are applied to all Lightbox links. some flashvars are meant to be different for each link (e.g. preview image, description, author, etc -- http://developer.longtailvideo.com/trac/wiki/FlashVars).
we need a way of adding additional flashvars on a case-by-case basis, in addition to the "universal" flashvars on the Lightbox settings page.
Comment | File | Size | Author |
---|---|---|---|
#18 | lightbox2_361870_3.patch | 1.91 KB | jrust |
#17 | lightbox2_361870_2.patch | 1.33 KB | jrust |
#14 | lightbox.js.txt | 40.69 KB | ncy |
#1 | lightbox2_361870.patch | 899 bytes | ncy |
Comments
Comment #1
ncy CreditAttribution: ncy commentedhere's a patch -- it introduces an optional new attribute "flashvars" for each Lightbox link. it adds these flashvars to the flashvars that are set on the Lightbox settings page.
example use:
-nick
Comment #2
jfolwarski CreditAttribution: jfolwarski commentedI just wanted to say thanks for posting this patch. It worked great me.
Comment #3
jfolwarski CreditAttribution: jfolwarski commentedAs a side note did you have any problems using this patch in IE? My flash player disappears and is replaced with a white box with a scroll bar. Any solutions?
Comment #4
jfolwarski CreditAttribution: jfolwarski commentedI just got it to work as in IE now. It was a problem with the way I entered in the flashvars. I can't say exactly now I screwed it up so only IE wouldn't work. It does work though with the correct formatting of the flashvars.
Comment #5
ncy CreditAttribution: ncy commentedglad i could help! :) thanx also for the update posts on IE
cheers,
-nick
Comment #6
gburnham CreditAttribution: gburnham commentedI would also like to add my voice to the chorus of Thank Yous. You solved my problem (http://drupal.org/node/304560#comment-1458286) as well nyc - thanks.
Greg
Comment #7
ecantelo CreditAttribution: ecantelo commentedSorry for being a dolt, but I've been teaching myself all this to build my own website. Could you tell me where the patch goes within the lightbox.js file? I've been trying to use lightbox2 for embedded Vimeo videos and it's proved to be a rocky road.
Thanks so much, will appreciate any and all help!
Comment #8
ncy CreditAttribution: ncy commentedyou should be able to use the "patch" command to update the old file to the new one. if you want to do it manually, the lines with a + mean lines that should be added.
on Windows, you can install Cygwin to patch. http://drupal.org/node/32875
hth
Comment #9
ecantelo CreditAttribution: ecantelo commentedWell after ignoring my website for months, I'm back at it. Let's see, I'm on a mac using dreamweaver and cannot find this "patch" command you speak of. So if I add the + lines manually, where in the lightbox.js do I insert them? Or should I be including them in js in the first place? Any help would be much appreciated, I basically have little to no idea what I'm doing, so thanks for your patience. :)
Comment #10
ncy CreditAttribution: ncy commentedi recommend using the patch command. less room for error. here's a guide for mac OSX
http://drupal.org/node/60818
basically, you have to open up a Terminal (should be located in applications->utilities i think?).
so basically something like:
$ patch -p0 < lightbox2_361870.patch
but i think you need to be in the right directory with files in the right places.
Comment #11
ecantelo CreditAttribution: ecantelo commentedThanks for the patch details. Just realized part of the problem is that I've got lightbox 2.04, and the patch looks like it is for version 2.0 - Any suggestions? Can I just go into the patch and change the file name from 2 to 2.04? I have no idea! :) Greatly appreciate the help!
Comment #12
ncy CreditAttribution: ncy commentedthe filename is lightbox.js in the js folder. it shouldn't make changes to any other file.
if you really want to do it the old-school manual way, just look in the patch file at the lines around the + lines. those are the context lines so you know where you are in the code. and add in those + lines.
i haven't looked at 2.04, but i assume there hasn't been much change to the lightbox.js file?
Comment #13
ecantelo CreditAttribution: ecantelo commentedYeah, I don't know if this is the full patch, but this is the only line of code it added when I ran the patch:
if (rel_parts["flashvars"])
Lightbox.flvFlashvars = Lightbox.flvFlashvars + '&' + rel_parts["flashvars"];
Does that seem right to you? I STILL can't seem to get embedded vimeo content to work with it though. Any ideas?
This is exactly what vimeo gives me and I'm not fully sure where to add it, if I use a href or I've seem some writing on using emfields - but I have no idea how to activate them. And this goes to show you how little I know, I can't figure out how to show the embedding vimeo code without this site trying to implement the code into this post... Arghh, if you need it I would be more than happy to directly email you.
(And again I'm on, Mac osx, using dreamweaver CS3, lightbox 2, and embedded vimeo content)
Thanks so much for all your help and patience, I am utterly clueless when it comes to this stuff. If you know anyone in Los Angeles who knows this stuff, let me know! :)
Comment #14
ncy CreditAttribution: ncy commentedseems like it should've added more than that ... i'm attaching my lightbox.js file. my lightbox version is 6.x-1.9
vimeo content? is that your goal? this patch might not be necessary in this case i think?
check out this screencast:
http://mustardseedmedia.com/podcast/episode22
it uses emfield, CCK, and Views.
Comment #15
ecantelo CreditAttribution: ecantelo commentedThanks, that was really helpful!
I also recently discovered "Video LightBox", that actually generates everything you need, thumbnails, code, etc for a lightbox like effect that works great with Vimeo videos - It's definitely got some bugs and really weird file organization, but quite a relief for a web-design laymen like myself. I hope this helps someone else!
http://videolightbox.com/
Cheers!
Comment #16
jrust CreditAttribution: jrust commentedWorks great for me as well. Many thanks.
Comment #17
jrust CreditAttribution: jrust commentedEncountered a problem with the original solution which is that TinyMCE strips out the flashvars attribute because it's not a valid attribute for an anchor tag (and I imagine this would also cause a page not to validate against W3C). So, I've attached a patch which makes flashvars an optional style attribute in the rel part. Example:
This passes through TinyMCE without any problems and has the added benefit of keeping all the lightvideo settings in the same part of the tag.
Comment #18
jrust CreditAttribution: jrust commentedUpdating the patch to fix a couple bugs that popped up, specifically that in IE the video wasn't playing at all when the thumbnail was passed.
Comment #19
stella CreditAttribution: stella commentedCommitted, thanks!
Comment #21
m4oliveiHey,
Great that this patch got in, thanks a bunch. I'm using 6.x-1.11.
I found there is a small gotcha with this patch however. If your showing your videos in a group, the unique flashvars per link only apply to the first video that is opened up in the lightbox. For example say I have the following two video links:
If I click 'Test Video 1' the lightbox correctly opens using the flashvars in its rel attribute and shows the preview image of pegunins.jpg. If I then flip to the next video inside the lightbox, the flashvars remain the same and the preview image is still penguins.jpg, when it should change to be hydrangeas.jpg.
The work around is of course to not use grouping, however thats less than ideal. If anyone can see something I'm doing wrong please let me know, otherwise, if our client comes back and says they need the grouping, I'll look at creating a patch. From the limited debugging I've done so far, the issue seems to stem from the fact that Lightbox.parseRel() isn't called as part of a slide flip.
Thanks,
Matt