DynamicPageList: Difference between revisions
No edit summary |
Pathoschild (talk | contribs) unblanked page (mw:Extension:DynamicPageList does not have any usage documentation at all; maybe you forgot to move it?) |
||
Line 1: | Line 1: | ||
{{MoveToMediaWiki}} |
|||
{{MovedToMediaWiki|Extension:DynamicPageList}} |
|||
: ''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/DynamicPageList.php DynamicPageList.php] (Wikimedia 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/DynamicPageList.php DynamicPageList.php] 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]] |
Revision as of 05:34, 15 February 2008
- 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>
- 22 June 2014: Category:Pages to be exported to MediaWiki.org/Translations
- 2 April 2024: User language
- 2 April 2024: User language/ar
- 2 April 2024: User language/anp
- 2 April 2024: User language/arz
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>
- 1 March 2023: Template:H:lf
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:
plain text:
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>
- 1 March 2023: Template:H:lf
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>