GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Main page
  • Welcome
  • Community portal
  • Village pump
  • Help center
  • Upload file
  • Recent changes
  • Latest files
  • Random file
  • Contact us
  • Special pages
  • Add links
  • Search
  • English

This view

  • Original page
  • New address

GeezerVison is showing commons.wikimedia.org — Help:Gadget-GallerySlideshow - Wikimedia Commons

This is the documentation for GallerySlideshow, a JavaScript gadget which can be enabled or disabled in your Preferences. The script itself is located at MediaWiki:Gadget-GallerySlideshow.js.

If you need more help, please ask at the discussion page or at Commons:Help desk.

Documentation: বাংলা ∙ Deutsch ∙ English ∙ español ∙ فارسی ∙ français ∙ မြန်မာဘာသာ ∙ Nederlands ∙ português ∙ русский ∙ ไทย

Gallery Slideshow is a gadget that provides JavaScript code to create a slideshow of the images within a category or in a gallery on a page in the Commons or (Gallery) namespaces. It is activated in your preferences by default.

Alternatively, you may continue to use the Media Viewer, to be set on Special:Preferences#mw-prefsection-rendering.

Try it now!
Fullscreen? Hit F11 before clicking.
JavaScript is disabled in your browser.
Hover the slideshow button in order to see more options after activating the gadget

Keyboard navigation

Screenshot of Gadget-GallerySlideshow in Gallery-mode
  • Space: next image
  • End: last loaded image
  • ←: previous image
  • →: next image
  • Break: play / pause (break) [Ctrl+C on Mac]
  • Esc: hide slideshow (press again to show it)

URL parameters

URL-Parameter allows you to post links, which can start a customized slideshow.

Example of a URL's construction: http://commons.wikimedia.org/wiki/Category:X?param1=value1&followingParam=value&followingParam=value

List of parameters and possible values
  • gsAutoPlay Possible values: 1 or 0 — automatically starts playing after opening the slideshow.
  • gsDelay Possible values: number >2500 — sets the delay to wait before loading a new image.
  • gsDir Possible values: asc, desc — (direction)- starts the slideshow from the beginning or end.
  • gsContinue Possible values: valid Key — starts the slideshow from this key.
  • gsAutoStart Possible values: 1 or 0 — automatically opens the slideshow after page-loading.
  • gsReadFromScreen Possible values: 1 or 0 — sorting like displayed on the page; only images in gallery-boxes; loads only visible images in categories
  • withJS Possible values: MediaWiki:Gadget-GallerySlideshow.js — load script code for the slideshow; this is not necessary if you have it enabled in your preferences.
  • withCSS Possible values: MediaWiki:Gadget-GallerySlideshow.css — load style code for the slideshow; this is not necessary if you have it enabled in your preferences.

Examples:

  • Works for all users: Category:Featured images.
    • http://commons.wikimedia.org/wiki/Category:Featured_pictures_on_Wikimedia_Commons?gsAutoPlay=1&gsDelay=10000&gsDir=desc&gsAutoStart=1&withJS=MediaWiki:Gadget-GallerySlideshow.js&withCSS=MediaWiki:Gadget-GallerySlideshow.css
  • Works for users with gadget activated only: Commons:Featured images of Flowers.
    • http://commons.wikimedia.org/wiki/Commons:Featured_pictures/Plants/Flowers?gsAutoPlay=1&gsDelay=10000&gsDir=desc&gsAutoStart=1&gsReadFromScreen=1
  • Works for users with gadget activated only: Category:Featured images.
    • http://commons.wikimedia.org/wiki/Category:Featured_pictures_on_Wikimedia_Commons?gsAutoPlay=1&gsDelay=10000&gsDir=desc&gsAutoStart=1

Custom settings

You can customize your slideshow in your common.js by adding the code below. Note that your settings can be overwritten by URL-parameters.

$(document).bind('slideshow', function(evt, st, x) {
	if (!st || !x) return;
	if ('starting' !== st) return;
	
	// The following lines are just examples.
	// You can remove a complete line to use the defaults or change the values
	x.autoPlay = true;   // same as gsAutoPlay but use only true or false
	x.delay = 10000;     // same as gsDelay
	x.cmdir = 'desc';    // same as gsDir but use only 'asc' or 'desc', NOT 0 or 1

	// number of days to save the position where you have left the slideshow
	x.lastPositionExpiry = 1; // -1 to delete the cookie when you close your browser (session-cookie)
	x.defaultTransitionDuration = 2000;
});

If you are a real hacker, you can search for var defaults = { in MediaWiki:GallerySlideshow.js. There is a complete list of defaults you can customize. If this is still not enough, GallerySlideshow fires a lot of events. Just search for $(document).triggerHandler('slideshow', (also in MediaWiki:Gadget-GallerySlideshow.js) You can listen to them using the approach above.

Cookies

For convenience the slideshow stores some information in cookies:

  • The image you've last seen.
  • The delay you've last entered.

Cookies are often lost while logout or closing the browser. If so, don't blame me, look in your browser's settings.

Retrieved from "https://commons.wikimedia.org/w/index.php?title=Help:Gadget-GallerySlideshow&oldid=996652834"
Categories:
  • Commons help
  • Commons tools
  • Commons gadgets enabled by default
Hidden category:
  • Gadget script documentation
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.