<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.pttlink.org/index.php?action=history&amp;feed=atom&amp;title=Module%3AUnsubst</id>
	<title>Module:Unsubst - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.pttlink.org/index.php?action=history&amp;feed=atom&amp;title=Module%3AUnsubst"/>
	<link rel="alternate" type="text/html" href="https://wiki.pttlink.org/index.php?title=Module:Unsubst&amp;action=history"/>
	<updated>2026-04-07T15:27:15Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.5</generator>
	<entry>
		<id>https://wiki.pttlink.org/index.php?title=Module:Unsubst&amp;diff=5439&amp;oldid=prev</id>
		<title>Kg7qin: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="https://wiki.pttlink.org/index.php?title=Module:Unsubst&amp;diff=5439&amp;oldid=prev"/>
		<updated>2022-01-20T16:22:00Z</updated>

		<summary type="html">&lt;p&gt;1 revision imported&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 16:22, 20 January 2022&lt;/td&gt;
				&lt;/tr&gt;
&lt;!-- diff cache key mediawiki:diff::1.12:old-5438:rev-5439 --&gt;
&lt;/table&gt;</summary>
		<author><name>Kg7qin</name></author>
	</entry>
	<entry>
		<id>https://wiki.pttlink.org/index.php?title=Module:Unsubst&amp;diff=5438&amp;oldid=prev</id>
		<title>Mediawiki&gt;Trappist the monk: sync from sandbox; see talk;</title>
		<link rel="alternate" type="text/html" href="https://wiki.pttlink.org/index.php?title=Module:Unsubst&amp;diff=5438&amp;oldid=prev"/>
		<updated>2021-10-08T18:22:16Z</updated>

		<summary type="html">&lt;p&gt;sync from sandbox; see &lt;a href=&quot;/index.php?title=Module_talk:Unsubst&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Module talk:Unsubst (page does not exist)&quot;&gt;talk&lt;/a&gt;;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 18:22, 8 October 2021&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l9&quot; &gt;Line 9:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 9:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	['$aliases'] = 'parameter aliases',&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	['$aliases'] = 'parameter aliases',&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	['$flags'] = 'flags',&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	['$flags'] = 'flags',&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	['$B'] = 'template content'&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	['$B'] = 'template content'&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;,&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;	['$template-name'] = 'template invocation name override',&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;}&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l47&quot; &gt;Line 47:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 48:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	-- Find the invocation name.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	-- Find the invocation name.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	local mTemplateInvocation = require('Module:Template invocation')&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	local mTemplateInvocation = require('Module:Template invocation')&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	local name = mTemplateInvocation.name(frame:getParent():getTitle())&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	local &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;name&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;	if frame.args['$template-name'] and '' ~= frame.args['$template-name'] then&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;		name = frame.args['$template-name']										-- override whatever the template name is with this name&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;	else&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;		&lt;/ins&gt;name = mTemplateInvocation.name(frame:getParent():getTitle())&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;	end&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	-- Combine passed args with passed defaults&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	-- Combine passed args with passed defaults&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key mediawiki:diff::1.12:old-4963:rev-5438 --&gt;
&lt;/table&gt;</summary>
		<author><name>Mediawiki&gt;Trappist the monk</name></author>
	</entry>
	<entry>
		<id>https://wiki.pttlink.org/index.php?title=Module:Unsubst&amp;diff=4963&amp;oldid=prev</id>
		<title>Kg7qin: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="https://wiki.pttlink.org/index.php?title=Module:Unsubst&amp;diff=4963&amp;oldid=prev"/>
		<updated>2021-09-06T01:31:32Z</updated>

		<summary type="html">&lt;p&gt;1 revision imported&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 01:31, 6 September 2021&lt;/td&gt;
				&lt;/tr&gt;
