Extension:News

The News extension provides a custom tag, &lt;news&gt;, that allows the inclusion of an excerpt from the Special:Recentchanges page to be shown on any wiki page. It supports several types of filtering as well as full custom formating of entries, using template syntax.

Note that the functionality of this extension overlaps with the DynamicPageList and DynamicPageList2 extensions - however, this extension has a different focus.

Installing
Copy the News directory into the extensions folder of your MediaWiki installation. Then add the following line to your LocalSettings.php file (near the end):

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

Usage
To get the last 10 changes to your wiki on any wiki page, use the following:

You can provide options to controll the listing (for example, 20 entries and no minor edits):

To define your own format for the generated list, you can provide a pattern that will be used for each entry:

* (User:, )

For a full list of options and template parameters, see below.

Options
The following options (tag attributes) can be used to controll the output of the &lt;news&gt; tags:


 * unique: show only the most recent change to each page
 * limit: the maximum number of entries to show
 * categories: limit results to the given categories. Multiple categories can be given separated by "|"; Intersections of categories are not                supported. Recursion into subcategories is not supported.
 * namespaces: limit results to the given namespaces. Multiple namespaces can be given separated by "|"; you can use "0", "-" or "main" to refer to the default namespace.
 * notalk: ignore all "talk" namespaces. Not used if the namespaces option is given.
 * nominor: hide minor edits ("true" or "false", default is "false"). *
 * nobot: hide bot edits ("true" or "false", default is "false"). *
 * noanon: hide anonymous edits ("true" or "false", default is "false"). *
 * onlypatrolled: show only patrolled edits ("true" or "false", default is "false"). *
 * onlynew: show only page creations ("true" or "false", default is "false"). *

'' * if some edits are filtered out, the edit shown by in the news list may not refer to the current revision. To avoid people clicking the link and seeing a later, possible undesiarable version, use   in your custom pattern to link to the exact revision. See the "parameters" section below.''

Parameters
When giving a template text between the &lt;news&gt; tags, the following template-parameters are available (use them as ):


 * rawtime: raw timestamp - can be formated using the parser function "time", e.g.
 * date: date of the edit, formated per user preference
 * time: time of the edit, formated per user preference
 * timeanddate: time and date of the edit, formated per user preference
 * namespace: numeric namespace id, can be used with
 * title: canonical title (without namespace prefix)
 * pagename: full title, with namespace prefix
 * type: numerical change type (0 = edit, 1 = new, 2 = move, 3 = log, 4 = move-over)
 * minor: "true" for minor changes, blank otherwise
 * user: user name who made the entry
 * comment: edit summary (escaped wikitext, safe to use)
 * new_rev: revision id associated with this entry (or zero)
 * old_rev: revision id associated with the entry before this one (or zero)
 * diff: full diff link for the edit (or blank)
 * permalink: full url to the revision created by the edit (may not be the current revision)
 * bot: "true" for bot edits, blank otherwise
 * new: "true" for newly created pages, blank otherwise
 * patrolled: "true" if the edit was patrolled, blank otherwise
 * old_len: page length before the edit
 * new_len: page length after the edit

Related Extensions
The Dynamic Page List extension creates reports on pages based on a variety of selection criteria and offers mechanisms for content transclusion.