Mini with Lightbox

Summary: Lightbox slideshow for the Mini gallery
Version: 20110824
Prerequisites: Mini version 20110817 or newer
Status: beta
Maintainer: Petko
Categories: Images, Uploads, Gallery
Users: (view? / edit)
Discussion: MiniLightbox-Talk?
License: CC-BY (lightbox.js, mini-lightbox.js), MIT (libraries)

Description

Use the Mini gallery with Lightbox instead of Ultralightbox.

This recipe enables Lightbox for Mini. Lightbox is a slideshow similar to Ultralightbox, but has a slightly different look and feel and a few more configuration options. Lightbox is built on the Prototype library.

Lightbox was previously bundled with Mini, but from version 20110817, Mini comes with the Ultralightbox slideshow which is simpler and much smaller than Lightbox. The recipe is for users who prefer this package instead of the (new) default one.

Demo.

Installation

You need a working Mini installation version 20110817 or newer. This recipe is a plugin for Mini.

  • Get mini-lightbox.zipΔ (alt. download: mini-lightbox.zip).
  • Copy the folder "lb" to your pmwiki/pub directory.
  • Add to local/config.php these lines:
    $Mini['LbUrl'] = '$FarmPubDirUrl/lb';
    $Mini['LbFiles'] = array('prototype.js', 'builder.js', 'effects.js',
       'mini-lightbox.js', 'lightbox.js', 'lightbox.css');
    

Configuration

The recipe has the following parameters in config.php:

  • $Mini['EnableLightbox'] = 1; this variable works the same way as with Ultralightbox, see Mini. It can be 1, 2 or 3.
  • $Mini['LbFiles'] = array(...); this variable controls the loading of all scripts and styles. The Prototype library should be loaded before all plugins. If your site already loads the library, you can disable it here: write array('mini-lightbox.js', 'lightbox.js', 'lightbox.css') that is without the first 3 files.

You can change the parameters passed to Lightbox at the beginning of the file pub/lb/mini-lightbox.js, inside the block MiniLightboxOptions={}. For example, the overlay opacity can be changed in the line:

  overlayOpacity: 0.8,  // set to 0.3 for more transparent overlay.

Usage

The Lightbox recipe works mostly like Ultralightbox (see Mini). Users with recent browsers will see a nice slideshow when they click on a thumbnail. Visitors with JavaScript disabled will see the large pictures in their browsers without any special effects.

Notes

The recipe requires Mini version 20110817 or newer.

Change log / Release notes

  • 20110824 distinct MiniLightboxOptions block for easier configuration.
  • 20110817 first release as a recipe split from the Mini distribution.

See also

Contributors

This PmWiki recipe is written and maintained by Petko (5ko [snail] 5ko [period] fr). Lightbox [1] and its underlying libraries are written by a number of people. See the source files for authors and free software licenses.

  • If this recipe helps you or saves you time, you can help support its continued development by .

Comments

See discussion at MiniLightbox-Talk?

User notes? : If you use, used or reviewed this recipe, you can add your name. These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki.