Lightbox 2.8.0 plugin for WordPress
Get the latest version here . Click a thumbnail pic to see it in action. Learn more about this plugin.
Lightbox 2 allows you to present images in a slick window, while darkening the rest of the page. It makes your site look professional, and adds little to page load times. It does not require any browser plugins to work, and works on just about every web browser out there! When a browser doesn’t support javascript, your web site still looks and works fine.
The brilliant Lightbox 2.2 javascript/css was written by Lokesh Dhakar . I simply made it into a WordPress plugin and added some options. I’ve had help along the way from several others… thank you, your help is much appreciated!
To install: Put the lightbox-2 folder in your WordPress plugins folder, then activate it in WordPress.
Implementing Lightbox is automatic . Create a link to an image to see Lightbox-2 work.
Features:
- Auto-lightboxing of all links to images in your posts. No more manually adding rel= to your links! This can be turned off in Lightbox 2 admin options. Also, no double rel= tags, thanks to Tanin.
- Grabs the title from the img title or the alt if there is no anchor title.
- Themes that determine the colours of the lightbox window. You can select from Black, White or Grey.
- No longer conflicts with any WordPress themes! This means it looks right, every time. Almost. Unless you are using a theme called stimuli_lightbox… ;)
- Uses wp_enqueue_script to prevent multiple prototype and scriptaculous libraries from clobbering each other. At least with other plugins that use wp_enqueue_script.
- This version works when wordpress is installed in non-standard locations , ie: /wordpress/ instead of /, whereas other Lightbox plugins break.
- Uses the arrow keys as well as P and N keys to navigate between images. The X and Escape keys close the Lightbox window, as does clicking anywhere outside the image.
- Minor cosmetic changes from the scripts by Lokesh.
YES, I will be adding WP 2.5+ ‘gallery’ lightboxing functionality in the future… not very soon, however! So try this plugin in the meantime!
Please read the Frequently Asked Questions included with the plugin before posting a comment!
About this entry
You’re currently reading “Lightbox 2.8.0 plugin for WordPress,” an entry on stimuli.ca
- Published:
- 10.14.08 / 10am
- Category:
- News



