From MediaWiki.org
Jump to: navigation, search
MediaWiki extensions manualManual:Extensions
Crystal Clear action run.png

Release status:Extension status stable

ImplementationTemplate:Extension#type Tag, Parser function
DescriptionTemplate:Extension#description Create a slideshow (using Javascript) from multiple included div elements
Author(s)Template:Extension#username Chris Reigrut, Yaron Koren, DaSch, Alexia E. Smith, Nick White
Latest versionTemplate:Extension#version 1.3.0 (2016-04-06)
MediaWikiTemplate:Extension#mediawiki 1.17+
PHPTemplate:Extension#php 5.3+
Database changesTemplate:Extension#needs-updatephp No
LicenseTemplate:Extension#license GNU General Public License 3.0 or later
ExampleTemplate:Extension#example PDF Keynote embedded as Slideshow
Russian sample
Hooks usedTemplate:Extension#hook

Translate the JavascriptSlideshow extension if it is available at translatewiki.net

Check usage and version matrix.

The JavascriptSlideshow extension creates a slideshow which can:

  • Create a "rotating" slideshow (i.e. one that changes from one picture to another)
  • Create stop-action animation from multiple images or multiple pieces of text


  • Download and place the file(s) in a directory called JavascriptSlideshow in your extensions/ folder.
  • Add the following code at the bottom of your LocalSettings.php:
    require_once "$IP/extensions/JavascriptSlideshow/JavascriptSlideshow.php";
  • YesY Done - Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

Options / attributes[edit]

The id to be given to the div containing the content. This allows you to pre-specify the id for styling purposes. If none is specified, the id will be a randomly generated number starting with 'slideshow_' (e.g. slideshow_12345).
The time, in milliseconds, between transitions. The default is 1000 milliseconds (one second).
The sequence in which to display the content. Must be one of the following values:
  • random: This is the default.
  • forward
  • backward

How to transition (change) between content. Must be one of the following values:
  • cut: A straight cut from the current content to the new content. This is the default.
  • fade: A one-second fade between the current content and the new content.
  • blindDown: The new content "rolls down" over the existing content.
The time, in milliseconds, that transitions take to complete. The default is 400 milliseconds. Increase it to make transitions slower.
if 'true', center the slideshow (only works for a slideshow of images, not text).



<slideshow sequence="random" transition="fade" refresh="10000">
<div>[[Image:Image1.jpg|thumb|right|128px|Caption 1]]</div>
<div>[[Image:Image2.jpg|thumb|right|128px|Caption 2]]</div>
<div>[[Image:Image3.jpg|thumb|right|128px|Caption 3]]</div>

This results in a div (with a randomly generated id) that randomly changed every 10 seconds between the three images specified (which happen to be wiki images).

Parser function[edit]

|id=bar refresh=1000

would result in a div (with an id of bar) that changed every second between the words Tick and Tock.

Revision history[edit]

1.2.3 (05/09/2013)
Make it work with PHP 5.2 (for some Mediawiki 1.19 installs) – Download
1.2.2 (03/18/2013)
Add 'center' option, use css to stop initial image flashing and ensure it looks reasonable without javascript – Download
1.2.1 (03/18/2013)
Fix bug ensuring image width is always set correctly – Download
1.2.0 (02/21/2013)
Improve translation and validation – Download
1.1.0 (02/20/2013)
Use HTML5 data attributes to allow multiple slideshows, add transitiontime option, bug fixes – Download
1.0.3 (02/20/2013)
Version that works without HTML5 – Download (IMPORTANT: Only use this version if you can't use HTML5 in your wiki. This version might not work with some version of MediaWiki!)
1.0.2 (02/19/2013)
Small bug fixes – Download
1.0.1 (02/18/2013)
Bug fix for IE6/8 – Download
1.0 (02/14/2013)
Overhauled code and bug fixes for OOP updated code
0.4 (01/29/2013)
Reworked Version, now at github
0.3 (03/25/2012)
Support added for MediaWiki 1.17 and higher, removed for versions of MediaWiki below 1.17; use of Scriptaculous replaced with jQuery. slideshow.php slideshow.js.
0.2.1 (09/15/2008)
More changes to the way that the divs are displayed, and added a spacer div (since the main div is now positioned absolutely in order to deal with IEs CSS failings). slideshow.php slideshow.js.
0.2.0 (09/02/2008)
Modified the way that the embedded divs are displayed to allow more control over styling. slideshow.php slideshow.js.
0.1.0 (07/30/2008)
Initial release, marked beta. slideshow.php slideshow.js.