DynamicPageList: Difference between revisions

From Meta, a Wikimedia project coordination wiki
Content deleted Content added
→‎Installation: update download path
m Reverted changes by WhatAWonderfullWorld (talk) to last version by Tegel
Tag: Rollback
 
(9 intermediate revisions by 7 users not shown)
Line 1: Line 1:
{{MovedToMediaWiki|Extension:DynamicPageList (Wikimedia)}}
{{MoveToMediaWiki}}
: ''Other languages: [[DynamicPageList (de)|de]]''
: ''Derived extensions: [[DynamicPageList2]] is a modified version with more features, but also more resource-expensive. [[DPLforum]] outputs in forum style.''

{{extension
|name = DynamicPageList2
|author = [[n:User:IlyaHaykinson|IlyaHaykinson]], [[n:en:User:Amgine|Amgine]]
|download = [http://svn.wikimedia.org/viewvc/mediawiki/trunk/extensions/intersection/ intersection] (MediaWiki SVN)
|image =
|type = Parser Extension
|maturity =
|mediawiki= 1.5
|version = 0.5?
|update = 2006-08-07
|description = Outputs a bulleted list of items residing in a category or a union of several categories, with filtering, selection, and display options.
}}
'''DynamicPageList''' is a Mediawiki 1.5 extension developed for [[n:en:Main Page|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 [http://svn.wikimedia.org/viewvc/mediawiki/trunk/extensions/intersection/ the files] in your <code>extensions/</code> directory and add <code>include("extensions/DynamicPageList.php");</code> 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.

<div style="{{style example}}">
<pre>
<DynamicPageList>
category = Pages to be exported to MediaWiki.org
count = 5
order = ascending
addfirstcategorydate = true
</DynamicPageList>
</pre>

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

===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 [[Help:Magic word|magic words]] like <nowiki>{{CURRENTMONTHNAME}}</nowiki> in the category name.

The syntax is <code>category = ''category name''</code>

<div style="{{style example}}">
<pre>
<DynamicPageList>
category = Demo
category = Demo 1
</DynamicPageList>
</pre>

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

====notcategory====
''notcategory'' restricts the list of pages to those ''not'' in a particular category. You can use [[Help:Magic word|magic words]] like <nowiki>{{CURRENTMONTHNAME}}</nowiki> in the category name.

<div style="{{style example}}">
<pre>
<DynamicPageList>
category = Demo
notcategory = Demo 1
</DynamicPageList>
</pre>

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

====namespace====
''namespace'' restricts the list of pages specified above to those in a particular namespace, specified by name or number (see the [[Help:Namespace#List_of_namespaces|List of default namespaces]]). Any invalid name is equivalent to the main article namespace.

<div style="{{style example}}">
<pre>
<DynamicPageList>
category = Demo
namespace = Help
</DynamicPageList>
</pre>

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

====redirects====
''redirects'' determines whether or not to include [[Help:Redirect|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).

<div style="{{style example}}">
<pre>
<DynamicPageList>
category = Demo
redirects = only
</DynamicPageList>
</pre>

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

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

<div style="{{style example}}">
<pre>
<DynamicPageList>
category = Demo
count = 2
</DynamicPageList>
</pre>

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

===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: [[Help:Contents|Contents]]).

<div style="{{style example}}">
<pre>
<DynamicPageList>
category = Demo
shownamespace = false
</DynamicPageList>
</pre>

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

====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.

<div style="{{style example}}">
<pre>
<DynamicPageList>
category = Demo
addfirstcategorydate = true
</DynamicPageList>
</pre>

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

====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).

<div style="{{style example}}">
<pre>
unordered:
<DynamicPageList>
category = Demo
mode = unordered
</DynamicPageList>

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

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

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

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

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

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

<div style="{{style example}}">

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

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

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

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

===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).

<div style="{{style example}}">
<pre>
<DynamicPageList>
category = Demo
addfirstcategorydate = true
ordermethod = lastedit
</DynamicPageList>
</pre>

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

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

<div style="{{style example}}">
<pre>
<DynamicPageList>
category = Demo
order = ascending
</DynamicPageList>
</pre>

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

[[Category:MediaWiki extensions]]

Latest revision as of 20:09, 16 October 2019