Lightbox 2.9.2 plugin for WordPress
Update: Now handles correct image resizing for smaller screens (optional, off by default).
Features spiffy new auto-lightboxing code courtesy of the talented Michael Tyson.
Please read the Frequently Asked Questions included with the plugin before posting a comment!
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:
- Resizes large images to fit the viewer’s screen.
- 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.
- Grabs the title from the img title or the img 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.9.2 plugin for WordPress,” an entry on stimuli.ca
- Published:
- 02.07.10 / 11am
- Category:
- Software



I do not want this plugin to resize to the browser height or width. Everything worked like I wanted it to, full 100% resize. After updating today it resizes to browser window. How do I make it resize to full 100% size.
Hello!
This plugin seems to mess with certain tags – the output from my plugin, flickrpress, for example:
<a href="http://farm5.static.flickr.com/4039/4337325635_0ecca22f1a.jpg" class="thickbox" rel="lightbox[flickr]"
title="Douz animal market | <a href="http://www.flickr.com/photos/michael-tyson/4337325635">View at Flickr</a>">
I took a look into the Lightbox 2 plugin – the regex that performs the replacement is actually a tad clumsy and inflexible, hence the tag mangling.
The following will do the trick; I’ve tested it on my site and it now works properly. It uses a negative lookahead to avoid performing replacement on tags with the lightbox “rel” value already, instead of performing the change, then ‘fixing’ it, which is what the prior regex was doing, mangling the tag in the process:
function autoexpand_rel_wlightbox ($content) {
global $post;
$pattern = "/(<a(?![^>]*?rel=['\"]lightbox.*)[^>]*?href=['\"][^'\"] ?\.(?:bmp|gif|jpg|jpeg|png)['\"][^\>]*)>/i";
$replacement = ‘$1 rel="lightbox['.$post->ID.']">’;
$content = preg_replace($pattern, $replacement, $content);
return $content;
}
Hi, Michael.
Sorry, but I am not technical. In which lightbox 2 file do I place this?
* lightbox-2/lightbox2.php
* lightbox-2/options.php
* lightbox-2/readme.txt
* lightbox-2/lightbox.js
And where in the code?
Thank you for your help.
Hello Michael!
First, thanks for your plugin. I have been using it for quite sometime.
My question is along the lines of Shell’s: How to stop it from resizing images? I really liked it when it didn’t do that, and besides, it’s not resizing the images proportionally to the original image’s aspect ratio, distorting them in the process.
Thanks for your help.
Alexandre
Brazil
I’ll see if I can make it optional.
Rupert, that would be ideal. Thanks for your attention to this.
Hi Rupert, I am working on using your Lightbox 2 plugin with my WP-ImageFlow2 plugin. The problem I have is your start function requires the imagelink to have a childnode, if not the script hangs infinitely. Is it possible for you to test for the presence of childnode before doing the title search?
Shell! You are so right! That is *exactly* why I came here. Everything was working perfectly until I updated, and now it is resizing images, which I don’t want it to do. Please, Rupert, if you can, make that optional. Otherwise I love this plugin, it is phenomenal!
I’ve added Michael’s regex, made resizing large images optional (see Settings->Lightbox 2) and I forget what else.
Thank you, thank you, thank you. It works perfectly once again. Where can I donate some money for this plugin. I owe you for this.
Rupert thanks for the great plugin –
If there is any chance to make the resizing happen proportionally? As some others have mentioned it seems to stretch. I for one would love this feature.
Thanks again for great work.
I wanted to point out that I just upgraded from 2.8.2 and there is a conflict with these scripts that allow the navigation to animate using jquery. The prior version worked fine with these scripts so now I can’t use the plugin.
Does anyone know what in this new version is breaking the jquery navigation from working properly?
Any insight would be greatly appreciated. Thank you in advance if anyone can help.
http://www.martysgrill.com/home
First of all thank you!
Question: does it add itself to the posts or pages where I already have added images?
Since the update, Lightbox seems to be having trouble with photobucket links now. Before, it either loaded them correctly or allowed the user to go fullscreen without the thickbox. Now it just leaves the user stuck on the “loading” screen.
I agree with the above post regarding the auto-resize. It’s not keeping the aspect ratio the same, so it’s not as useful for my site.
As well, selecting auto-lightboxing doesn’t seem to do anything to my image links. I’m pretty sure there’s nothing in my WordPress theme that would be messing with the rel parameter either. Any thoughts?
This is one of the pages where clicking on the pics leaves the user with a loading box: http://frp.unlimited2.net/sw-a-new-skope/
It worked correctly in version 2.8.2 and 2.9.
Wander, You are linking to a photobucket page, not an image.
image: http://img.photobucket.com/albums/v169/cmdrkoenig67/han_solo.jpg
page: http://smg.photobucket.com/albums/v169/cmdrkoenig67/?action=view¤t=han_solo.jpg
OK, images resize without stretching. I also fixed some other stuff. Phew. I’m burnt out!
I am trying to get this plugin working with my theme. I searched the default & classic themes header.php files for ‘wp_header()’ and I was unable to find any reference to them. Is there an updated guide on how to get this working with my own theme? My theme was copied from the default theme and modified.
Thank you so much Rupert for this new update. It is so much appreciated!
Hi,
I am having a trouble when I am using both wordpress and ecommerce plugin. When I use the lightbox it does not want to disappear when clicking on ‘close’ it does, however, close when I press ‘Escape’ on the keyboard?
This is very strange and I do not understand why keyboard works and clicking on close doesn’t. Can someone help please. Here’s a page where the problem occurs:
http://n-ll.co.uk/products/copy_of_3X-Ginseng.html
your awesome
Hello,
I am having issues with some portrait style photos. The plugin works amazingly for all landscape photos, and some portrait photos, but other portrait photos looked squished and scrunched. Is there a way to fix this?
Thank you,
Jim
I do not know if this will help at all but a Portuguese website got around the problem I am having. The URL is http://www.raulnunes.com/. All of his images are resized correctly using lightbox
Okaaay well I see the update for the plug-in fixed this issue.
Sorry for bothering you!
The plug-in is amazing so thank you very much!!
I don’t really want the previous and next function. Just want people to be able to zoom in on selected image.
I could “break” it by removing the prev and next images, even in CSS, but that seems clumsy
It would be a good option.
Meanwhile, any suggestions on how?
I was having trouble with this plugin – the lightbox wouldn’t appear and I got a link to plain page with the photo. As you advised I tried disabling and re-enabling my other plugins and found that it was Image Rotator Pro (it was in my header) that was screwing it up. Just in case that helps anyone..
Thanks for the great plugin, it looks very smooth :-)
Hi thanks for the plugin and making things automatic. I have problems with the latest update. Doesn’t seem to work anymore.
I deactivated and reactivated and nothing seems to work. The only plugin that might have a conflict is Nextgen Gallery, but your plugin was working fine before the last update.
Any ideas on what could be going on? I looked at my header based on the tip that Georgie did, but my header did not have that Image Rotator Pro code.
Hi. I’m having problems with the plugin.
The old version didn’t work and with the update suddenly it worked. But now, it only works for my old pictures on the site, not the new pictures I added today to a post.
For some pictures in that post it will go straight to the full size picture and for others it will tone out, give you a black screen and then jump over to the full size.
Any ideas what the problem is? I have used it both with and without the plugin called “faster image insert”, but I used that plugin with both posts and one is working, the other not, so I don’t know what can be the cause.
I have tried deactivating it and activating it again and I have deactivated all the other plugins too. No luck.
Hi,
I have a new WordPress installation and the plugin does not seem to work with 2 new themes I bought. I read all documentation I found available from your site and the plugin but it is not clear what I need to do to resolve the conflict.
You mention in one place that themes can magle some image properties and I have to hack some CSS – what am I looking for? At the top of this page though you mention that the plugin is supposed to not conflict with virtually any theme. So not sure why is it not working…
Basically I get two images popup. It works properly with the two default WordPress themes but it fails in the same way with 2 new premium themes that otherwise seem to behave very nice.
For clarity, I set up anotehr new WordPress installation just to demonstrate this and using a theme does shows exact same behavior – http://voraciousminds.com/
Are you taking donations? This plugin is excellent. I’d love to send you a few bucks to promote further development and support!
My PhotoBlog Chayacitra looks MUCH better now =)
Hello, I am a new WordPress user.
I installed the newest version of WordPress (2.9.2) onto my host earlier today, and got my website setup…
The issue I am having is that Lightbox is not working.
I have tried my current them, and the default wordpress theme, and it still dosent work.
I have tested in IE and FF with the same results.
I get this error message when the images try to load:
Webpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; GTB6.4; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.2)
Timestamp: Tue, 16 Feb 2010 12:04:28 UTC
Message: ‘style’ is null or not an object
Line: 33
Char: 6
Code: 0
URI: http://danieldare.com/main/wp-content/plugins/lightbox-2/lightbox-resize.js?ver=1.8
Message: Object doesn’t support this property or method
Line: 3938
Char: 9
Code: 0
URI: http://danieldare.com/main/wp-includes/js/prototype.js?ver=1.6
If I am reading this right, does that mean that the latest version of wordpress dosent work with this plugin?
If it is a fix you cn address, please do asap! I would LOVE to be able to utilize this app :)
-Daniel Dare
Thanks, Tim!
I purposely don’t include paypal nags in lightbox. You are the second person to actually seek me out (Shell, above, was the first) and offer a contribution. That’s really quite remarkable.
Anyway, if you’d care to donate, my palpal ID is stimulusresponse@hotmail.com
Music is the main thing I buy, so you’d be feeding my love for Beatport tracks. I’m in India for a third year in a row and really miss my sweet, sweet electronic music.
Dan: you have what is known as ‘jQuery/Protype conflict’ and it has nothing to do with my plugin.
Just wanted to say thanks for answering my question and you are right – the themes had already lightbox installed though not triggered properly.BTW – your plugin is great!
call me dumb but I can’t find where to change the theme for the plugin from black to white or gray… said WordPress options.. I dont see them. :(
Hi,
I’ve read all faq and so on and can’t find my problem here. Well then I installed Lightbox for WordPress and it works fine.
But I got a white line at the bottom of every picture.. really anoying.. some help?!
Hi,
I discovered that the plugin isn’t working anymore on my blog. Before it worked all well. but i have nothing changed inside the settings or database. more people having this problem?
i am using the theme: Aras theme (which worked before with lightbox2)
Thank you for this plugin !
I am having a problem out of the clear blue-
all of the sudden my lightbox 2 will no longer display images, except for the posts where I only have 1 image linked. I have updated to the newest WP and lightbox 2 versions-
everything worked fine before but now it will not display my images in lightbox if more than 1 image is linked.
http://frederickheidbrink.com/blog
please help, love the plugin !
-FRH
Fred: your jQuery line you added to lightbox.js is breaking the javascript. Please remove it.
Great plugin, I really like the look that it adds to my Lazyest gallery. I noticed one small problem when using Lightbox 2.9.2 with Lazyest Gallery 0.15.6.1 but I don’t know which plugin is causing it. If the images in a folder span multiple pages, the Lightbox view doesn’t work for the images in that folder. I’ve worked around it by switching off pagination but thought you might like to know about it.
I really love this one and use it on my site http://www.devogelman.com
I have a question though. On my site there’s a java apllet visible whichs shows my webcam. When clicking on an image, the lightbox shows with the image partly behind my java-applet. I know, this is common behaviour…
BUT…
The last part of the lightbox (the footer with the close button) shows OVER the java-applet. Will it be possible to make a next version that does that for the whole image?
Check for an example: http://www.devogelman.com/2010/02/walnoten-voor-de-winter/
Kind regards!
Ed
that was fantastically easy. i’ve only tested it a few times, but I just installed your plugin and it looks great. thanks.
Hi there,
I became a fan of your plugin when I tried a picasa gallery with lightbox 2 integrated. Now I’d like to use it on my whole website, but it interferes with my theme. The pics are ‘beneath’ the banner header. Can you tell me what to do to solve this? Thanks!
Hi!
The plugin works great for Firefox, but for IE8 it doesn’t. Any tips or tricks?
See the site in the link on my name…
Already fixed it with z-index!
Hi Rupert,
I love this plugin! It’s great and it makes your website more professional =). I was testing it on several browsers (IE8, Firefox 3.5 and Google Chrome). It worked all fine except Google Chrome. The Close X button doesn’t seem to work. Or am I the only one having this issue?
Keep up the good work!
In addition on my post above: Close X button doesn’t seem to work for larger size images (in my case: 1029×684). Smaller sizes works fine.
Why have you deleted the option to adjust the transparency and lightbox resize speed?
I really need these features.
This plugin is not working when you have Jquery Lazyload plugin activated, any suggestion?
http://wordpress.org/extend/plugins/jquery-image-lazy-loading/
I’ve got the IE8 problem too. The screen turns pitch black instead of dimming. FF works sweet.
Since upgrading to the latest version of Lightbox it no longer works consistently on Firefox on both Mac and PC. At http://daveingram.ca – images no longer clickable, Lightbox doesn’t seem to work (Pyrmont theme). On http://IslandNature.ca it doesn’t work on the main page (home.php) but for some reason seems to work on the single post pages (Gridline Magazine theme). Any ideas of where the conflict could be? Seems weird that it would work on one page in a blog but not another…
Thanks – love the plugin when it works!
My apologies – it seems to be the latest posts that don’t work i.e. the ones added after the last update. Older posts seem to be OK, just my latest two posts added yesterday.
Maurice: well done.
Khai: I can’t reproduce the bug on Chrome 5 Mac. Link?
TW: google ‘jQurey prototype conflict’
deVogelman: I will investigate.
Dave: Link?
How can i solve this conflict, can you tell me if possible?
The new version broke my site. It created a dropdown lightbox with menu that showed on every page of my site. Very odd. Worked great before the update. Now I have to keep it deactivated. You can check my site to see.. I’ll keep it “broken” for a couple days in case you want to take a look.
*plugin conflict*
read the FAQ
fair nuff.. i noticed i didn’t need the plugin too. strangely though, i couldn’t make the other plugin work w/out yours when i first tried.. which was why i added yours. now it seems the one plugin will suffice.
thanks for taking a look.
Hi! First of all, great plug in!
But I’m experiencing some problems because once in a while it doesn’t work (and the picture gets bigger as there would be no plug in). In order to make it work again I have to delete the cache. Do you have any idea how to fix it? I’m working on WordPress 2.9.1, with a slightly modified defaul theme. I tested it with Firefox 3.5.8, Chrome 4 and IE 7. I had the same problem with alll of them.
Thanks a lot!
The lightbox is working fine on my website, but today suddenly lightbox won’t load for this image i uploaded.
All the other images are working and the settings are exactly the same.
Could this be a filesize problem or something?
Hey Rupert…thanks for all your hard work on this…simple Q:
any way to change the text @ the bottom of lightbox to the image filename instead of ‘Image __ of ___’
thx!
Hi Rupert,
I love your plugin and it worked great until the latest update (or at least somewhere around that time). Since 02/16/10 the images are being linked to a separate page, showing only the image (like so: http://don-f.com/blog/?attachment_id=71) Older posts are properly showing lightbox-behaviour (e.g. here: http://don-f.com/blog/?p=50) I’ve already tried deactivating all other plugins, but to no avail.
Is it possible the latest WP update (2.9.2) messed something up? My theme is in its original state.
Thanks a lot for any hints!
br, D.
The lightbox-2 plugin only works for White for me. The other colors do not work. Any ideas?
Maria: All the contents of your blog have to *finish loading* before lightbox activates. If one tiny thumbnail image is straggling, lightbox is not activated until it is done.
Steven: link?
Nathan: dig around in the lightbox.js and lightbox-resize.js
Don: It must have something to do with how you are adding images to posts. Make sure the link for the image is the *image URL*, ie: ends in .jpg. Be careful when posting not to select another option in the WP embed image thingie.
Robert: delete your chache, both for WP and your browser.
Brilliant, that did the trick! Thank you for your help. :)
br, D.
@Rupert: Thank you, that seems to work.
Thank you. that was exactly what I was looking for. Made my life much easier. Thanks.
How do I disable Lightbox 2.9 on a per page basis.
I have lightbox2 installed on my wp blog. I love it! Only problem is that the images in my last post which was created last night do not load with in lightbox. All settings are correct and equal to other posts on my site. Other post images seem to load in lightbox fine? I have checked plugins so that’s not the issue. Not sure what’s going on here? When clicked, the screen starts to darken like it usually does, but then it just opens to the actual image. The image doesn’t pop up in lightbox at all.
Please help me figure out why this is happening! ;)
Thanks,
Ry
Found it! Can you suggest a change? (instead of image 1 of 12…just display filename)
Element.setInnerHTML( ‘stimuli_numberDisplay’, “Image ” eval(activeImage 1) ” of ” imageArray.length);
Hi: If I call jquey separately on a site, the Lightbox plugin trashes it (or vice versa depending on my call order. Anyone else have this issue?
Hi, i´d love to use this plugin.
I installed it like in the faq. I also activated it.
But now when i write the code for linking an image nothing happens. The picture shows up normally. What do i do wrong?
Fixed it. I deleted all of the uploaded images from my media library and re-up’ed them. After re-upping and inserting them back into the post it now works fine. Not sure what the problem was? I’d still be curious to find out…
Thanks for a great WP plugin.
Ry
Hi,
I have a question with Lightbox 2
Could it be that it has problems with some WordPress themes? I have one designed by mono-lab and installed Lightbox 2. Everything looks ok but it doesn’t work.
Perhaps you can help me :)
Kind regards
Libertas
Version 2.9.2… Going hand in hand with WordPress.. :)
Great plugin! I specially like that it does not add much to the page load time. Will give it a try.
great, it works again!:)
BUT …wher is the background color adjustment option???
ok, i found out how to change in the lb theme css. sorry for bothering. thanks for the plug!
Is there any chance you will include a slide show feature in the future??
Hello, thanks for your plugin! Is there a way I can resize the images like little squares like yours? For example, the image is shown as a little square thumbnail (like yours) and when clicked, it expands with lightbox 2?
Thanks a lot!
i don’t know why, but sometimes it works and somethimes not.
i dont know what to do.
please can you answer me to the mail?
i don’t know what happens what it works only it wants, the same image somtimes works, and sometimes not, what could i do?
Hi there,
I have had Lightbox 2 installed on my WordPress blog for about a year and it has always worked like a dream.
However, the other day when I was checking a post – I noticed that images were no longer opening through Lightbox.
I have made no changes to the theme I have been using and have looked at all the possible causes I can think of – but can’t seem to get to the bottom of the problem.
Any ideas why it might have just suddenly stopped working?
Any suggestions would be most welcome!
Thanks
John
Hello!
I really love your plugin and find usefull the auto lightbox option but I need to avoid the light boox in 4 images I used on the homepage of my wp blog.
Can you tell me what I need to add to do this? You’d be very very kind!
Thanks!
Hello I would like to know why when I link an image I do not get a thumbnail, instead I just get a normal link. Though when I click on the normal link instead of opening a new page with the link on it, it opens the light box. How do I get the thumbnails to work?
The link to my post is as follows:
http://www.talksontech.com/smartqv7-review/2/
After the “Design” section I have links to various pictures that simply won’t display thumbnails.
Any help would be appreciated! Thankyou!
PeterV
I was having problems getting this (or any!) lightbox style to work, eventually worked out it was because I had “featured_gallery” plugin activated which came with the theme I was working with. Not sure if anything can be done to fix this, I’ll work around it but it might help someone else get it working!
Great plugin, but will not run on the same page as “YouTube with fancy zoom” which also utilizes some sort of lightbox. I don’t want to give up on either, so hopefully the incompatability will be fixable?
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?
Like in a post when you can click the category link and it takes you to http://domain.com/category.
If my explanation is to weird:
How can I add links next or under the title of the picture in the plugin when you click a image like here, in stead of the Boy and his Turtle to show a link.
Again ;)
I have done all the things in the FAQ.
I installed it like in the faq. I also activated it.
But now when i write the code for linking an image nothing happens. The picture shows up normally.
Did i forgot to add something in any .php?
What do i do wrong?
My Page is here http://fraubeutel.de/
I would be so happy if you could help me, i´m pretty new in WordPress but try the best. ;)
Cheers for the plug-in, although im pretty sure this is theme related but over at statusevents.co.uk the images are not positioning properly in the bounding box. I was wondering if anyone has any thoughts/tip/tricks to fix this,
Thanks
Dom
Did anyone figure out how to remove the line beneath the images? Or how to remove the lightbox on a per page basis?
I installed the Lightbox 2 plugin. It works fine, but not on every page.
The following pages it works fine:
http://www.packleader.be/over-mezelf/
http://www.packleader.be/mijn-honden/
The following pages it doesn’t work (just shows the picture)
http://www.packleader.be/diensten/privetraining/
The exact same issues occur when I use another theme (standard WP themes)
Any ideas? Thx in advance!
Hi,
can you insert a button in the image mask (like arrow or X to close) for FULLSCREEN VIEW MODE?
I have my thumbail and when I click over, the plugin FLEXIBLE LIGHTBOX show me the mask with the image to 800×600, for example but i need to switch at FULLSCREEN mode like youtube and so on.
Is it possible?
Tnx in advance & best regards!
..::EnZiS::.. ^_^
Hi,
I a having a problem. Lightbox keeps breaking. It works great for a while, and then it will stop working. Then it might work again…
I have tried everything. Tried using it with the simplest of themes. Tried uninatalling and reinstalling it. Tried disabling other plug ins…Tried unistalling and reinstalling wordpress…etc.
Any suggestions or ideas of things to look for?
Hi,some of my pages have a lot of images on them, as it’s a photography site. The result is that some take a bit longer to load than I would like. Often times a user may click on one of the images before the page has finished loading and before the required lightbox logic has loaded. The result is that the image simply opens in a new window rather than the cool lightbox overlay. Is there a way to create an overlay that shows “loading” or something until after the page is fully loaded? I’ve searched for something like this and been unsuccessful. THANK YOU!!
Featured Content Gallery and Lightbox 2 don’t seem to work together, they both work seperately but once both activated at same time neither work. Can you email me about this?
Great plugin but we seem to be having the same issue as some others where the close button doesn’t work?
Page with this issue here: http://thebloghouse.com/design/wordpress-theme/
Thanks
Read the FAQ, and get back to me when you’ve figured out the source of the problem.
I got it working great, but it opens a white light box and a black light box.. white over black.. so they have to close the top one (white) to scroll through images in the black light box..
Totally confusing.. If i turn off the plugin, the images don’t lightbox at all so i don’t see a conflict.
hi michael,
i’ve installed lightbox 2.9.2 on wordpress 2.9.2 an get the following error:
Details zum Fehler auf der Webseite
Benutzer-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; CMDTDF; InfoPath.3; Tablet PC 2.0)
Zeitstempel: Fri, 19 Mar 2010 10:44:46 UTC
Meldung: Das Objekt unterstützt diese Eigenschaft oder Methode nicht.
Zeile: 113
Zeichen: 4
Code: 0
URI: http://www.enigma.at/blog/wp-content/plugins/lightbox-2/lightbox.js?ver=1.8
any tips for me to solve the problem?
thx
Hi Michael,
I can’t get lightbox to work with my theme : http://www.flexible7.com/bluebubble-wordpress-theme/
I’m assuming this is because of jquery image settings it already uses. Is it possible/easy to tweak this to work on my blog? I will be using the theme’s image settings for the portfolio pages, but wanted to use lightbox to view images on theblog sections that don’t implement the theme’s jquery technique.
Thanks!
Rupert,
Is it possible to disable lightbox for specific images within a post? Could I apply some custom class to it?
Thanks,
Dave
Hello there… should the plug-in work with the new WP “post thumbnail” feature? Mine does not work… when I click the larger thumb on the single post page, it just points back to the permalink and loops back on itself. At this point I am not sure if it is the plug-in or my theme which is not a typical setup (Elegant Themes). I would appreciate any help figuring this out. I have read the FAQ and have posted this same request for help on multiple forums with no real guidance yet. Thanks!
Randy
Lightbox is working beautifully on any photos that I uploaded while signed in as Admin, but it doesn’t pop the photos put in by any other user.
Here’s my story:
http://myveronanj.com/2010/03/21/house-snooping-claridge-condos/
Here’s one done by one of my staff on her log-in
http://myveronanj.com/2010/03/20/crock-it-beef-burgundy/
But if somebody else uploaded the photo and then I, working as the admin, delete it and re-post it from the Media Library, it works.
Also, the top image pops under, instead of over, our nav bar. Any thoughts on fixing this appreciated.
One more thing. It seems to be canceling out MapPress, which we also have installed.
The overlay doesn’t cover the full screen for some of the themes. I believe the it covers the full width of the page, but in cases where the browser window is actually bigger than the page width, it is obvious that only portions of the page gets overlayed.
i facing problem with Lightbox 2.92 wordpress 2.92. some post with png cant’ show with lightbox. some post can. why?
is that the photo file size problem or the resolution have set limit?
when i test with my own desktop it can work, but when on server it can’t.
Same questions as: Chris 02.10.10 / 11am
—-
BACKGROUND:
I brutally hacked the heck out of “delight” theme to make it jive with the rest of my HTML based site.
THE PROBLEM:
Basically when I click the thumbnails they link to a seperate page rather then do the nice gallery effect – Lightbox 2 actually used to work some time ago, but no longer. I am flumoxed.
In your readme.txt you advise looking into Header.php in the default theme for wp_header(). It’s not there so I have no idea where to start.
I’m essentially stabbing in the dark and would super much appreciate being pointed in the right direction.
thanks man,
-Tonky
Does the server need anything installed for this to work? i am able to get it to fire on one but not the other so i had them install the GD library but that didn’t work either any help would be much appreciated.
thanks!
kmaier
Hell, why you can’t tell people how to use it with a neat example. What do you mean with a link? A link from workpress, a link in HTML with the a-tag…
Dude, I wasted half an hour, because I thought it would work together with the media library of WP and because you can’t tell it at the plug-in page at wordpress.com, instead you just mention in a list what it can do!
Im a pro, trying to make a living and I am not interested in your blog at the moment and at almost 1 am not at all, sorry… I’m tired!
Just tell the people from the start how to use it, okay – instead of having here 107 comments… do you answer here? I saw your name Robert only twice! Neat marketing letting a community to debug right from the start… :)
Btw, when the comment is too long the box here is shifting over the send button, thats not good. I am using firefox 3.5.8, yes I know I should updated to 3.6… just btw.
Hi,
great plugin, only it works to well. The thing is that it kills jCarousel Lite (WP plugin) functionality in my slideshow on the frontpage, where I by the way do not have images requiring Lightbox.
Could I bother you for some help on this? Maybe some code in the functions.php does the trick?
I’m just a noob a don’t know much about PHP code. Tried searching around, didn’t find much to be helpful.
Thanks in advance!
Just wanted to say that my Lightbox problem was a link to image issue. When I upgraded my version of WordPress it defaulted to the “no link” option when inserting an image. Changing that to “link to image” solved the problem. Awesome plugin! Thanks
hi!
this plug-in is stupidly simple, and works great, but I’ve found that it conflicts with WP-Insert Plugin. If I deactivate WP-Insert LightBox goes fine…
What determines how many photos can be viewed by clicking “next”? All the photos in a given folder on the server? If I want a gallery of all “A” type photos do I put them in a specific “A” folder and if I want a gallery of all “B” type folders do I put them in a different “B” folder? I wish there was some documentation on how to use this plugin.
But thanks, the price is right!
I’m struggling to get lightbox working properly with ie8. I’m using WP2.92 and lightbox2.92. Everything works great in FF. I know it’s something to do with the CSS in the theme I’m using but I’m not sure where I should be looking…
I’m using lightbox on single images and while it ‘works’, if the black overlay is always positioned at the top of the screen so if the page has been scrolled at all, the black box only covers part of the screen (or none if you;ve scrolled down far enough). I’ve found several other people talking about this problem, but no solutions as yet.
I’ve gone through my theme’s css commenting out sections to see if I can find the offending part but no luck – so I guess it’s more than one section. Could you possibly put something together that indicates what kind of css properties will break lightbox like this so at least we know where to start looking? I guess I’m asking for some examples of ‘bad’ css that cause this kind of behaviour.
Thanks for your work on this plugin, it’s much appreciated.
Hello. Thanks for the great plugin!
Can someone please instruct us on how to disable (or “remove”) this plugin on a page-by-page basis?
For example, some pages will have other scripts with which Lightbox 2 will conflict -OR- we simply want to make it so the user does not have to load Lightbox 2 scripts on pages for which there are no images.
I’ve tried adding the code
[code]remove_action('wp_head', 'lightbox_styles');[/code]
to the header.php & functions.php files — but it does not help.
Anyone else have a solution?
Thanks!
Add line: add_filter(‘comment_text’, ‘autoexpand_rel_wlightbox’, 99); in new version, please.
Hi Rupert, and congratulations for the great work !
I have a problem though, and didn’t find the solution in the FAQ / comments above
The plugin works just fine on some pages like :
http://on-verra.net/plongeepassion/tarifs/tarifs-explorations/
http://on-verra.net/plongeepassion/formations/le-niveau-1/
But won’t work on other pages like :
http://on-verra.net/plongeepassion/formations/le-bapteme/
http://on-verra.net/plongeepassion/les-sites/
I have checked the code and it seems ok…
Any idea ?
Thanks for your help !
nothing work. installed from admin panel plugin installer. activated. select Auto-lightbox image links, save setting. nothing happen.
Hi, can you tell me what plug in, or how do you do, to have those thumbnails please. I tried to made it manually on wordpress but the images are deformed.
thanks
Installed at http://www.panpdx.com
the tags are not auto inserting into the image and if I manually add the REL tag is, does not work
I have downloaded and installed the plugin, activated it, but obviously am missing some step. Do I need to download and install the original source files?
I’ve been looking all over the web for a way to add a single image to post that will link to a Lightbox Gallery of several photos when clicked.
Is this possible?
Hi, Thanks for creating this plugin. However, for some reason some images link to another page or individual image instead the lightbox, like on this page:
http://69.89.31.227/~arzanaor/attivita/
I have tried to manally ad the rel= tag but the image is never displayed.
Is there any solution to this problem? I would love to be able to rely on Lightbox2.
@David Levine: are you the same Levine from Ikariam? ^^ if so I have been farming your inactive account for maybe a year now lol, please, could you just break your walls?
@Rupert: great work and many thanks =)
I was wondering if you or any of the fellow commentators have an idea if the plugin can be used to open HTML pages with lightbox (like opening the_permalink() within a lightbox overlay)
Features: could be neat to be able to exclude the plugin from certain pages (either from admin, or by allowing manual inserting the lightbox js in the header with conditional tags).
Thanks a million and good continuation ;)
The plug in is not adding rel=”lightbox[]” tags automatically, I need to add them to each image. This has worked in the past, has the new version of wordpress broken this functionality?
My lightbox plugin gives a javascript error…
element.dispatchEvent is not a function
[Break on this error] element.dispatchEvent(event);
protot…ver=1.6 (regel 3936)
element.style is undefined
[Break on this error] element.style.width = w “px”;
lightb…ver=1.8 (regel 33)
What it means: create a link to the image
Nice plugin works fine @Firefox, Safari and Chrome -both mac and windows- but somehow @IE v.8 i can’t see anything!! Any help provided will be usefull :)
Thx
Update: everything is OK now, i have just forgotten to close a bracket! It seems every browser, except from ie can bypass that.
I am a newbie to this plugin and I have a configuration question? How do you tell the plugin which folder the images are stored in? For example, if I have 70 images to display, where should I put them on the server? This has been racking my brain. Any help would be greatly appreciated.
I am using your Lightbox plugin with Next Gen Gallery for a client’s photo gallery here: http://www.loveoflearning.org/about/photo-album.
The client reported that they can view images in Lightbox 2 from 1-40, but anything above that does not work. This issue is in IE 8, but not Firefox for PC & Mac or any other Mac based browser.
My client tested in Firefox and it works, but in IE 8, it does not go past 40.
Can you take a quick scan through my CSS file or check out the site and let me know what you think is the issue and how to resolve it for IE 8? Thanks in advance.
Tony Zeoli
Same questions as Dave (03.24.10). On a specific page i’d like to show 6 sets of six images, but only want to lightbox them as 6 separate sets (not total of showing 36). How can i achieve this by still having the auto-lightbox option for the rest of my site?
Hello,
I am using latest version of plugin and for some reason the arrow keys as well as P and N keys to navigate between images don’t work.
I am using it with nexgen gallery and I was also wondering why my version has next and prev just below the image whereas the sample on your website has arrows on the right and left of the image.
Thanks
Hi,
I found your Lightbox2 plugin to be the best looking wordpress gallery plugin there is.
However, I was very sad to see it doesn’t work when there’s jQuery used in the WordPress template.
My website is http://blog.ideeaeuropeana.ro
For the moment I activated a temporary plugin which does the job, although it’s not perfect. If needed, I can activate the Lightbox2 to see how it breaks the tabs and everything done with jQuery.
Cheers!
I have Lightbox 2 and am using the Creativix theme, it allegedly has Lightbox integration already but the images just open in the window. What can I do to fix this? Thank you in advance!!
Hi,
I have some images with a link to Wikipedia, something like http://en.wikipedia.org/wiki/File:KyotoFushimiInariLarge.jpg . Lightbox 2 doesn’t seem to understand that the target is a page, not an image, and apparently tries to scale it. Would be great if your plugin could adjust automatically or if I could turn it off per post, or even better per image.
Thank you!
Good Afternoon,
I am having an issue with the lightbox 2 plugin. for some reason it isn’t showing the title from either the Anchor tag or Img tag. I can’t figure out why. I turned off all additional plug-ins to see if something was interfearing, but the title still never showed up.
please view at http://chicagomale.clubha.us
any help you could give would be great. THANK YOU!!
Sorry… I mean’t http://chicagomale.clubha.us/gallery
for the example.
fancybox.net ist better
Hello,
I would like to use this plugin up here in Germany, but it doesn’t work with Arthemia Theme. Maybe you could help?
Martin
What could cause the lightbox to appear underneath my nav bar?
Hello,
I think you should remove the get_option(‘siteurl’) for setting the value of $options_page, because WordPress supports SSL admin while siteurl is http:// commonly.
$options_page = ‘admin.php?page=lightbox-2/options.php’;
Thanks.
And in the function lightbox_styles, why not printing the html directly like this:
$html = “”;
echo($html);
Using Javascript and document.write is more complex. And I don’t think document.write is a good thing.
Thanks.
Sorry, the html code is filtered. But you know what I said :P
Now i using synology photo gallery to build wordprss
I want to ask, If I using a photo with not link of .jpg
example
http://leafboy.no-ip.org/photo/convert.php?dir=6970686f6e65&name=494d475f303030352e4a5047&type=5&v=0
Can this kind of image link using and work with lightbox with plugin ?
We have installed Lightbox 2 on our WordPress /Thesis site, yet it’s not working. We’ve followed the instructions posted here – http://wordpress.org/extend/plugins/lightbox-2/faq/ – and cannot remedy the problem.
Can you ofer any suggestions?
Thanks
Thanks for the plugin. This is great! Does anyone know if it’s possible to pull out a thumbnail from the latest gallery on the home page of the wordpress blog? Would love to be able to show the galleries from the home page.
Hi,
I am using an XML file to load a gallery of images that, when clicked, open in Lightbox. It had trouble getting it to work with this plugin because I am using a template with spry (region-repeat) which is not processed through the hook that re-renders the image tag with the lightbox properties (e.g. rel and actions). So I changed the updateImageList function to this:
updateImageList: function() {
this.updateImageList = Prototype.emptyFunction;
document.observe(‘click’, (function(event){
var target = event.findElement(‘a[rel^=lightbox]‘) || event.findElement(‘area[rel^=lightbox]‘);
if (target) {
event.stop();
myLightbox.start(target);
}
}).bind(this));
},
Now it works — for both normal image inserts in a post and my custom template that I’m using to generate my gallery.
This code is from Lightbox v2.04. I don’t know if it’s the right way to go about it, but thought I’d share.
Rupert, thanks for the plugin!
Please Help! I just built this site using WP 2.9.2 and a purchased theme Photocrati which recommends Lightbox 2. It’s set to work in all of the portfolio galleries. It’s beautiful and works as promised in FF, Safari, Chrome and Opera, mac and PC, but on IE8 (pc) clicking the thumbnail brings up a new page, all white with the image in the upper left hand corner. Is there a fix? I see others have IE8 issues above, but don’t see any answers.
Just to let you all know, it is working now. I deleted the plugin and reinstalled it and, well, it’s fine.
I am using Lightbox2 (2.92) with NextGen Gallery and would like to know how I can change the top padding for the image.
I would like to have little or no space at the top. I have searched the web and the only fixes I have found don’t seem to work.
Thank you.
Hi
Can you please write a piece of documentation on how to add the thumbnail MANUALLY?
I disabled the auto-lightbox option and want to do it manually. I have also studied the code and I know that on every hyperlink I need to add rel=”lightbox[some_number]“, but what is the number in the box? image ID or post ID?
It neither stated in FAQ or this main website, please advise.
Sorry but one more thing: this plugin seems not working with new WP “post thumbnail” feature.
Maybe should we add a little piece of JS that add a “rel” attribute?
Hi
I posted a ‘bugfix’ last year to make your plugin produce valid xhtml 1.1 code. As it is still missing, I repost here.
As the characters ‘[' and ']‘ are not allowed in a ‘rel’ tag when using xhtml, and you generate tags like ‘lightbox[POSTID]‘, the whole blog page gets invalid.
To fix this, you can generate tags like ‘lightbox_POSTID’, which is allowed by xhtml standard and the lightbox script still works with this.
If anyone wants to change the code by themselfs, you have to:
- edit ‘lightbox-2/lightbox2.php’
- find ‘function autoexpand_rel_wlightbox’
- and on the line that starts with ‘$replacement’
- change: lightbox['.$post->ID.']
- to: lightbox_’.$post->ID.’
- save
Hi all,
For embedding an iFrame what are the changes? Is it possible?
I want to show up a google map and it doesn’t seem to be working.
Hi, I LOVE Lightbox, but Lightbox 2.9.2 just stopped working for me. I updated to WP 3.0, but have posted since with no problems, so I’m not sure if that is the issue or not. Other than the WP update, there have been no changes to my site.
I’ve tried various forms of troubleshooting, including creating new posts with older images from media library and it does not work with the old images either (even though their former posts are still working).
Any help will be greatly appreciated! Thanks :)
link to post with broken lightbox:
http://www.delapuravida.com/2010/06/bizcochos-dolce-gabbana/
link to post with working lightbox:
http://www.delapuravida.com/2010/06/new-money/
ok, it seems I am having the same problem with rel=”lightbox[x]” not being added to images anymore. I tried adding it manually, but that did not work.
I would really like to keep using this plug-in, but my site is reliant upon images…
Sorry for triple post, but I fixed the problem and thought my solution might help other people –
uninstall lightbox and reinstall it.
Work this with WordPress 3.0? I like the Plugin but can you make more faster?
Excellent Plugin
Please advise me how to make web visitors able to
“save as” the photos that lightbox displays. Im not very good with code so the more detailed the better. thanks so much. TJ
Hi,
I am also requesting to have an option to allow the users to download the image… maybe have an direct link where the text caption area is… help is much appreciated!
Your Slickr Gallery Page is broken.
I love this plugin because it’s “out of the box.” Unfortunately, i can never use it because it interferes with my rotating images on my home pages. They don’t rotate anymore. Not sure what causes this.
Any help would be appreciated! Would love to use the plugin. Here’s a sample of the rotating images i use: http://www.compassconsultation.com/
Hi
Thank you for putting so much work into this plugin. I love it!
On one of my sites I have a video widget on the sidebar. This plugin makes the video disappear. Video works perfectly on the post. Any suggestions? Would appreciate any help. Thanks
Is there a way to have Google Analytics record each image view?
I found a way to add Google Analytics to record each image view. Modify the lightbox-2 .js files to include “pageTracker._trackPageview();” in the “showImage” function. Enjoy!
G’day.
My Lightbox 2 plugin is having a conflict with a plugin called Featured Content Gallery (wwwfeaturedcontentgallery.com).
When both plugins are activated the Featured Content Gallery stops working and Lightbox 2 doesn’t work – ie images open on a white backgroud in the top left coner. But when I deactivate the Featured Content Gallery plugin Lightbox 2 works just fine.
Problem is I’d like to get both working at the same time.
Any help greatly appreciated.
I am trying to find the CSS for the plugin, can’t seem to find it. All I want to do is change the title text to white and normal font weight, then add a small bit of padding at the bottom. Can’t find where to add it in? HELP please
Hi,
The default thumbnail size is 150×150 which looks pretty big , is there any way to resize it to 90×90? Thanks:)
oops, I guess you cant post
in here, here is the drupal code that works:href="jobs/1.jpg" rel="lightshow[roadtrip]">Windows & More Professional Portfolio
href="jobs/2.jpg" rel="lightshow[roadtrip]" class="lightbox_hide_image">
I can confirm that the latest version of this plugin crashes IE 8
I’m receiving the following error message when activating the plugin:
“Notice: has_cap was called with an argument that is deprecated since version 2.0! Usage of user levels by plugins and themes is deprecated. Use roles and capabilities instead. in [...]/wordpress/wp-includes/functions.php on line 3321″
I know that this message doesn’t appear when having WP_DEBUG set to false, but I wanted you to be informed about this bug anyway.
This plugin works beautifully on all of my posts but the first post. Here is a link to the post that Lightbox 2 doesn’t work with: (http://lookwehavekids.com/look_we_have_kids/). Can you think of any reason why it works everywhere else, but not in this post?