Jump to content
This wiki has been automatically closed because there have been no edits or log actions made within the last 60 days. If you are a user (who is not the bureaucrat) that wishes for this wiki to be reopened, please request that at Requests for reopening wikis. If this wiki is not reopened within 6 months it may be deleted. Note: If you are a bureaucrat on this wiki, you can go to Special:ManageWiki and uncheck the "Closed" box to reopen it.

Other parameters: Difference between revisions

Fixed and aligned some <pre> and <code>
(repaired cross-reference links)
(Fixed and aligned some <pre> and <code>)
Line 9:
Syntax:
 
<code>updaterules=
<i>rule</i>;
...
<i>rule</i>;
</code>
 
Where rule is one of the following:
 
* rules for batch update of articles
replace ''pattern'';
by by ''replacement'';
before ''pattern'';
insert insert ''text'';
after ''pattern'';
insert insert ''text'';
 
* rules for interactive update of articles
template ''template name'';
legend ''legend article name'';
table ''table format'';
editform ''form parameters'';
action ''form action'';
hidden ''value'';
submit ''submit button'';
commit ''commit button'';
parameter ''parameter name'';
value value ''value'';
format format ''display format'';
tooltip tooltip ''text'';
optional optional ''value'';
afterparm afterparm ''parameter name'';
 
* common rules
summary ''edit summary text'';
exec ''value'';
 
The first group of rules is intended for batch updates of articles. A DPL query can select a group of articles and perform updates like inserting a piece of text at a certain position or changing text portions based on regular expressions.
Line 74 ⟶ 73:
 
A DPL statement may contain replacement, insertion before and after at the same time.
replace /([a-z]+])-cat/;
by \1-dog;
before foo;
insert bar;
after foo;
insert bar2;
 
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.
Line 92 ⟶ 91:
 
a regular expression
after ''pattern'';
insert ''text'';
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 114 ⟶ 113:
}}
 
<code> deleterules=
reason <i>text</i>;
exec true;
</code>
 
This command is experimental at the moment.
Line 192 ⟶ 190:
Example:
<pre><nowiki>
[[Category:Q Cat]] linking to [[Q Link]] and showing [[Image:Q Image]] and using {{Q Template}}
... DPL query which includes contents from other articles.
assuming that this contents contains links and images,
that it uses templates and thatthe articles are part of one or more categories
RESET statement at the end of the DPL query with one or more of 'categories,templates,images,links'
...
</nowiki></pre>
 
Line 291 ⟶ 289:
<pre><nowiki>
{{#dpl:
| namespace = Media
| debug = 0
| namespace = Special
}}
</nowiki></pre>
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.