Release status: unmaintained |
|
|---|---|
![]() |
|
| Implementation | Tag, Special page |
| Description | Allows to display the most popular pages of a wiki on a page |
| Author(s) |
|
| Latest version | 0.4.0 (2015-06-27) |
| MediaWiki | 1.25+ |
| PHP | 5.3+ |
| Database changes | No |
| License | MIT License |
| Download | Download extension Git [?]: |
|
Parameters
$wgTopTenPagesStartAtOne |
|
|
Tags
|
|
|
Hooks used
|
|
| Quarterly downloads | 18 (Ranked 152nd) |
| Translate the TopTenPages extension if it is available at translatewiki.net | |
The TopTenPages extension allows to display the most popular pages of the wiki on a page. It makes use of "Special:Popularpages" provided by the HitCounters extension.
Usage
<TopTenPages [offset=OFFSET]>[NUMBEROFPAGES]</TopTenPages>
or
{{Special:TopTenPages/OFFSET/NUMBEROFPAGES}}
- OFFSET
- Format: Number
- Default:
0or- - How many of the most popular Pages to ignore. (e.g.
1to ignore the main page) - NUMBEROFPAGES
- Format: Number
- Default:
10 - Maximum number of pages to be listed.
Examples
- 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/>
Installation
- Make sure you installed the HitCounters extension which is required by this extension to work.
- Download and place the file(s) in a directory called
TopTenPagesin yourextensions/folder. - Add the following code at the bottom of your LocalSettings.php file:
wfLoadExtension( 'TopTenPages' );
- Configure as required
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( 'TopTenPages' );, you need to use:
require_once "$IP/extensions/TopTenPages/TopTenPages.php";
Configuration
$wgTopTenPagesStartAtOne(disabled by default)- Enable this to always start the list numbering at "1", even if an "offset" attribute was set.
This article is issued from Mediawiki. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.
