Gamepedia Help Wiki
Azxiana (talk | contribs)
No edit summary
 
(14 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{{DPL Manual|section=|subsection=}}
+
{{DPL manual|section=|subsection=}}
   
  +
'''DynamicPageList3''' (DPL/DPL3) is a powerful MediaWiki [[extension]] that can generate lists of pages, and/or certain data and statistics gathered from them, for display in a wiki page. DPL lists are automatically updated whenever said data changes.
=Sections=
 
==[[DPL:Source and Installation|Source and Installation]]==
 
Visit this section to see full installation directions and how to find DynamicPageList3's source code.
 
   
  +
As a basic example, DPL can be used to insert, in a wiki page, an always-current list of all pages of a particular [[category]]. The data displayed may be selected and sorted based on factors like author, namespace, date, name pattern, usage of templates, or references to other articles, with a variety of custom formatting possibilities.
==[[DPL:Compatibility|Compatibility with Previous Versions]]==
 
DynamicPageList3 is fully backwards compatible and this section highlights those details.
 
   
  +
== Usage ==
==[[DPL:Bug_Reporting_and_Feature_Requests|Bug Reporting and Feature Requests]]==
 
  +
* [[Extension:DPL3/General usage and invocation syntax|General usage and invocation syntax]]
   
  +
== Primary DPL module ==
==[[DPL:General Usage and Invocation Syntax|General Usage and Invocation Syntax]]==
 
  +
These sections contain documentation on DPL's primary module, <code><nowiki>{{#dpl: ... }}</nowiki></code>. This is the DPL functionality used most often, and has a wide range of powerful coding options.
'''This chapter is really important to read. It explains fundamental concepts of DPL.''' There are two modes to invoke DPL; each of them has its advantages and disadvantages. DPL has a mechanism to substitute [[variables]], it has different output modes, can accept variables from the URL, etc.
 
  +
* [[Extension:DPL3/Parameters: Criteria for page selection|Criteria for page selection]]
  +
* [[Extension:DPL3/Parameters: Controlling output format|Controlling output format]]
  +
* [[Extension:DPL3/Parameters: Controlling output order|Controlling output order]]
  +
* [[Extension:DPL3/Parameters: Controlling output volume|Controlling output volume]]
  +
* [[Extension:DPL3/Parameters: Other parameters|Other parameters]]
   
  +
== Complete DPL Manual Table of Contents ==
==Parameters==
 
  +
Below is the legacy Table of Contents provided as navigation in the original DPL documentation. It is an expansive, cross-referenced list of DPL parameters (which some find daunting and others find helpful). Its links can all be found via the pages listed above, however the table below may be useful to more easily find what you need, especially if you don't know which section your desired functionality might be located in (expand the table below and use your browser's Find In Page feature, usually <code>Ctrl-F</code>).
   
  +
{{collapse top|Click to reveal legacy DPL Manual Table of Contents|Click to hide the Table of Contents}}
===[[DPL:Parameters:_Criteria_for_Page_Selection|Criteria for Page Selection]]===
 
  +
<DPL>
  +
namespace = Extension
  +
uses = Template:DPL parameter
  +
mode = userformat
  +
replaceintitle = @DPL Manual/@,
  +
include = {DPL Manual}:[[%PAGE%|%TITLE%]],{DPL parameter}/dpl
  +
listseparators={|class=wikitable,\n|-\n|,,\n|}
  +
secseparators=,,\n|\n{|class="wikitable sortable" width=100%\n!width=140px|name\n!purpose\n|-\n|,\n|}
  +
multisecseparators=,\n|-\n|
  +
allowcachedresults = true
  +
</DPL>
  +
{{collapse bottom}}
   
  +
== Other DPL modules ==
===[[DPL:Parameters:_Other_Parameters|Other Parameters]]===
 
  +
These sections detail some additional functions provided by the DPL extension.
 
