Extension:RandomImageByCategory

From MediaWiki.org
Jump to: navigation, search
MediaWiki extensions manual - list
Crystal Clear action run.png
RandomImageByCategory

Release status: stable

Implementation Tag
Description Displays a random image from a given category
Author(s) Aaron Wright
David Pean
Jack Phoenix
Latest version 1.0
MediaWiki 1.12+
Database changes No
License GPLv2+
Download
Example <randomimagebycategory width="200" categories="Featured Image"/>
Hooks used
ParserFirstCallInit

Translate the RandomImageByCategory extension if possible

Check usage and version matrix; code metrics

The RandomImageByCategory extension displays a random image from the given category or categories.

Installation[edit | edit source]

  • Download and extract the files in a directory called RandomImageByCategory in your extensions/ folder. If you're a developer and this extension is in a Git repository, then instead you should clone the repository.
  • Add the following code at the bottom of your LocalSettings.php:
require_once( "$IP/extensions/RandomImageByCategory/RandomImageByCategory.php" );
  • Done! Navigate to "Special:Version" on your wiki to verify that the extension is successfully installed.

Usage[edit | edit source]

Supported parameters are width, limit and categories.

Example
<randomimagebycategory categories="Watermelons"/>

See also[edit | edit source]