Difference between revisions of "DPL:Manual"

From FollowTheScore
Jump to: navigation, search
(Parameters)
(+german manual)
 
(28 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Type:Manual|section=Index}}
+
{{Type Manual|section=Index}}
 +
__NOTOC__
  
'''[[mw:Extension:DynamicPageList|DynamicPageList]]''' is a Mediawiki extension developed for use on Wikinews (but not yet installed there), but it can be installed on any wiki. It allows wiki users to dynamically create lists of pages based on a variety of selection criteria like ''categories, namespaces, title, references to other articles, usage of templates''. Selection criteria can be combined using logical AND and OR. Contents of the pages can be included in the output of DPL2.
+
====[[DPL:Manual - Authors and History|Authors and History]]====
 +
''follow the link in the headline ..''
  
Source Code and Examples for Release 0.9.x can be found on the [http://semeb.com/dpldemo dpl demo web site].
+
====[[DPL:Manual - Source and Installation|Source and Installation]], Security Issues====
 +
''follow the link in the headline ..''
  
==[[DPL:Manual - Authors and History|Authors and History]]==
+
====[[DPL:Manual - Compatibility]]====
 +
''follow the link in the headline ..''
  
==[[DPL:Manual - Source and Installation|Source and Installation]]==
+
====[[DPL:Manual - General Usage and Invocation Syntax|General Usage and Invocation Syntax]]====
The current source code is available through pages of this wiki.
+
'''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.
 +
So, [[DPL:Manual - General Usage and Invocation Syntax|please read]].
  
==[[DPL:Websites using DPL]]==
+
====[[DPL:Manual - DPL Bug Reporting and Feature Requests|Bug Reporting and Feature Requests]]====
Note: if you have installed DPL2 on a public site, you are invited to add it to the [[DPL:Websites using DPL|list of sites using DPL2]]. Thank you.
+
''follow the link in the headline ..''
  
== [[DPL:Manual - General Usage and Invocation Syntax|General Usage and Invocation Syntax]]==
+
====Language Support====
This is important to read as there are two modes to invoke DPL; each of them has its advantages and disadvantages.
+
*A German manual can be found on [http://www.wiki-aventurica.de/wiki/Hilfe:Dynamic_Page_List Wiki Aventurica].
  
== [[DPL:Manual - DPL Bug Reporting and Feature Requests|Bug Reporting and Feature Requests]] ==
+
====Modules====
 +
DPL at the moment is rather monolithic. But there is an attempt to offer parts of its functionality as separate functions.
  
 +
* dpl -- this is the main module. The list below describes its parameters
 +
* [[dplvar|#dplvar]] -- a small cache which can hold a few variable values
 +
* [[dplreplace|#dplreplace]] -- a function for string replacement based on regular expressions
 +
* [[dplmatrix|#dplmatrix]] -- a small matrix generator which takes an indented list as input
 +
* [[dplchapter|#dplchapter]] -- a function which transcludes portions of another article (not described / not public so far)
  
 
+
====Parameters for DPL====
== Parameters ==
 
 
<DPL>
 
<DPL>
 
   category=DPL Manual
 
   category=DPL Manual
Line 26: Line 39:
 
   titlematch=Manual - DPL parameters%
 
   titlematch=Manual - DPL parameters%
 
   mode=userformat
 
   mode=userformat
   includepage={Type:Manual}.overview,{DPL parameter}.overview
+
   includepage={Type Manual}.overview,{DPL parameter}.overview
 
   listseparators={|class=wikitable,\n|-\n|,,\n|}
 
   listseparators={|class=wikitable,\n|-\n|,,\n|}
   secseparators=,,\n|\n{|class=wikitable width=100%\n!width=140px|name\n!purpose\n|-\n|,\n|}
+
   secseparators=,,\n|\n{|class="wikitable sortable" width=100%\n!width=140px|name\n!purpose\n|-\n|,\n|}
 
   multisecseparators=,\n|-\n|
 
   multisecseparators=,\n|-\n|
 
</DPL>
 
</DPL>
 
* [[DPL:Manual - DPL parameters: Criteria for page selection|DPL parameters: Criteria for page selection]]
 
* [[DPL:Manual - DPL parameters: Controlling output order  |DPL parameters: Controlling output order]]
 
* [[DPL:Manual - DPL parameters: Controlling output volume  |DPL parameters: Controlling output volume]]
 
* [[DPL:Manual - DPL parameters: Controlling output format  |DPL parameters: Controlling output format]]
 
* [[DPL:Manual - DPL parameters: Other parameters          |DPL parameters: Other parameters]]
 

Latest revision as of 16:14, 28 May 2012

Manual Index


Authors and History

follow the link in the headline ..

Source and Installation, Security Issues

follow the link in the headline ..

DPL:Manual - Compatibility

follow the link in the headline ..

General Usage and Invocation Syntax

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.
So, please read.

Bug Reporting and Feature Requests

follow the link in the headline ..

Language Support

Modules

DPL at the moment is rather monolithic. But there is an attempt to offer parts of its functionality as separate functions.

  • dpl -- this is the main module. The list below describes its parameters
  • #dplvar -- a small cache which can hold a few variable values
  • #dplreplace -- a function for string replacement based on regular expressions
  • #dplmatrix -- a small matrix generator which takes an indented list as input
  • #dplchapter -- a function which transcludes portions of another article (not described / not public so far)

Parameters for DPL

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.
format customize the output format completely. Implicitly sets mode=userformat. Uses variable references like %PAGE% 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 ordermethods. (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/>.

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 %TITLE% 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.
Controlling output order
name purpose
ordermethod Determines what criterium (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
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.
Criteria for page selection
name purpose
category Select articles based on categories. You can specify more than one category with the pipe '
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 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.
title< 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 %REVISION% in mode=userformat).

firstrevisionsince The date of the first revision after the specified date will be shown (and will be available as %REVISION% 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 %REVISION% 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 %REVISION% 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'
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
skipthispage include the page containing the DPL query into the result set
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 allow delivery of results based on cached database contents.
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.
dplcache put the result of a DPL query in a special cache from where it is served until the cache expires
dplcacheperiod define the expiration period for the dplcache