Plugins

User login
Can't find a Plugin?

Can't find a Plugin you are looking for? Check out the jQuery Wiki page.

Are you a plugin developer? Please move your plugin over to this site.

Website Bug or Feature Request?

Found a bug on the new jQuery Plugin website? Have a feature request?

Submit it to the jQuery Plugin website issue queue to ensure it is noticed!

Lightbox doesn't handle large URLs; display alterations


Project:jQuery Lightbox Plugin (balupton edition)
Version:1.0.1-final
Component:Code
Category:bug report
Priority:normal
Assigned:balupton
Status:active (needs more info)
Description

I am trying to implement lightbox on my personal blog on blogger.com and the complex URLs assigned to images are not handled properly by lightbox. I have changed the URLs to point to my personal web host and the lightbox works fine, but I am unable to get it to work on blogger. Examples: http://replacementblog.blogspot.com (does not work) and http://dpender.com/gallery/nature/flowers (works great).

Also, I noticed that in the lightbox.css file, the overlay div is set to position:absolute. That means that if you scroll down the page and click on a lightbox link, the layout will display the image near the top, and you have to scroll back up. I changed this to position:fixed, and that made the image display in the center all the time. You may want to change that.

Comments

#1

Also, I noticed that in the lightbox.css file, the overlay div is set to position:absolute. That means that if you scroll down the page and click on a lightbox link, the layout will display the image near the top, and you have to scroll back up. I changed this to position:fixed, and that made the image display in the center all the time. You may want to change that.

This is only while loading images. I reverted to the original code for 1.0.1-final and found that this also occurs when two images are the same size. Lightbox.js determines the difference in size for reposition and resize. It should always look to reposition, because I have several images of the same size, and if I scroll down and click one, it displays in the same spot as the previous image, way up top.

#2

Assigned to:Anonymous» balupton

Hi there are three issues here:

Lightbox doesn't handle large URLs.
The issue here, acknowledged and will be fixed.

Lightbox does not reposition when scrolling.
http://plugins.jquery.com/node/1330

Lightbox does not reposition on two images the same size.
http://plugins.jquery.com/node/1331

#3

Status:active» active (needs more info)

Would you be able to put together a test case for this? As trying to debug it on your server is a bit hard.

#4

Really the best way to do this is to open up a new blog at Blogger.com and try to utilize the lightbox code there. With its new functionality, blogger is great, but they utilize wicked long URLs for their images. I tried to think of how to set up a test environment, but I am clueless. I can tell you that when I upload a picture, the URL for the picture has roughly 80 characters in it BEFORE the filename starts. For example, I just uploaded a test image to http://baluptontester.blogspot.com/ and its URL is "http://bp1.blogger.com/_NxdmW32pMNA/SCg45LTf89I/AAAAAAAAAAU/bbrYO6MSJSU/s1600-h/test+image.jpg" which is 94 characters long (total).

A good way of testing this is to create a folder on your server which mimics the length of this URL (or larger) and testing the jquery there. I hope this helps. If you need more information, or any debugging/recoding assistance, email me at jquery@dpender.com.

#5

I've looked into this, and the problem isn't actually with lightbox but rather blogger. For example, click that link on:
http://baluptontester.blogspot.com/
it will take you to:
http://bp1.blogger.com/_NxdmW32pMNA/SCg45LTf89I/AAAAAAAAAAU/bbrYO6MSJSU/...
and right click and view source, and you will have a html page in front of you.

So the images aren't actually html pages that it links to, so not sure how I would go about fixing this - any ideas?