&lt;!-- diff cache key mediawiki:diff::1.12:old-4962:rev-4963 --&gt;
&lt;/table&gt;</summary>
		<author><name>Kg7qin</name></author>
	</entry>
	<entry>
		<id>https://wiki.pttlink.org/index.php?title=Module:Unsubst&amp;diff=4962&amp;oldid=prev</id>
		<title>Mediawiki&gt;Amorymeltzer: Changed protection level for &quot;Module:Unsubst&quot;: High-risk Lua module: Bump to full protection, over 3.5M transclusions, including some very critical templates ([Edit=Require administrator access] (indefinite) [Move=Require administrator access] (indefinite))</title>
		<link rel="alternate" type="text/html" href="https://wiki.pttlink.org/index.php?title=Module:Unsubst&amp;diff=4962&amp;oldid=prev"/>
		<updated>2018-12-05T02:49:39Z</updated>

		<summary type="html">&lt;p&gt;Changed protection level for &amp;quot;&lt;a href=&quot;/wiki/Module:Unsubst&quot; title=&quot;Module:Unsubst&quot;&gt;Module:Unsubst&lt;/a&gt;&amp;quot;: &lt;a href=&quot;/index.php?title=WP:High-risk_templates&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;WP:High-risk templates (page does not exist)&quot;&gt;High-risk Lua module&lt;/a&gt;: Bump to full protection, over 3.5M transclusions, including some very critical templates ([Edit=Require administrator access] (indefinite) [Move=Require administrator access] (indefinite))&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;local checkType = require('libraryUtil').checkType&lt;br /&gt;
