Mini with Ultralightbox

Summary: Obsolete, Mini comes now bundled with Ultralightbox
Version: 20110816
Prerequisites: Mini, PmWiki version 2.2.17 or newer
Status: beta
Maintainer: Petko
Categories: Obsolete
Users: (view? / edit)
License: GPL3+ (Ultralightbox), MIT (unverse.js)

Description

From version 20110817, the Mini gallery is bundled with the Ultralightbox slideshow. See Mini for more information. This page is kept for historical reasons.

This recipe enables Ultralightbox for Mini. Ultralightbox is a slideshow similar to Lightbox, but it is built with the "Unverse.js" library instead of "Prototype".

Ultralightbox is minimalist and extremely lightweight. Compared to Lightbox (232kB) and Fancybox (175kB), the full Ultralightbox is only 7kB (25-33 times smaller). Yet it has the basic features of Lightbox: slideshow sets, animated transitions, mouse and keyboard navigation, downsizing large pictures to fit to the screen.

Demo.

Installation

You need a working Mini installation. This recipe is a plugin for Mini.

  • Copy mini-ultralightbox.php to your pmwiki/cookbook directory.
  • Copy the folder ultralightbox to your pmwiki/pub directory.
  • Add to local/config.php such a line:
    include_once("$FarmD/cookbook/mini-ultralightbox.php");

Configuration

The recipe has the following parameters in config.php:

  • $Mini['EnableLightbox'] = 2; this variable works the same way as with Lightbox, can be 1, 2 or 3, see Mini.
  • $Mini['uLbUrl'] = '$FarmPubDirUrl/ultralightbox'; change it if you use a different directory for the JavaScript files.

The following variables can be set in config.php in order to override the default ones from mini-ultralightbox.php:

  • $Mini['ULB'] = '<script type="text/javascript" src="%1$s/ultralightbox.js"></script>'; if your wiki already includes the Unverse library.
  • $HTMLStylesFmt['uv_mini'] = "your CSS"; if you want to modify the appearance styles of the ultralightboxes.

Usage

The Ultralightbox recipe works mostly like Lightbox (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.

The keyboard navigation accepts the following keys:

  • [n] or [right arrow] : display the next picture from the set
  • [p] or [left arrow] : display the previous picture from the set
  • [c] or [q] or [x] or [ESC] : close the lightbox

Notes

The recipe requires PmWiki version 2.2.17 or newer.

Ultralightbox is loaded only if the page has a Mini gallery, and if the variable EnableLightbox is 1, 2 or 3. If you use other Unverse plugins, you may want to call the Unverse library in config.php with $HTMLHeaderFmt and not call it from Mini, change $Mini['ULB'] like the example above.

Change log / Release notes

  • 20110816 minor changes to the user interface buttons, styles and transitions of the slides.
  • 20110813 first public release.

See also

Contributors

This PmWiki recipe is written and maintained by Petko. Ultralightbox is written by Petko Yotov. The Unverse library is written by John Goodman.

Comments

See discussion at MiniUltralightbox-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.