Lightbox2 automatic handling of videos in acidfree albums
voodoodrul - June 4, 2008 - 23:13
| Project: | Lightbox2 |
| Version: | 5.x-2.7 |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | stella |
| Status: | closed |
Description
It is very possible that this functionality exists, but thus far I am unable to make it work.
I have a site with mixed media stored in acidfree albums. When users click on a thumbnail, I want the media to display in a lightbox window.
Lightbox2's automatic image handling works great for my acidfree image galleries. However, I have video galleries as well and I would like videos to play in a lightbox window when users click on the thumbnails. Unfortunately, I can't have the content managers manually creating links with rel="lightvideo". Is this currently possible?

#1
#2
I should note that when using a video thumbnail, lightbox opens the thumbnail image. If no thumbnail is present, clicking on the placeholder image takes me to the node as expected. In any case, when clicking on a video with or without a thumbnail, I would like lightbox to pop up and play the video.
I am using the following related modules:
acidfree
image
video
video_upload
lightbox2 (of course)
#3
There's no way to do this at present. I didn't realise acidfree albums now had video support. Will take a look at what's involved and will get back to you.
Cheers,
Stella
#4
Very awesome! Thanks for the response!
#5
Ok, a solution has been implemented in the latest dev release (available later today). It's not 100% perfect. However, it will open acidfree album videos in a lightbox. This feature is only available if you enable the new "Enable Lightbox for Acidfree Videos" on admin/settings/lightbox2/automatic.
It won't however resize the lightbox so it's the same size as the video. You can either specify the video size (on video settings page) to match that of the lightbox (admin/settings/lightbox2/html_content) or vice versa. These are global settings however. To properly support the video size, a change first needs to be made to the acidfree module. I've opened a feature request for this: #268418: integrate support for lightbox2
Cheers,
Stella
#6
You are the best and incredibly fast. Much appreciated!
#7
This solution definately works. However, there is a conflict when using automatic handling of both Image and Video.
If a video has an associated Image thumbnail, clicking on the thumbnail pops lightbox and tries to open a page of the form: /system/files/images/test_thumb.jpg/lightframevideo. This takes me to a "Page not found" page within lightbox.
If I click on the link below the thumbnail or if no thumbnail is attached to the video, lightbox opens the video and plays it.
So I have two different links:
Thumbnail links to: http://cerberus.fa.umt.edu/mediaarts/system/files/images/test_thumb.jpg/... - Page not found
Link below the thumbnail links to: http://cerberus.fa.umt.edu/mediaarts/node/117/lightframevideo - Works
This is also inconsistent with the way Image links work. Clicking on the thumbnail pops lightbox. Clicking on the link below the thumbnail takes you to the node page itself outside of lightbox. There is nothing wrong with this functionality, but there is inconsistency between Image and Video links in this case.
#8
#9
Ok the issue with video thumbnails has been fixed and checked into CVS. It will be available in the next dev release, available later today.
Cheers,
Stella
#10
Hi Stella,
I tried the last dev version (June 17th) and I still have the same problem... when I click on my video, lightbox does open a window but instead of playing my video it opens a new window in which it says "Page not Found". I'm trying to play a .flv and I use flowplayer. If I click on "View Image Details" flowplayer plays the .flv properly.
I don't know if it makes sense? I attached a screenshot just in case... Let me know if you need more info.
Thanks for the great module :)
Matt
#11
You are the best Stella. This is very much appreciated.
On a side note, I hate IE. I am having a helluva time theming inline frames that are kicked back by the video module and are displayed in lightbox. I've almost driven myself to insert the style declarations in the video modules HTML $output, though this breaks the desired style sheet when viewing the media traditionally outside of lightbox.
Minor note: The "Enable Border" option in HTML Content doesn't seem to work for IE. IE always renders a border regardless of setting. This is probably related to the issues I have theming inline frames. No matter what I do with the CSS, IE refuses to style anything within the iframe or even listen to border declarations of the iframe itself. I'm not too sure what is up.
A simple
#lightboxFrame {
border:none;
}
Doesn't even work in IE. Works great in Firefox of course.
If I could only control the background color and declare an "overflow:hidden" to remove scroll bars, I'd be set, but IE refuses to play by the rules.
If you have any ideas to ponder regarding those minor issues, I'd love to hear them. Otherwise, I make due with the code treasures you've already produced. ;o)
#12
mabar207 :: Just FYI. I use a similar setup as you do and this is working well for me. Meaning I am using the video module with flowplayer and playing flvs. The behavior you describe is identical to what was occuring before the fix. I hate to ask, but are you sure you disabled and uninstalled the module before installing the new one? Did you enable the proper config in the lightbox admin pages? What are the exact links your browser wants to follow for your videos (both thumbnail and link text)?
Just thought I'd let you know a similar configuration does appear to be working. Good luck.
#13
Hi voodoodrul,
No worries I've been using Drupal for only few weeks now, so it would have been very possible that I had done something wrong! But I did try what you said, I disabled and uninstalled the module, deleted files, redownloaded the latest version, uploaded files, enabled module and modified the settings and I still have the same problem.
In admin/settings/lightbox2, I have checked:
"Use Alternative Layout"
and Video Settings -> "Enable Video Support"
In admin/settings/lightbox2/automatic, I have checked
Acidfree settings -> "Disable Lightbox for Acidfree Gallery Lists"
Acidfree settings -> "Enable Lightbox for Acidfree Videos"
My browser's trying to open:
[my site]/files/images/MVI_8167.flv.video-thumb.thumbnail.jpg -> for my thumbnail obviously, which is correct BTW!??
[my site]/content/mvi8167 -> for the text link, which works fine
Would it be a problem with my settings, since the path for the thumbnail picture is right?
Thanks for your help voodoodrul!
Matt
#14
mabar207: can you send me a link to your site so I can see what's happening? My contact form is enabled if you wish to do so off-list. Failing that can you paste in the actual generated video link?
voodoodrul: I've committed a fix for the iframe border issue. Will be available in the next dev release in a few hours.
Cheers,
Stellla
#15
mabar207: can you ensure that you updated the lightbox2.module file. If you did, can you clear the drupal cache? You can do that using the Devel module or by running update.php.
Cheers,
Stella
#16
Hi Stella,
I uninstalled lightbox, deleted the files via FTP, downloaded last version (June 21st), reinstalled the module and emptied my drupal cache using the devel module and I still have the same problem :(
Thanks,
Matt
#17
mabar207: I figured out the reason why you are getting a "page not found" error. The url for your video is
/content/video-1and not/node/xxxas lightbox2 expects. How come you have a different url than the default node page?Cheers,
Stella
#18
Trivial request, but it would be nice to be able to control the style of content within the iframe even at a basic level. Perhaps "Enable border" and "Background color". The background color is giving me trouble. Any stylesheet changes I attempt to make don't affect the background color of the iframe. This is what I am doing in my site's theme .css:
/* Lightbox2 theme */
#lightbox #outerImageContainer,
#lightbox #lightboxFrame {
background-color:#000;
color:#CCC;
overflow:hidden;
}
#lightbox #imageDataContainer {
color:#ccc;
background-color:#000;
opacity:0.75;
filter:alpha (opacity=75);
}
/*End Lightbox2 theme */
The end result being a simple black background in the iframe. This works fine in Firefox, Safari, etc., but doesn't work in IE. IE styles the outerFrameContainer properly, but the background of the iframe itself is white. I can change this by changing the video module's generated HTML output, but that also breaks the node view itself.
#19
voodoodrul: try out the latest dev release, it has a configuration option (under "Advanced settings" collapsed fieldset) to modify the lightbox colour. If you're having problems with it, please open a separate support request.
Cheers,
Stella
#20
Hi Stella,
Sorry for the delay... I've been quite busy these last days.
I have no clue why my URL is different, I haven't changed anything? I'll have a look into it and I'll let you know.
Thanks for your help!
Matt
#21
Released in Lightbox2 5.x-2.8 and 6.x-1.8.
Cheers,
Stella
#22
Released in Lightbox2 5.x-2.8 and 6.x-1.8.
Cheers,
Stella
#23
Hi Stella,
It's working! hehehe The problem was caused by pathauto (http://drupal.org/project/pathauto). This module changes the default path to content/[title-raw]... I just changed it back to Drupal's default value and it worked fine.
Thanks for your assistance!
Matt
#24
Automatically closed -- issue fixed for two weeks with no activity.