Extension:SlimboxThumbs

From Linux Web Expert

MediaWiki extensions manual
SlimboxThumbs
Release status: unmaintained
File:SlimboxThumbs.png
Implementation User interface
Description Displays full-size images with Slimbox 2 when clicking on thumbnails.
Author(s) Vitaliy Filippov, David Raison, Jeroen De Dauw
Latest version 2014-04-01 (2017-10-30)
MediaWiki 1.23-1.25
PHP 5.3+
License GNU General Public License 3.0 or later
Download
Quarterly downloads Lua error in Module:Extension at line 172: bad argument #1 to 'inNamespace' (unrecognized namespace name 'skin').
Public wikis using Lua error in Module:Extension at line 172: bad argument #1 to 'inNamespace' (unrecognized namespace name 'skin').
Translate the SlimboxThumbs extension if it is available at translatewiki.net
Issues Open tasks · Report a bug

The SlimboxThumbs extension 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.

SlimboxThumbs displays a lightbox for an image on the page if:

  • It is a thumbnail, and not already a full-sized image.
  • It is linked to an image page (File:Something.jpg). If the thumbnail is linked to a random URL or not linked to anything, there will be no lightbox - the idea is to have a way of cancelling lightbox for some images. Also you can link the thumbnail to another image's page, and this another image will be shown in the lightbox.

Such thumbnails, including images in galleries, are treated as being part of a slideshow, and have "previous" and "next" images. If an image is bigger than 90% of current viewport size, a respective thumbnail is shown using thumb.php.

Thanks to Alexander for creating the original LightboxThumbs version of this extension, yet the code isn't related to it anymore in any way.

This is a rewritten version of this extension which was discontinued by its original author, David Raison.

Installation

  • <translate> [[<tvar name=2>Special:ExtensionDistributor/SlimboxThumbs</tvar>|Download]] and move the extracted <tvar name=name>SlimboxThumbs</tvar> folder to your <tvar name=ext>extensions/</tvar> directory.</translate>
    <translate> Developers and code contributors should install the extension [[<tvar name=git>Special:MyLanguage/Download from Git</tvar>|from Git]] instead, using:</translate>cd extensions/
    git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/SlimboxThumbs
  • <translate> Add the following code at the bottom of your <tvar name=1>LocalSettings.php </tvar> file:</translate>
    require_once "$IP/extensions/SlimboxThumbs/SlimboxThumbs.php";
    
  • File:OOjs UI icon check-constructive.svg <translate> Done</translate> – <translate> Navigate to <tvar name=special>Special:Version</tvar> on your wiki to verify that the extension is successfully installed.</translate>

Customization

To speed up the animation, edit "slimbox/js/slimbox2.js" as follows:

overlayFadeDuration:1
resizeDuration:1
imageFadeDuration:1
captionAnimationDuration:1

Issues

  • If there are multiple galleries on one page, they are treated as being part of one big slideshow.

Troubleshooting

As always, try purging, refreshing (Ctrl+F5), etc. if it doesn't work.