Extension:DynamicPageList (Wikimedia)

From MediaWiki.org

(Redirected from Extension:Intersection)
Jump to: navigation, search

       

Manual on MediaWiki Extensions
List of MediaWiki Extensions
Crystal Clear action run.png
DynamicPageList

Release status: stable

Implementation  Tag, Parser function
Description Outputs a bulleted list of most recent items residing in a category, or a union of several categories.
Author(s)  n:en:User:IlyaHaykinson and n:en:User:Amgine
License GPL
Download Download snapshot

Subversion [Help]
Browse source code

check usage (experimental)

DynamicPageList is a Mediawiki 1.5+ extension developed for Wikinews. It is currently installed on all language Wikinews projects (see n:Wikinews:DynamicPageList) and Meta, and can be installed on any wiki. It allows wiki users to create a list of pages that are listed in a set of categories. See m:Help:DPL for general information.

This extension was previously known as DynamicPageList/old and later Intersection. You may also be interested in the third-party DynamicPageList, which is more actively-developed.

Contents

[edit] Installation

The dynamic page list is in Wikimedia SVN. To install it, get the extension files for your version of MediaWiki, and place them in the extensions/intersection directory. Then add include("$IP/extensions/intersection/DynamicPageList.php"); to your LocalSettings.php file.

[edit] Use

DynamicPage list can be used with XML-like syntax in the wiki edit view. The parameters control the pages to list, order, and display mode. See the following sections for information on each parameter. For example, the following are the oldest five pages on this wiki that were recently moved to MediaWiki.org.

The information below may be outdated, see n:Wikinews:DynamicPageList for an up-to-date usage documentation.

<DynamicPageList>
category             = Pages recently transferred from Meta
count                = 5
order                = ascending
addfirstcategorydate = true
</DynamicPageList>

[edit] Page selection

[edit] category

category lists categories to intersect. DynamicPageList will list pages that are found in every category listed. A minimum and maximum number of entries to list is set in the extension's source code. You may use magic words like {{CURRENTMONTHNAME}} in the category name.

The syntax is category = category name

<DynamicPageList>
category = Demo
category = Demo 1
</DynamicPageList>

[edit] notcategory

notcategory restricts the list of pages to those not in a particular category. You can use magic words like {{CURRENTMONTHNAME}} in the category name.

<DynamicPageList>
category    = Demo
notcategory = Demo 1
</DynamicPageList>

[edit] namespace

namespace restricts the list of pages specified above to those in a particular namespace, specified by name or number (see the List of default namespaces). Any invalid name is equivalent to the main article namespace.

<DynamicPageList>
category  = Demo
namespace = Help
</DynamicPageList>

[edit] redirects

redirects determines whether or not to include redirect pages. The value can be exclude (default, don't list redirects), include (list redirects), or only (don't list pages that aren't redirects).

<DynamicPageList>
category  = Demo
redirects = only
</DynamicPageList>

[edit] count

count restricts the number of results that are shown. By default, the pages added to the category most recently are shown (see order). Note that the extension will not list more results than the maximum defined in the extension source code.

<DynamicPageList>
category = Demo
count    = 2
</DynamicPageList>

[edit] Details displayed

[edit] shownamespace

shownamespace displays the namespace in the page names. The value can be true (default, display in name: Help:Contents) or false (don't display in name: Contents).

<DynamicPageList>
category      = Demo
shownamespace = false
</DynamicPageList>

[edit] addfirstcategorydate

addfirstcategorydate shows the date each article was added to category. The value can be true (display date) or false (default, don't display date). If many categories are specified, it uses the first category. The linked page names are prepended with the date formatted according to your local MediaWiki date display preferences.

<DynamicPageList>
category             = Demo
addfirstcategorydate = true
</DynamicPageList>

[edit] mode

mode determines the format of the list. The value can be unordered (bulleted list), ordered (numbered list), or none (plain text with line breaks).

unordered:
<DynamicPageList>
category = Demo
mode     = unordered
</DynamicPageList>

ordered:
<DynamicPageList>
category = Demo
mode     = ordered
</DynamicPageList>

plain text:
<DynamicPageList>
category = Demo
mode     = none
</DynamicPageList>

[edit] suppresserrors

suppresserrors hides errors. The value can be true (hide errors) or false (default, show errors).

true:
<DynamicPageList>
category       = Dem
suppresserrors = true
</DynamicPageList>

false:
<DynamicPageList>
category       = Dem
suppresserrors = false
</DynamicPageList>

[edit] Order

[edit] ordermethod

ordermethod determines the order and date to display. The value can be categoryadd (default, sort by date pages were categorised) or lastedit (sort by date pages were last edited).

<DynamicPageList>
category             = Demo
addfirstcategorydate = true
ordermethod          = lastedit
</DynamicPageList>

[edit] order

order decides the sort direction. The value can be descending (default, most recent to oldest) or ascending (oldest to most recent).

<DynamicPageList>
category  = Demo
order     = ascending
</DynamicPageList>

[edit] Derived extensions

Derived extensions: DPLforum outputs in forum style. Extension:DynamicPageList (third-party) is a modified version with more features, but also more resource-expensive. Neither of the latter is used on Wikimedia's sites.
Version 1.8.4 of DynamicPageList (third-party) is fully downward compatible with the extension described here. So the way is open for a re-unification of the different development paths.

This extension is being used on one or more of Wikimedia's wikis. It means that the extension is stable and works well enough to be used by such high traffic websites. A full list of the extensions installed on a particular wiki is produced by Special:Version on that wiki.