User:DeKaitlyn/Notes/DPL

From the RuneScape Wiki, the wiki for all things RuneScape
Jump to: navigation, search
Meeting notes.png
This page contains personal notes.
The information contained are the personal notes of DeKaitlyn, and as such, are not to be treated as completely factual information, and thus may not make any sense to others.

The following are some notes compiled/exracted from replies by Gaz.

How to escape properly[edit | edit source]

Replacing strings[edit | edit source]

To escape replace functions to use in DPL's format param, use ²{#replace:string¦search¦replacement}² or ²{replace¦string¦search¦replacement}², as per Gaz, master of DPL.

Getting the Subpage name[edit | edit source]

²{SUBPAGENAME:%PAGE%}² can be used, as per Gaz, master of DPL.

Including multiple variants of a template[edit | edit source]

Add a comma (,) behind the first variant, then another variant right behind it. Repeat for however many variants there are that you wish to include.

Example: |include={Retake anim}:1,{Retake animation}:1

Including "dynamic" (re)upload links[edit | edit source]

To make upload links, you just need to create the link manually. An upload link to a specific name is https://runescape.wiki/w/Special:Upload?wpDestFile=NAME.png&wpForReUpload=1. (You can find that by clicking the link on the file page.) To put this into a DPL format param you'll do something like [the below examples].

Gaz

Example #1:

|format = ,\n* [[%PAGE%]] ([²{fullurl:Special:Upload¦wpDestFile=²{urlencode:%TITLE%}²&wpForReUpload=1}² reupload])

Example #2:

|format=, \n* [[%PAGE%]] ([²{fullurl:²{urlencode:%PAGE%}²¦action=edit}² edit])

You could also pre-fill the description box by adding the wpUploadDescription URL parameter (so like:
²{fullurl:Special:Upload¦wpDestFile=²{urlencode:%TITLE%}²&wpForReUpload=1&wpUploadDescription=²{urlencode:retaken image}²}²).
(urlencode makes sure that the page name and the description work correctly as URLs, mostly by encoding spaces.) Hope that helps!

Gaz

You could also pre-fill the description box by adding the wpUploadDescription URL parameter (so like ²{fullurl:Special:Upload¦wpDestFile=²{urlencode:%TITLE%}²&wpForReUpload=1&wpUploadDescription=²{urlencode:retaken image}²}² )

Gaz

IncludeMatch and IncludeNotMatch[edit | edit source]

From what I understand includematch filters what should be included, rather than what goes into the result set ... I think includematch does some slightly different things if format or tablerow are in use, but it still won't remove the page from the result set ... My general rule of thumb is avoid includematch if at all possible.

Gaz

Regex[edit | edit source]

Refer to references.[1]

References[edit | edit source]