Difference between revisions of "DPL Extension Testing Ground"

From Project: Gorgon Wiki
Jump to: navigation, search
(An orphan page for my own testing of the DPL extension (Dynamic Page List).)
 
m (Serbule NPCs)
 
(13 intermediate revisions by 2 users not shown)
Line 1: Line 1:
==What==
+
{{TOCright}}
This should b an orphan page, used for testing the DPL extension. See [http://semeb.com/dpldemo/index.php?title=DPL:Manual DPL Manual].
+
This page is used for testing the DPL extension (it should be an orphan page). See [http://semeb.com/dpldemo/index.php?title=DPL:Manual DPL Manual].
  
==titlematch==
+
==DPL Cheatsheet==
Hmmm.. seems DPL installed doesn't support '''titlematch''':
+
 
 +
===Invocation===
 +
We can use <nowiki><dpl></nowiki> or <nowiki>{{ #dpl: ... }}</nowiki> to invoke DPL (Dynamic Page Lists). The latter is more powerful:
 +
* Magic words like <nowiki>{{PAGENAME}}</nowiki> or <nowiki>{{CURRENTDAY}}</nowiki> '''can be used'''.
 +
* Template calls like <nowiki>{{{some template}}}</nowiki> '''can be used''' as parameters.
 +
* Parser function calls like <nowiki>{{#if:...|...|...}}</nowiki> '''can be used''' within arguments.
 +
 
 +
===Special characters and escaping===
 +
Wiki characters must be escaped in the DPL arguments:
 +
* Use <nowiki>{{!}}</nowiki>  (ie. [[:Template:!]]) or the special symbol <tt>¦</tt> to escape the pipe character.
 +
* <tt>¶</tt> or <tt>\n</tt> must be used to insert a linefeed character where linefeeds are required by the wiki formatting.
 +
 
 +
Example of using an escape pipe character:
 +
<pre>
 +
{{#dpl:
 +
  |category = cat1¦cat2
 +
  |linksto  = {{{1}}}
 +
}}
 +
</pre>
 +
 
 +
===Debugging===
 +
<pre>
 +
resultsheader=«pre»«nowiki»
 +
resultsfooter=«/nowiki»«/pre»
 +
</pre>
 +
 
 +
==Using Titlematch==
 +
Pulling all news article for 2014 only. '''Note!''' : titlematch can create inefficient queries, and should not be necessary if categories can do it.
  
 
{{ #dpl:
 
{{ #dpl:
| titlematch = Game updates/{{ #var: year }}%
+
| titlematch = Game updates/2014-%
 
| ordermethod = title
 
| ordermethod = title
 
| order = descending
 
| order = descending
 
}}
 
}}
 +
 +
==dplreplace==
 +
This could be useful... ([http://semeb.com/dpldemo/index.php?title=Dplreplace manual])
 +
<pre>
 +
{{#dplreplace:abrakadabra|ab|AB}}
 +
</pre>
 +
 +
{{#dplreplace:abrakadabra|ab|AB}}
 +
 +
==uses (pulling pages using certain templates)==
 +
This is the main way we could handle skills/recipes tables with DPL and templating. WORK IN PROGRESS (trying to figure out the templating  of table rows with DPL).
 +
 +
{{ #dpl:
 +
| uses = Template:MAP infobox
 +
}}
 +
 +
==Ability table (work in progress)==
 +
This can be made to look nice, and the same code can be used to output various skill tables. I don't like the complexity though, simple "row templates" like the NPC Shops would be easier to do and easier to understand. However this is the only way I can think of atm in case developer wants to feed all individual abilities/recipes/etc in separate articles.
 +
 +
We don't really need this automation because there is no real need to pull abilities in various formats across various pages. They are mostly going to be listed on the Skills page, and NPCs only feature a subset of abilities that they can train, which can be maintained manually.
 +
 +
{{Ability table
 +
| category = Fire Magic abilities
 +
}}
 +
===Beta Testing favor===
 +
Please note that some NPCs do not have favor.
 +
<!-- ==== Serbule NPCs ====
 +
{{ #dpl:
 +
| category  = Serbule NPCs
 +
| include    = #Small Talk
 +
| table      = class="sortable table" style="width:50%",Serbule NPC Name,Favor
 +
| tablerow  = style="font-weight:bold"¦%%,
 +
}}
 +
-->

Latest revision as of 22:20, 28 December 2014

This page is used for testing the DPL extension (it should be an orphan page). See DPL Manual.

DPL Cheatsheet

Invocation

We can use <dpl> or {{ #dpl: ... }} to invoke DPL (Dynamic Page Lists). The latter is more powerful:

  • Magic words like {{PAGENAME}} or {{CURRENTDAY}} can be used.
  • Template calls like {{{some template}}} can be used as parameters.
  • Parser function calls like {{#if:...|...|...}} can be used within arguments.

Special characters and escaping

Wiki characters must be escaped in the DPL arguments:

  • Use {{!}} (ie. Template:!) or the special symbol ¦ to escape the pipe character.
  • or \n must be used to insert a linefeed character where linefeeds are required by the wiki formatting.

Example of using an escape pipe character:

{{#dpl:
  |category = cat1¦cat2
  |linksto  = {{{1}}}
}}

Debugging

 resultsheader=«pre»«nowiki»
 resultsfooter=«/nowiki»«/pre»

Using Titlematch

Pulling all news article for 2014 only. Note! : titlematch can create inefficient queries, and should not be necessary if categories can do it.

dplreplace

This could be useful... (manual)

 {{#dplreplace:abrakadabra|ab|AB}}

ABrakadABra

uses (pulling pages using certain templates)

This is the main way we could handle skills/recipes tables with DPL and templating. WORK IN PROGRESS (trying to figure out the templating of table rows with DPL).

Ability table (work in progress)

This can be made to look nice, and the same code can be used to output various skill tables. I don't like the complexity though, simple "row templates" like the NPC Shops would be easier to do and easier to understand. However this is the only way I can think of atm in case developer wants to feed all individual abilities/recipes/etc in separate articles.

We don't really need this automation because there is no real need to pull abilities in various formats across various pages. They are mostly going to be listed on the Skills page, and NPCs only feature a subset of abilities that they can train, which can be maintained manually.

Extension:DynamicPageList (DPL), version 2.3.0 : Warning: No results.

Beta Testing favor

Please note that some NPCs do not have favor.