&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
local BODY_PARAM = '$B'&lt;br /&gt;
&lt;br /&gt;
local specialParams = {&lt;br /&gt;
	['$params'] = 'parameter list',&lt;br /&gt;
	['$aliases'] = 'parameter aliases',&lt;br /&gt;
	['$flags'] = 'flags',&lt;br /&gt;
	['$B'] = 'template content'&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
function p.main(frame, body)&lt;br /&gt;
	-- If we are substing, this function returns a template invocation, and if&lt;br /&gt;
	-- not, it returns the template body. The template body can be specified in&lt;br /&gt;
	-- the body parameter, or in the template parameter defined in the&lt;br /&gt;
	-- BODY_PARAM variable. This function can be called from Lua or from&lt;br /&gt;
	-- #invoke.&lt;br /&gt;
&lt;br /&gt;
	-- Return the template body if we aren't substing.&lt;br /&gt;
	if not mw.isSubsting() then&lt;br /&gt;
		if body ~= nil then&lt;br /&gt;
			return body&lt;br /&gt;
		elseif frame.args[BODY_PARAM] ~= nil then&lt;br /&gt;
			return frame.args[BODY_PARAM]&lt;br /&gt;
		else&lt;br /&gt;
			error(string.format(&lt;br /&gt;
				&amp;quot;no template content specified (use parameter '%s' from #invoke)&amp;quot;,&lt;br /&gt;
				BODY_PARAM&lt;br /&gt;
			), 2)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Sanity check for the frame object.&lt;br /&gt;
	if type(frame) ~= 'table'&lt;br /&gt;
		or type(frame.getParent) ~= 'function'&lt;br /&gt;
		or not frame:getParent()&lt;br /&gt;
	then&lt;br /&gt;
		error(&lt;br /&gt;
			&amp;quot;argument #1 to 'main' must be a frame object with a parent &amp;quot; ..&lt;br /&gt;
			&amp;quot;frame available&amp;quot;,&lt;br /&gt;
			2&lt;br /&gt;
		)&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Find the invocation name.&lt;br /&gt;
	local mTemplateInvocation = require('Module:Template invocation')&lt;br /&gt;
	local name = mTemplateInvocation.name(frame:getParent():getTitle())&lt;br /&gt;
&lt;br /&gt;
	-- Combine passed args with passed defaults&lt;br /&gt;
	local args = {}&lt;br /&gt;
	if string.find( ','..(frame.args['$flags'] or '')..',', ',%s*override%s*,' ) then&lt;br /&gt;
		for k, v in pairs( frame:getParent().args ) do&lt;br /&gt;
			args[k] = v&lt;br /&gt;
		end&lt;br /&gt;
		for k, v in pairs( frame.args ) do&lt;br /&gt;
			if not specialParams[k] then&lt;br /&gt;
				if v == '__DATE__' then&lt;br /&gt;
					v = mw.getContentLanguage():formatDate( 'F Y' )&lt;br /&gt;
				end&lt;br /&gt;
				args[k] = v&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	else&lt;br /&gt;
		for k, v in pairs( frame.args ) do&lt;br /&gt;
			if not specialParams[k] then&lt;br /&gt;
				if v == '__DATE__' then&lt;br /&gt;
					v = mw.getContentLanguage():formatDate( 'F Y' )&lt;br /&gt;
				end&lt;br /&gt;
				args[k] = v&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
		for k, v in pairs( frame:getParent().args ) do&lt;br /&gt;
			args[k] = v&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Trim parameters, if not specified otherwise&lt;br /&gt;
	if not string.find( ','..(frame.args['$flags'] or '')..',', ',%s*keep%-whitespace%s*,' ) then&lt;br /&gt;
		for k, v in pairs( args ) do args[k] = mw.ustring.match(v, '^%s*(.*)%s*$') or '' end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Pull information from parameter aliases&lt;br /&gt;
	local aliases = {}&lt;br /&gt;
	if frame.args['$aliases'] then&lt;br /&gt;
		local list = mw.text.split( frame.args['$aliases'], '%s*,%s*' )&lt;br /&gt;
		for k, v in ipairs( list ) do&lt;br /&gt;
			local tmp = mw.text.split( v, '%s*&amp;gt;%s*' )&lt;br /&gt;
			aliases[tonumber(mw.ustring.match(tmp[1], '^[1-9][0-9]*$')) or tmp[1]] = ((tonumber(mw.ustring.match(tmp[2], '^[1-9][0-9]*$'))) or tmp[2])&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	for k, v in pairs( aliases ) do&lt;br /&gt;
		if args[k] and ( not args[v] or args[v] == '' ) then&lt;br /&gt;
			args[v] = args[k]&lt;br /&gt;
		end&lt;br /&gt;
		args[k] = nil&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Remove empty parameters, if specified&lt;br /&gt;
	if string.find( ','..(frame.args['$flags'] or '')..',', ',%s*remove%-empty%s*,' ) then&lt;br /&gt;
		local tmp = 0&lt;br /&gt;
		for k, v in ipairs( args ) do&lt;br /&gt;
			if v ~= '' or ( args[k+1] and args[k+1] ~= '' ) or ( args[k+2] and args[k+2] ~= '' ) then&lt;br /&gt;
				tmp = k&lt;br /&gt;
			else&lt;br /&gt;
				break&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
		for k, v in pairs( args ) do&lt;br /&gt;
			if v == '' then&lt;br /&gt;
				if not (type(k) == 'number' and k &amp;lt; tmp) then args[k] = nil end&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Order parameters&lt;br /&gt;
	if frame.args['$params'] then&lt;br /&gt;
		local params, tmp = mw.text.split( frame.args['$params'], '%s*,%s*' ), {}&lt;br /&gt;
		for k, v in ipairs(params) do&lt;br /&gt;
			v = tonumber(mw.ustring.match(v, '^[1-9][0-9]*$')) or v&lt;br /&gt;
			if args[v] then tmp[v], args[v] = args[v], nil end&lt;br /&gt;
		end&lt;br /&gt;
		for k, v in pairs(args) do tmp[k], args[k] = args[k], nil end&lt;br /&gt;
		args = tmp&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	return mTemplateInvocation.invocation(name, args)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
p[''] = p.main -- For backwards compatibility&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>Mediawiki&gt;Amorymeltzer</name></author>
	</entry>
</feed>