Lightbox Plus

Lightbox Plus permits users to view larger versions of images from the current page and display simple slide shows, all in an overlay.

Download from WordPress.Org

download Lightbox Plus

Lightbox Plus 2.4.6 - (354 KB)

Description

Lightbox Plus implements ColorBox as a lightbox image overlay tool for WordPress. ColorBox was created by Jack Moore of Color Powered and is licensed under the MIT License. Lightbox Plus permits users to view larger versions of images without having to leave the current page, and is also able to display simple slide shows. The use of the dark or light background, which dims the page over which the image has been overlaid, also serves to highlight the image being viewed. Lightbox Plus captures the image title for display in the overlay. Lightbox Plus is able to lightbox images displayed using WordPress build in gallery.

Lightbox Plus uses WordPress’s built in jQuery library.

Read the FAQ first if you are having problems.

Requirements

Server

  • WordPress 2.8+
  • PHP 5+ (Recommended)

Support for PHP 4 has been completely removed – DO NOT UPDATE if you want Lightbox Plus to work with PHP 4.

Client

  • IE 7+, FireFox 2+, Chrome, Safari 3+, Opera 8+

Usage

Note that getting the caption to appear in the overlay image by using the caption options built into WordPress Lightbox Plus uses the image title which is generated by “Edit Image Title” field and not the “Edit Caption Field.” You can also manually add lightbox tags to your images using the following instructions.

  1. Add a rel=”lightbox[uniqueID|filename]” attribute to any link tag to activate the lightbox, include a name between square brackets in the rel attibute. For example:
    <a title="my caption" href="images/image-1.jpg" rel="lightbox[uniqueID|filename]">image #1</a>

    Optional: Use the title attribute if you want to show a caption.

  2. If you have a set of related images that you would like to group, follow step one but additionally include a group name between square brackets in the rel attribute. For example:
    <a href="images/image-1.jpg" rel="lightbox[roadtrip]">image #1</a>
    <a href="images/image-2.jpg" rel="lightbox[roadtrip]">image #2</a>
    <a href="images/image-3.jpg" rel="lightbox[roadtrip]">image #3</a>

Installation

Lightbox Plus for WordPress Demos

Frequently Asked Questions

Change Log

Special Thanks

  • Dirk Schmitz (for pointing out an obvious bug that I kept overlooking)
  • Michael Sheehan and Helena Hultén for constinued support and testing.
  • Ken Williams (for testing version 1.5)
  • Bart Lauwers of GenThree
  • navjotsingh (for bug fix in gellery shortcode with version 1.6.x)
  • Milan Petrovic for some quick debugging of version 2.0 admin panel and for pointing out an issue with the PHP Simple HTML DOM Parser.
  • Melanie Sallis for needing a lightbox for her site which prompted me to create this plugin
  • Jack Moore for creating the awesome jQuery plugin, ColorBox, and everyone who has contributed to the support in developing this plugin.

Support

The comments are now closed for Lightbox Plus.

For support please submit a support request  though the support form.  For questions or comments please post a message in the Lightbox Plus forum on my site.

Suggestions

Submit suggestions via Fundry.

