Extension:SlimboxThumbs

SlimboxThumbs incorporates Christophe Beyl's fullsize image viewer Slimbox 2 into MediaWiki's thumbnails and image galleries.

When a user clicks on a thumbnailed image or an image in a gallery, the page darkens and the image is displayed full-size "on top of" the page. A caption below the image includes the image's title and a link to its description page, along with the caption on the thumbnail, if any. Clicking anywhere off the image returns everything to normal.

Images in galleries are treated as being part of a slideshow, and have "previous" and "next" images.

Thanks to Alexander for creating the original Lightbox 2 version of this extension.

Disclaimer
The current code in svn is only partially working and will be discontinued in favour of a version using the jquery lightbox plugin and less regex hocus-pocus: GeeQuBox.

In other words, a new, slimmer and easier extension will be created. Anyone interested in taking up maintenance of this extension (for whatever nostalgic reasons) please feel free.

Download
You can download the code directly via SVN from the MediaWiki source code repository, at http://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions/SlimboxThumbs/. From a command line, you can call the following:

svn checkout http://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions/SlimboxThumbs/

Installation
Place the SlimboxThumbs directory within the main MediaWiki 'extensions' directory. Then, in the file LocalSettings.php in the main MediaWiki directory, add the following line:

Release Notes

 * 0.0.5 - Fixed bug where pictures wouldn't be adequately resized if other image-links would be on the same page.
 * 0.1 - Included copy of Slilmbox, stylized code, added internationalization file, added settings file, renamed functions to follow MW convention and fixed several minor issues.

Bugs

 * If there are multiple galleries on one page, they are treated as being part of one big slideshow.
 * This extensions conflicts with the GuMaxDD skin, resulting in the skins's DropDown menu not working.

Todo

 * Use jquery's fancybox instead of slimbox
 * Set resize height according to browser height
 * Load javascript (jQuery) only on pages with galleries
 * Change resize width & height on window.resize
 * Convert code to object-oriented-code
 * Try to replace the regexp mess with some better hook or data handling...