integrate support for lightbox2

stella - June 9, 2008 - 12:48
Project:Acidfree Albums
Version:5.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active
Description

The Lightbox2 module can display acidfree images and videos in a lightbox when the thumbnail image is clicked on. However, for videos it's not possible for lightbox2 to determine the width and height of the video.

In order for lightbox2 to display a video in a lightbox, it re-formats the node url being linked to from node/%nid to node/%nid/lightframevideo. It has a handler for this type of url which displays just the video content on the page. By the time the page is loaded, it is too late for lightbox2 to resize the lightbox iframe to the size of the video.

Proposed solution:
First add a configurable option to acidfree that would allow users to specify if they want videos to appear in a lightbox when the thumbnail is clicked. Then if enabled, change the node link from 'node/%nid' to 'node/%nid/lightframevideo/%width/%height' where %nid is the node id, %width is the configured video width and %height is the video height. Ideally you would only do this if the lightbox2 module was enabled, but even if it wasn't, the user would still be taken to the node as normal. As maintainer of the lightbox2 module, I could then parse the url to get the width and height of the video and adjust the lightbox size as appropriate. This is similar to a solution already implemented for the video_cck module.

Let me know what you think.

Cheers,
Stella

 
 

Drupal is a registered trademark of Dries Buytaert.