Other parameters: Difference between revisions

no edit summary
m (Alianin moved page DPL:Parameters: Other Parameters to Extension:DPL3/Parameters: Other parameters without leaving a redirect: Changing namespaces.)
No edit summary
Line 1:
{{DPL Manualmanual|section=Parameters|subsection=Other Parametersparameters}}
{{tocright}}
 
===updaterules===
 
{{DPL Parameter
|name = updaterules
Line 54 ⟶ 53:
The <code>updaterules</code> feature is intended for wiki expert users only. It is recommended that articles usind this statement are 'protected':
 
==== Rules for batch update in detail: ====
 
===== replace ''pattern''; =====
==== Rules for batch update in detail: ====
 
===== replace ''pattern''; =====
Defines a regular expression which matches text portions that shall be replaced. It is in the responsibility of the user to provide enclosing characters for the regexp; modifiers line 'U' or 'm' can be used.
 
===== by ''replacement''; =====
Defines the replacement for the above pattern; back references like \1 can be used.
 
===== before ''pattern''; =====
 
Defines locations where text will be inserted. The location(s) will be immediately before the match(es) of the pattern. If a pattern matches multiple times, multiple inserts will be performed.
 
The regexp will implicitly be enclosed in slashes. Hence literal slash characters must be escaped by backslashes.
 
===== after ''pattern''; =====
 
Defines locations where text will be inserted. The location(s) will be immediately after the match(es) of the pattern. If a pattern matches multiple times, multiple inserts will be performed.
 
The regexp will implicitly be enclosed in slashes. Hence literal slash characters must be escaped by backslashes.
 
===== insert ''text''; =====
 
Defines the text to be inserted.
 
Line 89 ⟶ 83:
Only one 'replace'-'by' sequence, one insertion 'before' and one insertion 'after' can be specified. 'replace' is always executed first, followed by 'insert before' and 'insert after', regardless of the sequence in which the rules appear in the DPL source ´text.
 
==== Rules for interactive update in detail: ====
===== template ''template name''; =====
 
===== template ''template name''; =====
 
The name of the template; the prefix "Template:" must be given.
 
 
 
 
be inserted. The location(s) will be immediately before the match(es) of the pattern. If a pattern matches multiple times, multiple inserts will be performed.
 
The regexp will implicitly be enclosed in slashes. Hence literal slash characters must be escaped by backslashes.
 
 
 
a regular expression
Line 109 ⟶ 96:
replace ''pattern'';
by ''replacement'';
 
 
 
 
 
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.
Line 119 ⟶ 102:
 
The size of the form fields will dapt to the size of the displayed content.
 
 
 
 
To make the use of the <code>updaterules</code> feature easier we provide a [[Template:Bulk Update|special user interface]].
Line 127 ⟶ 107:
''text'' is plain text; ''replacement'' is text which may contain references (like \1) to the matching ''pattern'' (provided that this pattern contains match groups).
 
===deleterules===
{{DPL Parameter
|name = deleterules
Line 142 ⟶ 122:
This will delete the selected pages; If "exec true" is missing, nothing will happen.
 
===goal===
 
{{DPL Parameter
|name = goal
Line 169 ⟶ 148:
Due to some limitations in MySQL it is currently not possible to restrict the intermediate result set of pages to a certain maximum (using the LIMIT clause). In addition the generated SQL code is not in all cases optimal (as its structure provides for complex selection criteria and therefore is unnecessarily complex in simple cases). So be careful and apply precise selection criteria.
 
===allowcachedresults===
 
{{DPL Parameter
|name = allowcachedresults
Line 185 ⟶ 163:
All queries are cached by default to reduce server load as generally articles do not change often enough to require updating every page load. If immediate updates are required every page load then set this parameter to false. The cache period is handled by the [[#cacheperiod]] parameter.
 
===reset===
 
{{DPL Parameter
|name = reset
Line 229 ⟶ 206:
 
If you want to avoid the above described effect of <code>reset</code> on your 'own' links you can use <code>[[eliminate]]</code>. But you should know that ''eliminate'' is rather expensive in terms of computer power as it does a second parse for all included contents.
 
 
<u>In parser fuction mode ('''<nowiki>{{#DPL:....}}</nowiki>'''):</u>
Line 244 ⟶ 220:
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.
 
=== fixcategory ===
 
=== fixcategory ===
 
{{DPL Parameter
|name = fixcategory
Line 262 ⟶ 236:
The <code>fixcategory</code> allows you to make a category assignment which is not blocked by the [[reset]] command.
 
===eliminate===
 
{{DPL Parameter
|name = eliminate
Line 295 ⟶ 268:
Please note that the use of <code>eliminate</code> needs a considerable amount of extra computing power as it performs a second parser step for each included document.
 
===debug===
 
{{DPL Parameter
|name = debug
Line 330 ⟶ 302:
'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 <code>[[suppresserrors]]</code> statement.
 
===execandexit===
 
{{DPL Parameter
|name = execandexit
Line 369 ⟶ 340:
Note <code>execandexit</code> acts like a short-circuit evaluation. This means, for example, that successive statements to influence caching behaviour (like [[allowcachedresults]]) will not be interpreted.
 
=== cacheperiod ===
 
{{DPL Parameter
|name = cacheperiod
Anonymous user