Extension:TopTenPages

From MediaWiki.org
Jump to: navigation, search
MediaWiki extensions manual - list
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) Saschatalk
Latest version 0.3.1 (2012-11-13)
MediaWiki 1.19+
PHP 5.3+
Database changes no
License No license specified
Download see here
Example

<TopTenPages/> or

<TopTenPages offset="1">5</TopTenPages>

Translate the TopTenPages extension if possible

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<//code> 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/> 

Note: The offset does not work properly (at least in version 1.2). It does start the list at the specified offset but the list is an ordered list thus displaying numbers. If you specifiy offset=1 as in the example above your list will start with 2. ie. "2 The art of cooking" instead of "1 The art of cooking" thus making this option unusable. I check other sites using this extension and they all don't use this parameter for precisely this reason I suspect.

This Extension makes use of the Wiki-Builtin-Function Special:Popularpages with similar functionality (which is disabled in some installations).

Image description[edit | edit source]

The Image was created by this code:

==Most visited pages==
<TopTenPages>10</TopTenPages>
[[Special:PopularPages|mehr >>]]

Installation[edit | edit source]

Copy Code files to your extensions directory.

To install the extension, add to your LocalSettings.php:

require_once("$IP/extensions/TopTenPages.php");

Sites that use TopTenPages[edit | edit source]