<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.geministation.com/index.php?action=history&amp;feed=atom&amp;title=Module%3ADPLlua%2Fdoc</id>
	<title>Module:DPLlua/doc - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.geministation.com/index.php?action=history&amp;feed=atom&amp;title=Module%3ADPLlua%2Fdoc"/>
	<link rel="alternate" type="text/html" href="https://wiki.geministation.com/index.php?title=Module:DPLlua/doc&amp;action=history"/>
	<updated>2026-06-04T07:57:39Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.8</generator>
	<entry>
		<id>https://wiki.geministation.com/index.php?title=Module:DPLlua/doc&amp;diff=8877&amp;oldid=prev</id>
		<title>Banri: Created page with &quot;{{Documentation}} Uses Module:DPLlua/Helper to make it possible to include all parameters of a template while maintaining good performance.   {{Helper module|name=DPLlua |...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.geministation.com/index.php?title=Module:DPLlua/doc&amp;diff=8877&amp;oldid=prev"/>
		<updated>2021-03-24T01:56:22Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{Documentation}} Uses &lt;a href=&quot;/index.php?title=Module:DPLlua/Helper&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Module:DPLlua/Helper (page does not exist)&quot;&gt;Module:DPLlua/Helper&lt;/a&gt; to make it possible to include all parameters of a template while maintaining good performance.   {{Helper module|name=DPLlua |...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Documentation}}&lt;br /&gt;
Uses [[Module:DPLlua/Helper]] to make it possible to include all parameters of a template while maintaining good performance. &lt;br /&gt;
&lt;br /&gt;
{{Helper module|name=DPLlua&lt;br /&gt;
|fname1 = ask(&amp;amp;nbsp;...&amp;amp;nbsp;)&lt;br /&gt;
|ftype1 = tables&lt;br /&gt;
|fuse1 = &amp;lt;code&amp;gt;ask&amp;lt;/code&amp;gt; takes a series of tables each containing the settings for a DPL query; it will return the same number of result tables as input tables. All formatting settings are stripped from the config. If the config does not contains &amp;lt;code&amp;gt;include&amp;lt;/code&amp;gt;, the result will be a simple list of page names. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	&amp;lt;pagename#1&amp;gt;,&lt;br /&gt;
	&amp;lt;pagename#2&amp;gt;,&lt;br /&gt;
	&amp;lt;pagename#3&amp;gt;,&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
A query with an &amp;lt;code&amp;gt;include&amp;lt;/code&amp;gt; of the form &amp;lt;code&amp;gt;include = &amp;#039;{template#1}:1:2:param1:param2, {template#2}:3:param1, %0&amp;#039;&amp;lt;/code&amp;gt; will give a result like&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	[&amp;#039;include&amp;#039;] = {&lt;br /&gt;
		[&amp;#039;template#1&amp;#039;] = {&lt;br /&gt;
			[1] = val#1,&lt;br /&gt;
			[2] = val#2,&lt;br /&gt;
			[&amp;#039;param1&amp;#039;] = val#3,&lt;br /&gt;
			[&amp;#039;param2&amp;#039;] = val#4,&lt;br /&gt;
		},&lt;br /&gt;
		[&amp;#039;template#2&amp;#039;] = {&lt;br /&gt;
			[3] = val#5,&lt;br /&gt;
			[&amp;#039;param1&amp;#039;] = val#6,&lt;br /&gt;
		},&lt;br /&gt;
		[&amp;#039;%0&amp;#039;] = val#7&lt;br /&gt;
	},&lt;br /&gt;
	[&amp;#039;title&amp;#039;] = &amp;lt;pagename&amp;gt;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You can also do &amp;lt;code&amp;gt;include = &amp;#039;{some template}&amp;#039;&amp;lt;/code&amp;gt; which will include all parameters of that template in their unexpanded form (templates are not expanded but some content in parser tags is placed in strip markers).&lt;br /&gt;
&lt;br /&gt;
If a template appears multiple times on the same page then &amp;lt;code&amp;gt;val#1&amp;lt;/code&amp;gt; of the above example will be be a table like &amp;lt;code&amp;gt;{val#1 of template 1, val#1 of template 2, ...}&amp;lt;/code&amp;gt;, etc.&lt;br /&gt;
&lt;br /&gt;
If the config value &amp;lt;code&amp;gt;count&amp;lt;/code&amp;gt; is larger than 500 it will automatically generate multiple DPL queries with offsets and their outputs will be combined in the returned result.&lt;br /&gt;
&lt;br /&gt;
The output contains a &amp;lt;code&amp;gt;time&amp;lt;/code&amp;gt; field so you don&amp;#039;t need to use &amp;lt;code&amp;gt;%DPLTIME%&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If the DPL throws an error it will be available in the &amp;lt;code&amp;gt;error&amp;lt;/code&amp;gt; field of the output.&lt;br /&gt;
&lt;br /&gt;
Differences with normal DPL:&lt;br /&gt;
* All formatting options are ignored&lt;br /&gt;
* Using &amp;lt;code&amp;gt;include = &amp;#039;{template}&amp;#039;&amp;lt;/code&amp;gt; will include all the arguments of that template instead of expanding the template&lt;br /&gt;
* The parameter &amp;lt;code&amp;gt;count&amp;lt;/code&amp;gt; can go higher than 500&lt;br /&gt;
* When the value of a parameter is a table it will be expanded into multiple lines. E.g. doing &amp;lt;code&amp;gt;notcategory = {val#1, val#2}&amp;lt;/code&amp;gt; will expand into &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
|notcategory = val#1&lt;br /&gt;
|notcategory = val#2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note, if you include a whole template (e.g. &amp;lt;code&amp;gt;include = &amp;#039;{some template}&amp;#039;&amp;lt;/code&amp;gt;), content inside strip markers (not nowiki) can&amp;#039;t be cleaned up inside lua so pipe characters (&amp;lt;code&amp;gt;&amp;amp;#124;&amp;lt;/code&amp;gt;) will be replaced with &amp;lt;code&amp;gt;§&amp;lt;/code&amp;gt; characters and the &amp;lt;code&amp;gt;{&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;}&amp;lt;/code&amp;gt; characters are replaced by &amp;lt;code&amp;gt;&amp;amp;#10100;&amp;lt;/code&amp;gt; (U+2774) and &amp;lt;code&amp;gt;&amp;amp;#10101;&amp;lt;/code&amp;gt; (U+2775). Use &amp;lt;code&amp;gt;include = &amp;#039;{some template}, {some template}:1:2:3&amp;#039;&amp;lt;/code&amp;gt; instead for the problem parameters.&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Banri</name></author>
	</entry>
</feed>