Other parameters: Difference between revisions

m
Fix formatting in a few places, still need to split out some examples but first will have to test the fix to %TOTALPAGES% used for scroll behaviour
imported>FrozenPlum
(Add example)
imported>FrozenPlum
m (Fix formatting in a few places, still need to split out some examples but first will have to test the fix to %TOTALPAGES% used for scroll behaviour)
Line 12:
'''Syntax:'''
 
<code>debug=<i>n</i></code>, where ''{{tt|n''}} is one of:
* <code>''0''</code> – Silent mode, shows nothing.
* <code>''1''</code> – Quiet mode, shows (fatal) errors.
Line 21:
 
 
{{note|'''Note:''' If the debug parameter is used, but '''not''' used in the first position inof the DPL3 elementstatement, the new debug settings are not applied before all previous parameters have been parsed and checked.''' This generates a warning for <code>debug{{=}}2</code> and above.}}
 
 
Line 30:
'''Notes:'''
* DPL3 debug messages are translatable in ''DynamicPageList2.i18n.php''.
* <code>debug=''1''</code> suppresses warning messages (e.g., if the result set of a DPL3 query is empty). As an alternative, the <code>{{DPL|suppresserrors}}=</code> statement can be used.
 
 
Line 42:
'''Syntax:'''
 
<code>allowcachedresults=''value''</code> where ''{{tt|value''}} is one of:
* <code>''true''</code> – ('''default''', need not be set).
* <code>''false''</code> – prevent caching.
 
 
Line 53:
{{DPL Parameter
|name = cacheperiod
|purpose= Defines the expiration period for the DPL3 cache.
}}
 
Line 65:
{{DPL Parameter
|name = goal
|purpose= Set the goal for DPL3 to either show '''pages''' (default) or '''categories''' these pages belong to.
}}
 
Line 71:
'''Syntax:'''
 
<code>goal=''goaltype''</code> where ''{{tt|goaltype''}} can be one of:
* <code>''pages''</code> – ('''default''', need not be set).
* <code>''categories''</code>.
 
 
Line 105:
'''Syntax:'''
 
<code>eliminate=''keyword,..''</code> where ''{{tt|keyword''}} is one of:
* <code>''categories''</code>
* <code>''templates''</code>
Line 114:
 
The output of a DPL3 statement typically creates links to all pages which are part of the result set. The inclusion of contents from other pages via DPL3 (using <code>{{DPL|include}}</code>) normally has these consequences:
* The page containing the DPL3 query becomes part of the categories of the transcluded page.
* It shares ('adopts') their use of templates.
* It shares their references to images.
Line 138:
'''Syntax:'''
 
<code>reset=''keyword,..''</code>, where ''{{tt|keyword''}} is one of:
* <code>''categories''</code>
* <code>''templates''</code>
Line 170:
 
'''In parser extension mode''' (tag like <code><nowiki><dpl></nowiki></code>):
* <code>reset=''categories''</code> – Ignores categories of included contents but keeps 'own' categories like 'Q Cat'.
* <code>reset=''images''</code> – Throws away references to images contained in included contents but keeps 'own' images like 'Q Image'.
* <code>reset=''templates''</code> – Ignores templates used in included contents but keeps 'own' template usage ('Q Template').
* <code>reset=''links''</code> – Throws away all references to other pages, i.e., links contained in included contents and links like 'Q Link' are ignored. This means all links can be used in the normal "FORWARD" way, but no "BACKLINKS" are available for them.
 
 
Line 180:
 
''' In parser function mode''' (<code><nowiki>{{#dpl:....}}</nowiki></code>):
* <code>reset=''categories''</code> – Ignores all categories.<br>
* <code>reset=''images''</code> – Throws away all references to images.
* <code>reset=''templates''</code> – Ignores all template invocations.
* <code>reset=''links''</code> – Throws away all references to other pages.
 
 
Line 207:
Use multiple commands to assign the article to more than one category.
 
If <code>reset=''all''</code> or <code>reset=''categories''</code> are used, the article containing the DPL3 statement is not be recorded in the MediaWiki link database. This may be quite useful if an article transcludes content from other pages. Without the <code>{{DPL|reset}}</code> command, the article would appear in a category if a text portion containing an assignment to that category was used.
 
As a side effect of using <code>reset=''all''</code>, the article does not appear in a category, even if one is literally assigned to it.
<code>fixcategory</code> allows a category assignment to be made which is not blocked by the <code>reset</code> command.
 
Line 355:
 
A regular expression:
 
<pre>
after ''pattern'';
insert ''text'';
replace ''pattern'';
by ''replacement'';
 
</pre>
 
For safety reasons, the update statements are only performed if "exec yes" is specified. So, leaving this away, what would happen if the update were to be executed can be checked.
Anonymous user