Jump to:
| Project: | Acidfree Albums |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | mwheinz |
| Status: | active |
Issue Summary
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
Comments
#1
#2
I have to validate this myself, but if a pager is used allow for lightbox2 to iterate through the pages as well. I believe the current state allows for lightbox2 to only go through the present page. Node gallery seems to implement this in some fashion but that module may not be using the lightbox2 method. Mwheinz, this may need to be opened as a separate post (along with the roadmap link) if accepted.
#3
There is a way to do this. What we need to do is ensure that we have links (not actual images) for all the images in the album
click here!
Now, I would add a class the link that has "visibility: hidden; display: none; height: 0" etc.
so if you on page 2 of your album and I'll assume just two images per page: you would have
<a class="acidfree-hidden" href="images/image-1.jpg" rel="lightbox" title="my caption">click here!</a><a class="acidfree-hidden" href="images/image-2.jpg" rel="lightbox" title="my caption">click here!</a>
<a href="images/image-1.jpg" rel="lightbox" title="my caption"><img src="images/image-3.png/></a>
<a href="images/image-1.jpg" rel="lightbox" title="my caption"><img src="images/image-4.png/></a>
<a class="acidfree-hidden" href="images/image-5.jpg" rel="lightbox" title="my caption">click here!</a>
<a class="acidfree-hidden" href="images/image-6.jpg" rel="lightbox" title="my caption">click here!</a>
#4
The comments seem to be for a different issue than what is reported. Stella is talking about displaying acidfree videos in a light box and I was talking about allowing the lightbox to cycle through the whole album instead of stopping at the page boundary?