297 Responses to Lightbox Plus

  1. Pingback: Meine must-have Wordpress-Plugins | mindgears.de

  2. Pingback: 6 trendów w szablonach WordPress, czyli jak być na czasie | Sekrety WordPress

  3. Pingback: Top 1000 WordPress Plugin Authors « Metode de promovare

  4. Pingback: 24 Wordpress Image-Based Plugins | DesignBeep

  5. Pingback: Creating a Lightbox Gallery in WordPress | Introducing the Lightbox Plus Plugin | Blake McCreary Design

  6. Pingback: Voices - Tips for including audio, video, and images in posts

  7. Pingback: Síðugerðin | The Site Design « Dalla – Salbjörg Rita Jónsdóttir

  8. Pingback: WordPress Plugin Releases for 09/28 « Weblog Tools Collection

  9. Pingback: 真‧嚎洨 » 我每天都要做一件以前沒做過的事( DNA = Daily New Achievements )

  10. Pingback: 我的WP外掛清單 ~ My WP Plugin List ~ - 豬力喵的後花園

  11. Pingback: some useful wordpress plugins- devloperworld.com

  12. Pingback: Lightbox Plus

  13. steve says:

    getting this error every time I click on a new page or anything in
    the page Lightbox was not able to find it’s javascript script tag
    necessary for auto-inclusion what’s this all about? I don’t have
    WP-Gallery installed either

  14. Roy says:

    Great plugin. I’m using WordPress 2.8 and version 1.5.3.1 of
    Lightbox Plus. The lightbox function works fine on my blog, but
    when I subscribe to the RSS feed, the first character of each entry
    is missing when I read it in My Yahoo! (which I use to subscribe to
    the feeds). I have Article Preview turned on so that I can read the
    first few sentences of the feed when I hover over the title. This
    happens to every post that is using Lightbox Plus. For the entry
    “Jinxed!” there’s no photo and no usage of Lightbox Plus and it
    works. A bit annoying. Any workarounds or solutions to this?
    Thanks.

    • Roy says:

      Managed to work around it by inserting the text first instead of
      the photo (left aligned). Not as nice visually, but it works. Also,
      is there a way to insert photos side by side rather than one on top
      of the other?

  15. PoLLasQuE says:

    Hey! Having some trouble with your plugin. Tried different themes,
    even the default and classic, and in firefox the image is not
    showing and the borders are all collapsed somehow. CSS couldn’t be,
    and the only plugin I have is the watermark, but already
    deactivated and tried, and still no fix. What could it be?

  16. quanta says:

    I noticed a minor cosmetic issue with the “Shadowed” theme: the
    rounded border, its margins and the alpha shadowing in the Colorbox
    does not appear in Internet Explorer 8 or IE7. You can see it on
    this page with the Demo Example image. It may have to do with
    ColorBox’s user agent detection for IE6. What do you think?
    WordPress 2.8, Lightbox Plus 1.5.3.1.

  17. Pingback: 30 çok kullanışlı wordpress eklentisi | pervinin turqa

  18. Ciso says:

    Also the last version of the plugin created a big white square in
    the iphone-version of the website :(

  19. Ciso says:

    Hi! Thank you for this great plugin!! I have a problem after lasts
    upgrade: The popup image is not centered (as you can see here:
    "http://www.androidworld.it/2009/07/04/bloo-lapplicazione-per-facebook-android-market/)">
    http://www.androidworld.it/2009/07/04/bloo-lappli… Any idea?
    Already tried to Reset the Lightbox Plus settings.

  20. Luxtr says:

    Hi Dan, Maybe you can give me a tip on this bug: on my blog (click
    on link), the displayed pictures through Lightbox show the scroll
    bars on all browsers I’ve tried (latest FF, Opera and IExplore 7)
    which looks awful. At first, it only happened on Opera and IE, not
    on FF. After trying to narrow the error down I managed to screw it
    up :p because now it happens with browser. I’m not sure why. With
    the default theme it works OK but not with my custom theme. I’m
    using the Dark Lightbox theme, resize settings are disabled. The
    gallery on that test post is using NextGen gallery but the bug also
    happens when I add them manually to a post. Thanks & regards,
    Lux.

  21. pikus says:

    Hello, please check my page (click on link)… is it possible to
    change it, so that lightbox will be in the first layer? As you can
    see the youtube video is up on the lightbox image… Please let me
    know

    • Flash (i.e. YouTube videos, etc.) will sit atop the Lightbox Plus
      display no matter what the z-index is. This is an issue with Flash.
      See Flash
      content displays on top of all DHTML layers
      at Adobe for
      details. To work around this issue you will need to add something
      like the following to your <code><param /></code>
      and <code><embed></embed></code> tags:
      <code> <object><param name=”wmode” value=”opaque”
      /><embed wmode=”opaque” [all other embed settings, file src
      etc.]></embed></object> </code>

      • pikus says:

        I believe, but strange, because with Lighbox 2 I didn’t have this
        issue… The youtube was under the image seen with lightbox2.
        Anyway my apologies… please tell me with some more details how to
        resolve this, what file I have to edit. I understand that it’s not
        a matter of your plugin, but I would really appreciate for some
        words more about how to make the flash go down… If I understand
        well, where I put the youtube video, before the stuffs, I have to
        type ” “? Thank you a lot

  22. A. says:

    Hello, I use LightBox Plus in combination with the Lazyest Gallery
    Plugin, but for single images I prefer the Highslide Plugin.
    Unfortunately Lightbox Plus is too greedy so that all Thumbnail
    Images Link display Highslide AND LightBox. To avoid this, I’ve
    patches the function “lightboxPlusReplace()”. Code: <pre
    lang=”php”> $pattern[0] = “#<a>#i”; $replacement[0] =
    ‘<a>’; </pre> I put on the first pattern the following
    replacement, so highslide Images leave unchanged. All other
    patterns/replacements indexes goes one up. It works, and it would
    be nice, that this goes in your original code, so I don’t need to
    patch any updates. The optimal way would be, that on the admin page
    user can configure self defined patterns to leave links unchanged.
    (The string “highslide” would be a variable) regards

  23. sergio says:

    Images won’t open in the overlay window, or… Images opening above
    the whole page content, or… Images showing no container box: The
    comment up here explains it The
    name of the folder for the css styles is different from the one
    called from the plug-in (i.e. Shadow / Shadowed) If you use wp
    super cache plugin, reload the page many times or de-activate and
    re-activate it after renaming the folder to “shadow”

    • The latest version, 1.5.3.1, corrects this problem. Install it or
      upgrade to it then reset the settings, or save the settings with a
      style other shadow(ed) and it should be fine. All the result of a
      typo on my part. Afterwards you can use the shadowed style with no
      issue.

  24. I have been noticing some 404 errors on my blog that are some how
    tied to this plugin. For some reason, I see
    “http://www.mysite.com/the_full_path_to_my_post/images/borderBottomRight.png”
    which if you click on it results in a 404. For some reason
    “images/borderBottomRight.png” is being appended to the path of my
    post. I’m not sure if the users are getting a 404 or if that is the
    result of viewing an image (but sometimes I see 404s for articles
    that don’t even have an image). I checked the CSS and it seems like
    it is pointing to the proper images and I checked the images
    directory and that image is indeed there. Any thoughts? Thanks, HTD

  25. See says:

    Love the plugin idea but it refuses to show anywhere but in the
    header for me (using iNove theme, yes, wp_head() is there). Anyone
    have ideas why it insists on using the header for display? Kind
    regards

  26. Just installed 1.5.3 version. Thanks for adding that “do not
    display titles” toggle! You rock!

  27. Frank says:

    How do I add an image instead of a text link to activate the
    lightbox? Like you did in your example. I hope I made myself clear.

  28. Great plugin. I would love for there to be a toggle that allows for
    titles (image names that translate into titles) be a configurable
    option. Currently, if I have an ugly image name like
    “image_xyz_123.jpg” it shows that ugly name of “image_xyz_123″. It
    would be great if I could turn that on or off. Until then, where in
    the code can I turn off the image name display? Thanks, HTD

    • That’s definitely in the plans – in the meantime you should be able
      to change this: <pre lang=”php” line=”83″>$replacement[0] =
      ‘<a$1href=$2$3$4$5$6 title=”$9″
      rel=”lightbox['.$postGroupID.']“><img$7title=$8$9$10$11/>’;</pre>
      to this: <pre lang=”php” line=”83″>$replacement[0] =
      ‘<a$1href=$2$3$4$5$6
      rel=”lightbox['.$postGroupID.']“><img$7$9$10$11/>’;</pre>
      Or even easier, in the colorbox.css for the style you are using
      (elegant) change: <pre lang=”css”
      line=”33″>#cboxTitle{position:absolute; bottom:3px; left:0;
      text-align:center; width:100%; color:#949494;}</pre> to
      <del
      datetime=”2009-06-24T19:32:52+00:00″><code>#cboxTitle{position:absolute;
      bottom:3px; left:0; text-align:center; width:100%;
      color:#949494;display=none;}</code></del> <pre
      lang=”css” line=”33″>#cboxTitle{position:absolute; bottom:3px;
      left:0; text-align:center; width:100%;
      color:#949494;display=none;}</pre>

  29. nik says:

    Hi, just a few notes on my experiences in implementing Lightbox
    under WordPress 2.8 – rel=”lightbox” makes a set of pictures to
    behave as in the gallery, e.g. once edited into html code with each
    separate picture, all the pictures on the page behave like in the
    group. – I had to remove all diacritical marks used in some
    languages on the title of each picture though (Edit Title in Media
    Library when inserting pictures), as any diacritical mark left
    (e.g. “á”) causes the subsequent picture (not the one with wrong
    title) to freeze and not to show.

  30. Jay says:

    Dan LBP is working very well. Nice work! I have 2 questions: 1) How
    do I disable LBP for individual images or posts? New image inserted
    into a post will now automatically enlarge via LB. The only
    solution I have found is to set “link url” to “none” in WP
    Gallery/image upload dialog box. However by doing so, I can no
    longer use Highslide Integration plug in. 2) How/where do I change
    code so enlarged images in LBP will close by clicking on the same
    enlarged image? What code do I use? If I could get this second part
    figured out, I could toss out Highslide Integration (which works
    nicely and has a checkbox in the WP Gallery/image dialog box to
    activate or disable Highslide. Thanks for any additional help! Jay

    • 1. You can’t really aside from not having a Link URL, at least not
      at this point. 2. I’m going to look at extending the JavaScript to
      enable this option. Right now you have to click on the overlay or
      the close button.

    • The answer to question number one is that currently there is not a
      method to do so other than what you have mentioned. I plan on
      adding the option to have LPB work as a class based implementation
      at which point you would have a check box that basically says use
      this class an then you will need to add the class for the item you
      want LBP to tag. As for question two, I can’t easily answer that,
      it’s in the JavaScript but it’s currently designed to work the
      opposite way in that you click anywhere but on the image and it
      closes it. Part of the reason for this is that you should be able
      to load inline content and external pages using LBP and they need
      to be interacted with usually.

      • Jay says:

        Dan, Thanks for getting back to me on this info so fast. Long reply
        back on my part due to traveling. I like your plan to add a check
        box that would enable or disable LBP. Great idea. Too bad no
        current options for the other feature. Again, excellent plug-in.
        Jay

Stop SOPA