4mj feedburner
704mj twitter

Lightbox 2 WordPress Plugin

WordPress plugin used to overlay images on the current page into neat Javascript-powered overlay popups.

16-12-2008 – Version 2 is out! Now from settings you can choose background-color, overlay opacity, resize speed and automatically add the lightbox effect to your post’s images.

This plugin includes the new Lightbox JS v2.0.4 javascript written by Lokesh Dhakar and and was then transformed into a WordPress Plugin by me. Use a title attribute if you want to show a caption. Click on the images below for an example.

  • 29-07-2007 – See also the new Slimbox WordPress Plugin, a 7kb clone of the popular Lightbox JS
  • I added the digg it button, please DIGG ME!

test1Roma 2

Upgrade

  • De-activate the plugin.
  • Delete the old version `lightbox-2-wordpress-plugin` directory.

Installation

  • Unzip the `lightbox-2-wordpress-plugin.zip` file.
  • Upload lightbox-2-wordpress-plugin folder to the /wp-content/plugins/ directory.
  • Activate the plugin through the ‘Plugins’ menu in WordPress, go to Setting->Lightbox.
  • Add a rel=”lightbox” attribute to any link tag to activate the lightbox, or rel=”lightbox[roadtrip]“ for an image set.
  • Optional: Use a title attribute if you want to show a caption.

Single example:
<a href=”img1.jpg” rel=”lightbox” title=”my caption”>thumbnail1</a>
Image set example:
<a href=”img1.jpg” rel=”lightbox[roadtrip]“>thumbnail1</a>
<a href=”img2.jpg” rel=”lightbox[roadtrip]“>thumbnail2</a>
<a href=”img3.jpg” rel=”lightbox[roadtrip]“>thumbnail3</a>
Tnx to my sister for the photos! Link me in your site!

Changelog

Version 2.0.2 (19-12-2008)
Some fixes
Version 2.0 (16-12-2008)
Background-color, overlay opacity, resize speed, auto-lightbox from settings.
Version 1.8.2 (09-06-2008)
Some fixes
Version 1.8 (14-03-2008)

Update Lightbox Js to version 2.04

  • v2.04 – 03/09/08
    • NEW – Upgraded Prototype from v1.4 to v1.6.0.2
    • NEW – Moved label text into configuration for easier localization
    • UPDATED – Code cleaned up. Respect for the global namespace and native javascript objects.
    • FIXED – Caption displays as “null” when viewing an uncaptioned image after viewing a captioned image.
    • FIXED – Clicking ‘close’ button shifts layout as link focus’ dotted line appears.

Version 1.7 (12-06-2007)

Update Lightbox Js to version 2.03.3

  • v2.03.3 – 5/21/07 – Support for horizontally scrolling pages. Added updateImageList method for ajax’y pages.

Fixed xhtml validation

Version 1.6 (05-05-2007)

Update Lightbox Js to version 2.03.2

  • v2.03.2 – 4/30/07 – Fixed animated gif support in IE/Opera.
  • v2.03.1 – 4/18/07 – Fixed embed hiding. Overlay opacity var added to config. Image sets w/Imagemaps fix. Clearfix removed.
  • v2.03 – 4/10/07 – Improved keyboard navigation. Animation off toggle. HidesFlash movies under overlay. Imagemap support. Valid CSS.

Fixed close and loading vars (Tnx to Anton Zhuchkov)
Changed “get_settings(‘home’)” in “get_option(‘siteurl’)”
(Tnx to Luca Dentella)

Version 1.5 (06-05-2006)

Fixed close and loading vars.(see here if u have problem with close button)

Version 1.4

Fixed path’s problem

Update Lightbox Js to version 2.0.2

Centering in IE6 (any DOCTYPE) fixed.
Smoothed out resize transition.
Fixed layout issues caused by multiline captions.
Added keyboard navigation: N for next, P for previous and X for close.

Version 0.3

Single Images and Image Set

My plugin on wordpress page suddenly stopped working. I wrote several email to them but nothing…
caffe

If you appreciate this plugin or my support, please donate to me so I can but a cup of coffee. Thank you!
caffe
Thanks to the donors:

  • Per T Sovik
  • Hoa Hua
  • Spencer Harris
  • Jan Herrmann
  • Niels Emmer
  • Sahar Alarayedh
Scritto da Peppe | 29 mar 06
7 ott 06 , 12:44 pm

KazOo:

Ciao Peppe,

