6
This is free software licensed under the GNU General Public Licence. Please
7
see http://www.gnu.org/copyleft/gpl.html for further details, including the
8
full text and terms of the licence.
13
2. Installing the extension
14
3. Accessing the special page
15
4. Including the special page
16
5. Customising the interface text
17
6. Customising extension behaviour
22
The Newest Pages extension adds an includable special page to MediaWiki which
23
produces an ordered list of the newest pages in the wiki, up to a specified
24
limit. The page can be accessed as a regular special page, or included within
25
other pages as a form of dynamic list.
27
== 2. Installing the extension ==
29
To install the Newest Pages extension, first upload/copy the extension files
30
NewestPages.php and NewestPages.i18n.php into your MediaWiki extensions directory.
31
Then edit your LocalSettings.php file and add the following line:
33
require_once( 'extensions/NewestPages.php' );
35
Save the file to complete the installation.
37
== 3. Accessing the special page ==
39
To access the special page in the regular view mode, go to Special:Newestpages
40
on your wiki, or select it from the list of special pages.
42
The page has a default limit of 50 items, which can be customised using the
43
supplied limit links, or with the 'limit' parameter in the page URL.
45
To filter according to namespace, use the namespace selector and click Go, or
46
alter the 'namespace' parameter in the page URL.
48
You can opt to exclude redirect pages from the results using the "show/hide
49
redirects" links at the top of the page.
51
== 4. Including the special page ==
53
To include the special page into another page, add the following wiki markup
56
{{Special:Newestpages}}
58
This will be replaced with a list when the containing page is rendered. To
59
customise the limit here, use the following syntax:
61
{{Special:Newestpages/X}}
63
where X is the desired limit. To set the namespace to be used, pass this
66
{{Special:Newestpages/User}}
68
would show the newest pages in the user namespace. Use - to select the main
69
namespace. To select a namespace AND set a limit, use syntax similar to the
72
{{Special:Newestpages/User/5}}
73
{{Special:Newestpages/5/User}}
75
== 5. Customising the interface text ==
77
All interface text used in the Newest Pages extension is customisable via
78
the MediaWiki namespace. See Special:Allmessages for a list of customisable
79
interface messages in the wiki.
81
== 6. Customising extension behaviour ==
83
The default page limit for the extension can be altered using the
84
$wgNewestPagesLimit variable, e.g.
86
$wgNewestPagesLimit = 500;
88
sets the default limit to be 500. This should be set after the call
89
to include the extension file. The default remains at 50 pages, and there
90
is an absolute limit of 5000 pages, to avoid crippling the database server(s).
94
This extension was written in a much more specific form to serve the needs of a
95
user in the #mediawiki IRC channel. Following a second request for a similar
96
page, I decided to clean up the code, give the page a more generalised function,
99
Feedback welcomed at <robchur@gmail.com> as usual.
b'\\ No newline at end of file'