Other parameters: Difference between revisions

replaced: tt> → code> (56)
No edit summary
(replaced: tt> → code> (56))
Line 52:
The third group of rules is common to both other groups and controls the update process.
 
The <ttcode>updaterules</ttcode> feature is intended for wiki expert users only. It is recommended that articles usind this statement are 'protected':
 
 
Line 116:
For safety reasons the update statements will only be performed if "exec yes" is specified. So, leaving this away, you can check what would happen if the update were to be executed.
 
Note that if "exec yes" is present the update will be performed each time the page is rendered which contains the DPL statement with the <ttcode>updaterules</ttcode>. So it is advisable to set "exec yes" only via a command line argument and not as part of the statioc article text. Thus you stay in control when the update happens. Typically one would use an URL parameter like ''DPL_arg1'' for that purpose.
 
The size of the form fields will dapt to the size of the displayed content.
Line 123:
 
 
To make the use of the <ttcode>updaterules</ttcode> feature easier we provide a [[Template:Bulk Update|special user interface]].
 
''text'' is plain text; ''replacement'' is text which may contain references (like \1) to the matching ''pattern'' (provided that this pattern contains match groups).
Line 209:
In some cases this may be useful. But in many cases this is not wanted. Especially when you use DPL to create a printable document which contains the full text of other articles you will probably not want to duplicate all links, template uses etc. of those articles.
 
The <ttcode>reset</ttcode> parameter will suppress all or some of the effects described above.
 
There are some subtle differences here depending on the mode in which you use DPL. These differences affect the question how links, and categories etc. are treated which are direct part of the document containing the DPL query.
Line 228:
;reset=links: will throw away all references to other pages, i.e. links contained in included contents and links like 'Q Link' will be ignored. This means that all links can be used in the normal "FORWARD" way, but no "BACKLINKS" are available for them.
 
If you want to avoid the above described effect of <ttcode>reset</ttcode> on your 'own' links you can use <ttcode>[[eliminate]]</ttcode>. But you should know that ''eliminate'' is rather expensive in terms of computer power as it does a second parse for all included contents.
 
 
Line 238:
;reset=links: will throw away all references to other pages
 
As you see, using <ttcode>reset</ttcode> in parser function mode will clear everything regardless whether it comes from included contents or whether it is direct part of the document containing the DPL query.
 
If you want to avoid the above described effect of <ttcode>reset</ttcode>, you can use <ttcode>[[eliminate]]</ttcode>. But you should know that ''eliminate'' is rather expensive in terms of computing power as it does a second parse for all included contents. The extra parser step is conducted as soon as you specify <ttcode>eliminate</ttcode>. In terms of extra processing needed it does not make a difference whether you specify one or more arguments for the 'eliminate' command.
 
If you have '''more than one DPL query''' in a document the effects will depend on the exact mode (parser extension or parser function mode), on the sequence of the statements and on the presence of 'reset' or 'eliminate' statements in each of the queries and on their individual arguments. As this is a very rare case we only give a simple rule of thumb here: Once you have used 'reset' in parser function mode or 'reset=links' in parser extension mode the effect of these statements will dominate the rest.
Line 249:
{{DPL Parameter
|name = fixcategory
|purpose= assign the article containing a DPL statement to a category although <ttcode>reset</ttcode> was used.
}}
 
Line 257:
Use multiple commands to assign the article to more than one category.
 
If you use <ttcode>reset=all</ttcode> or <ttcode>reset=categories</ttcode> the article containing your DPL statement will not be recorded in the mediawiki link database. This may be quite useful if your article transcludes content from other pages. Without the <ttcode>reset</ttcode> command your article would appear in a category if you included a text portion containing an assignment to that category.
 
As a side effect of using <ttcode>reset=all</ttcode> your article will not appear in a category even if you literally assign it to one.
The <ttcode>fixcategory</ttcode> allows you to make a category assignment which is not blocked by the [[reset]] command.
 
===eliminate===
Line 273:
<code>eliminate=keyword,..</code>
 
Where <ttcode>keyword</ttcode> is one of:
 
* <ttcode>categories</ttcode>
* <ttcode>templates</ttcode>
* <ttcode>images</ttcode>
* <ttcode>links</ttcode>
* <ttcode>all</ttcode> &mdash; a synonym for all of the above
 
The output of a DPL statement typically creates links to all pages which are part of the result set. The inclusion of contents from other pages via DPL (using <ttcode>[[include]]</ttcode>) normally has these consequences:
* the page containing the DPL query becomes part of the categories of the transcluded page
* shares ('adopts') their use of templates
Line 289:
In some cases this may be useful. But in many cases this is not wanted. Especially when you use DPL to create a printable document which contains the full text of other articles you will probably not want to duplicate all links, template uses etc. of those articles.
 
The <ttcode>eliminate</ttcode> parameter will suppress all or some of the effects described above.
 
For further explanation see <ttcode>[[reset]]</ttcode>.
 
Please note that the use of <ttcode>eliminate</ttcode> needs a considerable amount of extra computing power as it performs a second parser step for each included document.
 
===debug===
Line 328:
DPL debug messages are translatable in <code>DynamicPageList2.i18n.php</code>. See also [[#Internationalization]].
 
'debug=1' will suppress warning messages (e.g. if the result set of a DPL query is empty). As an alternative, you can use the <ttcode>[[suppresserrors]]</ttcode> statement.
 
===execandexit===
Line 367:
See also: [[Template:Extension DPL scroll]] and [[DPL Example 020]] and [[Scrolling]]
 
Note <ttcode>execandexit</ttcode> acts like a short-circuit evaluation. This means, for example, that successive statements to influence caching behaviour (like [[allowcachedresults]]) will not be interpreted.
 
=== cacheperiod ===