Wikihírek:DynamicPageList

A szabad hírforrás, melyet bárki szerkeszthet!

Erről az oldalról részletesebben olvashatsz a Meta oldalán

DynamicPageList egy Mediawiki 1.5 kiterjesztés ami a Wikihírek számára lett kifejlesztve (lásd e.g. Wikinews:2006/August/14), de bármilyen wikire fel lehet telepíteni. A Metában is működik. Lehetőséget nyújt a szekesztőknek arra, hogy egy listába szedett kategoriákból kilistázza azok tartalmát egy lapon. Már létezik továbbfejlesztett változat is, mw:Extension:DynamicPageList (ez a legutóbbi verzó) és mw:Extension:DynamicPageList2 (ez egy másik változat), de ezek még nem elérhetők a Wikihírekben.

A "dynamic page list" SVN -ben található meg a következő oldalon: mediawiki/trunk/extensions/intersection/DynamicPageList.php. Ahhoz, hogy telepítsd, tedd a filet extensions/ directory, és add hozzá a include("extensions/DynamicPageList.php"); a te LocalSettings.php fileoban.

DynamicPageList használata

A Dynamic Page List (DPL) egy MediaWiki kiterjesztés. Használatához, alkalmazd a következő XML syntaxot a te wikilapodon:

<DynamicPageList>
...parameters...
</DynamicPageList>

Az eredmény a következőképpen fog kinézni:

  • [[Page 1]]
  • [[Page 2]]
  • ...

where the list of pages being output, as well as the order and display mode of the list are set by the parameters specified.

The following lists parameters and their effects

A lap részei

"category"

Purpose:

DPL produces a list of all pages in the intersection of the specified categories (the pages which are in all of the listed categories).

Szintaxis:

category=category name

Példa:

<DynamicPageList>
category=Africa
category=Politika
</DynamicPageList>

Ezzel a képlettel egy lapon listázhatod [[Kategória:Afrika]] és [[Kategória:Politika]] egész tartalmát.

Jegyzet:

Legalább egy kategória paramétereit meg kell adni. A listázni kívánt kategóriák száma korlátozott, ezt a számot a telepítéskor lehet megadni. Lehet használni a kategóriákon belül a {{CURRENTMONTHNAME}}, {{CURRENTDAY}}, {{CURRENTYEAR}} sablonokat.

"notcategory"

Purpose:

Restricts the list of pages specified above to those not in a particular category.

Syntax:

notcategory=category name

Példa:

<DynamicPageList>
category=Afrika
notcategory=Zimbabwe
</DynamicPageList>

A listában benne lesz az egész [[Kategória:Africa]] de nem lesznek listázva a [[Kategória:Zimbabwe]] elemei.

Megjegyzés: Használhatod a {{CURRENTMONTHNAME}}, {{CURRENTDAY}}, {{CURRENTYEAR}} stb a kategórianévben.

"namespace" (névtér)

Purpose:

A lista csak a megadott névtér elemeit fogja tartalmazni.

Syntax:

namespace=namespaceid or name

The namespaceid may be any positive integer or zero, assuming it represents a valid namespace in the system. The zero namespace is the main article namespace.

Instead of the number, you may also specify a name, for example Talk or Template or User_talk. Any invalid name is equivalent to the main article namespace.

Példa:

<DynamicPageList>
category=Irányelvek
namespace=Wikihírek
</DynamicPageList>

Csak a Wikihírek névtérben levő és a [[Kategória:Irányelvek]].

"redirects" (átírányítások)

Purpose:

Controls the inclusion or exclusion of redirect pages in lists.

Example:

redirects=criteria

a kritérium lehet:

  • exclude — kihagyja a redirekt oldalakat a listából — (alap)
  • include — megjelennek a redirekt lapok a listában
  • only — kiválasztható, hogy csak az onlyban megadott redirekteket listázza

Példa:

<DynamicPageList>
category=Africa
redirects=include
</DynamicPageList>

This list will content pages and redirect pages tagged with [[Kategória:Africa]].

count

Purpose:

Restricts the number of results that are shown.

Example:

count=number of results

Example:

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

This list will output the two most recent pages that have [[Kategória:Africa]].

Notes:

There is a maximum allowed number of results, controlled by a setting in the extension.

Details displayed

Idő

You can show the news time using:

showtime=true

shownamespace

Purpose:

Specify whether to display the namespace names of the pages (default=true).

With the code

shownamespace=false

instead of e.g. Template:Stub the listing would simply be Stub.

Example:

<DynamicPageList>
category=Africa
namespace=Talk
shownamespace=false
</DynamicPageList>

This list will output all Talk pages in [[Kategória:Africa]], listed without the Talk: prepended to page names.

addfirstcategorydate

Purpose:

Shows the date the article got added to the first listed include category.

Example:

addfirstcategorydate=true

If omitted, the default is false.

Example:

<DynamicPageList>
category=Kenya
category=Tanzania
addfirstcategorydate=true
</DynamicPageList>

gives:

<DynamicPageList> category=Kenya category=Tanzania addfirstcategorydate=true </DynamicPageList> (apparently the lower bound is 2 July 2005)

This list will output a list of pages belonging to [[Kategória:Africa]], prepending each result with "DD Month YYYY: " (formatted according to your local mediawiki date display preferences).

mode

Purpose:

To control the output of the DPL: with bullets, numbers, or nothing in front.

Syntax:

mode=modename

modename can be one of:

  • unordered — outputs an unordered list — HTML tag "ul" — (default)
  • ordered — outputs an ordered list — HTML tag "ol"
  • none — outputs a list using newlines and HTML tags "br" to separate each item

Example:

<DynamicPageList>
category=Africa
mode=ordered
</DynamicPageList>

This list will output pages that have [[Kategória:Africa]] shown in an <ol>...</ol> list.

suppresserrors

Purpose:

Allows warnings about empty lists to be suppressed.

Example:

suppresserrors=true

If omitted, the default is false.

Example:

<DynamicPageList>
category=Nonexistent
suppresserrors=true
</DynamicPageList>

This list will output no pages since the category is non-existent, but will not show a warning saying the list is empty.

Order

ordermethod

Purpose:

Determines what date is used for ordering the list.

ordermethod=method

method can be one of:

  • categoryadd — outputs list based on most recent addition to the first category — (default)
  • lastedit — outputs list based on most recent edit to the pages

Example:

<DynamicPageList>
category=Africa
ordermethod=lastedit
addfirstcategorydate=true
count=3
</DynamicPageList>

gives

<DynamicPageList> category=Africa ordermethod=lastedit addfirstcategorydate=true count=3 </DynamicPageList> Note that sorting order is by last edit (or, in the case of a category, apparently by last edit of a page in that category), with most recently edited pages at the top, while the display date is that of addition to the category Africa.

whereas

<DynamicPageList>
category=Africa
ordermethod=addcategory
addfirstcategorydate=true
count=3
</DynamicPageList>

gives

<DynamicPageList> category=Africa ordermethod=addcategory addfirstcategorydate=true count=3 </DynamicPageList>

order

Purpose:

Controls the sort direction of the list.

Example:

order=orderdirection

orderdirection can be one of:

  • descending — outputs list from most recent to least recent — (default)
  • ascending — outputs list from least recent to most recent

Example:

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

This list will output pages that have [[Kategória:Africa]] shown ordered from oldest to newest.

See also

Note
stuff below is not installed here (but is intresting)