Lightbox2

Description

The Lightbox2 module is a simple, unobtrusive script used to overlay images on the current page. It is easy to set-up and works on most modern browsers. The module places images above your current page, not within. This frees you from the constraints of layout, particularly column widths, and keeps users on the same page. Clicking to view an image and then having to click the back button to return to your site is bad for continuity (and no fun!). The module inserts the required JavaScript and CSS directly into your page with no need to edit the theme.

Features

The version 2 module has several benefits over the plain Lightbox module. Note, not all of these features are available when the "Lightbox2 Lite" option is enabled.

  • Image Sets: group related images and navigate through them with ease - ideal for your image galleries.
  • Slideshow Capability: automatically transition between grouped images, includes play/pause and previous and next buttons.
  • HTML Content Support: ability to show websites or other HTML content in a lightbox.
  • Video Content Support: ability to show videos in a lightbox.
  • Visual Effects: fancy pre-loader and transition when you click on the image.
  • Keyboard Shortcuts: useful keyboard shortcuts for switching between images, toggling play / pause, etc.
  • Zoom Capability: larger images are reduced in size so they fit snugly inside the browser window. A zoom in button can then be clicked on to see it in its original size, while a zoom out button is provided to return you to the scaled down version.
  • Choice of Layouts: there are two layouts provided, not including the "Lightbox2 Lite" version.
  • Automatic Image Detection: configurable automatic re-formatting of image node thumbnails, so there is no need to add 'rel="lightbox"' to each image node link on your site. Image, Inline, Flickr, Acidfree Albums, Image Assist, Embedded Media Field and CCK Imagefield modules are all supported (images must have the "inline", "thumbnail", "image-thumbnail", "preview", "image-preview", etc, classes). It's also possible to configure a list of custom image classes which will trigger the lightbox when clicked on.
  • Control Over Lightbox Image Size: configure which image size should be displayed in the lightbox, e.g. preview or original.
  • Imagecache Support: adds a Lightbox2 field formatter for CCK imagefields for your custom views.
  • Image Page Link: a link to the image page can be provided within the lightbox itself. You can even specify if it should be opened in the current window or a new window.
  • Page Exclusion Capability: exclude certain pages on your site from having the lightbox2 functionality.
  • Login Support: ability to modify all user/login links so the login form appears in a lightbox.
  • Skin and Animation Configuration: configure the order and speed of the lightbox animations, along with the lightbox colors, border size and overlay opacity.
  • Gallery 2 Support: support for Gallery 2 images via the Gallery module (beta). See here for information on how to customise your Gallery2 theme to work with lightbox.
  • Right-to-Left Language Support: support for right-to-left languages and themes.

Dependencies

Lightbox2 5.x-2.0 and later versions now all use the jQuery library instead of the Scriptaculous and Prototype libraries, so there is no need to download and install a separate third party package. The 5.x versions have a dependency on the jQuery Update module since the version of jQuery included in Drupal core is not that recent. Both jQuery Update 1.x and 2.x versions should work with Lightbox2.

There is no such dependency for the 6.x versions.

Demo

http://www.stellapower.net/lightbox2

Current Maintainers

How to close your Lightbox with an onclick event

Use case: an image gallery view has a grid of image thumbnails, each with an "Edit Description" link in them. You want to open the Edit form

Lightbox2 - FAQ

Frequently Asked Questions

Lightbox2 - How to add a lightbox to your images and other content

Demo site: http://www.stellapower.net/lightbox2

Lightbox2 - Installation

Install the module

Lightbox2 - Keyboard Shortcuts

Lightbox2 - Known Issues

Lightbox Lite in IE - older versions of Lightbox2

Lightbox2 - Settings

The Lightbox2 module can be configured at Administer >> Site Configuration >> Lightbox2. Users will need the 'administer lightbox2'

Lightbox2 - Translation of configuration strings

In order to translate the lightbox2 configuration strings, such as the text for the "View Image Details" link and the image count, please

Lightbox2 - User Permissions

There are two permissions you can assign a user using the Lightbox2 module:

Guide maintainers

stella's picture