Not working in Opera 9.60..
http://www.uplo4d.com/viewe/247559818notworking.png
GAH!!!!
Newest version (2.8.0) does not work correctly (with WP 2.6.2). Tested with Mac Firefox 3.0.3 and Safari 3.1.2.
The problem: description/text part under the picture just appears quickly and then disappears.
Moved back to version 2.7.8…
Arik: Read the FAQ. You have a conflict. I built and tested the plugin with those browsers, on Mac platform!
Any chance of getting “resize image up to size of window” support for this? I’d like to be able to have extra-large images scale down to the size of the window at largest, so that scrolling doesn’t occur.
I think someone offered a patch to do this a few versions back, but I was never able to get it to work. It’d be great if this could be integrated into the Lightbox plug-in.
- Jeff
Hi, is it possible to add printing options to this plugin?
Thanks.
Same thing happens here on windows and FF v3.0.3. The description shows, then disappears quickly.
Hi there,
I don’t know what I am doing wrong, but it does not work for the images that i already have on my site.
http://www.keiser24.de/blog/
Is the problem that I am using the gallery?
Thank you very much for your help!
Cheers
Joe
Fredelig: Same thing doesn’t happen here, on my site, using the specified software! Conflict. FAQ.
Jeff, I’ll look into it.
Laurent: such as?
Joe: grab http://justintadlock.com/archives/2008/04/13/cleaner-wordpress-gallery-plugin and install that as well, to get lightboxed galleries.
hi great plugin but i notice that when you upload a large img WP by default will auto shrink it down so when you clieck to view larger it fits witin the browser but the plugin open lighthouse window to the orig size of the image. So if an img is uploaded directly from say a digital camera (thus the size is huge) the plugin will open the orig size of the image.
Is there a setting to optimize the “lighthouse image”?
Thanks
pk
Rupert: Yes, it’s most probably a conflict, but your faq is not helping me find out what it is. v1.7.7 works perfect. Do you know any changes since then that can cause this and maybe help me find out what the conflict is?
Hello!
Congratulation for your WP-plugin!
It works very well…
But..i have a little problem..and i don’t know the solution..
I have installed your plugin and it work well,but now i add a carousel(random images after first post in home page)in my home page and internet explorer(like other browser)give me a problem and lightbox dosn’t work…
If you can help me to understand where is the conflict.. i’ll be grateful to you.
PS:sorry for my english.. i’m italian..
Thanks for all!
hi there, i love your plugin. but like some previous users have said, it would be really really nice to have the capability to resize images to fit the visitor’s screen. i remember seeing that functionality in some other plugins. hope you can get it in soon. thx.
pk/jh/Jeff: It is ‘bad manners’ to link to huge images. That said, I’ll get resizing working for a future release ;)
Fredelig: I updated the lightbox scripts to 2.03 from 2.02, amongst many other things. If you figure out what theme/plugin is causing the conflict, please post here.
Hi Rupert,
Thanks for your help. The LightHouse works now BUT the gallery seems to be messed up. http://www.keiser24.de/blog
The images are now underneath each other and not beside as they used to be.
Thanks again for your work; the feature is amazing!
Cheers, Joe
i have the same problem as Arik. 2.8 does not display the stimuli_caption tag.
can you give a workaround for this?
thanks,
C
PS: if you sort this out, do we still need lightbox_auto plugin?
Plugin doesn’t work. Which that can happen I understand that. But it doesn’t seem like you are very active with providing support for the plugin, which if that is the case, I wouldn’t recommend my friends to use this.
I am using default theme, I can see the code automatically added into my source code, but the plugin does not work. Any suggestions?
cezar: I have seen your site with Firefox 3.0.3 and have no issues reading captions.
Gary: You are correct that I do not support this plugin… it is provided ‘as-is’ in hopes you may find it useful.
I work full-time in a country (India) where I only have internet access at work.
Step 3 of the FAQ included with the plugin covers the answer to your, and 99.999% of other peoples, questions regarding lightbox not working. There is a link to this FAQ further up this page, just before the comments start. You are urged to read it.
hint: Google ‘jquery lightbox conflict’
cezar: Wait a minute, try disabling lightbox_auto plugin. Maybe that is mangling things?
it works now because i reverted back to an older version. i tried with lightbox_auto activated and de activated and the caption did not show.
Okay… could people having issues please post links?
It appears that the ‘caption disappearing’ issue is a result of web browser caches and goes away over time.
Hi Rupert, regarding my suggestion to add printing options, when my readers click on images it loads perfectly but when they try to print the image it actually prints the main page and not the image itself. I’m wondering if it is possible to have a print option after opening up the image. Thanks.
I am having this exact same issue after upgrading:
“The problem: description/text part under the picture just appears quickly and then disappears.”
Sorry, but it’s not on issue on my end. Everything was working fine before I upgraded. For now I have also had to downgrade to an older version. Hope this gets fixed soon!
I can’t post a working link for you because I’ve already reverted to older version… this bug looks awful!
Here is a link to screenshot for you though, as you can see the entire area where the description goes at the bottom is blanked out… part of that bottom bar/background is missing.
http://dominionsm.com/images/screen.jpg
Hello, i love the plugin but it works only in the first picture in a post. After that im still getting the lightbox window but it loads for ever… any idea what can cause it?
Hello Rupert,
I’m going crazy. I just can’t seem to get Lightbox to work … the image in “eMarketing examples … ” simply opens in a new window. Any help you can provide me would be appreciated and rewarded. http://www.letrichdoit.com
Thank you.
omg hot to get light box 2 working? why don’t you guys make some step by step faq or smthng… >_< help please!
Foodeater: As already mentioned, I believe the caption issues are a result of web browser cache. The problem goes away by itself over time.
Laurent: I’ll see what I can do.
Rich: tell the author of WhosWho theme to use wp_enqueue_script() for javascripts.
other culprits: ajax-comment-posting plugin also needs to use wp_enqueue_script() function… someone here contact the author of that plugin as well.
Rupert,
Thanks for your quick response. The author says he doesn’t have time to provide support for his product … is this fix something I can figure out how to do myself?
Hey Rupert. I did read the FAQ, but my issue is that LightBox is not working in IE. I’m not sure when this started as I’ve used your plugin for quite a long time. I’m running WP 2.6.2 and Lightbox 2.8.0. I switch my theme to the default WP Theme and even disabled every plugin except Lightbox to no avail. Your plugin works great with Firefox, though.
“I believe the caption issues are a result of web browser cache. The problem goes away by itself over time.”
Thanks for the answer but I can’t exactly tell my clients or the many users to my website that!
Is there a way to fix this cache issue so that it doesn’t happen from the start? I can’t put this updated plugin live on my website and present things looking like this (broken) to my visitors or my clients. I’ve tried running this updated version on a test site of mine and after many days, clearing my cache and reloading many times, the problem does not change or go away.
Foodeater: Link? PS: caching is done by all browsers, automatically. You can empty your browser cache… google how to do it.
Shane: IE version?
Rich: Yes. Google ‘jquery prototype conflict’.
The thing is, to people having troubles, my site is running the latest WP, and the latest Lightbox, and as you can see with your browsers, I am not having any issues. It works in every browser except possibly Opera (may be a cache issue).
So it begs the question: why does it not work for the select few posting here?!
Rupert: IE 7
Rupert: I do not use the visual editor in WP. Would that matter?
I already told you that I cannot provide a link because I have reverted to an older version of this plugin that works properly.
Look, I know full well what a cache is and how to clear it! Obviously if a few of us are having the same issue, than it’s a problem with your plugin and not with anything on our side. I’m not going to put a big note on my clients professional website telling people they have to clear their cache in order for the images to display properly. The previous version didn’t have this caching issue but your new version does, so that would imply the problem is with your plugin, not our individual browser set-ups or websites.
This begs the question, why are you blaming the people that are coming here to alert you of this problem instead of addressing the actual problem? We’re doing you a favor by letting you know something is broken, it’s up to you if you want to believe us or not. I already posted an image for you to see what’s happening, and I’ve already let you know that clearing the cache doesn’t fix it.
Oh well… it was nice will it lasted!
I won’t keep coming back to complain, but please don’t assume we are all stupid just because your update broke the plugin! I’m still hoping this can be corrected with a future update, otherwise I will just need to find something that works better.
How do you create a ‘Batch’ of images to flip prev/next through? Like how you have on this page with thumbnails…but I want to simply let people click on a photo in a post and then flip through more images in the lightbox popup…Is this possible? Please help.
Hi Rupert,
I had light box on my blog http://dancarrphotography.com/blog
It worked fine for a coupe of months then it stopped all of a sudden today. All I had done was make a post on the blog. I made no other changes. Since then i have deleted that new post and it still does not work. I went to the plugin section of the inteface and it said a newer version of lightbox was available so i installed that version so im up to date and have 2.8 but it still doesnt work?
Seems odd that it should just stop like that, any thoughts?
thanks!
Shane: Should not matter. It appears to work now, in my Firefox 3. Make sure the page loads fully before clicking a pic(?)
Foodeater: Calm down. I can’t debug a page I can’t view. When and if you have a page I can look at, let me know.
junu: simply post multiple images in one blog post. My plugin takes care of the rest.
Ooisx: link?
Dandig: May be a cache issue, as your site works fine for me in FF3.
Rupert: It has always worked in Firefox. IE7 is what is giving me the problem. It’s not a big deal though. I just know that most of my visitors use IE.
Rupert: Guess what? It now works in IE7 on every machine I’ve tried. Works from my home machine and I just vpn’d into my work PC it it works there also. I have done nothing to my site since I’ve had the problem. Weird.
Exactly! ;)
Hi, great plugin.
I have noticed that when I install the plugin, everything work great but my site take quite a lot longer to load up.
I have not looked at the code but i was wondering if anyone has had this before and any way around it.
Does the script pre-load any images before the site is displayed
Thanks
I love how all image links in a post will show in the lightbox that is navigable via prev/next. However, I want to ‘hide’ the image links and only have one link that opens the lightbox with more images. Is there a trick to do this in css/html?
i’d like to lightbox a simple viewer gallery. is this possible? your faqs just say to link to an image and lightbox will do its thing but if i want to lightbox a whole gallery is this possible?
A fix for the Safari Resize Bug:
In lightbox.js, around line 456, right after –
resizeImageContainer: function( imgWidth, imgHeight) {
Add the following
document.getElementById(‘lightboxImage’).removeAttribute(‘width’);
Seems to fix it up right.
Stu: Look at plugins like slimbox and thickbox, which do the same thing, and have much smaller javascript files. Prototype and Scriptaculous (libraries Lightbox depends on) are notoriously huge.
junu: yes. google “CSS hide”
melanie: is this what you mean?
Kevin: Cheers. What version of Safari has that bug? This site was tested in Safari 3.1.x
The opacity of the overlay doesn’t work in ie7 on the pc. Everything else works but the overlay is a solid colour not transparent. That’s also true for your web site too, if I click the images at the top of this page it’s a solid grey background I get, not a transparent one.
Very odd. Any ideas?
Denise: My IE 7 works fine.
Doesn’t work in mine, have a look….
http://www.deniselaurent.co.uk/ie7problem.jpg
this is only a problem on the blog (yours or mine) but when I look at a gallery on my site that uses lightbox 2 outside of wordpress it works.
Hi Rupert
First of all thanks for the plug-in…
I am trying to change Theme color from black to white….but does seem to work it..
This what i have change it
/* Where our theme reside: */
$lightbox_2_theme_path = (dirname(__FILE__).”/Themes”);
update_option(‘lightbox_2_theme_path’, $lightbox_2_theme_path);
/* Set the default theme to white */
add_option(‘lightbox_2_theme’, ‘white’);
add_option(‘lightbox_2_automate’, 1);
Came to know it under option setting….
Rupert: Thanks for that. Now knowing what was causing the loading time i have found a smaller script and the site speed is greatly improved
Stu
Stu: No worries… I may migrate to mootools in the future for that reason.
Denise: Sounds like a textbook example of a wordpress theme conflict. Check the FAQ to test that theory.
rupert, i’m actually talking about this: http://wordpress.org/extend/plugins/wp-simpleviewer/
With lightbox, you’d have to post thumbnails, each linking to a larger image.
The plugin you are intrigued by is flash-based, requiring the flash plugin. Flash is: a) non-indexable by search engines b) proprietary c) doesn’t run on popular mobile platforms like iPhone’s OS.
Short answer, no, lightbox doesn’t do what you want, exactly.
It would be easy enough to code, mind you, but I personally don’t have the time.
Hi, can this plugin be set up to open a separate gallery using a photo link?
Say a page has 6 pictures. Clicking on one does NOT loop through the six photos on that page, but rather each of them runs a gallery from a different source (folder) without leaving the original page.
I thought you’d say it was my theme, that’s why my example was taken from your web site, this web site, to show that the problem exists on your web site too. Your images come up with an opaque background too. I don’t think it’s the theme.
Gabe: No.
Denise: Whups! If I can recreate the bug, I’ll look into it.
Hi, thanks for this plugin, it looks ace.
I am new to wordpress and have a question. I have made a post with an image using the <img src= function and then I have installed this plugin but it doesn’t seem to work. I only have the sitemap generator plugin installed so don’t think it’s a conflict problem. Do I need to create a new post before it will work? Thank you.
i had trouble getting my modified black theme to work properly in firefox in the newest version and it sounds like some other folks were having a similar problem so i wanted to tell people how i fixed it.
in my custom css, i had changed some of the backgrounds to white and when i tested the newest version in firefox the captions portion kept reverting to transparent. IE seemed to work fine. go figure.
anywho, i noticed a difference between the new black theme CSS file and my modified version from the earlier version. the difference can be found in the #stimuli_imageDataContainer element.
to fix my captions problem, i had to re-apply the overflow and width elements. the full element should look like this:
#stimuli_imageDataContainer{
font: 10px Verdana, Helvetica, sans-serif;
background-color: #ffffff;
margin: 0 auto;
line-height: 1.4em;
overflow: auto;
width: 100%
}
hope this helps some other folks.
Geln: you need to *link* to an image, not post one. You can post a small thumbnail that *links* to a larger version…
Web guy: Thanks for the patch!
Hi,
The plugin works on most posts/images but not on latest post. It has worked though but after editing the images a bit in WP it stopped working.
Looking into the html code I find the rel=”lightbox[203]” code added to the link but still it is NOT working while other posts are. Other posts/images have the same sort of rel-code added to the link but with there unique post number.
The problem started when I deleted and re added the image via the media library. Now it links directly to the image while it does use the rel-code in the link.
Everytime when I write a post and use an uploaded image it works fine. But when I delete the image in the post and re add it using the media librabry I get this problem.
I realy hope someone can help me fix this problem.
This is the case in every browser. I use the latest plugin 2.8.0 and WP 2.6.2.
Hi, I’m trying to use Lightbox 2 with the Slickr Gallery plugin but when I enable the Lightbox plugin I always receive this error:
Fatal error: Call to undefined function wp_enqueue_script() in /home/dca32/www.dca32.ch/news/wp-content/plugins/lightbox-2/lightbox2.php on line 67
I’m using an old WP 2.0.5 installation. I tried to install other versions of this plugin but I always see the same error (in older version the line is 64 but anyway….)
please help me, I don’t really know what to do. Chris posted here the same question but you didn’t answer. Please let us know something, I really need Lightbox to work!
I was having issues with IE using this plugin, essentially the modal window would appear for a short time then the linked image would display as a new URI.
I applied a fixed to lighbox.js to prevent event propagation before starting the animation and seems to have fixed it, although no does a weird display thing when page has a scrollbar…
Old Code (line #193)
anchor.onclick = function () {myLightbox.start(this);return false;}
New Code
anchor.onclick = function (e) {
if (!e) var e = window.event;
e.cancelBubble = true;
if (e.stopPropagation) e.stopPropagation();
myLightbox.start(this);
return false;
}
The new problem is fixed! The one I mentioned in last post was when clicking the next/prev links. In IE it would jump to the top of the page but the image was in the centre (if page has a scrollbar).
I added the event propagation trap code (as in last post) to the two onclick functions within updateNav and hey presto, no more problems in IE!
I’ve tested these changes in IE7, FF3 and Safari all on PC so if anyone has any problems please post :)
New updateNav function:
updateNav: function() {
Element.show(‘stimuli_hoverNav’);
// if not first image in set, display prev image button
if(activeImage != 0){
Element.show(‘stimuli_prevLink’);
document.getElementById(‘stimuli_prevLink’).onclick = function(e) {
if (!e) var e = window.event;
e.cancelBubble = true;
if (e.stopPropagation) e.stopPropagation();
myLightbox.changeImage(activeImage – 1); return false;
}
}
// if not last image in set, display next image button
if(activeImage != (imageArray.length – 1)){
Element.show(‘stimuli_nextLink’);
document.getElementById(‘stimuli_nextLink’).onclick = function(e) {
if (!e) var e = window.event;
e.cancelBubble = true;
if (e.stopPropagation) e.stopPropagation();
myLightbox.changeImage(activeImage 1); return false;
}
}
this.enableKeyboardNav();
},
Hey Rupert, thanks for designing this, t’s pretty awesome; however, I’ve installed it on my blog, and it doesn’t work consistently. It works on all the posts on the main page/index of the blog, but – for example – if I actually click on a specific post in the archive and THEN try to view the images in the post, they don’t always show up in the Lightbox display – even though they worked fine when they were on the front page. Any suggestions?
I have WordPress 2.7-beta3-9841 ad the auto lightbox does not work. i works on older posts but now it does not insert <a href=”" rel=”lightbox anymore. Is this easy to fix? i cant get it to work by typing rel=”lightbox” myself either.
Great plugin just wished it worked on the newest wordpress by aoto inserting the rel tag.
Thank you so much for this beautiful plug-in! I have a question about it. I am using Lightbox 2 combined with Flickr Photo Album. When I insert thumbnails into a post, scrolling through them does not end with the photos posted to that current post, instead, the little slideshow includes all photos I have posted to the blog in thumbnail form. So even though there are only 2 pictures in the most recent post, clicking on the first one brings up “Image 1 of 5″ and clicking through views photos from prior posts. Is there a way to contain the slideshow & numbering to an individual post?
Thank you!
Rupert,
I echo the sentiment. Thanks for the great plug-in. I say this as a non-programmer/coder but I do wonder why, with as many variations as there are out there, including a version which resizes the images to fit on screen, there is seemingly NO support for max height/width adjustments… or am I mistaken? I can’t find ANYTHING and although it may seem like we all want the biggest images possible, from a designers standpoint, I would actually LOVE to be able to set a max height or width to restrain larger images but NOT distort smaller images.
Any hope we’ll see this in the future or is something already out there and I just didn’t find it?
Hi,
Could you please make it work with WordPress 2.7?
Thanks in advance!
Hi,
how can it show image sequence? i have one image per post. is ther some thing to add to link of the image?
Just wanted to inform you of a plugin incompatibility -
NextGEN Smooth Gallery plugin – http://uninuni.com/wordpress-plugin-nextgen-smooth-gallery/
Smooth Gallery uses Mootools and I’ve already run into compatibility issues between Lightbox and Mootools outside of WordPress… so it makes sense.
Luckily, I don’t need to use them both together. Thanks for a great and easy Lightbox plugin!
One more quick suggestion… NextGen is a really popular gallery plugin (although I’m digging your flickr gallery right now) — but, I know NextGen has a way to configure Lightbox in its settings as long as you manually install Lightbox first (I have not tried this setting though). Since your plugin already installs Lightbox, I wonder how easy it would be to make these two plugins work nicely together.
Again, thanks for developing such an easy plugin!
Hi, first thank you for your effort on this great plugin.
I came here after reading FAQ as you said.
I am now using Lightbox plugin and Carrington theme, but they do not work together if I turn on the AJAX comment and archive browsing functionality of Carrington.
I would like to have both functions together, so could you give me any clue about which part of the code I should take a look and hack?
Thank you very much!
Seems not to work with WP versions from 2.6.x upwards. In my fresh instllation of version 2.7 it’s not working at all.
Does anybody know, what’s the reason or the problem? Maybe it’s just a small thing that could easily be fixed?
Thanks in advance!
Greetings
Gunther
Gunther, try the FAQ to isolate the problem. This site is running 2.7 and has no issues.
@Gunther:
Rupert’s plugin works perfectly, … but in Word Press 2.7 you have to add the link to the full-size photo manually …
You can do this by clicking on the “File URL” button on the “Link URL” line of your image insert window. … this will add the necessary link to the full-size image!
This way it’s even better because you can chose whenever you want your lightbox effect or not.
@Rupert:
Thanks for that fantastic plugin, … no cheesy bits, just pure and functional the way I like it !!! :D
@kochi:
As I mentioned ;-) …
very little problem.
Thank you very much. Now it works perfectly!
Maybe a little sentence somewhere in the description will help others to avoid this problem.
@Rupert:
I pay you a compliment (hope that’s correct at least you know what I meant) – great plugin.
Greetings
Gunther
Rupert,
Thanks for this plugin. I’m migrating everything to WordPress and was previously using Lightbox as well, so I’m happy to see I can keep on using it.
Question tho: how do I change the width of the border around everything? Right now it looks like I have a 10px white border but for esthetic’s sake I’d like it to be 20px. When I change the padding of #stimuli_imageContainer I get a 20px border on the top, left and bottom but the right side border disappears and the close button stops working. I can’t for the life of me figure out where it goes wrong. Could you point me in the right direction?
Cheers,
Emile
Rupert,
Of course I figured it out after posting here ;-)
Should someone wonder about the same: simply add padding to #stimuli_outerImageContainer ( padding: 10px 10px 0 10px; ) and to #stimuli_imageDataContainer ( padding: 0 10px 0 10px; ). To accurately position the left margin, add a ‘margin-left: …px;’ to #stimuli_lightbox, and fill in the dots with the number of pixels you want the image shifted to the right.
Cheerio,
Emile
There is still a problem. If the (linked) picture is higher than the viewport, the bottom of the image container with the title/ caption and close link is missing.
Did I missed something again?
Is there a solution for the problem?
BTW: I’m using FF 3.0.4 on a Win Vista 32 System.
Gunther
Gunther: I’ll look into an auto-resize-image feature for lightbox.
Is there any way to add a link inside the caption? I’ve read stuff on the forums about this but not in regards to the plugin and the code provided did not work.
Thanks much and great plugin!!
Hi there :)
I actually used this plugin for nearly half a year now, but noticed something when not so internet-savvy people navigated my blog: They kept pushing the “back” button to get back from the image to the page. And were frustrated when it didn’t work properly…
So I stopped using it now, with a heavy heart :(
Maybe you could capture “back”-button presses with JS somehow and make them close the lightbox instead of navigating away from the underlying page? If you’d do that, I’d gleefully reactivate the plugin at once…
First off, I love this plugin. It provided exactly the slick interface I was looking for.
My only problem is that the close button has never worked for me, so users have to hit ESC or click out of the picture to exit – obviously a pretty bad user experience. Any ideas? Could this be an issue with another plugin?
doesnt work at all after “coltrane” update (but older posts work ok)
please see this topic on wordpress: http://wordpress.org/support/topic/222687
Hii Rupert..
Pls try this one Milkbox 1.2 by Luca Reghellin. And here there’s an Autoplay example http://reghellin.com/milkbox/example3/
Is there no way to set a default max size for these images? A client of mine upload 150 hi res images that stretch the screen to eternity. Instead of having to resize each of them it would be great to set a max width and height so images stay on screen. Is there something that can be hard coded in the JS to do this?
Hi Rupert,
I’m having the same problem as Denise; in ie7 the opacity of the overlay doesn’t work..but just on the frontpage, on single pages it works as it should be. I found this problem on your website as well, do you have any idea what it could be?
Please change code “” to “” in the FAQ.
http://wordpress.org/extend/plugins/lightbox-2/faq/
Added the following code to allow using the Photobucket HTML code insertion:
$pattern[2] = “/]*?)>/i”;
$replacement[2] = ‘ID.’]”>’;
Oops, my previous comment didn’t display the code modification properly. It is a simple modif, but email me if you want me to send it to you.
In WP2.7 – when going to the settings > lightbox 2 screen,
under “Lightbox Appearance” I get the following error
Warning: opendir(/home/site/public_html/wordpress/wp-content/plugins/lightbox-2/Themes) [function.opendir]: failed to open dir: No such file or directory in /home/site/public_html/wordpress/wp-content/plugins/lightbox-2/options.php on line 28
that path/file does exist, and I have no other issues with WP –
has this happened before? have I done something wrong?
installed this plug-in, but it doesn’t work automatically.
I don’t know how to put pictures into post, and apply this properties.
I have installed update of this plugin and it works fantastic on the wordpress index page, but if I read a full article and have an image within that article that I would like to be “lightboxed” if you will, it does not seem to work. Do I need to add anything to the “single.php” page in order to get the plugin to work on this page?
What a great thing. Unfortunately I have a unique problem. The plug-in works great, but it disables a scrolling post feature I have. If you had a moment to check it out that would be great.
http://www.packerslounge.com
If I can fix this minor bug, I will be a happy happy man.
Thank You
I will actually reiterate and say that the plugin works great all the time, but my carousel cease to work when activated.
Thanks
I’m having trouble getting lightbox to work. I insalled it and am trying to make it work with the NextGen Gallery thing.
http://amfiltz.com/test
Here’s an example of it. I see the code is showing up, but it’s not functioning for me. I upgraded to 2.8 and all, and the affect works for me on other sites, so I’m not sure of the problem. I also attempted to disable all other plugins, but that didn’t fix the problem.
Some help woul be appreciated. Thanks!
hallo.Thanks for your work.
This plugin can not work for wp 2.7.I am expecting that to update.
Thank you very much.
Here WordPress 2.7 and this wonderful plugin is not working any more… :-(
I can’t get therel option even if I choose “URL File” from the popup…
I also tried to change theme: no way to get the rel option. And even if I manually add rel=”lightbox” the plugin doesn’t work! :-(
Hello!
Is there any way to open up each picture individually?
Like… i have a page that has 6 images, can it be set that they open up individually? Meaning the other images are not “linked” together?
my problem is, it starts to load then suddenly just loads the image. Are there any .css issues to avoid in your main site.
I have made some changes to mine but have no ideas what would conflict with the plugin ?
Hi,
could you please help me to determine why lightbox (2.8) is not working for my site?
i suspect there is some conflict between scripts or something, as i installed it as instructed. However, i don’t know enough from scripts to solve it by myself.
and indeed, this plugin is the last cherry on my blog-cake!
what basically happens (or doens’t happen ;-( ) is upon clicking on an image, the picture just opens in the same window on a blank page, instead of with the lightbox overlay (so obviously, it doesn’t work…).
could you please take a look at http://dsyre.com/?p=600 ?
i tried a lightbox with one of the images on my blog…
Thank you so much i advance for checking!
Arvid
I’m having some issues with using lightbox-2 for a horizontal website. when you open up a pic that is to the right of where the screen initially starts, the lightbox opens up and places the pic where the initial center is.
it seems like it’d be very easy to change with some CSS, but i’m not very familiar with the lightbox css. anythoughts?
http://i44.tinypic.com/2z6y3ko.jpg
Hi!
Was just wondering if there is a possibility to give the “lightbox window” that displays the image a standard size – say 800×600 – regardless of the original size of the image.
Where would I have to adjust the code to do that?
Thanks for the plugin and your work.
Hi there!
I just wanted to say thanks for this great plugin. I installed it on my site tonight, and it’s working great.
I did have to turn off the automatic inclusion of the nofollow attribute that the “Smart SEO Links” plugin has as an option, but after I figured that out it worked great.
Hi,
First of all, thanks for this wonderful plugin.
I have recently shifted by upload folder in wp-content to a sub-domain in a bid to improve the speed of my site. This however breaks the “Auto-lightbox image links” feature.
Normally when an image is added to a post/page that links to itself, rel=”lightbox” is added to the anchor tag. However, this does not happens after moving my upload folder. Now, I’ve to manually add the tag via the HTML editor for lightbox to work.
Can this be fixed?
Hi,
Not sure if this has been raised, but I had problems with the automatic adding of the rel attribute to links that point to an image. The filter for the _content() was being called before WordPress filtered the_content() to replace [gallery] with the html markup.
I fixed this issue by setting the priority of the filters for the_content and the_excerpt on line 62 to:
if (get_option(‘lightbox_2_automate’) == 1){
add_filter(‘the_content’, ‘autoexpand_rel_wlightbox’, 99);
add_filter(‘the_excerpt’, ‘autoexpand_rel_wlightbox’, 99);
}
All works automatically with WordPress inbuilt gallery now.
Joe Hoyle
Works perfectly for me with the exception of one minor item – the “close X” button does not work – I have to click the escape key or outside the image area to disable LB. – I saw someone else in here had the same issue.
I’ve tested on various browsers and followed the recommendations on the faq – dissabled all other plugins, etc. – always get the same result.
If you can offer some advice/input it would be appreciated.
Thanks in advance.
Hi Rupert,
not sure if you are aware of it, but since there is no mention of it here, I wanted to point out a conflict between Lightbox 2 and the CoolIris plugin. The result is that an image cannot be clicked a second time. On the second click, the Lightbox shows up, but the image doesn’t, because “display: none” is not removed from the hidden image. Clicking on a different image seems to reset this behavior, returning functionality to the first image (but also inheriting the problem to image no. 2).
There is a simple fix for this conflict, which is to rename the pause() function into something more unique. I found the solution here:
http://echeng.com/journal/2008/07/06/wordpress-lightbox-and-piclens-plugins-clash/
Do you think you could include the fix in your next update? I’ve implemented it on my side but that will of course be trashed next time I use WP 2.7′s built-in auto-update feature.
Thanks for your plugin!
Hi guys.
Cool pugin but can you tell me or post it anywhere, what the two updates in the last days changed?
i mean update to 2.8.1 and then to 2.8.2.
thanks a lot
Joe Hoyle and Jerry’s comments right above this one have both been implemented in 2.8.1 and 2.8.2, respectively.
Hi,
I’m having the same issue as Arvid, above: I click on the image, and it opens in the same window on a blank page.
In order to be sure it’s not my theme, I changed to the WP default theme and re-tested with the same result. If anyone knows a fix for this, or if it’s a common error, please direct us toward the answer.
thanks
This problem seems to occur for posts and pages that already existed when you installed Lightbox 2. $lightboxoffmeta is null for those, so I changed line 49 in lightbox.php from:
if ($lightboxoffmeta == “false”) {
to:
if ($lightboxoffmeta == “false” || $lightboxoffmeta == null) {
After that, it works fine again. Please implement. ;)
lol… Forget what I just wrote… I just noticed, there is another plugin called “Lightbox 2″!!! -.-
I simply installed the wrong one.
Just make sure you install this one by Rupert Morris: http://wordpress.org/extend/plugins/lightbox-2/
Instead of this one by Giuseppe Argento: http://www.4mj.it/lightbox-js-v20-wordpress/
Rupert’s plugin works like a charm.
plugin works great, however i have a site that is displaying a video widget and it conflicts. lightbox tries to display the videos when clicked, and never ends up loading. the video widget has its own popup js, but i dont have the slightest knowledge how to go in and disable it. is there any way to have the lightbox plugin disabled for certain pages?
is there a way to disable this plugin on a specific page? Its conflicting with my mootools scripts!
Hello and thank you for a wonderfull plugin.
I was using it since a year ago (perhaps a little more), and always worked perfectly.
I always make upgrades to my wordpress (now I am using 2.7 version), and last week I have received a notification that Lightbox 2 v.2.8.2 was out, and I have choose automatic plugin upgrade.
I have no added newer plugins, but since that plugin upgrade when I click on an image nothing happens (not pop up image, not nothing).
¿Any idea what is happening?¿?Did you received any other complains? Please help me, I like your plugin very much and now can’t work anymore.
Keep on waiting for your answer.
Regards, Sergio.
Hello again.
I want to appologize for my last mail, becouse at last I found the problem.
I am not sure if the problem is due to last WordPress upgrade to v. 2.7 or what, but the fact is that when you upload an image, now you must choose between any of the URL Link buttons suggested:
- None (is the default now)
- URL File (used to be the default)
- URL Post
If you don’t choose a button, the option by default is none, and when you put a thumb in a post, if you click on the image nothing happens (no pop up, no nothing).
So the solutions that I found is when upload to choose the button URL File, and then everything works fine.
Please excuse my poor english, and acept my excuses for my last mail, buy I was really desperate (I love your Plugin, is really usefull a nice).
Best regards and thank you very much
Sergio Supino (from Argentina)
2.8 has a bug with the current version of WordPress using Opera. The background disappears below the picture except for small boxes under the caption and close text. I have confirmed it is not my css or template as I switched to the default wordpress theme and got the same error. I have replaced it with version 2.7.8 to fix the issue for now.
Feel free to contact me if you require more information.
Not working correctly in Opera. The description part under the picture disappears.
But the 2.7.8 versión works good. I think is something with the new css.
Hi,
Great plugin. Just a couple of issues I wonder if you would comment on…
* Seems to work in posts but not pages? See pages at noodleandspam.com (fotobook generated on the left)
* The button link to close the lightbox is not aligned. To close the windows I have to point in a small empty space slight down and left of the word “CLOSE”
Hello Rupert
Look what I’ve found in Lightbox option panel
Warning: opendir(/pub/home/tsymbal/asyan/wp-content/plugins/lightbox-2/Themes): failed to open dir: No such file or directory in /pub/home/tsymbal/asyan/wp-content/plugins/lightbox-2/options.php on line 28
do you know how to fix that?
P.S. Using the latest version of Lightbox and WordPress
Greetings from Russia and
All the best!
Love your plugin! :-)
But could you change the following, cause it breaks my clean xhtml 1.1:
- in function ‘autoexpand_rel_wlightbox’, change the following line:
– $replacement[0] = ‘ID.’]”>’;
– $replacement[0] = ‘ID.’”>’;
lightbox supports it, and its valid xhtml 1.1
keep up the good work
simon
darn, code seems to get broken :-/
well, instead of using this in rel tag ( ‘lightbox[POSTID]‘ ), use ‘lightbox_POSTID’.
Hi, I really like this cool plugin!
But as the previous poster allready asked for – could you please remove the square brackets from rel tag – they aren’t supported in XHTML 1.1.
Regards,
Martin
Hello,
is it possible to show an another page instead of an image file?
For example, I would like to make a preview of aa.php. Is it possible with this plugin?
Hi! Your plugin is brilliant for showing off small photos in WP . But how can I use this plugin only for small photos .
In other words , I want to deactivate the effect of this plugin on some images , while remaining active on others .
Right now , my only option is going back to previous version , where I have the rel=”lightbox” attribute .
Thanks in advance .
Sorry for the trouble . Only now I noticed that option in Admin Lightbox settings . Thanks for this brilliant plugin .
Great plugin, works great for me :) However I do have one request that I hope you would implement. Instead of using the title of the image as caption, could it be altered to actually use the caption for that image?
Great plugin since lot of month BUT in version 2.8.x
“Grabs the title from the img title or the alt if there is no anchor title.”
This assertion is not true if rel is present in link anchor and title not. (as in shortcode [caption] of wp)
Lightbox forget to search the title in img.
(this problem was not in previous release)
I have been using your plugin for a while now with no problems, and really enjoy it. I just noticed that it is no longer working. It does not seem to be adding the html code to the image. I cannot say exactly when this changed since I don’t add blogs often. I disabled any plugins and updated everything. I am now at Lightbox 2.8.2 and WP 2.7.1. All the previous images still work fine; it is only on newer blogs. I have tried unchecking and checking the box under the the Lightbox settings as well. Thanks.
How do you change the size of preview???
I have the plugin installed on my site but for some reason the “close” button isn’t working.. any idea why this might be? I can close by clicking the background but the “X” button itself isn’t working at all
you can see an example on the images of this post here:
http://www.softthoughts.info/?p=105
Thanks for your help! and I love the plugin!
Thank you ! Awesome Plugin !
And for all those who say is not working…
I tested on IE 6/7/8, Mozilla, Opera, Chrome, Safari and PASSED 100%… WORKING damn nice !
Wait until the page is Fully Loaded !
Thanks again !
I have a problem with this plugin if it is active my accordion menu stoping…if i deactive the plugin is all ok…where is the problem for you?
Seems to break if one have nested pages like blog.sample.site/page/gallery (Using mod_rewrite). If i post images on that page, it wil try to strip gallery, but keep /page/ and its not a static page, os it screws up finding the image.
One way would be to strip the complete path and let the user add the complete path to the image.
I have the same problem as Bamboo above. WP 2.7.1, LB 2.8.2. I don’t know when, but it’s stopped adding the code to my site… and on those where the code was added previously, it no longer works.
For example:
http://www.licensinghandbook.com/2008/09/22/grape-licensing/
(it used to work)
http://www.licensinghandbook.com/2009/03/04/art-imitates-life/
(it never worked)
Thoughts and suggestions are appreciated.
Hi, I’m trying to disable the auto lightbox on older posts (imported from blogger). I tried using custom fields “lightboxoff” = true but that didn’t work. couldn’t find anything in the other comments here about it either. Is the only way to manually remove the tag? :( Thanks,
Chad
I have been trying for a few days to get this plugin to work on my wordpress ProPhoto themed site, but to no avail. I know that it is possible, because I saw it at http://katemcelweeblog.com/ and it looks awesome!
Lightbox 2 is activated in my plugins folder and I have a color option for Lightbox under Settings, but other than that there are no refrences to the plugin in my admin area and seemingly no way to activate it within the Post section. How do I get this thing up and running?
Wish I could use your Lightbox but it doesn’t play nice with my theme. It does work with my flickr gallery thumbnails perfectly. But, whenever I activate your plugin it freezes the slideshow I have at the top of my homepage.
Thanks. I’m using it!
I see there is an auto setiing for piccasaweb and flikr, how would I make images at http://imageshack.us/ show in this lightbox. Any advice please? Thanks…
Sorry to say, it doesn’t work for me..
If I upload a picture to my site using the wordpress uploader
it doesn’t work
Question:
Do I need to put my pictures on a website like flickr?
Does the plugin still work for anybody, or is it dead?
I don”t have any plugin installed except lightbox 2.8
After inserting an image to my site, nothing happens.
It just opens up in a new window.
Should I upload images to a site like flickr and then make a link?
Great work with the lightboxes, my other site wouldn’t be the same without it!
Hi Rupert, would be possible to consider making this plugin compatible with gettext system for translations?
I always could edit the lightbox.js to show the spanish translation for “Image” and “of”, but would be nice to use the gettext system because when we update the plugin we loose the changes we made to lightbox.js.
Thanks!
The latest update caused problems on my wordpress installation. reversing to an earlier version solves this. not sure why, but note from other comments that other people are having similar problems.
HELP! I tried to simply install the zipped file and suddenly the top of my page has some crazy error message on it. i have absolutely NO idea what this is nor how it came about. can somebody please offer me some help? if you go to kyleskidmore.com you can see it… it’s there even when i’m in the admin section!
Worked beautifully for awhile, then quit with the WP 2.7.1 and 2.7.2 upgrades. Did something change?
Do you have any plans to utilize Google Libraries for your .js calls in future releases? Your plugin doesn’t apparently use the proper WP API to take advantage of this…
Thanks!
…just a follow-up comment. Currently, your plugin forces calls for local versions of scriptaculous and prototype, even though my other plugins are calling them via CDN from Google Libraries. My site’s Yslow performance rating drops considerably once Lightbox 2 is installed – for the very reason I’ve described above.
Thanks!.
Still can’t get it to work with firefox. With IE it works ok.
Any ideas how to fix it?
Is there anyway to set the resize options? Thanks!
A strange one, The JS all appears to be working, but the image never loads! All I get is the spinner overlay. Same with all deactivated plugins and I’m using the default WP theme.
http://ingthorpe-co-uk.domain-ref.http.fluorine.lon.periodicnetwork.com/?page_id=9
Any help appreciated.
Works fine when image is on top of page/screen but if you scroll below the fold, and click image, only the top down to the fold of the screen is grayed. Works great if I switch to default WordPress theme so I assume it is something wrong in style.css maybe. Using Fusion Theme. I am not a coder but can hack code if I knew where to start. Any ideas?
Hi!
Having problems with plugin. It seems that it is not writing the correct output. This is from the source of the frontpage of the blog:
//<![CDATA[
document.write('');
//]]>
How can I get the output correct. Other plugins are only askimet. It seems also the the img tag is not changed at all. Do I miss something. WordPress version is 2.7. Lightbox is 2.8.2
With Rupert’s suggestion to hitting google with the jquery conflict search, save yourself some digging and go directly to http://docs.jquery.com/Using_jQuery_with_Other_Libraries of your theme uses jquery for drop downs and such.
Simply adding the following code after the confliting scripts I was rocking and rolling:
var $j = jQuery.noConflict();
All the best, J
Hello
I use Lightbox 2.8.2 in my blog,WordPress2.7 all is right.
When i active an other plugin(Widget) jalbum badge, lightbox dont’ works have you an idea
Thanks
SVE
i’d like to publish the description of the image instead of the title (compare the Admin UI). Is it possible? Thanx in advance .y.
I thin I posted this in the wrong place before. Everything works great for me except for the close button. it’s as if there is no target box. any help would be beyond great thanks
Hey! I’m just wondering if anyone have any suggestions how to get an auto-resize-for-screen function to this version of the plugin?
It works like a charm on my wordpress except that I want it to resize to the screen. Please, anyone who can help?
I promise I’ve searched everything in this area but since I’m not a programmer it’s not an easy task!
weird. it stopped working. reinstalled. went back to older version, changed themes, turned off other plug ins… it loads image in new frame/page, and when i hit back then the black screen is over the original page, but w no blown up image… any clues?
Is there any way to exclude certain image links from the lightbox effect while still have it automatically applied to the rest— perhaps a code like rel=”no-lightbox” or something similar?
Great plugin. but have a question
Because im new in wordpress.
i have try to group some images :
thumbnail11
thumbnail12
thumbnail13
using that code. is the grouping is not working. any solutions? and instead of showing thumbnail1…2…3 and so on. is there any way to show the pictures in thumbnails and when click to enlarge?
Thanks indeed
Hi Rupert,
First, thank you so much for this plugin. It works very well. My comment is definitely an “enhancement request.”
Is there any way to make the plugin display the “caption” property of the image instead of the “title” property? Adobe Lightroom lets you put in long Titles, but on export they are cut 64 off at characters (argh). But if I populate only the Caption field (which allows longer text), then Lightbox only displays the image’s filename. I hate counting characters when entering image titles! Thanks in advance for any quidance and/or a new feature.
Great plugin!
Would it be possible to cut the amount of headspace above the overlay images in the next update? Screen space is pretty precious, especially vertical space. Less headspace would allow for bigger images.
Thanks!
Is there a way to get this plugin to work on older posts? It works fine on any new post that I make but when I go back into my older posts and add links to my images it doesn’t work.
Does someone know if this plugin does work with WordPress 2.8?
After upgrading to WordPress 2.8 I got errors in the loading of pictures with Lightbox 2.
– Michiel
the plugin works great!
but, it disables the theme built-in carousel on the home page… don’t understand why.
any ideas?
- Matt
Hi. I have a similar problem as mentioned above. The plugin worked fine, but since I upgraded WordPress to version 2.8 the plugin (Version 2.8.2) isn’t working any more. When clicking on a picture, the viewer doensn’t open anymore, but I get redirected to my Flickr-aacount. I also de- and re-activted the plugin, but without success.
any ideas on what is going wrong and how I can fix it?
Hi there,
I am running Lightbox 2.8.2 on WordPress 2.8 and it only works on Firefox. Could you please help telling me what I could do to fix that?
Thank you,
Fernando
Hey there. I installed the plug-in in seconds by the way – thought it was very easy and perfect instructions. My question is just about the layout. How did you get your images to appear beside each other on this site? the 3 examples, or even the grid in the footer of this page? Thanks.
Ok I uploaded 3 Pictures to one of my Blog Posts. I only Inserted One of them into the post itself and Published it.
Now when I click on the image in the post it pops up and works fine, BUT the other two images that I uploaded in the post Gallery (and didn’t insert into the post) does not show up.
My question is How can I STILL only post 1 picture in my post AND get the other 2 pictures to show up when viewing them only from the LightBox??????????
Hello, love your plugin with the small problem that I cant use the Close X button in Internet Explorer. It works great in the latest versions of Firefox, Google Chrome and Safari. Well the Close X button only make a link below the Close X text, but still on the Close X image. Very odd and is there a solution?
Hi this is great plugin but it has a little bug that is when your upload image is so larg the pop up box does not resize the original image too see that better view
i want too resize the pop up and image box when image is so larg but i cant editet please help
tnx
im using wp 2.8.1 & it seems to be working but i get a black bar across the top instead of the lightbox :/
it works really well on my portfolio page. I use WordPress 2.8. Thanks a lot for this awesome plugin! =D
Lightbox 2 was working just fine whenever i had the older version of wordpress 2.8.1, i upgraded to 2.8.2 and now it doesn’t work at all, it just sends me to the picture through a link instead of bringing up the lightbox. I’ve deactivated, unistalled, reinstalled and reactivated but still nothing. Kinda strange, any help? I’m using the Elegant Grunge theme and I haven’t hacked it, it worked at the beginning but now it won’t
Me too!!
I want the image description to be displayed as well and also want to be able to add html in both the title and desc.
Any help/resource would be helpful.
I guess I need to make changes in the gallery plugin I am using for wordpress.
I found my answer and now to see if that works.
Yeah it stopped working for me when I upgraded to wordpress 2.8.2 was fine on 2.8.1
Can i save the images? if no, there are anything that i cant do for this? (sorry for my english)
….it just sends me to the picture through a link instead of bringing up the lightbox… how can fix this …
Hello, I just installed the last version of your plugin because of upgraded my wordpress version from 2.3 to 2.8.2…
It works fine but one question : Is it possible to modify the visual effect (the speed) ?
Many thanks in advance for your help.
Best Regards.
Hi,
the resize function not work for me and some of my images look as the original size (sometime more then 3000px)
how i can create resize role and make the max size to 800×600 ?
Best Regards,
Levi.
I get this problemon IE:
Webpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Media Center PC 4.0; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30)
Timestamp: Mon, 3 Aug 2009 20:05:59 UTC
Message: Object doesn’t support this property or method
Line: 113
Char: 4
Code: 0
URI: http://www.ree-she.com/wp-content/plugins/lightbox-2/lightbox.js?ver=1.8
Hi
Congratulation for your WP-plugin, which is indispensable.
Just an idea to improve it. It would be very useful to set the maximum number of images (thumbnails) displayed on the homepage.
For example, my blog is made up of image galleries. On the homepage, I would like to display only the first 5 thumbnails of each post, and all images in the detail of posts.
Would you mind think of that?
I’m afraid that there is some bug, because this plugin doesn’t work in Chrome. I checked it in other browsers (Firefox, Opera) and it worked, so it is not my page’s fault…
Hey,
This plugin does not seem to work after upgrading to the latest version of WordPress (2.8.3). Any ideas? I see they update JQuery..
Jonathan
Thanks Jonathan for this information.
My blog is currently working with the previous version 2.8.2 of WordPress, and I use Lightbox 2 for dozens of galeries. I’m going to wait before upgradding Lightbox…
your plugin doesn’t work good in 2.8.3 wordpress. When I click on picture it show but the text near by picture disappearing. Not so “brilliant” as describes
HI THERE.. I just read through hundreds of comments and saw that there were a LOT of them asking about the ability to set a finite size or a max size for an image.. every time someone asks, the question is completely ignored.
Is this something that can be done by a code change/patch?? ANY ideas insights for someone who might want to get in and do it themselves?? ANYTHING?
Their plugin for WordPress works great as well in galleries.
Hi, I’m relatively new to web design and have been able to get lightbox 2 to work fine in my site. However, what I Don’t know how to do is get lightbox2 to run on a page other than index.html. Is it restricted to the index page? If not, how and where do I edit to make it run on, for example, a gallery.html page? Very grateful for any help.
Strange, i have same problem as Erik Öhman. When i click the “Close X” button, nothing happens. I must click outside photo to get the photo-window to close. I use latest macos X 10.5.8 and latest Safari and firefox. Nothing helps. Anyone have a solution?
Hi there.. AWESOME plugin. I love that I dont have to think too hard to add the lightbox effect to all of my images – especially since my blog is mostly images.. But i have an issue
I want to offer free downloads of wallpapers and backgrounds to my readers.. the issue is, since these files are jpgs – it automatically adds the lightbox effect. How do I remove this effec tto just have it open or download?
I am using the fullscreen theme with wordpress and I can not get lightbox to work. my site is http://www.michaelanthonyphotography.org. if i acitvate the plugin then it disables my menus (categories, pages, etc…) I know it works with this them because it is working on a friend of mines page http://www.joshnewphotography.com. HELP!!!
Hi, I tried to use the lightbox 2 plugin for my website. Its working fine, but what it has done is, it has messed up my other javascript codes. I have a slider anchor javascript code that slides me to comments section when clicked on comments. On activating the lightbox, my slider code doesnt work on deactivating the lightbox, the slider works fine. How can I use your plugin without it affecting my other javascript code and plugins ?
Hi! I’ve been working with lightbox since i started a blog, but, i don’t know why, it works in my past post and now isn’t working in my recent post!
http://www.missfit.com.br/blog/
do you have idea what it would be?
I did this post the sabe way i did the other!
Hello, I’m new to wordpress but have worked with other cms’s before like joomla and I’m currently testing your plugin on my localhost.
My problem is: The “rel” tag is not automatically included and when I type it in manually rel=”lightbox” it doesn’t work as well although the script is loaded in the header, unfortunately I can’t post you a link because the site is on my computer.
Any suggestions?
Many thanks in advance
Julian
hello
I m french (sorry for my english)
Lightbox was working , with also image manager installed.
And suddenly , picture open big but not in the same page .
Lightbox in always active, last version.
I didn t add a new plugin. and I don t see what is wrong now.
I give you the html code of one of my picture
thanks a lot for your help.
Help! The plugin works fine but part of my site (navigation menu) is not blacked out…. Can you tell me why?
I would really like to use your plugin! Please help me.
Thanks
Example:
http://es.konisto.com/2009/08/como-ser-buen-padre-familia-358.html
hi,
i’ve read the FAQ carefully rupert, and after several se- and re-installs of earlier versions of lightbox, i haven’t been able to fix my problem. lightbox was working perfectly until at some point (i was changing the theme code for wider posts) i lost the lightbox functionality – when a thumbnail is clicked it now links to a full-size image in a new window. a worse problem is that if i deactivate the plugin, the layout of my site looks completely messed up. i wish i could tell you what id did exactly. i don’t want to do a clean re-install of the theme, as i’ve customised it extensively. hope you can suggest something, i really appreciate it.
I’m having the same problem as Julian (described above)
My problem is: The “rel” tag is not automatically included and when I type it in manually rel=”lightbox” it doesn’t work as well although the script is loaded in the header (…)
How to add rel tag by default?
Hi
Thanks good plugin my qestion add image save button ?
Sample: /i35.tinypic.com/108fbxv.png
Great plugin, but can it be made to work when the image is being called as a custom field (this is required for the particular theme I’m running).
The lightbox displays fine when I click on an image included in a post but not when clicking on an image that is displayed as a custom field.
Can you help?
Thanks,
Andy
Great plugin. Im having an issue with the faded background though. Im running a resolution of 2560×1600 and the faded background always appears on the left hand side of IE and does not cover the website behind. Any ideas ?
Hello, I had already activated the plugin and it definitely works on my site, but I want to be able to customize how it works on my site so for now I have deactivated it until you can perhaps help me out.
I only want the plugin to apply to a specific text link that will say “View the interaction scenario”. When you click it I want the lightbox popup to display a series of 12 images you can click through (using “next” and “previous”). I do not want these images to be visible on the page, only in the lightbox popup window, when you click on that one specific link.
Is this possible to do with this plugin? Or do you have any suggestions as to better plugins to serve this purpose for me?
Any help would be greatly appreciated. Thanks.
Hi,
.2
I installed the latest version of the lightbox (2.2.8.2) but it doesn’t work with wordpress 2.8.2. At least not on my machine. I see in the source that in the tag there is a rel=lightbox[12] but when I click on the image the image gets opened in another window.
Do you have any idea what is going wrong?
Oh, the website is on a vm on my machine so it’s not available to review.
Regards,
Andre
Hi,
I use your plugin for a long time. Since I upgraded to 2.8.4 (wordpress) it started getting buggy on some theme’s. And now the plugin makes my navigation on my website dissapear. The only theme i can use is the default one.
Are there any updated planned allready ?
Hi,
Is there any way to add a link inside the caption?
Hello,
Great plugin! however, in my freelance page where I have the images the first group of images get hidden behind my header?? how do I fix it?? please help?? :(
I added this plugin a while ago and it seemed to work fine with the first 3 images I posted. All the images on the blog pop up in the lightbox just fine. However, only the first 3 images can be navigated through in the lightbox. So, if I click on an image, it pops up in the lightbox. The images for 9/21/09 and 9/19/09 which are currently on the blog have the navigation arrows that allow me to go to the next/previous image. All the other images, do not have the navigation arrows.
Did I miss a setting or option on the subsequent images? I’d like to be able to navigate through all the images if I’m on the main page.
Thanks.
Nevermind on the above post from me. My links were missing the rel=”lightbox[47]” syntax in the tag for the image.
However, another question, I have the checkbox selected to auto-lightbox the images. Should this checkbox add that syntax? If so, what am I doing that’s making it not add it?
Click on my name to view my site. Thanks.
i wish it was as easy as “Installation:
Put the lightbox-2 folder in your WordPress plugins folder, then activate it in WordPress. Implementing lightbox on your site is easy: create a link to an image. That’s it!”
it’s not on my blog :]
(unless i’m doing something wrong :}
Hy can you help me with something I tried for a few days and just couldn’t do it?
When I click on the image and it opens I want in stead of Image % of % to show the category from which the picture takes part?
P.S. I am using the ePhoto template from elegant themes
Seems like there might be a bug where if the previous image has been given a title tag and the current image has not, then the current image inherits and displays the title of the previous image.
Example is here (the 2 single images: the 2nd single image gets the title of the 1st single image):
http://sapsiwye.com/wordpress/2009/10/best-lightbox-for-wordpress/
an addendum to previous post: in fact, it inherits the title of the last image displayed (with a title)
This plugin works great. Though, I have one issue with it. Namely, if you would use it with a picture that is larger than your screen real-estate it will only take the with of the image into account so it will display ‘properly’. However, most of the time (especially on 16:9 screens) the height is the most crucial one. Therefore:
Please scale the image down if it is too large on both the width (max 100% of screen width) and height (max 100% of window content height).
Thanks in advance,
Eddie Turfboer.
I would like to see some before and afters or something so that we can see the difference it makes, anyway you can do that?
Snuggie Blanket
Hey
This theme is cool, but the plugin only works in my actual posts, and not on my main index page, or sidebar.. :( any help?
is there a class i can add to an image to disable the lightbox working on it. Just and image that i would like people to download and lightbox is picking it up and doing its thing.
Thanks
#Rory: disable Auto-lightboxing in settings and manually add:
rel=”lightbox”
in the image you want lightbox to work on:
Hi again,
You may misunderstood me, after I click the picture and the picture is opened with the Lightbox plugin in the part where it shows the title of the picture and the number of the pic to show the category of the pic with link directly to the category and link to the post from which the pic is from.
I have got your plugin to work on my theme but it conflicts with a “simplegallery” image fading script that uses jquery.
I can only get one of the two to work at a time; whichever one is loaded last in the page header.
Why is this and how can I get both to work??
Great plugin, works well.
I am trying to dynamically populate, with PHP, the wordpress ‘the_excerpt’ inside the title=”" portion of an image with lightbox enabled.
My posts support php execution outside the title tag.(Im using runphp for wordpress). Any guess as to why the image and title tag/caption fail to render with the php inside of it? Any suggestions on making this work?
Would be a great feature to my clients wordpress site if it works. modified TDO-miniforms take user non admin excerpt and image, forces lightbox effect, inserts excerpt in title tag for related caption.
I used a strip tags on ‘the_excerpt’ if anyone is interested in dynamically writing php captions, from user excerpts on user submitted photos via TDO-mini-forms and runphp plugin to create dynamic lightbox galleries; then message me.
Photos with spaces in the filename aren’t displaying lightboxed. Like, “photo 1.jpg” isn’t lightboxed, but “photo_1.jpg” is. Do I have some other problem causing this, or is this a lightbox problem? Is there a simple fix?
Hi! I really enjoy your plug in, but for some reason today it just stopped working. I wrote a post today that had pictures in it, and it worked just fine. Then later, it seemed like it would start to work (the background would dim) but then it would just jump to the image location rather than loading over the current page. I tested in both Firefox and Chrome.
I tried uninstalling and reinstalling the plugin, but that did not work. (Strangely, when it was uninstalled, my Google Friend Connect widget also no longer loaded correctly.)
I didn’t change anything today before it stopped working. Any ideas? I really like it and would like to get it working again!
(Note I use your plugin in conjunction with the “Add Lightbox” plugin, but that didn’t seem to be changing anything for better or worse.)
is there a simple way to not display arrows and just have the image change (in [gallery] mode) on click and loop all the images?
thanks, and keep up the great work.
I found that the problem with filenames containing spaces in my case actually was caused by those spaces being read as ” ” as they’re retrieved from a picasaweb account. lightbox2.php excludes files containing a % symbol. I added “\%” to the pattern matching lines in lightbox2.php to let % symbols be included and it now works with those files. Is there any particular reason why I shouldn’t do that?
Oops, I wish these comments were editable. My previous comment should have said … caused by those spaces being read as ”%_20” (underscore added so it doesn’t get converted to a ” ” in these comments). Hopefully that will appear right.
it’s a very useful plugin, thank you very much. i have only a little problem. i use also “youtube with fancy zoom” plugin in my site. if i active this plugin, yours doesn’t work anymore. it’s like if they were in conflict each other. do you know how resolve the problem? it’s not possible to use both the plugin? thanks
As it says in FAQ, if our theme is not compatible with this wonderful plugin, can anyone post here the solution – exactly what and where should we correct our theme to work with Lightbox 2?
thanks
Can an ‘image’ link that is not a simple image ‘file’ be made to work?
Specifically, this:
is the sort of ‘image’ I would like to have open in a lightbox. Google spits out a jpeg resource as if it was ‘agooglemapimage.jpg’
Excellent plugin, thanks a bunch! But I would like to translate it into swedish. Is that possible?
I’m having the same problem as Zach Ford… It seems the plugin did work once, but now it just dims the screen and loads the image location. Any ideas?
Lightbox 2.8.2 does not work with the theme SimpleX 1.3.1 by Chandra Maharzan. Not sure why and I’m hoping you or someone may have an idea how to fix it. Yes, I do think you know everything *sheepish grin*. I will continue to investigate and if I figure out the answer I will post it here to help anyone else having the same issue. Thanks.
YOU ROCK!!! That’s what i call making a correctly Lightbox plugin. Tried others, but yours is the one that really worked for me. Thanks a lot!!!!
Lightbox and SimpleX fix is to download SimpleX 1.3.2. That fixes the problem.
Google Friend Connect widget don’t work with lightbox, any idea?
GREAT work, without doubt the best lightbox plugin around!
Just really needed the resizing function on the window (lightbox already does)
Im sorry to say it worked great on Safari and Chrome…. but got stucked on Firefox and IE. Just won’t load the necesary scripts.
I am using WP v2.9 with Cleaner Gallery v0.7 and Lightbox 2 v2.8.2 and cannot get the lightbox to work at all.
I have many old posts where I have even deleted all the images from the post and re-added them from the gallery to no avail. I have tried adding the {rel=”lightbox[attachmentID]“} code by hand and that didn’t work either. What am I doing wrong or what do I need to adjust to get this to work.
Does not work here.
works now theme problem :(
First of all, thank you very much for all your hard work on this wonderful plugin.
Second, I am having a problem that the FAQ has helped me narrow down, but not solve.
All existing pictures posted with the former version of your plugin display properly (in posts/pages as well as in lightbox). However, no new pictures display at all (while the caption still appears).
I cannot find any conflicts with any plugins that I am using (I tested as per the FAQ).
I cannot find any conflicts with my theme (I tested with alternate themes, including the default wordpress theme).
I can somewhat bypass the problem to a certain extent… By unchecking the “Auto-lightbox image links” option in the Lightbox 2 settings it will allow the image to be inserted into the post/page and displayed, however without caption and without lightbox.
I also noticed that when that setting is checked (and your plugin is allowed to auto-format the image links), the image is still technically inserted into the post/page, but it is not displayed due to an error in the class attribute of the image tag. I will show you an example:
from this post: (found below the title and above the contents if you are checking the source code) http://alexsantidote.com/165/happy-new-year-welcome-2010/
found in the img tag:
class=”alignright size-medium wp-image-197 ytxocfmvwykghvcnvavn ytxocfmvwykghvcnvavn ytxocfmvwykghvcnvavn”
Not sure what all the gibberish is, but even if I manually edit the image after the post is submitted and try to update it, the gibberish is back again in some way shape or form (even if I remove the class attribute entirely).
I hope this is descriptive enough…
Thanks for any help you can offer, I know you’re very busy and with limited Internet connection!
…Alex
I was still getting duplicate rel tags in my anchors, which might also explain some of the troubles others are having. I am running version 2.8.2 on wordpress 2.9.0 with Cleaner Gallery 0.7 (though the examples I tested on were not in a gallery).
I was getting tags with things like
rel="attachment wp-att-7804" rel="lightbox[7797]"and I see in the features section at the top of this page that’s supposed to be fixed. Perhaps it’s the space in the rel tag that’s confusing things; I didn’t pick apart the regex to that degree. What I did was add a third pattern to the autoexpand_rel_wlightbox() function:$pattern[2] = "/]*?)>/i";
$replacement[2] = 'ID.']$9>';
That seems to have fixed things. Not sure if the order the patterns are checked matters; you might want to do a ksort on the arrays first. I’m not really an expert on regular expressions, so you might want to have your local whiz kids check my work.
Hope this helps!
Dang – seems much of the code was lost in translation. One more try:
$pattern[2] = "/$lt;a(.*?)href=('|\")([A-Za-z0-9\/_\.\~\:-]*?)(\.bmp|\.gif|\.jpg|\.jpeg|\.png)('|\")(.*?)rel=('|\")(.*?)('|\")([^\>]*?)>/i";
$replacement[2] = '<a$1href=$2$3$4$5$6 rel="$8 lightbox['.$post->ID.']$9>';
There’s a typo in the above, so with apologies for pelting your site I’ll post the code one more time. If I could, I’d delete the previous post…
$pattern[2] = "/<a(.*?)href=('|\")([A-Za-z0-9\/_\.\~\:-]*?)(\.bmp|\.gif|\.jpg|\.jpeg|\.png)('|\")(.*?)rel=('|\")(.*?)('|\")([^\>]*?)>/i";
$replacement[2] = '<a$1href=$2$3$4$5$6 rel="$8 lightbox['.$post->ID.']$9>';
Hi, me again. Turns out the above exposed a couple of other problems, and itself had a non-fatal bug. Looks like the case when WordPress adds a rel property in the a tag was more damaging than I first thought. So here’s what I did about it.
First, the autoexpand function. I first try to do a substitution with an existing rel property. If there is none, then I add the property in a second preg_replace:
function autoexpand_rel_wlightbox ($content) {
global $post;
$pattern = "!<a(.*?)href=('|\")([A-Za-z0-9/_\.\~\:-]*?)(\.bmp|\.gif|\.jpg|\.jpeg|\.png)('|\")(.*?)rel=('|\")(.*?)('|\")([^\>]*?)>!i";
$replacement = '<a$1href=$2$3$4$5$6 rel="lightbox['.$post->ID.'] $8$9>';
$newContent = preg_replace($pattern, $replacement, $content);
if ($newContent == $content) {
// no existing rel found
$pattern = "!<a(.*?)href=('|\")([A-Za-z0-9/_\.\~\:-]*?)(\.bmp|\.gif|\.jpg|\.jpeg|\.png)('|\")([^\>]*?)>!i";
$replacement = '<a$1href=$2$3$4$5$6 rel="lightbox['.$post->ID.']">';
$newContent = preg_replace($pattern, $replacement, $content);
}
return $newContent;
}
The javascript assumes that the lightbox rel value will be the only thing in the rel property, which is not always true. I wrote a little routine that extracts the lightbox image set id from the rel property:
function stimuli_extractSetID(relStr) {
var returnStr = '';
if (relStr && relStr.length > 0) {
var startOffset = relStr.indexOf('lightbox[');
if (startOffset >= 0) {
var endOffset = relStr.indexOf(']', startOffset 9);
if (endOffset >= 0)
returnStr = relStr.substring(startOffset 9, endOffset);
}
}
return returnStr;
}
With that routine, there were a couple of simple modifications to Lightbox.prototype.start(), to use imagesetID rather than the entire rel string. Where it used to say:
if((imageLink.getAttribute('rel') == 'lightbox')){I put
var imagesetID = stimuli_extractSetID(imageLink.getAttribute('rel'));if (imagesetID.length == 0) {
and for finding all images of the same set the conditional becomes
if (anchor.getAttribute('href') && stimuli_extractSetID(anchor.getAttribute('rel')) == imagesetID){(Sorry, I don't have the exact line of the code I replaced.)
I hope this helps; I expect many of the troubles people are having stem from this issue. I have ONLY tested this solution with the automatic tag modification turned on, but it should work for others.
Also, this might be a good opportunity to remove square brackets - stimuli_extractSetID could be written to support square brackets or a dash, so going forward new code could be made in a compliant way.
(crossing fingers that formatting comes out ok...)
HI there – I installed your plugin and everything works fine except that I cannot see the arrows at left and right and cannot click to navigate through the pics. Did I miss something? Here’s the page: http://www.be-yogastudio.com/gallery/. Thanks!
I am working on a clients site and incorporated your wonderful plugin… while it works on some posts, it doesn’t work on others. Personally, I can’t comprehend while it would work in one portion of the site and not in the other portion. I am using a very slightly modified version of a default wordpress theme.
Works on this page: http://shanecoequipment.com/wordpress/?page_id=130
Doesn’t work on this page: http://shanecoequipment.com/wordpress/?page_id=23
You’ll notice, on the page that it doesn’t work with, that it still runs the background fade… but then, instead of loading the image over-top of that… it loads it as it’s own page. I hope no one else has asked this yet, I read through a good portion of the comments here, and didn’t notice anything. Thank you again for an awesome plug-in, really hope you can help me enjoy it’s full potential.
I see now that Travis and Zach Ford reported the same problem that is occurring on my problematic page…
*correction Zack (with a k) Ford
The Plugin doesn’t work on WP 2.9.1 (?).
Thanks a lot for this great plugin. I’m using Version 2.8.2 on WordPress 2.9.1. But I have one little feature request. For better theming capabilities it would be great if you could add a class (e.g. “lightbox”) to the image tags.
This could be easily done by changing line 55 of lightbox2.php:
$replacement[0] = ‘<a$1href=$2$3$4$5$6 class=”lightbox” rel=”lightbox['.$post->ID.']“>’;
What do you think?
Greetings from snowbound Germany
Christoph
my problem seems to have magically corrected itself… must have been a cache issue like some of the previously mentioned errors.
Thanks for a great plugin! Is it possible to have images resized to fit current window (as to avoid scrolling)?
thanks forthis lightbox cool :)
I’m using Lightbox 2.8.2 with WordPress 2.9.1. In my latest post (http://www.mrbungle.nl/2010/01/17/machinefabriek-peter-broderick/) the lightbox doesn’t seem to function anymore, while in earlier posts it does. What’s the problem?
Hi Rupert,
installed the plug-in on my custom theme and it seems to be working nearly perfectly except the left / right arrows for flipping thru a series of images. I’ve got three images on my first post to test out the plug-in ( http://www.wehmueller.net/blog/2010/01/18/filter-vanishing-point/ ) and for some reason I’m not getting the “next” arrow on the second image to get to the third (keyboard navigation works fine). Does it have something to do with the fact that I squeezed in the second photo a day later? The links all have a matching “rel” attribute, though.
Thx
Hi,
Can I add links under the alt/title of the photo/image? Like for example a link to my category from which the photo/image is from?
Hi there, what dimensions should I size my photos for MAXIMUM QUALITY and MINIMUM LOAD TIME? Thanks for the help.
LOVE THE PLUGIN!
Would love to see “custom theme” support in the admin panel. Just putting it out there :p
Hiya,
Thanks very much for this neat little plug in.
However for some reason it doesn’t work on one of my pages (http://www2.canapeum.com/home) but works fine on others (http://www2.canapeum.com/news). I can’t get my head around this issue and it is driving me mad… Any ideas about what have gone wrong?
Thanks
Hi, and thanx for the plugin.
Is there a way to exlude the entries from pages?
I´ve deactivated the plugin and put that in the header, but lightbox dosen´t work any longer. Or are there other ways?
Sorry, once again. The html and php code is gone.
is there a way to exlude the plugin from pages?
thanx for your help.
The plug-in still assumes that the wp-content directory is located under the WordPress root, but WordPress allows this to be located elsewhere these days.
Can you please modify lightbox2.php to use WP_PLUGIN_URL instead of calling bloginfo()? I have to manually fix this after installing each new release at the moment.
Thanks for a great plug-in.
Yes, yes, I can fix that. I’m out of the loop WRT WordPress. I’m not hip to all the new APIs and functions.
Hi Rupert!
All I wanted to say was, your plugin works FINE on my two websites. Both as a stand-alone and together with NGG Gallery. Beautiful overlay and a awesome plugin. Thank you!!
The plugin stopped working in actual WordPress 2.9.2.