* [[Extension:DPL3/Dplchapter|<nowiki>{{#dplchapter: ... }}</nowiki>]]
 
* [[Extension:DPL3/Dplvar|<nowiki>{{#dplvar: ... }}</nowiki>]]
 
* [[Extension:DPL3/Dplreplace|<nowiki>{{#dplreplace: ... }}</nowiki>]]
 
* [[Extension:DPL3/Dplnum|<nowiki>{{#dplnum: ... }}</nowiki>]]
 
* [[Extension:DPL3/Dplmatrix|<nowiki>{{#dplmatrix: ... }}</nowiki>]]
   
  +
== Notes ==
===[[DPL:Parameters:_Controlling_Output_Order|Controlling Output Order]]===
 
 
* [[Extension:DPL3/Compatibility|Compatibility with previous versions]]
  +
* [[Extension:DPL3/Bug reporting and feature requests|Bug reporting and feature requests]]
   
 
== Examples ==
===[[DPL:Parameters:_Controlling_Output_Format|Controlling Output Format]]===
 
 
=== Selecting articles ===
 
* [[Extension:DPL3/Example: Select by category|By category]]
 
* [[Extension:DPL3/Example: Select by recently changed|By recently changed]]
   
 
=== Show article's context or contents ===
===[[DPL:Parameters:_Controlling_Output_Volume|Controlling Output Volume]]===
 
 
* [[Extension:DPL3/Example: Related to article|Pages, templates, images, or categories related to an article]]
 
* [[Extension:DPL3/Example: Display images used|Display all images used in an article]]
   
 
=== Controlling output ===
==Accessing Individual Features==
 
 
* [[Extension:DPL3/Example: Show templates parameters from an article|Show templates parameters from an article]]
 
* [[Extension:DPL3/Example: Show sections from an article|Show sections from an article]]
   
  +
[[pt:DPL:Manual]]
===[[DPL:Dplchapter|<nowiki>{{#dplchapter: ... }}</nowiki>]]===
 
   
  +
[[Category:DPL3| ]]
===[[DPL:Dplvar|<nowiki>{{#dplvar: ... }}</nowiki>]]===
 
  +
[[Category:Extensions]]
   
  +
<!-- Extension prefix in other languages:
===[[DPL:Dplreplace|<nowiki>{{#dplreplace: ... }}</nowiki>]]===
 
   
  +
[[de:Erweiterung:{{subst:BASEPAGENAME}}]]
===[[DPL:Dplnum|<nowiki>{{#dplnum: ... }}</nowiki>]]===
 
  +
[[es:Extensión:{{subst:BASEPAGENAME}}]]
 
  +
[[fr:Extension:{{subst:BASEPAGENAME}}]]
===[[DPL:Dplmatrix|<nowiki>{{#dplmatrix: ... }}</nowiki>]]===
 
  +
[[it:Estensione:{{subst:BASEPAGENAME}}]]
 
  +
[[nl:Uitbreiding:{{subst:BASEPAGENAME}}]]
==Examples==
 
  +
[[pl:Rozszerzenie:{{subst:BASEPAGENAME}}]]
===Selecting Articles===
 
  +
[[pt:Extensão:{{subst:BASEPAGENAME}}]]
* [[DPL:Example - Select by Category|By category]]
 
  +
[[ru:Расширение:{{subst:BASEPAGENAME}}]]
* [[DPL:Example - Select by Recently Changed|By recently changed]]
 
  +
[[zh:扩展:{{subst:BASEPAGENAME}}]]
 
  +
-->
===Show Article's Context or Contents===
 
* [[DPL:Example - Related to Article|Pages, templates, images, or categories related to an article]]
 
* [[DPL:Example - Display Images Used|Display all images used in an article]]
 
 
===Controlling Output===
 
* [[DPL:Example - Show Templates Parameters from an Article|Show Templates Parameters from an Article]]
 
* [[DPL:Example - Show Sections from an Article|Show Sections from an Article]]
 

Latest revision as of 03:27, 31 July 2019

Manual

DynamicPageList3 (DPL/DPL3) is a powerful MediaWiki extension that can generate lists of pages, and/or certain data and statistics gathered from them, for display in a wiki page. DPL lists are automatically updated whenever said data changes.

As a basic example, DPL can be used to insert, in a wiki page, an always-current list of all pages of a particular category. The data displayed may be selected and sorted based on factors like author, namespace, date, name pattern, usage of templates, or references to other articles, with a variety of custom formatting possibilities.

Usage

Primary DPL module

These sections contain documentation on DPL's primary module, {{#dpl: ... }}. This is the DPL functionality used most often, and has a wide range of powerful coding options.

Complete DPL Manual Table of Contents

Below is the legacy Table of Contents provided as navigation in the original DPL documentation. It is an expansive, cross-referenced list of DPL parameters (which some find daunting and others find helpful). Its links can all be found via the pages listed above, however the table below may be useful to more easily find what you need, especially if you don't know which section your desired functionality might be located in (expand the table below and use your browser's Find In Page feature, usually Ctrl-F).

  • DPL3/Parameters: Controlling output format
    name purpose
    mode Provide basic control over the output of DPL.
    inlinetext To define the inline text used in mode=inline.
    listseparators (alias for format) see the format parameter. Implicitly sets mode=userformat.
    format customize the output format completely. Implicitly sets mode=userformat. Uses variable references like Extension:DPL3/Parameters: Controlling output format to describe the output format. See also the secseparators parameter.
    secseparators customize the output format of included sections. Can be used with standard output modes and with mode=userformat.
    multisecseparators put a tag between multiple transcluded parts which refer to the same template or chapter.
    dominantsection define a section with multiple occurrences as dominant, i.e. each piece of contents of this section (which is associated with a template call or a chapter within the original document) will create a separate output line.
    table a simple syntax to create standard tabular output; see also tablerow
    tablerow a simple syntax to create customized tabular output; see also table
    tablesortcol define a column to be used as sort key (see also table )
    headingmode To control the output of the headings in a DPL with complex/multi-parameter ordermethod. (No effect with single-param ordermethods.) For ordermethod=method1,method2,..., method1 is used for headings. E.g. headingmode affects category headings in ordermethod=category,title (2-param ordermethod). See also headingcount
    headingcount In combination with headingmode this parameter decides whether we show a text line with the number of articles per group or not.
    listattr Adds attributes to HTML list elements, depending on mode (HTML element is ol for ordered, ul for unordered, div for others). Can be used with pseudo mode=inline where inline text contains one or more <br/>.

    Only applicable to mode=ordered or mode=unordered.

    Not applicable to mode=category or mode=inline (with no <br/> in inline text).

    itemattr Adds attributes to HTML list items, depending on mode (element is li for ordered/unordered, span for others).

    Not applicable to mode=category.

    hlistattr Adds attributes to the HTML list element at the heading/top level, depending on headingmode (HTML element would be ol for ordered, ul for unordered, dl for definition, div for others)

    Not yet applicable to headingmode=none.

    hitemattr Adds attributes to HTML list items (headings) at the heading level, depending on headingmode (HTML element would be li for ordered/unordered, div for others).

    To be used with headingmode='unordered' or 'ordered'. (Not yet applicable for others.)

    userdateformat Define a special layout for date formatting.
    shownamespace To restrict the appearance of the namespace name of a page before the page. As the switch is true by default it should be set to false if you want to avoid namespaces to be shown in the output.
    escapelinks Regarding images and categories this parameter allows you to decide whether
    • you want to see a link to the image or to the category page (escapelinks=true, this is the default)
    • you want to see the image or make the page which contains the DPL statement part of the categories which are returned by DPL (escapelinks=false)
    titlemaxlength To limit the number of characters of the title to display. If the page title (this does not include the namespace or any other prefix before the title) is bigger than the titlemaxlength value, the title is truncated and ended by '...'.
    replaceintitle execute a string replacement operation on the DPL3/Parameters: Controlling output format var
    columns Define a column layout for the output.
    rows Define a row layout for the output. A "row" is a group of output lines for which the heading is repeated. If you do not know how big your result will be, it may be better to use the rowsize parameter.
    rowsize Define a row layout for the output. A "row" is a group of n output lines for which the heading will be repeated.
    rowcolformat Defines layout properties (using HTML table tag parameters) for the row/column grid.
    DPL3/Parameters: Controlling output volume
    name purpose
    resultsheader output a headline if there is at least one article to display.
    resultsfooter output a summary 'footline' if there is at least one article to display.
    oneresultheader output a headline if there is exactly one article to display.
    oneresultfooter output a footline if there is exactly one article to display.
    noresultsheader output a headline if there is no article to display (empty result).
    suppresserrors suppress the warning message if no matching article was found.
    noresultsfooter output a footline if there is no article to display (empty result).
    addcategories Shows all categories to which an article belongs as a small text line after the article name.
    addpagecounter Shows number of times the page has been viewed according to the definition of the 'page_counter' field on Page_table.
    addpagesize Shows the size of the page.
    addcontribution shows how much a user contributed to an article.
    adduser Requires ordermethod=[...,]firstedit or ordermethod=[...,]lastedit (where the [...,] signifies a complex ordermethod with extra parameters). If firstedit (lastedit), 'adduser=true' displays the user who made the first (last) revision of the page. In this way the parameter is equivelent to the addauthor (addlasteditor) parameter (see below).
    addauthor show the user who created the article
    addlasteditor show the user who edited the most recent revision of a page
    addpagetoucheddate Shows date/time of last change to the page according to the definition of the 'page_touched' field on Page_table.

    Requires ordermethod=[...,]pagetouched or ordermethod=[...,]title. ([...,] means complex ordermethods with extra param before are allowed.)

    addeditdate Requires ordermethod=[...,]firstedit or ordermethod=[...,]lastedit. ([...,] means complex ordermethods with extra param before firstedit
    addexternallink add the URL of an external link to the output list.
    addfirstcategorydate Shows the date/time the article got added to one of the listed include categories. If there are more than one categories listed and an article belongs to more than one of them, the result is ambiguous.

    From a logical point of view it is recommended to include one category only with 'category' parameter or to make sure that each of the article in the result belongs to only one of the categories listed. Conflicts with other "add*date" (addeditdate, etc.) parameters to avoid confusion.

    showcurid page links will contain the current page id
    include include pages (whole content) or include certain sections of articles or template parameters.

    This functionality is based on the ideas and work of Steve Sanbeg and his extension Labeled Section Transclusion. DPL comes with a modified version of Sanbeg´s source, so there is no need for additional installation.

    includepage this can be used as a longer name for include.
    includemaxlength Delimit the size of an included article to a maximum of [n] characters of wiki source text or less.

    Care is taken to respect pairs of braces and brackets as far as possible. Otherwise we might confuse the result by half-cut syntax elements of transcluded sections. Therefore the output might be shorter or even larger than [n] characters.

    includetrim removes all leading and trailing whitespace from transcluded contents.
    DPL3/Parameters: Other parameters
    name purpose
    updaterules define a set of rules which are executed to perform an update on selected articles (bulk update or template value editing)
    deleterules allow the mass deletion of wiki pages
    goal set the overall goal for DPL to either show pages (default) or categories these pages belong to
    allowcachedresults Cache query results to improve performance keep servers from crashing under high load.
    reset suppress references to pages, templates, images, categories in DPL output
    fixcategory assign the article containing a DPL statement to a category although reset was used.
    eliminate suppress references to pages, templates, images, categories in DPL output
    debug Sets debugging level.
    execandexit process the command given as an argument and then exit immediately.
    cacheperiod define the expiration period for the dplcache
    DPL3/Parameters: Controlling output order
    name purpose
    ordermethod Determines what criterion (resp. criteria) is (resp. are) used to order the list.
    order Controls the sort direction of the list.
    ordercollation Allow individual collations, make case insensitive sorting possible
    DPL3/Parameters: Criteria for page selection
    name purpose
    category Select articles based on categories. You can specify more than one category with the pipe '|' as a separator, with the effect that the pages listed have to be at least in one of the categories (logical OR).

    If you specify the 'category=' parameter more than once, the pages listed have to match all these parameters (logical AND).

    categorymatch Select articles based on categories. You can specify one or more patterns (SQL LIKE); a page will be selected if at least one of its categories matches at least one of the patterns.
    categoryregexp select pages with a category matching a regular expression
    notcategory Much like the category parameter, but requires that every page listed not be in a particular category. Unlike in 'category' you cannot combine several categories using logical OR in this parameter.
    notcategorymatch Works like notcategory but based on SQL LIKE
    notcategoryregexp Works like notcategory but based on SQL REGEXP
    categoriesminmax To restrict the search to articles which are assigned to at least [min] and at most to [max] categories.
    namespace To restrict the articles in the list to only be in one of the given namespaces.
    notnamespace Much like the notcategory parameter, but for namespaces. Requires that every page listed not be in one of given namespaces.
    linksfrom Selects articles which are referenced from at least one of the specified pages.
    openreferences extends the 'linksfrom' to unresolved references.
    notlinksfrom Selects articles which are NOT referenced from any of the specified pages.
    linksto Selects articles which link to at least one of the specified pages.
    notlinksto Selects articles which do NOT link to any of the specified pages.
    linkstoexternal Selects articles which contain an external link that matches a given text pattern.
    imageused Selects articles which use a certain image
    imagecontainer Select images which are contained in one or more articles
    uses Selects articles which use (transclude) at least one of the specified templates (wiki syntax: {{...}}).
    notuses Selects articles which do not use any of the specified template.
    usedby Selects articles (templates) which are used (included) by a specified page.
    createdby Selects articles which were created by the specified user.
    Warning: This keyword can produce very slow and inefficient queries on your MediaWiki system, potentially impacting performance for all users. (See bug report.)
    notcreatedby Selects articles which were NOT created by the specified user.
    Warning: This keyword can produce very slow and inefficient queries on your MediaWiki system, potentially impacting performance for all users. (See bug report.)
    modifiedby Selects articles which were created or at least once modified by the specified user.
    notmodifiedby Selects articles which were NOT (created or) modified by the specified user.
    lastmodifiedby Selects articles where the last modification was done by the specified user.
    notlastmodifiedby Selects articles where the last modification was NOT done by the specified user.
    title Select one single page by its (namespace and) title.
    titlelt Restrict the selection to pages with a title less or equal to a given value.
    title> Restrict the selection to pages with a title greater or equal to a given value.
    scroll enable built-in support for scrolling result sets.
    titlematch Select pages with a title matching at least one of the specified patterns. The patterns are used as a LIKE argument in an SQL query. Namespaces are ignored as the namespace parameter can be used to further narrow the selection.
    titleregexp Select pages with a title matching the specified regular expressions. The pattern will be used as a REGEXP argument in a SQL query. Namespaces are ignored as the namespace= parameter can be used to further narrow the selection.
    nottitlematch Select pages with a title NOT matching any of the specified patterns. The patterns are used as a LIKE argument in a SQL query. Namespaces are ignored as the namespace= parameter can be used to further narrow the selection. Normally you would want to use this selection only in combination with other criteria. Otherwise output could become huge.
    nottitleregexp Select pages with a title that does NOT match the specified regular expression. The expression will be used as a REGEXP argument in a SQL query. Namespaces are ignored as the namespace= parameter can be used to further narrow the selection. Normally you would want to use this selection only in combination with other criteria. Otherwise output could become huge.
    includematch Controls the selection of pages based on contents which shall be included from these pages.
    includematchparsed Controls the selection of pages based on (pre-parsed) contents which shall be included from these pages.
    includenotmatch Controls the selection of pages based on contents which shall be included from these pages.
    includenotmatchparsed Controls the selection of pages based on (pre-parsed) contents which shall be included from these pages.
    lastrevisionbefore shows only articles which existed before the specified date. The date of the last revision

    before that date will be shown (and will be available as 0 in mode=userformat).

    firstrevisionsince The date of the first revision after the specified date will be shown (and will be available as 0 in mode=userformat).
    allrevisionsbefore shows all revisions which existed before the specified date. The date of each revision will be shown (and will be available as 0 in mode=userformat).
    allrevisionssince shows all revisions which were created after the specified date. The date of each revision will be shown (and will be available as 0 in mode=userformat). If there was no new revision of an existing article after the specified date that article will not appear in the output.
    maxrevisions show a page (or its revisions) only if there do not exist more than a given number of revisions for that page.
    minrevisions show a page (or its revisions) only if there exist at least a given number of revisions for that page.
    articlecategory select a talk page based on a category to which the corresponding base article (in the default namespace) belongs.
    includesubpages Controls the inclusion or exclusion of pages which have a '/' in their name. Default is true.
    redirects Controls the inclusion or exclusion of redirect pages in the output. By default redirections are NOT shown.
    minoredits Control the inclusion or exlusion of minor edits in lists.
    stablepages Control the inclusion or exclusion of pages which are flagged as 'stable'
    qualitypages Control the inclusion or exclusion of pages which are flagged as 'quality pages'
    skipthispage include the page containing the DPL query into the result set
    count Controls the number of results that are shown.
    scroll activate result scrolling
    offset show only a portion of a big result list; typically used in combination with "count="
    randomcount create the complete result set and then select a subset for display by random.
    randomseed set an initial value for the random generator
    distinct allow / suppresses duplicates in the output
    ignorecase make comparisons insensitive to case
  • Other DPL modules

    These sections detail some additional functions provided by the DPL extension.

    Notes

    Examples

    Selecting articles

    Show article's context or contents

    Controlling output