Utente:Wedhro/Sandbox/Aiuto:DPL: differenze tra le versioni

Vai alla navigazione Vai alla ricerca
nessun oggetto della modifica
(Creata pagina con ''''Questa è una guida avanzata all'uso dei DPL''' che ci vorrà un bel po' a finire perché è complicata. Ci sono parti in inglese perché devo ancora finire di tradurla, e ...')
 
Nessun oggetto della modifica
Riga 1:
'''Questa è una guida avanzata all'uso dei DPL''' che ci vorrà un bel po' a finire perché è complicata. Ci sono parti in inglese perché devo ancora finire di tradurla, e manca ancora un sacco di roba che devonodevo trovare.
 
Una '''D'''ynamic '''P'''age '''L'''ist (lista di pagine dinamica) è uno strumento del Maligno concepito per compilare automaticamente liste "intelligenti" di pagine; almeno, più intelligenti delle bombe americane. Lo scopo ovviamente è quello di lavorare meno per avere più tempo da dedicare ad attività utili al sito, come inviare faccine con fiorellini/cuoricini alle utentesse.
 
Un DPL si usa inserendo nella pagina in cui dovrà comparire una "funzione parser" assegnandoli parametri ben precisi, che appare così:
 
<nowiki>
{{#dpl:
| parametro1 = valore1
| parametro2 = valore2
}}</nowiki>
Ci sono 2 tipi fondamentali di parametri che contraddistinguono ogni ricerca fatto tramite DPL (3, contando anche le bestemmie): i [[#Criteri di ricerca|'''criteri''']] da dare al DPL in modo che trovi le pagine giuste; e il modo in cui esso [[#Visualizzazione dei risultati|'''visualizzerà i risultati''']].
 
NB: in questa pagina non troverai veri DPL di esempio funzionanti perché sono pesanti per il server, e ce ne vorrebbero così tanti da inchiodarti quella merda di browser che usi.
 
== Criteri di ricerca ==
 
Si deve inserire almeno un criterio di ricerca, altrimenti il DPL non troverà nulla e vi guarderà come un ''cummenda'' guarda un barbone alla stazione della metro. Inserendone più d'uno il DPL troverà le pagine che rispettano ''tutti'' i criteri dati; ci sono comunque modi per trovare pagine che rispettino un criterio ''oppure'' un altro.
 
=== category ===
 
Cerca pagine che rientrino in una o più [[Categoria:Categorie|'''categorie''']]. La ricerca su una sola categoria trova pagine che rientrino in quella categoria, senza curarsi del fatto che rientri o meno in altre. NB: non devi scrivere ''categoria:vattelapesca'' ma solo ''vattelapesca''.
 
<nowiki>
{{#dpl:
| category = vattelapesca
}}</nowiki>
Si possono anche cercare pagine ''senza'' categoria, specificando come categoria <code><nowiki>_none_</nowiki></code>. ''Non basta'' lasciare il parametro vuoto, ciò non produrrà alcun risultato.
 
==== and/or ====
 
Per una ricerca più complessa si possono usare parametri logici, dove la barretta verticale <code><nowiki>|</nowiki></code> rappresenta un '''OR''' e l'e commerciale <code><nowiki>&</nowiki></code> rappresenta un '''AND'''. Per i digiuni di logica (visto che succede a pensare solo alla figa e al pallone?), ''OR'' vuol dire che basta si verifichi almeno una delle condizioni date, mentre ''AND'' richiede che si verifichino tutte.
 
<nowiki>
{{#dpl:
| category = vattelapesca|minchiate|abominii
}}</nowiki>
 
Cerca le pagine che rientrino in ''categoria:vattelapesca'' oppure ''categoria:minchiate'' o ancora ''categoria:abominii''.
 
<nowiki>{{#dpl:
| category = vattelapesca|minchiate|abominii
}}</nowiki>
Questa invece cerca pagine che rientrino ''in tutte e 3'' le categorie di cui sopra.
 
Si può fare una ricerca ancor più complessa inserendo più volte il parametro ''category''. Ognuno di essi si considera in '''AND''' con gli altri, in questo modo puoi specificare diversi gruppi di criteri che si devono verificare tutti insieme.
 
<nowiki>
{{#dpl:
| category = vattelapesca
| category = abominii|minchiate
}}</nowiki>
 
Questa cerca le pagine che sono in ''categoria:vattelapesca'' '''e''' anche in almeno una fra ''categoria:minchiate'' o ''categoria:abominii''.
 
''If [[#ordermethod|ordermethod]]=category,... and [[#headingmode|headingmode]] are enabled, you can restrict the categories you want as headings in the result by preceding the list of categories (specified with the category parameter) with a '+' or '-'. See the example below.
* A '+' means that only the categories listed in that statement are allowed to appear as headings in the output.
* A '-' means that the categories listed in that statement are NOT allowed to appear as headings in the output (but all others)
 
If you put a "*" before the name of a category, DPL will add all DIRECT subcategories of that category to your statement.
Using TWO asterisks ("**") will extend the tree search to two levels. This provides some minimal support for hierarchies of categories. The syntax and/or semantics of this feature might be changed in a future version.
 
Notes:
 
If you want to use magic words like <nowiki> {{CURRENTMONTHNAME}}, {{CURRENTDAY}}, {{CURRENTYEAR}} </nowiki> etc in the category name, you must use the parser function syntax variant.
 
To prevent a DPL query from returning huge output (or consuming too many resources) there are some
[[#Extension_options|configuration variables]] in the source code of the extension module like <code>$wgDPL2MaxCategoryCount</code>, <code>$wgDPL2AllowUnlimitedCategories</code>, <code>$wgDPL2MinCategoryCount</code>.''
 
 
=== categorymatch ===
 
È simile a [[#category]] ma invece di cercare in specifiche categorie verifica che la pagina compaia ''almeno in una'' delle categorie che hanno un certo tipo di nome. Questo richiede l'uso del segno percentuale <code><nowiki>%</nowiki></code> da usare come "jolly" e rappresenta un qualunque numero di caratteri qualunque. Ad esempio "ca%ata" troverà sia "ca'''zz''ata" che "ca'''ga'''ta". Ciò è utilissimo per fare ricerche in tante categorie simili senza doverle scriver una per una.
 
La barretta verticale <code><nowiki>|</nowiki></code> anche qui è usata come '''OR'''.
 
<nowiki>
{{#dpl:
| categorymatch = %pesca%|minchi%
}}</nowiki>
 
Troverà la pagine in ''categoria:vattelapesca'', ''categoria:pesca'', ''categoria:pescatori'', ''categoria:minchiate'', oppure ''categoria: minchie enormi''.
 
===categoryregexp===
 
''{{DPL parameter
|name = categoryregexp
|purpose= select pages with a category matching a regular expression
}}
 
The complete text behind "categoryregexp" will be taken as ONE argument and used in a SQL REGEXP clause, i.e. "|" characters can be used as a normal part of the regexp.''
 
===notcategory===
 
''{{DPL parameter
|name = notcategory
|purpose= 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.
}}
 
Syntax:
 
<code>notcategory=<i>category name</i></code>
 
Example:
 
<pre><nowiki>
DPL
category=Africa
notcategory=Zimbabwe
notcategory=Kenya
DPL
</nowiki></pre>
 
This list will output pages that have <nowiki>[[Category:Africa]]</nowiki> but ''do not'' have either <nowiki>[[Category:Zimbabwe]]</nowiki> or <nowiki>[[Category:Kenya]]</nowiki> listed.
 
Notes:
 
If you use the parser function syntax you will be able to use Magic words like <nowiki>{{CURRENTMONTHNAME}}, {{CURRENTDAY}}, {{CURRENTYEAR}}</nowiki> etc in the category name.
 
Related [[DPL extension variables]]: <code>$wgDPL2MaxCategoryCount</code>, <code>$wgDPL2AllowUnlimitedCategories</code>, <code>$wgDPL2MinCategoryCount</code>.''
 
===notcategorymatch===
 
{{DPL parameter
|name = notcategorymatch
|purpose= Works like notcategory but based on SQL LIKE
}}
 
===notcategoryregexp===
 
{{DPL parameter
|name = notcategoryregexp
|purpose= Works like notcategory but based on SQL REGEXP
}}
 
===categoriesminmax===
 
{{DPL parameter
|name = categoriesminmax
|purpose= To restrict the search to articles which are assigned to at least [min] and at most to [max] categories.
}}
 
Syntax:
 
<code>categoriesminmax=[min],[max]</code>
 
Example:
 
<pre><nowiki>
DPL
category=Africa
categoriesminmax=3
DPL
</nowiki></pre>
 
The list will only contain articles which belong to category "Africa" and at least to two other categories
 
<pre><nowiki>
DPL
category=Africa
categoriesminmax=,1
DPL
</nowiki></pre>
 
The list will only contain articles which belong to category "Africa" and are not assigned to any other category.
 
 
== Select articles based on NAMESPACES ==
 
===namespace===
 
{{DPL parameter
|name = namespace
|purpose= To restrict the articles in the list to only be in one of the given namespaces.
}}
 
Syntax:
 
<code>namespace=<i>1st namespace name|2nd namespace name|3rd namespace name|...</i></code>
 
The namespace name may be any one, assuming it represents a valid namespace in the system, including custom ones, BUT no pseudo-namespace such as ''Media'', ''Special'' which have negative namespace ids. The empty string is the main article namespace (e.g. '<code>namespace=</code>' for pages in Main ns only, '<code>namespace=|Help</code>' or '<code>namespace=Talk|</code>' for Main or Talk ns, '<code>namespace=User||Category</code>' for User, Main or Category, etc.).
 
Name spaces are <u>case sensitive</u> <code>namespace=User_talk</code> will work, but <code>namespace=User_Talk</code> will not.
 
Instead of using the title of a namespace you can also use its numeric ID - although this is not recommended. DPL will always try to interpret the argument as a name first. So, if you create a user namespace with the title "1" (which is possible in principle) DPL will take this namespace if given a "1" as an argument. In this case the "Talk" namespace (which has the numeric id '1') cannot be specified by its number but only by the literal "Talk".
 
Example 1:
 
<pre><nowiki>
DPL
category=Policy
namespace=Wikinews|Discussion
DPL
</nowiki></pre>
 
This list will output pages that are in the ''Wikinews'' or ''Discussion'' namespace and belong to <nowiki>[[Category:Policy]]</nowiki>.
 
Example 2 (with magic word):
 
<pre><nowiki>
{{#dpl: category = Policy | namespace= {{NAMESPACE}} }}
</nowiki></pre>
 
This list will output pages that are in the namespace the current page is in - whatever it is - and belong to <nowiki>[[Category:Policy]]</nowiki>.
 
===notnamespace===
 
{{DPL parameter
|name = notnamespace
|purpose= Much like the notcategory parameter, but for namespaces. Requires that every page listed '''not''' be in one of given namespaces.
}}
 
Syntax:
 
<code>notnamespace=<i>namespace name</i></code>
 
Example 1:
 
<pre><nowiki>
DPL
notnamespace=Wikinews
notnamespace=Discussion
DPL
</nowiki></pre>
 
This list will output pages that are NEITHER in the ''Wikinews'' NOR in the ''Discussion'' namespace.
 
Example 2 (with magic word):
 
<pre><nowiki>
{{#dpl: notnamespace = Wikinews | notnamespace = {{NAMESPACE}} }}
</nowiki></pre>
 
This list will output pages that are NEITHER in the ''Wikinews'' NOR in the namespace the current page is in.
 
 
 
== Select articles based on LINKS ==
 
===linksfrom===
 
{{DPL parameter
|name = linksfrom
|purpose= Selects articles which are referenced from at least one of the specified pages.
}}
 
Syntax:
 
<code>linksfrom=<i>full page name|..</i></code>
 
The page mentioned in the DPL query can be retrieved via %PAGESEL%.
 
Example 1:
<pre><nowiki>
DPL
category = Poets
linksfrom = Dublin|Cork
DPL
</nowiki></pre>
 
This list will output pages that are mentioned (with a hyperlink) in article ''Dublin'' or ''Cork'' in the Main namespace
and which belong to category "Poets".
 
Example 2 (with magic word):
 
<pre><nowiki>
{{#dpl: category = Poets | linksfrom = {{FULLPAGENAME}} }}
</nowiki></pre>
 
This list will output pages that are in category "Poets" and which are referenced by the current page, whatever it is.
Note that normally 'linksfrom' will '''only show existing pages'''. With 'openreferences=yes' this can be changed.
 
Note that the <tt>[[#distinct|distinct]]</tt> parameter can be used to control the amount of output you get.
 
===openreferences===
 
{{DPL parameter
|name = openreferences
|purpose= extends the 'linksfrom' to unresolved references.
}}
 
Syntax:
 
<code>openreferences=yes</code>
 
Example 1:
<pre><nowiki>
DPL
linksfrom = Dublin|Cork
openreferences=yes
DPL
</nowiki></pre>
 
This list will output pages that are mentioned (with a hyperlink) in article ''Dublin'' or ''Cork'' in the Main namespace, regardless whether these pages exist or not.
 
Note that the vast majority of DPL parameters '''depend on the existence of a page'''. If you set openreferences to 'yes' '''none of those parameters can be used'''. Examples for conflicting parameters are all parameters which relate to categories, revisions, authors, redirections and some other parameters.
 
Note that you '''must specify ordermethod=none''' if you want to use '''openreferences=yes'''.
 
===notlinksfrom===
 
{{DPL parameter
|name = notlinksfrom
|purpose= Selects articles which are NOT referenced from any of the specified pages.
}}
 
Syntax:
 
<code>notlinksfrom=<i>full page name|..</i></code>
 
Similar to <code>linksfrom</code>, you could use the <code><nowiki>{{FULLPAGENAME}}</nowiki></code> Magic Word, and not include any pages linked to from the current page. This, however, will generally result in errors.
 
===linksto===
 
{{DPL parameter
|name = linksto
|purpose= Selects articles which link to at least one of the specified pages.
}}
 
Syntax:
 
<code>linksto=<i>full page name|..</i></code>
 
The page mentioned in the DPL query can be retrieved via %PAGESEL%.
 
A %-sign can be used as a wildcard (SQL-LIKE expression).
 
If you specify more than one ''linksto'' condition they will act as a logical AND. In this case the %PAGESEL% variable will point to the FIRST condition.
 
<u>Example</u>
<table><tr valign=top><td>'''Parser extension'''
<pre><nowiki>
DPL
category = Poets
linksto = Dublin|C%r%
DPL
</nowiki></pre>
 
<td>'''Parser function'''
<pre>
{{#dpl: category = Poets | linksto = Dublin{{!}}C%r%}}
</pre>
</table>
 
This list will output pages that are in <tt>[[#category|category]]</tt> "Poets" and link to a page with title ''Dublin'' or ''Cork'' (or ''Cornwall'' etc.) in the ''Main'' <tt>[[#namespace|namespace]]</tt> (by default). To make the comparison case-insensitive, use the parameter <tt>[[#ignorecase|ignorecase]]</tt>. Note the use of <tt>[[template:!|<nowiki>{{!}}</nowiki>]]</tt> as a template call to "|" in order for multiple values in parameters when using DPL as a [[DPL:Manual - General Usage and Invocation Syntax|parser function]] (otherwise DPL would interpret "|Cork" as another parameter, and give an error).
 
If a page links to ''Cork'' and ''Cornwall'' it will appear twice in the output. Use %PAGESEL% to see thename of the page it links to.
 
<u>Example 2 (with magic word)</u>
<pre><nowiki>
{{#dpl: category = Poets | linksto = {{FULLPAGENAME}} }}
</nowiki></pre>
 
This list will output pages that are in category "Poets" and link to the current page, whatever it is.
 
Note that the <tt>[[distinct]]</tt> parameter can be used to control the amount of output you get.
 
===notlinksto===
 
{{DPL parameter
|name = notlinksto
|purpose= Selects articles which do NOT link to any of the specified pages.
}}
 
Syntax:
 
<code>notlinksto=<i>full page name|..</i></code>
 
Example:
<pre><nowiki>
DPL
category = Poets
notlinksto = London|Paris
DPL
</nowiki></pre>
 
This list will output pages that are in category "Poets" and do not have a link pointing to a page with title ''London'' or ''Paris'' in the Main namespace.
 
Note:
 
The implementation of this feature is not very efficient. Use with care and avoid huge result sets.
 
Note that the <tt>[[#distinct|distinct]]</tt> parameter can be used to control the amount of output you get.
 
 
===linkstoexternal===
 
{{DPL parameter
|name = linkstoexternal
|purpose= Selects articles which contain an external link that matches a given text pattern.
}}
 
Syntax:
 
<code>linkstoexternal=<i>text pattern|..</i></code>
 
This command selects pages which contain external http links that match a certain pattern. The pattern is used in SQL LIKE expression, i.e. _ and % are treated as special symbols that match any character respecting a group of arbitrary characters.
 
The pattern is case-sensitive!
 
The pattern is matched against the whole URL. Therefore you need to put % around the pattern if you only give part of the string:
linkstoexternal=%mywebpage%
 
If you specify more than one ''linkstoexternal'' item, a page must match ALL conditions (logical AND).
 
The URL of the external link can be retrieved via %EXTERNALLINK%.
 
See also the [[addexternallink]] command.
 
===imageused===
 
{{DPL parameter
|name = imageused
|purpose= Selects articles which use a certain image
}}
 
Syntax:
 
<code>imageused=<i>image name|..</i></code>
 
Example:
<pre><nowiki>
DPL
imageused = My.gif | Your image.png | Image:His.jpg
DPL
</nowiki></pre>
 
As you can see the Namespace 'Image' need not be specified.
 
Note: There is a variable %IMAGESEL% which contains the image name(s) used for selection.
 
 
===imagecontainer===
 
{{DPL parameter
|name = imagecontainer
|purpose= Select images which are contained in one or more articles
}}
 
Syntax:
 
<code>imagecontainer=<i>page name|..</i></code>
 
Example:
<pre><nowiki>
DPL
imagecontainer = MyPage | YourPage
escapelinks=false
openreferences=true
DPL
</nowiki></pre>
 
This statement will show all images which are contained in the two articles ''MyPage'' and ''YourPage''. Normally we would only get the names of images that really exist. But because we have specified ''openreferences=true'' we will also see non-existing images. Normally we would get a list of image names. Setting the parameter ''escapelinks'' to false, however, causes that we will see existing images directly. Non existing images will be displayed as red links.
 
See [[Test imagecontainer|example]].
 
== Select articles based on the use of TEMPLATES ==
 
===uses===
 
{{DPL parameter
|name = uses
|purpose= Selects articles which use at least one of the specified templates (wiki syntax: <code><nowiki>{{...}}</nowiki></code>).
}}
 
Syntax:
 
<code>uses=<i>Template:name|Template:..</i></code>
The "Template" namespace must be specified. You can also specify another namespace if you like.
 
Example 1:
<pre><nowiki>
DPL
uses = Template:Poet|Template:Painter
DPL
</nowiki></pre>
 
This list will output pages that use a template called ''Poet'' and/or another template called "Painter".
 
It is not possible to find pages that use 2 templates (e.g. Template:Foo AND Template:Bar).
 
===notuses===
 
{{DPL parameter
|name = notuses
|purpose= Selects articles which do not use any of the specified template.
}}
 
Syntax:
 
<code>notuses=<i>Template:name|Template:..</i></code>
 
Example 1:
<pre><nowiki>
DPL
category = Poet
notuses = Template:Poet
DPL
</nowiki></pre>
 
This list will output pages about poets which do not use the corresponding template.
 
Caution:
 
The implementation of this feature is not very efficient. Use with care and avoid huge result sets.
 
 
===usedby===
 
{{DPL parameter
|name = usedby
|purpose= Selects articles (templates) which are used (included) by a specified page.
}}
 
Syntax:
 
<code>usedby=<i>page</i></code>
 
Example 1:
<pre><nowiki>
DPL
usedby=Main Page
DPL
</nowiki></pre>
 
This will create a list of all pages which are included by the main page of your wiki.
 
== Select articles based on authors / editors ==
 
===createdby===
 
{{DPL parameter
|name = createdby
|purpose= Selects articles which were created by the specified user.<br/>{{slow}}
}}
 
Syntax:
 
<code>createdby=<i>username</i></code>
 
'''Note (applies for all user related selection criteria):'''
 
* You can combine user related selections. For example you could search for pages which were not created by user1 but modified by him, or you could search for pages which were created by user1 and lastmodified by user. You can also show several or all versions of such articles by specifiying one or more of the "revision" group of parameters like ''allrevisionsbefore''.
* currently there is no mechanism to make a distinction between minor edits and normal modifications
 
===notcreatedby===
 
{{DPL parameter
|name = notcreatedby
|purpose= Selects articles which were NOT created by the specified user.<br/>{{slow}}
}}
 
Syntax:
 
<code>notcreatedby=<i>username</i></code>
 
Note:
 
To avoid huge result sets this will typically be accompanied by other selection criteria.
 
===modifiedby===
 
{{DPL parameter
|name = modifiedby
|purpose= Selects articles which were created or at least once modified by the specified user.
}}
 
Syntax:
 
<code>modifiedby=<i>username</i></code>
 
Note:
 
''modifiedby'' will always be a superset of ''createdby'' as the creation of a page is interpreted as its first modification.
 
===notmodifiedby===
 
{{DPL parameter
|name = notmodifiedby
|purpose= Selects articles which were NOT (created or) modified by the specified user.
}}
 
Syntax:
 
<code>notmodifiedby=<i>username</i></code>
 
Note:
 
To avoid huge result sets this will typically be accompanied by other selection criteria.
 
 
===lastmodifiedby===
 
{{DPL parameter
|name = lastmodifiedby
|purpose= Selects articles where the last modification was done by the specified user.
}}
 
Syntax:
 
<code>lastmodifiedby=<i>username</i></code>
 
===notlastmodifiedby===
 
{{DPL parameter
|name = notlastmodifiedby
|purpose= Selects articles where the last modification was NOT done by the specified user.
}}
 
Syntax:
 
<code>notlastmodifiedby=<i>username</i></code>
 
Note:
 
To avoid huge result sets this will typically be accompanied by other selection criteria.
 
 
== Select articles based on TITLE ==
 
There are several possibilities to select articles by their title. When the titles of matching articles are displayed later in the output list their names can be shown in different ways: The namespace may be shown or skipped and even parts of the name can be changed. See [[shownamespace]], [[replaceintitle]], [[escapelinks]] and [[titlemaxlength]] for details.
 
 
===title===
 
{{DPL parameter
|name = title
|purpose= Select one single page by its (namespace and) title.
}}
 
Syntax:
 
<code>title=<i>pagetitle</i></code>
 
If you specify a "title", the "mode" will be automatically set to "userformat" which means that you will get no output by default. Specifying an exact "title" makes sense if you want to transclude contents from one specific other page, e.g. the whole text, a chapter, labeled sections or template calls.
 
Thus DPL may serve as a more flexible alternative to [[mw:Extension:Labeled Section Transclusion|Labeled Section Transclusion]].
 
Examples:
 
<pre><nowiki>
{{#dpl:title=My Page|include=#First Chapter}}
{{#dpl:title=My Page|include={My Template}.dpl|multisecseparators=\n----\n}}
</nowiki></pre>
 
The first example will include the contents of "My Chapter" of an article named "My Page" in the main namespace.
 
The second example will take all invocations of template "My Template" in article "My Page" and apply "Template:My Template.dpl" instead of "Template:My Template". The output will be separated by horizontal lines.
 
 
===title&lt;===
 
{{DPL parameter
|name = title&lt;
|purpose= Restrict the selection to pages with a title less or equal to a given value.
}}
 
Syntax:
 
<code>title&lt;=<i>string</i></code>
 
The ''string'' given need not be a valid page title.
 
If this parameter is set together with 'ASCENDING' order and a [[count]] limit, you will get the pages which are immediately 'below' the given ''string''. This allows efficient scrolling through huge result sets.
 
For details see [[Scrolling]].
 
 
===title&gt;===
 
{{DPL parameter
|name = title&gt;
|purpose= Restrict the selection to pages with a title greater or equal to a given value.
}}
 
Syntax:
 
<code>title&gt;=<i>string</i></code>
 
The ''string'' given need not be a valid page title.
 
If this parameter is set together with 'ASCENDING' order and a [[count]] limit, you will get the pages which are immediately 'above' the given ''string''. This allows efficient scrolling through huge result sets.
 
For details see [[Scrolling]].
 
===scroll===
 
{{DPL parameter
|name = scroll
|purpose= enable built-in support for scrolling result sets.
}}
 
Syntax:
 
<code>scroll=<i>yes</i></code>
 
If this command is given, DPL will interpret some special arguments in the URL.
 
DPL_count limit number of pages to show
DPL_offset where to start (n<sup>th</sup> page)
DPL_refresh whether to purge the special DPL cache or not
DPL_fromTitle page name to start after (will be passed to title< )
DPL_toTitle page name to end with (will be passed to title> , needed for reverse scroll)
DPL_findTitle page name to start with (will be passed to title>= )
DPL_scrolldir direction of scroll (can be 'up' or 'down')
 
For details see [[Scrolling]].
 
===titlematch===
 
{{DPL parameter
|name = titlematch
|purpose= Select pages with a title matching at least one of the specified patterns. The patterns are used as a [http://www.w3schools.com/sql/sql_where.asp <tt>LIKE</tt> argument] in an SQL query. Namespaces are ignored as the <tt>[[#namespace|namespace]]</tt> parameter can be used to further narrow the selection.
}}
 
Syntax:
 
<code>titlematch=<i>pattern|..</i></code>
 
Example:
 
<pre><nowiki>
DPL
titlematch=%foo%|bar%
DPL
</nowiki></pre>
 
This will output all pages (regardless of namespace) which have a name that contains "foo" somewhere in the title or start with "bar"
 
Example:
 
<pre><nowiki>
DPL
namespace=
titlematch=A%
DPL
</nowiki></pre>
 
This will output all pages in the main namespace which begin with "A".
 
The match is case-sensitive, even with respect to the first character; to make it case-insensitive, use the parameter <tt>[[#ignorecase|ignorecase]]</tt>. Note that spaces are translated to \_ (escaped underscore) as MediaWiki internally stores names with underscores instead of spaces. Using an underscore in your <tt>titlematch</tt> argument means 'any single character' in SQL LIKE expressions.
 
===titleregexp===
 
{{DPL parameter
|name = titleregexp
|purpose= 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.
}}
 
Syntax:
 
<code>titleregexp=<i>regular expression</i></code>
 
Example:
 
<pre><nowiki>
DPL
titleregexp=[0-9]+.*y$
DPL
</nowiki></pre>
 
This will output all pages (regardless of namespace) which have a digit in their name and end with a "y". Use the parameter <tt>[[#ignorecase|ignorecase]]</tt> to make the comparison case-insensitive.
 
===nottitlematch===
 
{{DPL parameter
|name = nottitlematch
|purpose= 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.
}}
 
Syntax:
 
<code>nottitlematch=<i>pattern|..</i></code>
 
Example:
 
<pre><nowiki>
DPL
nottitlematch=%e%|%u%
DPL
</nowiki></pre>
 
This will output all pages (regardless of namespace) which do not contain an "e" or a "u" in their title.
 
 
===nottitleregexp===
 
{{DPL parameter
|name = nottitleregexp
|purpose= 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.
}}
 
Syntax:
 
<code>nottitleregexp=<i>regular expression</i></code>
 
== Select articles based on CONTENTS ==
 
===includematch===
 
{{DPL parameter
|name = includematch
|purpose= Controls the selection of pages based on contents which shall be included from these pages.
}}
 
Syntax:
 
<code>includematch=<i>regexp1,regexp2,..</i></code>
 
The idea is that a page will only be selected (and its contents included) if the contents to be included matches a regular expression. In case of (heading based) chapter inclusion and labeled section inclusion the ''relevant contents of the page'' must match the pattern; in case of template based matching it is the ''complete wikitext of the calling code of your template'' which is tested against your regular expression. Be careful to design your regexp in a proper way so that it can match all syntactical variations and note that we use '''Perl regular expressions'''. This means that you must delimit your regexp with two identical characters that are not part of the regexp itself, e.g. with <tt>/</tt>. Otherwise you will see strange error messages from the php interpreter...
 
If you are not familiar with regular expressions and/or do not know the specifics of Perl regexp used in PHP, you should definitely have a look into the [http://www.php.net/docs.php PHP manual] before using <tt>includematch</tt>.
 
You may want to match '''named parameters''' or '''unnamed parameters'''. In the first case you should use something like
<pre><nowiki>
includematch=/\{{!}}\s*myParameter\s*=\s*myPattern/s
</nowiki></pre>
to be on the safe side. Thus you can put spaces around the <tt>=</tt> and use linebreaks in your original article when calling the template - and still the pattern will match. Note that you must use a template to produce a pipe symbol - otherwise the pipe will break the parameter structure of your DPL call.
 
In case the template expects unnamed parameters you would specify something like
<pre><nowiki>
includematch=/\|\s*myPattern/s
</nowiki></pre>
If the parameter is not the last one in your template call you might use
<pre><nowiki>
includematch=/\{{!}}\s*myPattern\s*\|/s
</nowiki></pre>
 
Note that in combination with templates the regexp matching will only work if you produce some output at all via the <tt>include</tt> statement. So, if you call a dummy parameter only or if you call a phantom template that does not produce any output, you will see no matches. It is, however, sufficient to produce a space character to get output. It is not necesssary to output the parameter which matches your regexp.
 
See the <tt>[[DPL:Manual - DPL parameters: Controlling output volume#include|include]]</tt> parameter.
And see [[Talk:Test_includematch]].
 
'''Example:'''
 
<pre><nowiki>
DPL
category = Africa
include = #myChapter,{countryProfile}.dpl
includematch = ,/Name\s*=\s*[Kk]amerun/s
DPL
</nowiki></pre>
 
This will match articles which contain a call to the template "countryProfile" and use the "Name" parameter of that template with an argument that contains "Kamerun" or "kamerun" as a text string. Note that there is no pattern specified for the first element of the <tt>include</tt> statement. "KAMERUN" would not match; we could use the "i" modifier with the regexp to match without case sensitivity if we wanted so.
 
===includematchparsed===
 
{{DPL parameter
|name = includematchparsed
|purpose= Controls the selection of pages based on (pre-parsed) contents which shall be included from these pages.
}}
 
works exactly like [[includematch]] but the contents will be parsed before it is tested against the regular expression.
 
===includenotmatch===
 
{{DPL parameter
|name = includenotmatch
|purpose= Controls the selection of pages based on contents which shall be included from these pages.
}}
 
Syntax:
 
<code>includenotmatch=<i>regexp1,regexp2,..</i></code>
 
The idea is that a page will only be selected (and its contents included) if the contents to be included '''does not match''' a given regular expression. In case of (heading based) chapter inclusion and labeled section inclusion the relevant contents of the page must not match the pattern; in case of template based matching it is the calling code of your template which must not match the regular expression. Be careful to design your regexp in a proper way so that it covers all syntactical variations. You should use something like
includenotmatch=myParameter\s*=\s*myPattern/s
to be on the safe side. Thus you can put spaces around the '=' and use linebreaks in your original article when calling the template - and still the pattern will do its job.
 
See the <tt>[[DPL:Manual - DPL parameters: Controlling output volume#include|include]]</tt> parameter.
 
Example:
 
<pre><nowiki>
DPL
category = Africa
include = #myChapter,{countryProfile}.dpl
includenotmatch = ,/Name\s*=\s*[Kk]amerun/s
DPL
</nowiki></pre>
 
This will match articles which contain a call to the template "countryProfile" and use the "Name" parameter of that template with an argument that '''does not''' contain "Kamerun" or "kamerun" as a text string. Note that there is no pattern specified for the first element of the <tt>include</tt> statement. "KAMERUN" would not match; we could use the "i" modifier with the regexp to match without case sensitivity if we wanted so.
 
===includenotmatchparsed===
 
{{DPL parameter
|name = includenotmatchparsed
|purpose= Controls the selection of pages based on (pre-parsed) contents which shall be included from these pages.
}}
 
works exactly like [[includenotmatch]] but the contents will be parsed before it is tested against the regular expression.
 
== Select articles based on REVISION dates ==
 
By default DPL uses "Y-m-d H:i:s" to display date and time. Note that MediaWiki stores all dates/times in UTC format. When displaying a time stamp DPL will translate it according to
# the timezone preference (difference to UTC/GMT) given by the user in his user settings
# if no preference is given and for all anonymous users the local time on the server will be used.
 
So you will either see a time based on your local time (browser based) or based on the timezone in which the wiki server is running.
 
The same kind of translation applies to dates you specify when selecting articles by revision date/time.
 
 
===lastrevisionbefore===
 
{{DPL parameter
|name = lastrevisionbefore
|purpose= 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).
}}
 
Syntax:
 
<code>lastrevisionbefore=<i>dateandoptionaltime</i></code>
 
''dateandoptionaltime'' is a numeric string of up to 14 digits, like "200812041300" (4th of Dec, 2008, 13:00).
The string may contain separation characters like "2008/12/04--13:00".
 
Note: if this parameter is used the variable %REVISION% will contain the revision of the selected page(s).
 
===firstrevisionsince===
 
{{DPL parameter
|name = firstrevisionsince
|purpose= The date of the first revision after the specified date will be shown (and will be available as %REVISION% in mode=userformat).
}}
 
Syntax:
 
<code>firstrevisionsince=<i>dateandoptionaltime</i></code>
 
''dateandoptionaltime'' is a numeric string of up to 14 digits, like "200812041300" (4th of Dec, 2008, 13:00)
The string may contain separation characters like "2008/12/04--13:00".
 
Note: if this parameter is used the variable %REVISION% will contain the revision of the selected page(s).
 
===allrevisionsbefore===
 
{{DPL parameter
|name = allrevisionsbefore
|purpose= 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).
}}
 
Syntax:
 
<code>allrevisionsbefore=<i>dateandoptionaltime</i></code>
 
''dateandoptionaltime'' is a numeric string of up to 14 digits, like "200812041300" (4th of Dec, 2008, 13:00)
The string may contain separation characters like "2008/12/04--13:00".
 
Note: if this parameter is used the variable %REVISION% will contain the revision of the selected page(s).
 
===allrevisionssince===
 
{{DPL parameter
|name = allrevisionssince
|purpose= 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.
}}
 
Syntax:
 
<code>allrevisionssince=<i>dateandoptionaltime</i></code>
 
''dateandoptionaltime'' is a numeric string of up to 14 digits, like "200812041300" (4th of Dec, 2008, 13:00)
The string may contain separation characters like "2008/12/04--13:00".
 
Note: if this parameter is used the variable %REVISION% will contain the revision of the selected page(s).
 
 
===maxrevisions===
 
{{DPL parameter
|name = maxrevisions
|purpose= show a page (or its revisions) only if there do not exist more than a given number of revisions for that page.
}}
 
Syntax:
 
<code>maxrevisions=<i>number</i></code>
 
''number'' must be greater or equal than 1.
 
 
===minrevisions===
 
{{DPL parameter
|name = minrevisions
|purpose= show a page (or its revisions) only if there exist at least a given number of revisions for that page.
}}
 
Syntax:
 
<code>minrevisions=<i>number</i></code>
 
''number'' must be greater or equal than 1. In practice only values of 2 or greater make sense. Using a value of ''2'', you could exclude freshly created pages from a result set.
 
== Select articles based on OTHER criteria ==
 
===articlecategory===
 
{{DPL parameter
|name = articlecategory
|purpose= select a talk page based on a category to which the corresponding base article (in the default namespace) belongs.
}}
 
Syntax:
 
<code>articlecategory= ''categoryname''</code>
 
If you want to select articles in namespace=Talk you can use this statement to define (in addition) a category for an article with identical name in namespace 0 (default namespace).
 
===includesubpages===
 
{{DPL parameter
|name = includesubpages
|purpose= Controls the inclusion or exclusion of pages which have a '/' in their name. Default is <tt>true</tt>.
}}
 
Syntax:
 
<code>includesubpages=false</code>
 
As subpages are by default always included, only 'no' or 'false' makes sense as an argument for <tt>includesubpages</tt>.
 
 
===redirects===
 
{{DPL parameter
|name = redirects
|purpose= Controls the inclusion or exclusion of redirect pages in the output. By default redirections are NOT shown.
}}
 
Syntax:
 
<code>redirects=<i>criteria</i></code>
 
''criteria'' can be one of:
* ''exclude'' &mdash; excludes redirect pages from lists &mdash; '''(default)'''
* ''include'' &mdash; allows redirect pages to appear in lists
* ''only'' &mdash; lists ''only'' redirect pages in lists
 
Example:
 
<pre><nowiki>
DPL
category = Africa
redirects = include
DPL
</nowiki></pre>
 
The result will consist of content pages and redirect pages tagged with <nowiki>[[Category:Africa]]</nowiki>. Note: this parameter does ''not'' show pages that ''link'' to the redirect (as [[Special:Whatlinkshere/DPL:Discussion]] does); only redirect pages themselves.
 
 
===minoredits===
 
{{DPL parameter
|name = minoredits
|purpose= Control the inclusion or exlusion of minor edits in lists.
}}
 
Requires: <tt>[[ordermethod]]=[...]firstedit|lastedit</tt>
 
Example:
 
<code>minoredits=<i>criteria</i></code>
 
''criteria'' can be one of:
* ''exclude'' &mdash; ignore minor edits when sorting lists
* ''include'' &mdash; includes minor edits to sort lists &mdash; '''(default)'''
 
Example:
 
<pre><nowiki>
DPL
category=Africa
ordermethod=lastedit
minoredits=exclude
DPL
</nowiki></pre>
 
This list will order pages tagged with <nowiki>[[Category:Africa]]</nowiki> by lastedit, but minor edits will be ignored in the ordering.
 
 
 
===stablepages===
 
{{DPL parameter
|name = stablepages
|purpose= Control the inclusion or exclusion of pages which are flagged as 'stable'
}}
 
Syntax:
 
<code>stablepages=<i> include | exclude | only</i></code>
 
default is <tt> include </tt>.
 
Purpose:
 
This parameter is only useful if your wiki uses [http://mediawiki.org/wiki/Extension:FlaggedRevisions Extension:FlaggedRevisions]. It allows you to control whether pages flagged as 'stable' will be part of the DPL result or not.
 
 
 
 
===qualitypages===
 
{{DPL parameter
|name = qualitypages
|purpose= Control the inclusion or exclusion of pages which are flagged as 'quality pages'
}}
 
Syntax:
 
<code>qualitypages=<i> include | exclude | only</i></code>
 
default is <tt> include </tt>.
 
Purpose:
 
This parameter is only useful if your wiki uses [http://mediawiki.org/wiki/Extension:FlaggedRevisions Extension:FlaggedRevisions]. It allows you to control whether pages flagged as 'quality pages' will be part of the DPL result or not.
 
== Restrict the output volume ==
 
===count===
 
{{DPL parameter
|name = count
|purpose= Controls the number of results that are shown.
}}
 
Syntax:
 
<code>count=<i>n</i></code>, with <code>n</code> a positive integer
 
A blank value (<code>count=</code>) for unlimited. '''It is limited to 500 by default''', depending on [[DPL:Manual_-_Source_and_Installation#Server-Wide_Configuration:_Extension_options|extension variables]]: <code>$wgDPL2MaxResultCount</code>, <code>$wgDPL2AllowUnlimitedResults</code>.
 
Example:
 
<pre><nowiki>
DPL
category=Africa
ordermethod=pagetouched
count=2
DPL
</nowiki></pre>
 
This list will output the two pages most recently changed that have <nowiki>[[Category:Africa]]</nowiki>.
 
If 'count' is missing it can be set from outside via the URL parameter ''DPL_count''.
 
===scroll===
 
{{DPL parameter
|name = scroll
|purpose= activate result scrolling
}}
 
Syntax:
 
<code>scroll=<i>yes</i></code>
 
Huge result sets can be split into smaller parts. DPL allows you to fetch parts of a huge result set by setting auxiliary selection criteria ([[title&lt;]], [[title&gt;]]). [[DPL_Example_027]] demonstrates the principle. It uses a ''scroll helper template'' which generates links to scroll forward and backward through a long result list. To make this possible it relies on variables which give the name of the first and last result item actually shown. The command <tt>scroll=yes</tt> is used to fill these variables with proper values and to set the title limits according to URL parameters derived from these variables.
 
see also [[Scrolling]].
 
Example:
 
see [[DPL_Example_027]]
 
===offset===
 
{{DPL parameter
|name = offset
|purpose= show only a portion of a big result list; typically used in combination with "count="
}}
 
Syntax:
 
<code>offset = n</code> with n = number of result lines to skip, (integer), default = 0
 
Example:
 
<pre><nowiki>
DPL
category=Africa
offset = 10
count = 5
DPL
</nowiki></pre>
 
This will show articles #11 .. #15 of category Africa; order is determined by alphabet as we did not give any specific ordermethod.
 
Note:
 
# You could put a DPL query into a template and make count & offset parameters. Calling this template with different values will allow you to display different portions of the result list.
# if you use <tt>mode=ordered</tt> the numbers will be adjusted to reflect the absolute position of the entries, i.e. in the above example you will see numbers starting from 11.
 
If 'offset' is missing it can be set from outside via the URL parameter ''DPL_offset''.
 
===randomcount===
 
{{DPL parameter
|name = randomcount
|purpose= create the complete result set and then select a subset for display by random.
}}
 
Syntax:
 
<code>randomcount=<i>n</i></code>, with <code>n</code> a positive integer
 
If randomcount is larger than the number of results, the complete result set will be displayed.
 
Example:
 
<pre><nowiki>
DPL
category=Africa
ordermethod=size
count=20
randomcount=3
DPL
</nowiki></pre>
 
This list will output three random articles from the group of the 20 largest articles on Africa.
 
 
===randomseed===
 
{{DPL parameter
|name = randomseed
|purpose= set an initial value for the random generator
}}
 
Syntax:
 
<code>randomseed=<i>n</i></code>, with <code>n</code> a positive integer
 
Example:
 
<pre><nowiki>
{{#dpl:
|category=Africa
|randomcount=3
|randomseed={{#time:Ymd}}
}}
</nowiki></pre>
 
This will set the random seed to a new value every day. Using this on your homepage you could present a stable set of random articles for one day and switch to another set every day.
 
===distinct===
 
{{DPL parameter
|name = distinct
|purpose= allow / suppresses duplicates in the output
}}
 
Syntax:
 
<code>distinct=<i>true | false | strict</i></code>
 
Normally distinct is set to <tt>true</tt>. This means that a page will occur only once in the output.
 
In connection with <tt>[[linksto]]</tt> and <tt>[[linksfrom]]</tt>, however, a page can occur more than once in the output. This happens if you specify more than one page for the <tt>linksfrom</tt>/<tt>linksto</tt> parameter and the same page contains links to more than one of them (<tt>linksto</tt>) or if the same page is referenced by more than one of them (<tt>linksfrom</tt>). If you want see a page only once also in these cases, use <tt>distinct=strict</tt>.
 
On the other hand, if you wish to see mutiple result entries you should switch this to <tt>false</tt>. This may make sense in combination with <tt>linksto</tt> or <tt>linksfrom</tt> if you want to see how many links from one document to another document exist.
 
 
===ignorecase===
 
{{DPL parameter
|name = ignorecase
|purpose= make comparisons insensitive to case
}}
 
Syntax:
 
<code>ignorecase=<i>true</i></code>
 
The default is case sensitivity. So only <tt>true</tt> makes sense as an argument.
 
The parameter has an effect on <tt>[[#linksto|linksto]]</tt>, <tt>[[#uses|uses]]</tt>, <tt>[[#titlematch|titlematch]]</tt>, <tt>[[#titleregexp|titleregexp]]</tt> and their <tt>not</tt>-equivalents.
 
For case-insensitivity in ordering result sets see <tt>[[ordercollation]]</tt>.
 
===skipthispage===
 
{{DPL parameter
|name = skipthispage
|purpose= include the page containing the DPL query into the result set
}}
 
Syntax:
 
<code>skipthispage=<i>no</i></code>
 
The default is <tt>yes</tt>, i.e. the page where your DPL query stands will never show up in the result set.
Setting this parameter to 'no' may lead to runtime errors which are hard to track down. You should only use that parameter if your query is straight forward in its structure and you need the current page to show up in the result (if it matches the selction criteria).
 
 
== Visualizzazione dei risultati ==
 
=== Mode ===
Line 136 ⟶ 1 438:
Example:
<pre><nowiki>
<DPL>
category = Africa
format = ,\n* [[%PAGE%|%TITLE%]],,
</DPL>
</nowiki></pre>
 
Line 146 ⟶ 1 448:
Creating a top-five hitlist with access rates and bold article names of varying size could be done like this:
<pre><nowiki>
<DPL>
category = Africa
ordermethod = counter
Line 153 ⟶ 1 455:
count = 5
format = ,\n%COUNT% --- <font size="%COUNTFS%">'''[[%PAGE%]]'''</font>,<br/>,
</DPL>
</nowiki></pre>
 
You can also use HTML syntax for the tags, although this is discouraged.
<pre><nowiki>
<DPL>
linksto = Africa
format = <ul type="disc">,<li>[[%PAGE%]],</li>,</ul>
</DPL>
</nowiki></pre>
 
Now let us create a table using wiki syntax:
<pre><nowiki>
<DPL>
linksto = Africa
format = {| class="wikitable"¶!pages found,¶|-¶|[[%PAGE%]],,¶|}
</DPL>
</nowiki></pre>
We use 'Startall' to define the table header and 'Endall' for the footer.
Line 176 ⟶ 1 478:
'''we could also produce image galleries:'''
<pre><nowiki>
<DPL>
namespace = Image
format = <gallery>,%PAGE%\n,,</gallery>
</DPL>
</nowiki></pre>
 
Line 209 ⟶ 1 511:
 
<pre><nowiki>
<DPL>
linksto = Africa
mode = userformat
Line 215 ⟶ 1 517:
includepage = #fruit,#color
secseparators = ¶|,,¶|,,
</DPL>
</nowiki></pre>
 
Which produces,
<DPL>
linksto = Africa
mode = userformat
Line 225 ⟶ 1 527:
includepage = #fruit,#color
secseparators = ¶|,,¶|,,
</DPL>
 
Use <tt>[[#listseparators|listseparators]]</tt> to define a table with three columns and put a link to the article in the first column of each row. Use <tt>secseparators</tt> to add more columns for each section found. There are two pairs for each transcluded section; the first element of each pair is a linefeed and a pipe (which define a new column in the table) and the second element of each pair is empty. Have a careful look at the '¶' symbols ('\n' can be used as an alternative). They always appear before a wiki syntax element which must be placed at the beginning of a new line. Thus, make sure that the wiki parser will understand them. Note: if an article does not contain a section named "fruit", it will result in an empty cell in the table.
Line 233 ⟶ 1 535:
====Example 2====
<pre><nowiki>
<DPL>
linksto = Africa
mode = userformat
Line 239 ⟶ 1 541:
includepage = #fruit[50],#color[100 more..]
secseparators = \n|
</DPL>
</nowiki></pre>
 
Line 263 ⟶ 1 565:
Example:
<pre><nowiki>
<DPL>
category=TestSSt
includepage={interfaces_overview} dpl
Line 270 ⟶ 1 572:
secseparators = \n|
multisecseparators=¶|-¶|&amp;nbsp;|
</DPL>
</nowiki></pre>
 
Line 379 ⟶ 1 681:
The <tt>tablerow</tt> command is best explained by an example (you can also find this example on the title page of this wiki):
<pre><nowiki>
DPL
<dpl>
category=African Union member states
nottitlematch=Sudan
Line 387 ⟶ 1 689:
table =,Country,Area,Population,Text,#hits
tablerow =align=right|%%,align=right|%%,bgcolor=lightyellow|<small>%%</small>,\n|align=right|%%
DPL
</dpl>
</nowiki></pre>
* We select some African countries, we exclude Sudan
Line 446 ⟶ 1 748:
 
<pre><nowiki>
<DPL>
category=Africa|Europe
ordermethod=category,title
headingmode=definition
mode=ordered
</DPL>
</nowiki></pre>
 
Line 506 ⟶ 1 808:
|-
|<pre><nowiki>
<DPL>
ordermethod=category,title
headingmode=ordered
Line 512 ⟶ 1 814:
listattr= class="submenul"
itemattr= class="submenuli" style="font-style: italic;"
</DPL>
</nowiki></pre>
|<pre><nowiki>
Line 547 ⟶ 1 849:
|-
|<pre><nowiki>
<DPL>
ordermethod=category,title
headingmode=ordered
Line 553 ⟶ 1 855:
listattr= class="submenul"
itemattr= class="submenuli" style="font-weight: bold;"
</DPL>
</nowiki></pre>
|<pre><nowiki>
Line 619 ⟶ 1 921:
|- valign=top
|<pre><nowiki>
<DPL>
ordermethod=category,pagetouched
headingmode=H2
mode=ordered
hlistattr= class="topmenul" id="dmenu"
</DPL>
</nowiki></pre>
|<pre><nowiki>
Line 673 ⟶ 1 975:
|- valign=top
|<pre><nowiki>
<DPL>
ordermethod=category,title
headingmode=unordered
Line 679 ⟶ 1 981:
hlistattr= class="topmenul" id="dmenu"
hitemattr= class="topmenuli" style="color: red;"
</DPL>
</nowiki></pre>
|<pre><nowiki>
Line 756 ⟶ 2 058:
 
<pre><nowiki>
<DPL>
category = Africa
namespace = Talk
shownamespace = false
</DPL>
</nowiki></pre>
 
Line 832 ⟶ 2 134:
 
<pre><nowiki>
<dpl>DPL</nowiki>
category=Test
columns=3
rowcolformat=width=100%
DPL
</dpl>
</pre>
 
Simply displays all articles and subcategories in [[:Category:Test]] in 3 columns (<tt>[[#rowcolformat|rowcolformat]]</tt> is used to make the table width 100%).
 
DPL
<dpl>
category=Test
columns=3
rowcolformat=width=100%
DPL
</dpl>
 
'''More complex example:'''
Line 852 ⟶ 2 154:
 
<pre><nowiki>
<DPL></nowiki>
category=Africa
addpagesize=true
Line 860 ⟶ 2 162:
count=12
columns=3
</DPL>
</pre>
 
The output will contain a list of the 12 largest articles on Africa, arranged in three columns. Each column consists of a table which has itself three columns: rank, article name and size. ''Unfortunately, it doesn't work...''
 
<DPL>
category=Africa
addpagesize=true
Line 873 ⟶ 2 175:
count=12
columns=3
</DPL>
 
===rows===
Line 890 ⟶ 2 192:
 
<pre><nowiki>
<DPL>
category=Africa
addpagesize=true
Line 898 ⟶ 2 200:
count=12
rows=2
</DPL>
</nowiki></pre>
 
Line 920 ⟶ 2 222:
 
<pre><nowiki>
<DPL>
category=Africa
addpagesize=true
Line 927 ⟶ 2 229:
listseparators={|class=sortablewikitable id=2\n!Rank\n!width=200px|Article\n!Bytes\n|-,\n|%NR%.\n|[[%PAGE%]]\n|align=right|%SIZE%,\n|-,\n|}
rowsize=20
</DPL>
</nowiki></pre>
 
Line 946 ⟶ 2 248:
 
<pre><nowiki>
<DPL>
category=Africa
columns=3
rowcolformat=cellspacing=20
</DPL>
</nowiki></pre>
 
Line 960 ⟶ 2 262:
 
<pre><nowiki>
<DPL>
category=Africa
columns=3
rowcolformat=class=dpl3columns
</DPL>
</nowiki></pre>
 
I cookie ci aiutano a fornire i nostri servizi. Utilizzando i nostri servizi, accetti il nostro utilizzo dei cookie.

Menu di navigazione