MediaWiki extensions manual
RandomPages
Release status: beta
Implementation Tag
Description Allows to return one or more randomly selected pages
Author(s) Aurelian Oancea
Latest version 0.5.0 (2018-04-06)
Compatibility policy Snapshots releases along with MediaWiki. Master is not backward compatible.
MediaWiki
Database changes No
License GNU General Public License 3.0 or later
Download
Tags
  • <randompages />
Quarterly downloads 6 (Ranked 164th)
Translate the RandomPages extension if it is available at translatewiki.net

The Random Pages extension returns one or more randomly selected pages. The original version 0.2 doesn't work with MediaWiki 1.25+ (Original URL: http://locknet.ro/). Now version 0.5.0 supports all MediaWiki 1.25+ version.

Usage

RandomPages adds a new MediaWiki wiki parser tag: <randompages />

Available options
Name Type Description Default
limitintto control how many links should be fetched randomly from the database150
namespacebooltrue to restrict only to the global namespacefalse
levelsintlevels of CSS applied to each entry5
 <randompages limit="10" namespace="true" levels="10" />

Gets 10 random pages from the global namespace with 10 levels of style

Installation

  • Download and place the file(s) in a directory called RandomPages in your extensions/ folder.
  • Add the following code at the bottom of your LocalSettings.php file:
    wfLoadExtension( 'RandomPages' );
    
  • Yes Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

To users running MediaWiki 1.24 or earlier:

The instructions above describe the new way of installing this extension using wfLoadExtension(). If you need to install this extension on these earlier versions (MediaWiki 1.24 and earlier), instead of wfLoadExtension( 'RandomPages' );, you need to use:

require_once "$IP/extensions/RandomPages/RandomPages.php";
This article is issued from Mediawiki. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.