DynamicPageList: Difference between revisions

From Meta, a Wikimedia project coordination wiki
Content deleted Content added
unblanked page (mw:Extension:DynamicPageList does not have any usage documentation at all; maybe you forgot to move it?)
update download path (has 2 files now)
Line 6: Line 6:
|name = DynamicPageList2
|name = DynamicPageList2
|author = [[n:User:IlyaHaykinson|IlyaHaykinson]], [[n:en:User:Amgine|Amgine]]
|author = [[n:User:IlyaHaykinson|IlyaHaykinson]], [[n:en:User:Amgine|Amgine]]
|download = [http://svn.wikimedia.org/viewvc/mediawiki/trunk/extensions/intersection/DynamicPageList.php DynamicPageList.php] (Wikimedia SVN)
|download = [http://svn.wikimedia.org/viewvc/mediawiki/trunk/extensions/intersection/ intersection] (MediaWiki SVN)
|image =
|image =
|type = Parser Extension
|type = Parser Extension

Revision as of 22:18, 22 February 2008

 
This page should be moved to MediaWiki.org.
Please do not move the page by hand. It will be imported by a MediaWiki.org administrator with the full edit history. In the meantime, you may continue to edit the page as normal.
Other languages: de
Derived extensions: DynamicPageList2 is a modified version with more features, but also more resource-expensive. DPLforum outputs in forum style.

Template:Extension 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 Help:DPL for general information.

Installation

The dynamic page list is in Wikimedia SVN. To install it, place DynamicPageList.php in your extensions/ directory and add include("extensions/DynamicPageList.php"); to your LocalSettings.php file.

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 should be moved to MediaWiki.org.

<DynamicPageList>
category             = Pages to be exported to MediaWiki.org
count                = 5
order                = ascending
addfirstcategorydate = true
</DynamicPageList>

Page selection

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>

No pages meet these criteria.

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>

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>

No pages meet these criteria.

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>

No pages meet these criteria.

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>

Details displayed

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>

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>

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>

unordered:


ordered:

  1. Template:H:lf


plain text:

Template:H:lf

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>

true:


false: No pages meet these criteria.

Order

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>

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>