Yen's Blog

Lens, Wheels, Skates, Keyboard

Using Lightbox With NextGen Gallery

In my former Wordpress blog, I used the excellent NextGen plugin to manage images in galleries.  When embedded in a post, the gallery is rendered as thumbnails, whose full-size version  is shown as an overlay when clicked.  I also like to embed inline images so that I can include a caption.  Inline images, however, are still directly linked and not shown as an overlay.  When viewed, it requires an additional click or two to go back to the post.

To make sure that inline images are opened on the same page, I use the Slimbox plugin.  This works well, except that now when gallery thumbnails are clicked, two full-sized versions are shown, one by NextGen’s built-in effect and one by Slimbox.

To solve this problem, I opened NextGen’s options page and locate the Effects tab.  By default, the JavaScript Thumbnail effect is set to Shutter.  I changed it to None (or Lightbox) to ensure that only Slimbox handles the effect (Slimbox is a clone of Lightbox).  The only drawback of not using the Shutter effect is that you can’t use Ajax pagination with the gallery if pagination is turned on (as of NextGen 1.9.3).