You would make me very happy with a little help to get your beautiful plugin running. The thing is: other Lightbox installs work okay (but aren’t nearly as pretty as Lightbox 2.2), but upon activating Lightbox 2.2 (and deactivating others) *nothing* happens. Please, a few simple guidelines would be much appreciated, just tell me what you would do in my case, I’ll try to comprehend… I’ve been up all night and it’s driving me nuts…

http://www.radiokazoo.net

Thanks in advance!

7 ott 06 , 12:50 pm

Peppe:

Where you put the files?
The requested URL /wordpress/wp-content/plugins/lightbox/prototype.js was not found on this server.

7 ott 06 , 12:58 pm

KazOo:

Wow, that’s fast!

I’ve checked, they are in wordpress/wp-content/plugins/lightbox2/lightbox

I noticed an incorrect script-reference (wrong paths), how do I correct this? (I suppose those were left behind by a previous Lightbox install which I removed)

Thanks again!

7 ott 06 , 12:58 pm

Peppe:

Yours files are are here:
http://www.radiokazoo.net/wordpress/wp-content/plugins/lightbox2/lightbox/prototype.js
I understand your problem, please re-download the plugin, i changed the tree.
Unzip in the plugin folder only lightbox2.php and the folder lightbox, not the folder lightbox2.

7 ott 06 , 1:11 pm

KazOo:

I’m sorry, but it still does not work. I removed the previous 2.2 install, uploaded it again according your instructions (php in the root of /plugins + the rest in /plugins/lightbox), removed the WYSIWYG editor, made sure the rel=”lightbox” tag is present in the image link, but alas…

If you still have a clue, please… *sigh*

7 ott 06 , 1:20 pm

KazOo:

Just to make sure I did it right, here’s the code for the test-image I just posted:

But I’m probably just overlooking something stupid.
I’m sorry to bother you… scuzi… :)

7 ott 06 , 1:26 pm

Peppe:

Yes lol,
add the rel=”lightbox” to the a href, not to the img src.
Bye

7 ott 06 , 1:31 pm

KazOo:

*gasp* It.. it WORKS! I’m stunned!
Thanks for your time, I’d gladly return the favor, this is great…

Good luck!

KazOo (Netherlands)

7 ott 06 , 1:33 pm

Peppe:

You welcome,
look the forum for the problem with your close button.
Bye

8 ott 06 , 1:46 pm

KazOo:

Ciao Peppe,

For me personally, inserting the rel=”lightbox” tag everytime is a minor hassle. But I now want to make a photo-weblog for my daughter (who is a beginning but very talentful photographer). Although your plugin would be excellent for presenting her work, I don’t think I can ever talk her into html-coding her wordpress-posts.
So, is there a way to automate this? I know of other Lightbox-plugins that insert a button on the editor, but those operate nowhere near as slick as your 2.2…

Thanks in advance for your reply…!

8 ott 06 , 2:14 pm

Peppe:

