Extension:TopTenPages

From MediaWiki.org
Jump to: navigation, search
MediaWiki extensions manual
Crystal Clear action run.png
Top Ten Pages

Release status: beta

TopTenPages.png
Implementation Tag, User activity, Special page
Description Allows to display the most popular pages of a wiki on a page
Author(s) Sascha
Timo Tijhof
Latest version 0.4.0 (2015-06-27)
PHP 5.3+
Database changes No
License No license specified
Download
Parameters
  • <TopTenPages/>
  • <TopTenPages offset="1">5</TopTenPages>

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

Check usage and version matrix; code metrics

The TopTenPages extension allows to display the most popular pages of the wiki on a page.

Usage[edit | edit source]

 <TopTenPages [offset=OFFSET]>[NUMBEROFPAGES]</TopTenPages>

Or:

 {{Special:TopTenPages/OFFSET/NUMBEROFPAGES}}
OFFSET
Format: Number
Default: 0 or -
How many of the most popular Pages to ignore. (e.g. 1 to ignore the main page)
NUMBEROFPAGES
Format: Number
Default: 10
Maximum number of pages to be listed.

Examples[edit | edit source]

To show 10 most popular Pages:

<TopTenPages/> 

To show 5 most popular Pages:

<TopTenPages>5</TopTenPages>

To omit the most popular page(s):

<TopTenPages offset=1/> 

This extension makes use of the HitCounters' "Special:Popularpages".

Installation[edit | edit source]

  • Before downloading TopTenPages, first install HitCounters. (Unless you are using MediaWiki 1.24 or older, where HitCounters was part of MediaWiki)
  • Download and place the file(s) in a directory called TopTenPages in your extensions/ folder.
  • Add the following code at the bottom of your LocalSettings.php:
require_once "$IP/extensions/TopTenPages/TopTenPages.php";
  • YesYDone - Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

Configuration[edit | edit source]

$wgTopTenPagesStartAtOne
(Disabled by default) Enable this to always start the list numbering at "1", even if an "offset" attribute was set.

Sites that use TopTenPages[edit | edit source]