There is a way to auto insert the rel… to any image
Open the lightbox2.php and de-comment function lightbox_create and add_filter (remove /* and */ and // before add_filter…)

9 ott 06 , 7:13 pm

Dexter:

still doesn’t work on my site….In ff I get:
Errore: Il foglio di stile http://carpibec.it/blog/wp-content/plugins/lightbox2/lightbox.css non

9 ott 06 , 10:37 pm

Peppe:

Se non l\’avevi capito sono italiano, lol!
comunque hai sbagliato l\’albero delle cartelle, devi uplodare in plugin il file lightbox.php e la cartella lightbox, non tutto lightbox2, infatti i tuoi file adesso stanno in http://carpibec.it/blog/wp-content/plugins/lightbox2/lightbox/lightbox.css

10 ott 06 , 3:03 am

KaZOo:

Ciao Peppe, `e encora me… :) – soffro!

I’m puzzled, maybe you (or someone) can help me:

Why is it that when you click on a linked image the *first* time the browser shows you a new page with the original image on it, and only the *second* time you click the thumbnail Lightbox starts working??

Molto grazie per rispondere!
(I’m picking up quite some Italian here.. :)

http://www.it85.nl/wp (the photoblog I’m making for my daughter)

10 ott 06 , 7:33 am

Peppe:

Hi kazzo, it is normal, the plugin works when the page has been loaded completely.

16 ott 06 , 4:10 am

riley harmon:

I have a specific theme i would like to use this with, but for some reason, the theme is inhibiting me from doing so. Do you think you could please take a look at the theme and see what can be fixed? Thanks a bunch!

theme name: Sybmim 1.0.9

16 ott 06 , 9:36 am

Peppe:

Hi Riley, plz send me a link-test.

[...] There’s also a WordPress plugin for it right here. Open Social Bookmarks Bookmark to: Site Search Tags: Uncategorized Technorati Tags: Uncategorized [...]

[...] We’ve already downloaded the lightbox WordPress plugin, unzipped it and moved the contents to the Plugin folder on our wordpress install http://www.domain.tld/wp-content/plugins/. We then activated the plugin from the Plugin page in the admin panel. We also added the following lines of code to the theme header.php file. before the < / head > tag. [...]

5 dic 06 , 8:22 pm

Oscar:

Hello guys,
The plugin is good,Lightbox works, but i cannot see the
open/close/next/prev images.
Have to change the images path in lightbox.js ?

Anyone experienced the same problem?

Ps. my blog strucure is like http://www.myblog/blog

5 dic 06 , 8:34 pm

Oscar:

Hello again Guys,

I resolved, I just corrected the path in lightbox.js, and put an absolute one. It’ works fine now.

I also removed in lightbox2.php the 2 lines for scriptacolous an prototype loading, because they already run for other plugins (like ajax_comments and ajax
_shoutbox)

Thanks.

[...] Neu dazugekommen ist das Lightbox-Plugin, eine nette und vor allem nützliche JavaScript-Spielerei zum anzeigen von Bildern. Da ich ja eher sporadisch mit Bildern hier im Blog hantiere, wird es nicht so oft zum Einsatz kommen, aber wenn, wie zb hier, dann macht es Spaß. Und sieht fein aus. [...]

15 dic 06 , 12:47 am

Jon Symons:

Hi I just installed the latest version of the plugin in my site, but when you click to open an image, the “closeimage.gif” does not show up.
The reason is because my blog it not in the site root. Your plugin is looking for its images here:
http://www.stepbystepblog.com/wp-content/plugins/lightbox/images/
but on my site, which is in a folder called “howto” the images are located here:
http://www.stepbystepblog.com/howto/wp-content/plugins/lightbox/images/
I think you may be using the wrong variable from WordPress for the path.
Thanks.

19 dic 06 , 6:02 am

Ryan:

Jon,
Thanks to your guidance I managed to track down this problem. Near the top of the lightbox.js file look for the image paths loading.gif and closelabel.gif and fix them. That takes care of the problem right away.
Thanks for the great plugin.
Ryan

[...] Ok, i found an easier to install version here: Lightbox 2 WordPress Plugin

24 dic 06 , 4:01 pm

Bhooshan:

Hi. I must thank you for devising such a wonderful plugin. It surely has taken the load off editing the files and stuff. I am facing an issue and thought I might ask the creator to pull me out of it :-)

The URL in question is here – http://www.bhooshan.com/2006/12/24/down-memory-lane/

I have installed your plugin in the directory wp-content/plugin/lightbox. I have editied portions of the lightbox.css and lightbox.js to refelct the absolute path to the directory. However, my plugin doesn’t seem to work at all. I looked high and low for the answers and yet I have ended up completely perplexed. Since the page is on the LIVE website and I also need to share it with the other developers for possible answers, I need some answers rather quickly. Can you please help me out with this?

Clue: I have installed MINT webstats application which uses JS. I have a gut feeling that it is conflicting with Lightbox.

24 dic 06 , 6:51 pm

Bhooshan:

Issue is Resolved. Thanks once again, for making this wonderful plugin :-)

[...] I’ve been burning midnight oil just to upload these pictures using Lightbox2 WordPress Plugin. It has been an agonizing period for a wordpress newbie like me to setup the plugins to work. Along the way, I realized the importance of conveying your message clearly. I’ll write more about it later. Now, I just want to sit back and appreciating my first photos in lightbox. [...]

[...] 1º Fazer o download do plugin aqui. [...]

11 gen 07 , 4:56 am

Shannon Whitle:

The plugin worked well to display a screenshot. I had to alter lightbox.js because my WP directory is one step below the domain.

Right now I can’t use the plugin, however, because it was causing my left sidebar to disappear. It looks like it’s happening after the page load. Any ideas?

11 gen 07 , 4:36 pm

Mario:

For easier access I’d like to get the close button nav from buttom to the top of the displayed image. Is this possible and how?

Thx for answers!

20 gen 07 , 11:10 am

Sailesh:

Where on your page is the link to the 15. download??

21 gen 07 , 12:21 am

elena:

The pluging doesn’t work.
I have no clue on the reason why.
It is a simple link from a thumbnail to a news window with the large img.

21 gen 07 , 3:50 am

Peppe:

Plz link me your page.

22 gen 07 , 11:56 am

dorus:

Hi,

Love your plugin! It looks great and works very smooth!

I am trying to get it to work at same time as the vPIP plugin found here: http://utilities.cinegage.com/videos-playing-in-place/ .
But when I turn on the vPIP plugin the lightbox plugin stops working. Is there a way around this problem? Maybe a line I can write in a post to disable a certain plugin?

Thanx and keep up the good work!
dorus

24 gen 07 , 4:56 am

chancho:

bellisimo, gracias hermano!!

24 gen 07 , 11:11 am

Markus:

Hei! I like the plugin but it doesn`t work with the new wp 2.1. Du you have time and can you make en update?

Thank`s a lot!
Markus

25 gen 07 , 1:43 am

ozzy:

Ciao Peppe, complimenti per il plugin. Ho provato a installarlo sul mio blog, funziona solo che mi va in conflitto col men

25 gen 07 , 3:24 am

Peppe:

mmm, non so come funziona il tuo menu, sinceramente ti posso consigliare di mettere un menu in css.

25 gen 07 , 4:36 am

Peppe:

To markus: i updated wp to 2.1 and the plugin works fine!

25 gen 07 , 6:19 pm

Markus:

Yes, now i´t works. I think, it was es problem with the ImageManger and not with your Plugin. Sorry! Markus

25 gen 07 , 7:43 pm

P.G. Holyfield:

A revisit to the closelabel.gif issue… when on the main page of the blog, the close image appears. When on the permalinked page (in this case http://www.pgholyfield.com/maah/archives/59 ), the close image does not appear… when looking at the properties of the broken image, the image url has an additional level added to the name (the maah folder is repeated). Has this been seen before?

http://www.pgholyfield.com/maah/maah/wp-content/plugins/lightbox/images/closelabel.gif

26 gen 07 , 5:23 am

P.G. Holyfield:

Hey Peppe, tried the instructions in your forum, changed the code in the lightbox.js file to:

var fileLoadingImage = “/maah/wp-content/plugins/lightbox/images/loading.gif”;
var fileBottomNavCloseImage = “/maah/wp-content/plugins/lightbox/images/closelabel.gif”;

…maah being the directory for WP…

again, the close image shows up fine when opening an image from the main blog page. But from an internal post page the close image has an incorrect path.

Example of main page (where image appears correctly): http://pgholyfield.com/maah

Example of internal page (where image does not appear)

26 gen 07 , 5:27 am

Peppe:

hi holy, i can see the close image also here, delete your cache http://www.pgholyfield.com/maah/archives/59

26 gen 07 , 5:34 am

P.G. Holyfield:

Yep, that did it. Thanks!

2 feb 07 , 4:14 pm

Mitos Kalandiel:

I’ve found a lil “bug” (well actually it’s not a real bug, more a problem, when you don’t have the same “WordPress Adress” and “Blog Adress”)

The plugin won’t work, when (as in my case) the blog itself is lotated in subdirectory, but you use rewrite rules, to make it look like the blog was located at the root of the domain.

Basically you use the `get_settings(‘home’);`-action to generate the links for the .js and .css files in the header. But it would be better/nicer to use the `get_settings(‘siteurl’);`-action to avoid that problem.

Just a suggestion ;) You might also want to insert that information, on the plugin-page, so users can tweak that for themselves, and you don’t need to release a new version of this fine plugin ;)

Kudos for making this plugin, it really is such a nice addition to prevent the layout of your blog being “broken” (or better uglyfied ;) )

[...] was trying (for weeks now) to use the Lightbox Plugin for WordPress on our Blog, but for some reason it didn’t work at [...]

2 feb 07 , 7:34 pm

Peppe:

Hi mitos, no problem with .js and .css path, get_settings(’home’) works fine, the only problem is with closebutton if u use a subdirectory for wp(see the forum).

[...] So as you can see it s really nice! You can find more information about it on the LightBox 2 website, or you can get a WordPress Pluggin here [...]

« 1 2 3 4 5 6 7 8 9 10 1136 » Mostra tutto

Lascia un commento

4MJ – Internet News © 2002 - 2010 è basato su piattaforma WordPress
Progetto e Design sono esclusiva proprietà di Giuseppe Argento.
Mappa Sito, Articoli (RSS) e Commenti (RSS) | Contatti
designed by giuseppe argento