<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="uk">
		<id>http://wiki.isofts.kiev.ua/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Kolk</id>
		<title>wiki - Внесок користувача [uk]</title>
		<link rel="self" type="application/atom+xml" href="http://wiki.isofts.kiev.ua/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Kolk"/>
		<link rel="alternate" type="text/html" href="http://wiki.isofts.kiev.ua/index.php/%D0%A1%D0%BF%D0%B5%D1%86%D1%96%D0%B0%D0%BB%D1%8C%D0%BD%D0%B0:%D0%92%D0%BD%D0%B5%D1%81%D0%BE%D0%BA/Kolk"/>
		<updated>2026-04-04T16:20:23Z</updated>
		<subtitle>Внесок користувача</subtitle>
		<generator>MediaWiki 1.25.3</generator>

	<entry>
		<id>http://wiki.isofts.kiev.ua/index.php?title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:Arguments/doc&amp;diff=699</id>
		<title>Модуль:Arguments/doc</title>
		<link rel="alternate" type="text/html" href="http://wiki.isofts.kiev.ua/index.php?title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:Arguments/doc&amp;diff=699"/>
				<updated>2016-11-24T15:23:45Z</updated>
		
		<summary type="html">&lt;p&gt;Kolk: Імпортовано 1 версія&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{High-risk|18740446+ pages, which is {{#expr:(1874044600/{{NUMBEROFPAGES:R}}) round 0}}% of all}}&lt;br /&gt;
{{Module rating|p}}&lt;br /&gt;
&lt;br /&gt;
This module provides easy processing of arguments passed from #invoke. It is a meta-module, meant for use by other modules, and should not be called from #invoke directly. Its features include:&lt;br /&gt;
* Easy trimming of arguments and removal of blank arguments.&lt;br /&gt;
* Arguments can be passed by both the current frame and by the parent frame at the same time. (More details below.)&lt;br /&gt;
* Arguments can be passed in directly from another Lua module or from the debug console.&lt;br /&gt;
* Arguments are fetched as needed, which can help avoid (some) problems with {{tag|ref}} tags.&lt;br /&gt;
* Most features can be customized.&lt;br /&gt;
&lt;br /&gt;
== Basic use ==&lt;br /&gt;
&lt;br /&gt;
First, you need to load the module. It contains one function, named &amp;lt;code&amp;gt;getArgs&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local getArgs = require('Module:Arguments').getArgs&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the most basic scenario, you can use getArgs inside your main function. The variable &amp;lt;code&amp;gt;args&amp;lt;/code&amp;gt; is a table containing the arguments from #invoke. (See below for details.)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local getArgs = require('Module:Arguments').getArgs&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
function p.main(frame)&lt;br /&gt;
	local args = getArgs(frame)&lt;br /&gt;
	-- Main module code goes here.&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, the recommended practice is to use a function just for processing arguments from #invoke. This means that if someone calls your module from another Lua module you don't have to have a frame object available, which improves performance.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local getArgs = require('Module:Arguments').getArgs&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
function p.main(frame)&lt;br /&gt;
	local args = getArgs(frame)&lt;br /&gt;
	return p._main(args)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p._main(args)&lt;br /&gt;
	-- Main module code goes here.&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want multiple functions to use the arguments, and you also want them to be accessible from #invoke, you can use a wrapper function.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local getArgs = require('Module:Arguments').getArgs&lt;br /&gt;
&lt;br /&gt;
local function makeInvokeFunc(funcName)&lt;br /&gt;
	return function (frame)&lt;br /&gt;
		local args = getArgs(frame)&lt;br /&gt;
		return p[funcName](args)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
p.func1 = makeInvokeFunc('_func1')&lt;br /&gt;
&lt;br /&gt;
function p._func1(args)&lt;br /&gt;
	-- Code for the first function goes here.&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
p.func2 = makeInvokeFunc('_func2')&lt;br /&gt;
&lt;br /&gt;
function p._func2(args)&lt;br /&gt;
	-- Code for the second function goes here.&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Options ===&lt;br /&gt;
&lt;br /&gt;
The following options are available. They are explained in the sections below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local args = getArgs(frame, {&lt;br /&gt;
	trim = false,&lt;br /&gt;
	removeBlanks = false,&lt;br /&gt;
	valueFunc = function (key, value)&lt;br /&gt;
		-- Code for processing one argument&lt;br /&gt;
	end,&lt;br /&gt;
	frameOnly = true,&lt;br /&gt;
	parentOnly = true,&lt;br /&gt;
	parentFirst = true,&lt;br /&gt;
	wrappers = {&lt;br /&gt;
		'Template:A wrapper template',&lt;br /&gt;
		'Template:Another wrapper template'&lt;br /&gt;
	},&lt;br /&gt;
	readOnly = true,&lt;br /&gt;
	noOverwrite = true&lt;br /&gt;
})&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Trimming and removing blanks ===&lt;br /&gt;
&lt;br /&gt;
Blank arguments often trip up coders new to converting MediaWiki templates to Lua. In template syntax, blank strings and strings consisting only of whitespace are considered false. However, in Lua, blank strings and strings consisting of whitespace are considered true. This means that if you don't pay attention to such arguments when you write your Lua modules, you might treat something as true that should actually be treated as false. To avoid this, by default this module removes all blank arguments.&lt;br /&gt;
&lt;br /&gt;
Similarly, whitespace can cause problems when dealing with positional arguments. Although whitespace is trimmed for named arguments coming from #invoke, it is preserved for positional arguments. Most of the time this additional whitespace is not desired, so this module trims it off by default.&lt;br /&gt;
&lt;br /&gt;
However, sometimes you want to use blank arguments as input, and sometimes you want to keep additional whitespace. This can be necessary to convert some templates exactly as they were written. If you want to do this, you can set the &amp;lt;code&amp;gt;trim&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;removeBlanks&amp;lt;/code&amp;gt; arguments to &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local args = getArgs(frame, {&lt;br /&gt;
	trim = false,&lt;br /&gt;
	removeBlanks = false&lt;br /&gt;
})&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Custom formatting of arguments ===&lt;br /&gt;
&lt;br /&gt;
Sometimes you want to remove some blank arguments but not others, or perhaps you might want to put all of the positional arguments in lower case. To do things like this you can use the &amp;lt;code&amp;gt;valueFunc&amp;lt;/code&amp;gt; option. The input to this option must be a function that takes two parameters, &amp;lt;code&amp;gt;key&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;value&amp;lt;/code&amp;gt;, and returns a single value. This value is what you will get when you access the field &amp;lt;code&amp;gt;key&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;args&amp;lt;/code&amp;gt; table.&lt;br /&gt;
&lt;br /&gt;
Example 1: this function preserves whitespace for the first positional argument, but trims all other arguments and removes all other blank arguments.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local args = getArgs(frame, {&lt;br /&gt;
	valueFunc = function (key, value)&lt;br /&gt;
		if key == 1 then&lt;br /&gt;
			return value&lt;br /&gt;
		elseif value then&lt;br /&gt;
			value = mw.text.trim(value)&lt;br /&gt;
			if value ~= '' then&lt;br /&gt;
				return value&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
		return nil&lt;br /&gt;
	end&lt;br /&gt;
})&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example 2: this function removes blank arguments and converts all arguments to lower case, but doesn't trim whitespace from positional parameters.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local args = getArgs(frame, {&lt;br /&gt;
	valueFunc = function (key, value)&lt;br /&gt;
		if not value then&lt;br /&gt;
			return nil&lt;br /&gt;
		end&lt;br /&gt;
		value = mw.ustring.lower(value)&lt;br /&gt;
		if mw.ustring.find(value, '%S') then&lt;br /&gt;
			return value&lt;br /&gt;
		end&lt;br /&gt;
		return nil&lt;br /&gt;
	end&lt;br /&gt;
})&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: the above functions will fail if passed input that is not of type &amp;lt;code&amp;gt;string&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;nil&amp;lt;/code&amp;gt;. This might be the case if you use the &amp;lt;code&amp;gt;getArgs&amp;lt;/code&amp;gt; function in the main function of your module, and that function is called by another Lua module. In this case, you will need to check the type of your input. This is not a problem if you are using a function specially for arguments from #invoke (i.e. you have &amp;lt;code&amp;gt;p.main&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;p._main&amp;lt;/code&amp;gt; functions, or something similar).&lt;br /&gt;
&lt;br /&gt;
{{cot|Examples 1 and 2 with type checking}}&lt;br /&gt;
Example 1:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local args = getArgs(frame, {&lt;br /&gt;
	valueFunc = function (key, value)&lt;br /&gt;
		if key == 1 then&lt;br /&gt;
			return value&lt;br /&gt;
		elseif type(value) == 'string' then&lt;br /&gt;
			value = mw.text.trim(value)&lt;br /&gt;
			if value ~= '' then&lt;br /&gt;
				return value&lt;br /&gt;
			else&lt;br /&gt;
				return nil&lt;br /&gt;
			end&lt;br /&gt;
		else&lt;br /&gt;
			return value&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
})&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example 2:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local args = getArgs(frame, {&lt;br /&gt;
	valueFunc = function (key, value)&lt;br /&gt;
		if type(value) == 'string' then&lt;br /&gt;
			value = mw.ustring.lower(value)&lt;br /&gt;
			if mw.ustring.find(value, '%S') then&lt;br /&gt;
				return value&lt;br /&gt;
			else&lt;br /&gt;
				return nil&lt;br /&gt;
			end&lt;br /&gt;
		else&lt;br /&gt;
			return value&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
})&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
{{cob}}&lt;br /&gt;
&lt;br /&gt;
Also, please note that the &amp;lt;code&amp;gt;valueFunc&amp;lt;/code&amp;gt; function is called more or less every time an argument is requested from the &amp;lt;code&amp;gt;args&amp;lt;/code&amp;gt; table, so if you care about performance you should make sure you aren't doing anything inefficient with your code.&lt;br /&gt;
&lt;br /&gt;
=== Frames and parent frames ===&lt;br /&gt;
&lt;br /&gt;
Arguments in the &amp;lt;code&amp;gt;args&amp;lt;/code&amp;gt; table can be passed from the current frame or from its parent frame at the same time. To understand what this means, it is easiest to give an example. Let's say that we have a module called &amp;lt;code&amp;gt;Module:ExampleArgs&amp;lt;/code&amp;gt;. This module prints the first two positional arguments that it is passed.&lt;br /&gt;
&lt;br /&gt;
{{cot|Module:ExampleArgs code}}&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local getArgs = require('Module:Arguments').getArgs&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
function p.main(frame)&lt;br /&gt;
	local args = getArgs(frame)&lt;br /&gt;
	return p._main(args)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p._main(args)&lt;br /&gt;
	local first = args[1] or ''&lt;br /&gt;
	local second = args[2] or ''&lt;br /&gt;
	return first .. ' ' .. second&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
{{cob}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;Module:ExampleArgs&amp;lt;/code&amp;gt; is then called by &amp;lt;code&amp;gt;Template:ExampleArgs&amp;lt;/code&amp;gt;, which contains the code &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{#invoke:ExampleArgs|main|firstInvokeArg}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;. This produces the result &amp;quot;firstInvokeArg&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Now if we were to call &amp;lt;code&amp;gt;Template:ExampleArgs&amp;lt;/code&amp;gt;, the following would happen:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 50em; max-width: 100%;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width: 60%;&amp;quot; | Code&lt;br /&gt;
! style=&amp;quot;width: 40%;&amp;quot; | Result&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{ExampleArgs}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
| firstInvokeArg&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{ExampleArgs|firstTemplateArg}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
| firstInvokeArg&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{ExampleArgs|firstTemplateArg|secondTemplateArg}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
| firstInvokeArg secondTemplateArg&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
There are three options you can set to change this behaviour: &amp;lt;code&amp;gt;frameOnly&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;parentOnly&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;parentFirst&amp;lt;/code&amp;gt;. If you set &amp;lt;code&amp;gt;frameOnly&amp;lt;/code&amp;gt; then only arguments passed from the current frame will be accepted; if you set &amp;lt;code&amp;gt;parentOnly&amp;lt;/code&amp;gt; then only arguments passed from the parent frame will be accepted; and if you set &amp;lt;code&amp;gt;parentFirst&amp;lt;/code&amp;gt; then arguments will be passed from both the current and parent frames, but the parent frame will have priority over the current frame. Here are the results in terms of &amp;lt;code&amp;gt;Template:ExampleArgs&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
; frameOnly&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 50em; max-width: 100%;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width: 60%;&amp;quot; | Code&lt;br /&gt;
! style=&amp;quot;width: 40%;&amp;quot; | Result&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{ExampleArgs}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
| firstInvokeArg&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{ExampleArgs|firstTemplateArg}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
| firstInvokeArg&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{ExampleArgs|firstTemplateArg|secondTemplateArg}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
| firstInvokeArg&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
; parentOnly&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 50em; max-width: 100%;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width: 60%;&amp;quot; | Code&lt;br /&gt;
! style=&amp;quot;width: 40%;&amp;quot; | Result&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{ExampleArgs}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{ExampleArgs|firstTemplateArg}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
| firstTemplateArg&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{ExampleArgs|firstTemplateArg|secondTemplateArg}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
| firstTemplateArg secondTemplateArg&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
; parentFirst&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 50em; max-width: 100%;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width: 60%;&amp;quot; | Code&lt;br /&gt;
! style=&amp;quot;width: 40%;&amp;quot; | Result&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{ExampleArgs}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
| firstInvokeArg&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{ExampleArgs|firstTemplateArg}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
| firstTemplateArg&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{ExampleArgs|firstTemplateArg|secondTemplateArg}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
| firstTemplateArg secondTemplateArg&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# If you set both the &amp;lt;code&amp;gt;frameOnly&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;parentOnly&amp;lt;/code&amp;gt; options, the module won't fetch any arguments at all from #invoke. This is probably not what you want.&lt;br /&gt;
# In some situations a parent frame may not be available, e.g. if getArgs is passed the parent frame rather than the current frame. In this case, only the frame arguments will be used (unless parentOnly is set, in which case no arguments will be used) and the &amp;lt;code&amp;gt;parentFirst&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;frameOnly&amp;lt;/code&amp;gt; options will have no effect.&lt;br /&gt;
&lt;br /&gt;
=== Wrappers ===&lt;br /&gt;
&lt;br /&gt;
The ''wrappers'' option is used to specify a limited number of templates as ''wrapper templates'', that is, templates whose only purpose is to call a module. If the module detects that it is being called from a wrapper template, it will only check for arguments in the parent frame; otherwise it will only check for arguments in the frame passed to getArgs. This allows modules to be called by either #invoke or through a wrapper template without the loss of performance associated with having to check both the frame and the parent frame for each argument lookup.&lt;br /&gt;
&lt;br /&gt;
For example, the only content of [[Template:Side box]] (excluding content in {{tag|noinclude}} tags) is &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{#invoke:Side box|main}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;. There is no point in checking the arguments passed directly to the #invoke statement for this template, as no arguments will ever be specified there. We can avoid checking arguments passed to #invoke by using the ''parentOnly'' option, but if we do this then #invoke will not work from other pages either. If this were the case, the {{para|text|Some text}} in the code &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{#invoke:Side box|main|text=Some text}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; would be ignored completely, no matter what page it was used from. By using the &amp;lt;code&amp;gt;wrappers&amp;lt;/code&amp;gt; option to specify 'Template:Side box' as a wrapper, we can make &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{#invoke:Side box|main|text=Some text}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; work from most pages, while still not requiring that the module check for arguments on the [[Template:Side box]] page itself.&lt;br /&gt;
&lt;br /&gt;
Wrappers can be specified either as a string, or as an array of strings.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local args = getArgs(frame, {&lt;br /&gt;
	wrappers = 'Template:Wrapper template'&lt;br /&gt;
})&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local args = getArgs(frame, {&lt;br /&gt;
	wrappers = {&lt;br /&gt;
		'Template:Wrapper 1',&lt;br /&gt;
		'Template:Wrapper 2',&lt;br /&gt;
		-- Any number of wrapper templates can be added here.&lt;br /&gt;
	}&lt;br /&gt;
})&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# The module will automatically detect if it is being called from a wrapper template's /sandbox subpage, so there is no need to specify sandbox pages explicitly.&lt;br /&gt;
# The ''wrappers'' option effectively changes the default of the ''frameOnly'' and ''parentOnly'' options. If, for example, ''parentOnly'' were explicitly set to false with ''wrappers'' set, calls via wrapper templates would result in both frame and parent arguments being loaded, though calls not via wrapper templates would result in only frame arguments being loaded.&lt;br /&gt;
# If the ''wrappers'' option is set and no parent frame is available, the module will always get the arguments from the frame passed to &amp;lt;code&amp;gt;getArgs&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Writing to the args table ===&lt;br /&gt;
&lt;br /&gt;
Sometimes it can be useful to write new values to the args table. This is possible with the default settings of this module. (However, bear in mind that it is usually better coding style to create a new table with your new values and copy arguments from the args table as needed.)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
args.foo = 'some value'&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is possible to alter this behaviour with the &amp;lt;code&amp;gt;readOnly&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;noOverwrite&amp;lt;/code&amp;gt; options. If &amp;lt;code&amp;gt;readOnly&amp;lt;/code&amp;gt; is set then it is not possible to write any values to the args table at all. If &amp;lt;code&amp;gt;noOverwrite&amp;lt;/code&amp;gt; is set, then it is possible to add new values to the table, but it is not possible to add a value if it would overwrite any arguments that are passed from #invoke.&lt;br /&gt;
&lt;br /&gt;
=== Ref tags ===&lt;br /&gt;
&lt;br /&gt;
This module uses [[mw:Extension:Scribunto/Lua reference manual#Metatables|metatables]] to fetch arguments from #invoke. This allows access to both the frame arguments and the parent frame arguments without using the &amp;lt;code&amp;gt;pairs()&amp;lt;/code&amp;gt; function. This can help if your module might be passed {{tag|ref}} tags as input.&lt;br /&gt;
&lt;br /&gt;
As soon as {{tag|ref}} tags are accessed from Lua, they are processed by the MediaWiki software and the reference will appear in the reference list at the bottom of the article. If your module proceeds to omit the reference tag from the output, you will end up with a phantom reference - a reference that appears in the reference list, but no number that links to it. This has been a problem with modules that use &amp;lt;code&amp;gt;pairs()&amp;lt;/code&amp;gt; to detect whether to use the arguments from the frame or the parent frame, as those modules automatically process every available argument.&lt;br /&gt;
&lt;br /&gt;
This module solves this problem by allowing access to both frame and parent frame arguments, while still only fetching those arguments when it is necessary. The problem will still occur if you use &amp;lt;code&amp;gt;pairs(args)&amp;lt;/code&amp;gt; elsewhere in your module, however.&lt;br /&gt;
&lt;br /&gt;
=== Known limitations ===&lt;br /&gt;
&lt;br /&gt;
The use of metatables also has its downsides. Most of the normal Lua table tools won't work properly on the args table, including the &amp;lt;code&amp;gt;#&amp;lt;/code&amp;gt; operator, the &amp;lt;code&amp;gt;next()&amp;lt;/code&amp;gt; function, and the functions in the table library. If using these is important for your module, you should use your own argument processing function instead of this module.&amp;lt;includeonly&amp;gt;{{#ifeq:{{SUBPAGENAME}}|sandbox||&lt;br /&gt;
[[Category:Lua metamodules]]&lt;br /&gt;
}}&amp;lt;/includeonly&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kolk</name></author>	</entry>

	<entry>
		<id>http://wiki.isofts.kiev.ua/index.php?title=%D0%A8%D0%B0%D0%B1%D0%BB%D0%BE%D0%BD:Main_other&amp;diff=697</id>
		<title>Шаблон:Main other</title>
		<link rel="alternate" type="text/html" href="http://wiki.isofts.kiev.ua/index.php?title=%D0%A8%D0%B0%D0%B1%D0%BB%D0%BE%D0%BD:Main_other&amp;diff=697"/>
				<updated>2016-11-24T15:23:42Z</updated>
		
		<summary type="html">&lt;p&gt;Kolk: Імпортовано 1 версія&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{#switch:&lt;br /&gt;
  &amp;lt;!--If no or empty &amp;quot;demospace&amp;quot; parameter then detect namespace--&amp;gt;&lt;br /&gt;
  {{#if:{{{demospace|}}} &lt;br /&gt;
  | {{lc: {{{demospace}}} }}    &amp;lt;!--Use lower case &amp;quot;demospace&amp;quot;--&amp;gt;&lt;br /&gt;
  | {{#ifeq:{{NAMESPACE}}|{{ns:0}}&lt;br /&gt;
    | main&lt;br /&gt;
    | other&lt;br /&gt;
    }} &lt;br /&gt;
  }}&lt;br /&gt;
| main     = {{{1|}}}&lt;br /&gt;
| other&lt;br /&gt;
| #default = {{{2|}}}&lt;br /&gt;
}}&amp;lt;noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{documentation}}&lt;br /&gt;
&amp;lt;!-- Add categories and interwikis to the /doc subpage, not here! --&amp;gt;&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kolk</name></author>	</entry>

	<entry>
		<id>http://wiki.isofts.kiev.ua/index.php?title=%D0%A8%D0%B0%D0%B1%D0%BB%D0%BE%D0%BD:Cot&amp;diff=695</id>
		<title>Шаблон:Cot</title>
		<link rel="alternate" type="text/html" href="http://wiki.isofts.kiev.ua/index.php?title=%D0%A8%D0%B0%D0%B1%D0%BB%D0%BE%D0%BD:Cot&amp;diff=695"/>
				<updated>2016-11-24T15:23:39Z</updated>
		
		<summary type="html">&lt;p&gt;Kolk: Імпортовано 1 версія&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Template:Collapse top]]&lt;br /&gt;
&amp;lt;noinclude&amp;gt;{{pp-template|small=yes}}&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kolk</name></author>	</entry>

	<entry>
		<id>http://wiki.isofts.kiev.ua/index.php?title=%D0%A8%D0%B0%D0%B1%D0%BB%D0%BE%D0%BD:Collapse_top&amp;diff=693</id>
		<title>Шаблон:Collapse top</title>
		<link rel="alternate" type="text/html" href="http://wiki.isofts.kiev.ua/index.php?title=%D0%A8%D0%B0%D0%B1%D0%BB%D0%BE%D0%BD:Collapse_top&amp;diff=693"/>
				<updated>2016-11-24T15:23:38Z</updated>
		
		<summary type="html">&lt;p&gt;Kolk: Імпортовано 1 версія&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;margin-left:{{{indent|0px}}}&amp;quot;&amp;gt;&amp;lt;!-- NOTE: width renders incorrectly if added to main STYLE section --&amp;gt;&lt;br /&gt;
{| &amp;lt;!-- Template:Collapse top --&amp;gt; class=&amp;quot;mw-collapsible {{{{{|safesubst:}}}#if:{{{expand|}}}||mw-collapsed}}&amp;quot; style=&amp;quot;background: {{{bg1|transparent}}}; text-align: left; border: {{{border|1px}}} solid {{{b-color|silver}}}; margin: 0.2em auto auto; width:{{{{{|safesubst:}}}#if:{{{width|}}}|{{{width}}}|100%}}; clear: {{{clear|both}}}; padding: 1px;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;background: {{{bg|#{{main other|F0F2F5|CCFFCC}}}}}; font-size:87%; padding:0.2em 0.3em; text-align:{{{{{|safesubst:}}}#if:{{{left|}}}|left|center}}; {{{{{|safesubst:}}}#if:{{{fc|}}}|color: {{{fc}}};|}}&amp;quot; | &amp;lt;span style=&amp;quot;font-size:115%&amp;quot;&amp;gt;{{{1|{{{title|{{{reason|{{{header|{{{heading|Extended content}}} }}} }}} }}} }}}&amp;lt;/span&amp;gt;   &lt;br /&gt;
{{{{{|safesubst:}}}#if:{{{warning|{{{2|}}}}}}&lt;br /&gt;
|{{{{{|safesubst:}}}!}}-&lt;br /&gt;
{{{{{|safesubst:}}}!}} style=&amp;quot;text-align:center; font-style:italic;&amp;quot; {{{{{|safesubst:}}}!}} {{{2|The following is a closed debate. {{strongbad|Please do not modify it.}} }}} }}&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border: solid {{{border2|1px silver}}}; padding: {{{padding|8px}}}; background: {{{bg2|white}}};&amp;quot; {{{{{|safesubst:}}}!}}&amp;lt;noinclude&amp;gt;&lt;br /&gt;
{{lorem ipsum|3}}&lt;br /&gt;
{{Collapse bottom}}&lt;br /&gt;
{{Documentation}}&lt;br /&gt;
{{Collapse top/TemplateData}}&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kolk</name></author>	</entry>

	<entry>
		<id>http://wiki.isofts.kiev.ua/index.php?title=%D0%A8%D0%B0%D0%B1%D0%BB%D0%BE%D0%BD:Collapse_bottom&amp;diff=691</id>
		<title>Шаблон:Collapse bottom</title>
		<link rel="alternate" type="text/html" href="http://wiki.isofts.kiev.ua/index.php?title=%D0%A8%D0%B0%D0%B1%D0%BB%D0%BE%D0%BD:Collapse_bottom&amp;diff=691"/>
				<updated>2016-11-24T15:23:36Z</updated>
		
		<summary type="html">&lt;p&gt;Kolk: Імпортовано 1 версія&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;|}&amp;lt;/div&amp;gt;&amp;lt;noinclude&amp;gt;&lt;br /&gt;
{{Documentation|Template:Collapse top/doc}}&lt;br /&gt;
&amp;lt;!-- PLEASE ADD THIS TEMPLATE'S CATEGORIES AND INTERWIKIS TO THE /doc SUBPAGE, THANKS --&amp;gt;&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kolk</name></author>	</entry>

	<entry>
		<id>http://wiki.isofts.kiev.ua/index.php?title=%D0%A8%D0%B0%D0%B1%D0%BB%D0%BE%D0%BD:Cob&amp;diff=689</id>
		<title>Шаблон:Cob</title>
		<link rel="alternate" type="text/html" href="http://wiki.isofts.kiev.ua/index.php?title=%D0%A8%D0%B0%D0%B1%D0%BB%D0%BE%D0%BD:Cob&amp;diff=689"/>
				<updated>2016-11-24T15:23:34Z</updated>
		
		<summary type="html">&lt;p&gt;Kolk: Імпортовано 1 версія&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Template:Collapse bottom]]&lt;/div&gt;</summary>
		<author><name>Kolk</name></author>	</entry>

	<entry>
		<id>http://wiki.isofts.kiev.ua/index.php?title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:Navbox/doc&amp;diff=687</id>
		<title>Модуль:Navbox/doc</title>
		<link rel="alternate" type="text/html" href="http://wiki.isofts.kiev.ua/index.php?title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:Navbox/doc&amp;diff=687"/>
				<updated>2016-11-24T15:23:33Z</updated>
		
		<summary type="html">&lt;p&gt;Kolk: Імпортовано 1 версія&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{High-risk|2730000+}}&lt;br /&gt;
{{module rating|protected}}&lt;br /&gt;
&lt;br /&gt;
This module implements the {{tl|Navbox}} template. Please see the template page for usage instructions.&lt;br /&gt;
&lt;br /&gt;
== Tracking/maintenance categories ==&lt;br /&gt;
* [[:Category:Navigational boxes without horizontal lists]]&lt;br /&gt;
* [[:Category:Navboxes using background colours]]&lt;br /&gt;
* [[:Category:Potentially illegible navboxes]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;includeonly&amp;gt;{{#ifeq:{{SUBPAGENAME}}|sandbox||&lt;br /&gt;
[[Category:Modules that add a tracking category]]&lt;br /&gt;
}}&amp;lt;/includeonly&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kolk</name></author>	</entry>

	<entry>
		<id>http://wiki.isofts.kiev.ua/index.php?title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:Message_box/doc&amp;diff=685</id>
		<title>Модуль:Message box/doc</title>
		<link rel="alternate" type="text/html" href="http://wiki.isofts.kiev.ua/index.php?title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:Message_box/doc&amp;diff=685"/>
				<updated>2016-11-24T15:23:30Z</updated>
		
		<summary type="html">&lt;p&gt;Kolk: Імпортовано 1 версія&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{High-risk| 5388000+,  which is ~{{#expr:(538860800/{{NUMBEROFPAGES:R}}) round 0}}% of all}}&lt;br /&gt;
{{module rating|p}}&lt;br /&gt;
&lt;br /&gt;
This is a meta-module that implements the message box templates {{tl|mbox}}, {{tl|ambox}}, {{tl|cmbox}}, {{tl|fmbox}}, {{tl|imbox}}, {{tl|ombox}}, and {{tl|tmbox}}. It is intended to be used from Lua modules, and should not be used directly from wiki pages. If you want to use this module's functionality from a wiki page, please use the individual message box templates instead.&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
To use this module from another Lua module, first you need to load it.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local messageBox = require('Module:Message box')&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To create a message box, use the &amp;lt;code&amp;gt;main&amp;lt;/code&amp;gt; function. It takes two parameters: the first is the box type (as a string), and the second is a table containing the message box parameters.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local box = messageBox.main( boxType, {&lt;br /&gt;
    param1 = param1,&lt;br /&gt;
    param2 = param2,&lt;br /&gt;
    -- More parameters...&lt;br /&gt;
})&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There are seven available box types:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Box type !! Template !! Purpose&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;mbox&amp;lt;/code&amp;gt; || {{tl|mbox}} || For message boxes to be used in multiple namespaces&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;ambox&amp;lt;/code&amp;gt; || {{tl|ambox}} || For article message boxes&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;cmbox&amp;lt;/code&amp;gt; || {{tl|cmbox}} || For category message boxes&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;fmbox&amp;lt;/code&amp;gt; || {{tl|fmbox}} || For interface message boxes&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;imbox&amp;lt;/code&amp;gt; || {{tl|imbox}} || For file namespace message boxes&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;tmbox&amp;lt;/code&amp;gt; || {{tl|tmbox}} || For talk page message boxes&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;ombox&amp;lt;/code&amp;gt; || {{tl|ombox}} || For message boxes in other namespaces&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
See the template page of each box type for the available parameters.&lt;br /&gt;
&lt;br /&gt;
== Usage from #invoke ==&lt;br /&gt;
&lt;br /&gt;
As well as the &amp;lt;code&amp;gt;main&amp;lt;/code&amp;gt; function, this module has separate functions for each box type. They are accessed using the code &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{#invoke:Message box|mbox|...}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{#invoke:Message box|ambox|...}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;, etc. These will work when called from other modules, but they access code used to process arguments passed from #invoke, and so calling them will be less efficient than calling &amp;lt;code&amp;gt;main&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Technical details ==&lt;br /&gt;
&lt;br /&gt;
The module uses the same basic code for each of the templates listed above; the differences between each of them are configured using the data at [[Module:Message box/configuration]]. Here are the various configuration options and what they mean:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;types&amp;lt;/code&amp;gt; - a table containing data used by the type parameter of the message box. The table keys are the values that can be passed to the type parameter, and the table values are tables containing the class and the image used by that type.&lt;br /&gt;
* &amp;lt;code&amp;gt;default&amp;lt;/code&amp;gt; - the type to use if no value was passed to the type parameter, or if an invalid value was specified.&lt;br /&gt;
* &amp;lt;code&amp;gt;showInvalidTypeError&amp;lt;/code&amp;gt; - whether to show an error if the value passed to the type parameter was invalid.&lt;br /&gt;
* &amp;lt;code&amp;gt;allowBlankParams&amp;lt;/code&amp;gt; - usually blank values are stripped from parameters passed to the module. However, whitespace is preserved for the parameters included in the allowBlankParams table.&lt;br /&gt;
* &amp;lt;code&amp;gt;allowSmall&amp;lt;/code&amp;gt; - whether a small version of the message box can be produced with &amp;quot;small=yes&amp;quot;.&lt;br /&gt;
* &amp;lt;code&amp;gt;smallParam&amp;lt;/code&amp;gt; - a custom name for the small parameter. For example, if set to &amp;quot;left&amp;quot; you can produce a small message box using &amp;quot;small=left&amp;quot;.&lt;br /&gt;
* &amp;lt;code&amp;gt;smallClass&amp;lt;/code&amp;gt; - the class to use for small message boxes.&lt;br /&gt;
* &amp;lt;code&amp;gt;substCheck&amp;lt;/code&amp;gt; - whether to perform a subst check or not.&lt;br /&gt;
* &amp;lt;code&amp;gt;classes&amp;lt;/code&amp;gt; - an array of classes to use with the message box.&lt;br /&gt;
* &amp;lt;code&amp;gt;imageEmptyCell&amp;lt;/code&amp;gt; - whether to use an empty {{tag|td}} cell if there is no image set. This is used to preserve spacing for message boxes with a width of less than 100% of the screen.&lt;br /&gt;
* &amp;lt;code&amp;gt;imageEmptyCellStyle&amp;lt;/code&amp;gt; - whether empty image cells should be styled.&lt;br /&gt;
* &amp;lt;code&amp;gt;imageCheckBlank&amp;lt;/code&amp;gt; - whether &amp;quot;image=blank&amp;quot; results in no image being displayed.&lt;br /&gt;
* &amp;lt;code&amp;gt;imageSmallSize&amp;lt;/code&amp;gt; - usually, images used in small message boxes are set to 30x30px. This sets a custom size.&lt;br /&gt;
* &amp;lt;code&amp;gt;imageCellDiv&amp;lt;/code&amp;gt; - whether to enclose the image in a div enforcing a maximum image size.&lt;br /&gt;
* &amp;lt;code&amp;gt;useCollapsibleTextFields&amp;lt;/code&amp;gt; - whether to use text fields that can be collapsed, i.e. &amp;quot;issue&amp;quot;, &amp;quot;fix&amp;quot;, &amp;quot;talk&amp;quot;, etc. Currently only used in ambox.&lt;br /&gt;
* &amp;lt;code&amp;gt;imageRightNone&amp;lt;/code&amp;gt; - whether imageright=none results in no image being displayed on the right-hand side of the message box.&lt;br /&gt;
* &amp;lt;code&amp;gt;sectionDefault&amp;lt;/code&amp;gt; - the default name for the &amp;quot;section&amp;quot; parameter. Depends on &amp;lt;code&amp;gt;useCollapsibleTextFields&amp;lt;/code&amp;gt;.&lt;br /&gt;
* &amp;lt;code&amp;gt;allowMainspaceCategories&amp;lt;/code&amp;gt; - allow categorisation in the main namespace.&lt;br /&gt;
* &amp;lt;code&amp;gt;templateCategory&amp;lt;/code&amp;gt; - the name of a category to be placed on the template page.&lt;br /&gt;
* &amp;lt;code&amp;gt;templateCategoryRequireName&amp;lt;/code&amp;gt; - whether the &amp;lt;code&amp;gt;name&amp;lt;/code&amp;gt; parameter is required to display the template category.&lt;br /&gt;
* &amp;lt;code&amp;gt;templateErrorCategory&amp;lt;/code&amp;gt; - the name of the error category to be used on the template page.&lt;br /&gt;
* &amp;lt;code&amp;gt;templateErrorParamsToCheck&amp;lt;/code&amp;gt; - an array of parameter names to check. If any are absent, the &amp;lt;code&amp;gt;templateErrorCategory&amp;lt;/code&amp;gt; is applied to the template page.&lt;/div&gt;</summary>
		<author><name>Kolk</name></author>	</entry>

	<entry>
		<id>http://wiki.isofts.kiev.ua/index.php?title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:Sidebar/doc&amp;diff=683</id>
		<title>Модуль:Sidebar/doc</title>
		<link rel="alternate" type="text/html" href="http://wiki.isofts.kiev.ua/index.php?title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:Sidebar/doc&amp;diff=683"/>
				<updated>2016-11-24T15:23:27Z</updated>
		
		<summary type="html">&lt;p&gt;Kolk: Імпортовано 1 версія&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{High-risk|155000+}}&lt;br /&gt;
{{module rating|protected}}&lt;br /&gt;
&lt;br /&gt;
This module implements the templates {{tl|sidebar}} and {{tl|sidebar with collapsible lists}}. See the individual template pages for documentation.&lt;/div&gt;</summary>
		<author><name>Kolk</name></author>	</entry>

	<entry>
		<id>http://wiki.isofts.kiev.ua/index.php?title=%D0%A8%D0%B0%D0%B1%D0%BB%D0%BE%D0%BD:Module_rating&amp;diff=681</id>
		<title>Шаблон:Module rating</title>
		<link rel="alternate" type="text/html" href="http://wiki.isofts.kiev.ua/index.php?title=%D0%A8%D0%B0%D0%B1%D0%BB%D0%BE%D0%BD:Module_rating&amp;diff=681"/>
				<updated>2016-11-24T15:23:25Z</updated>
		
		<summary type="html">&lt;p&gt;Kolk: Імпортовано 1 версія&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Module other|{{ombox&lt;br /&gt;
 | type      = notice&lt;br /&gt;
 | image     = {{#switch: {{{1|}}}&lt;br /&gt;
   | pre-alpha | prealpha | pa = [[File:Ambox warning blue construction.svg|40x40px|link=]]&lt;br /&gt;
   | alpha | a                 = [[File:Alpha lowercase.svg|26x26px|link=]]&lt;br /&gt;
   | beta | b                  = [[File:Greek lc beta.svg|40x40px|link=]]&lt;br /&gt;
   | release | r | general | g = [[File:Green check.svg|40x40px|link=]]&lt;br /&gt;
   | protected | protect | p   = [[File:Padlock{{#switch:{{#invoke:Effective protection level|edit|{{#switch:{{SUBPAGENAME}}|doc|sandbox={{FULLBASEPAGENAME}}|{{FULLPAGENAME}}}}}}|autoconfirmed=-silver|accountcreator|templateeditor=-pink|}}.svg|40x40px|link=]]&lt;br /&gt;
  }}&lt;br /&gt;
 | style     = &lt;br /&gt;
 | textstyle = &lt;br /&gt;
 | text      = {{#switch: {{{1|}}}&lt;br /&gt;
   | pre-alpha | prealpha | pa = This module is rated as [[:Category:Modules in pre-alpha development|pre-alpha]]. It is unfinished, and may or may not be in active development. It should not be used from article namespace pages. Modules remain pre-alpha until the original editor (or someone who takes one over if it is abandoned for some time) is satisfied with the basic structure.&amp;lt;!--&lt;br /&gt;
   --&amp;gt;{{#switch: {{SUBPAGENAME}}|doc|sandbox=&amp;lt;!-- No category for /doc or /sandbox subpages --&amp;gt;&lt;br /&gt;
       | {{#ifeq: {{{nocat|}}} | true | &amp;lt;!-- No category if user sets nocat=true --&amp;gt; | [[Category:Modules in pre-alpha development|{{PAGENAME}}]] }}&lt;br /&gt;
      }}&lt;br /&gt;
   | alpha | a                 = This module is rated as [[:Category:Modules in alpha|alpha]]. It is ready for third party input, and may be used on a few pages to see if problems arise, but should be watched. Suggestions for new features or changes in their input and output mechanisms are welcome.&amp;lt;!--&lt;br /&gt;
   --&amp;gt;{{#switch: {{SUBPAGENAME}}|doc|sandbox=&amp;lt;!-- No category for /doc or /sandbox subpages --&amp;gt;&lt;br /&gt;
       | {{#ifeq: {{{nocat|}}} | true | &amp;lt;!-- No category if user sets nocat=true --&amp;gt; | [[Category:Modules in alpha|{{PAGENAME}}]] }}&lt;br /&gt;
      }}&lt;br /&gt;
   | beta | b                  = This module is rated as [[:Category:Modules in beta|beta]], and is ready for widespread use. It is still new and should be used with some caution to ensure the results are as expected.&amp;lt;!--&lt;br /&gt;
   --&amp;gt;{{#switch: {{SUBPAGENAME}}|doc|sandbox=&amp;lt;!-- No category for /doc or /sandbox subpages --&amp;gt;&lt;br /&gt;
       | {{#ifeq: {{{nocat|}}} | true | &amp;lt;!-- No category if user sets nocat=true --&amp;gt; | [[Category:Modules in beta|{{PAGENAME}}]] }}&lt;br /&gt;
      }}&lt;br /&gt;
   | release | r | general | g = This module is rated as [[:Category:Modules for general use|ready for general use]]. It has reached a mature form and is thought to be bug-free and ready for use wherever appropriate. It is ready to mention on help pages and other Wikipedia resources as an option for new users to learn. To reduce server load and bad output, it should be improved by [[WP:TESTCASES|sandbox testing]] rather than repeated trial-and-error editing.&amp;lt;!--&lt;br /&gt;
   --&amp;gt;{{#switch: {{SUBPAGENAME}}|doc|sandbox=&amp;lt;!-- No category for /doc or /sandbox subpages --&amp;gt;&lt;br /&gt;
       | {{#ifeq: {{{nocat|}}} | true | &amp;lt;!-- No category if user sets nocat=true --&amp;gt; | [[Category:Modules for general use|{{PAGENAME}}]] }}&lt;br /&gt;
      }}&lt;br /&gt;
   | protected | protect | p   = This module is [[:Category:Modules subject to page protection|subject to page protection]]. It is a [[Wikipedia:High-risk templates|highly visible module]] in use by a very large number of pages, or is [[WP:SUBST|substituted]] very frequently. Because vandalism or mistakes would affect many pages, and even trivial editing might cause substantial load on the servers, it is [[WP:PROTECT|protected]] from editing.&amp;lt;!--&lt;br /&gt;
   --&amp;gt;{{#switch: {{SUBPAGENAME}}|doc|sandbox=&amp;lt;!-- No category for /doc or /sandbox subpages --&amp;gt;&lt;br /&gt;
       | {{#ifeq: {{{nocat|}}} | true | &amp;lt;!-- No category if user sets nocat=true --&amp;gt; | [[Category:Modules subject to page protection|{{PAGENAME}}]] }}&lt;br /&gt;
      }}&lt;br /&gt;
   | #default                  = {{error|Module rating is invalid or not specified.}}&lt;br /&gt;
  }}&lt;br /&gt;
}}|{{error|Error: {{tl|Module rating}} must be placed in the Module namespace.}}|demospace={{{demospace|&amp;lt;noinclude&amp;gt;module&amp;lt;/noinclude&amp;gt;}}}}}&amp;lt;noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{documentation}}&lt;br /&gt;
&amp;lt;!-- Categories go on the /doc subpage, and interwikis go in Wikidata. --&amp;gt;&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kolk</name></author>	</entry>

	<entry>
		<id>http://wiki.isofts.kiev.ua/index.php?title=%D0%A8%D0%B0%D0%B1%D0%BB%D0%BE%D0%BD:Module_other&amp;diff=679</id>
		<title>Шаблон:Module other</title>
		<link rel="alternate" type="text/html" href="http://wiki.isofts.kiev.ua/index.php?title=%D0%A8%D0%B0%D0%B1%D0%BB%D0%BE%D0%BD:Module_other&amp;diff=679"/>
				<updated>2016-11-24T15:23:22Z</updated>
		
		<summary type="html">&lt;p&gt;Kolk: Імпортовано 1 версія&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{#switch:&lt;br /&gt;
  &amp;lt;!--If no or empty &amp;quot;demospace&amp;quot; parameter then detect namespace--&amp;gt;&lt;br /&gt;
  {{#if:{{{demospace|}}}&lt;br /&gt;
  | {{lc: {{{demospace}}} }}    &amp;lt;!--Use lower case &amp;quot;demospace&amp;quot;--&amp;gt;&lt;br /&gt;
  | {{#ifeq:{{NAMESPACE}}|{{ns:Module}}&lt;br /&gt;
    | module&lt;br /&gt;
    | other&lt;br /&gt;
    }}&lt;br /&gt;
  }}&lt;br /&gt;
| module = {{{1|}}}&lt;br /&gt;
| other&lt;br /&gt;
| #default = {{{2|}}}&lt;br /&gt;
}}&amp;lt;!--End switch--&amp;gt;&amp;lt;noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{documentation}}&lt;br /&gt;
&amp;lt;!-- Add categories to the /doc subpage, not here! --&amp;gt;&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kolk</name></author>	</entry>

	<entry>
		<id>http://wiki.isofts.kiev.ua/index.php?title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:Unsubst/doc&amp;diff=677</id>
		<title>Модуль:Unsubst/doc</title>
		<link rel="alternate" type="text/html" href="http://wiki.isofts.kiev.ua/index.php?title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:Unsubst/doc&amp;diff=677"/>
				<updated>2016-11-24T15:23:20Z</updated>
		
		<summary type="html">&lt;p&gt;Kolk: Імпортовано 1 версія&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- Categories where indicated at the bottom of this page, please. --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{High-risk|2,200,000+}}&lt;br /&gt;
&lt;br /&gt;
Helper module to facilitate a substituted template transform into a template transclusion.&lt;br /&gt;
&lt;br /&gt;
Maintenance templates, such as {{tl|Citation needed}} or {{tl|Refimprove}}, should never be substituted. A trick to avoid that is to make a template substitute to its transcluded form.&lt;br /&gt;
&lt;br /&gt;
=== Usage ===&lt;br /&gt;
&lt;br /&gt;
To turn a template into a self-substituting template, wrap the existing template code with:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{ {{{|safesubst:}}}#invoke:Unsubst||$B=&lt;br /&gt;
&lt;br /&gt;
 [ ... existing template code ... ]&lt;br /&gt;
&lt;br /&gt;
}}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The wikitext to display when not substed must be given as &amp;quot;$B&amp;quot;. A parameter &amp;quot;$N&amp;quot; may also be seen in some templates; this was required in an older version of the module, but is no longer necessary and may be removed. Such templates are automatically placed in [[:Category:Calls to Module:Unsubst that use $N]].&lt;br /&gt;
&lt;br /&gt;
All other parameters passed to the #invoke will be copied to the generated template invocation as default values. If the value of any of these default parameters is &amp;quot;__DATE__&amp;quot;, that value in the generated template invocation will be the current month and year.&lt;br /&gt;
&lt;br /&gt;
Some templates have a &amp;lt;nowiki&amp;gt;&amp;lt;noinclude&amp;gt;&amp;lt;/nowiki&amp;gt; but no matching &amp;lt;nowiki&amp;gt;&amp;lt;/noinclude&amp;gt;&amp;lt;/nowiki&amp;gt; at the end of the template. In such cases the missing &amp;lt;nowiki&amp;gt;&amp;lt;/noinclude&amp;gt;&amp;lt;/nowiki&amp;gt; must be added before the ending &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Example ===&lt;br /&gt;
Consider a template Template:Example containing the following code:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{ {{{|safesubst:}}}#invoke:Unsubst||foo=bar |date=__DATE__ |$B=&lt;br /&gt;
&lt;br /&gt;
 [ ... Template code goes here ... ]&lt;br /&gt;
&lt;br /&gt;
}}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Original !! Result&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;{{subst:example}}&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;{{Example|foo=bar|date=&amp;lt;/nowiki&amp;gt;{{#time:F Y}}}}&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;{{subst:example|foo=X}}&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;{{Example|foo=X|date=&amp;lt;/nowiki&amp;gt;{{#time:F Y}}}}&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;{{subst:example|baz=X}}&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;{{Example|foo=bar|baz=X|date=&amp;lt;/nowiki&amp;gt;{{#time:F Y}}}}&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;{{subst:example|date=January 2001}}&amp;lt;/nowiki&amp;gt; || &amp;lt;nowiki&amp;gt;{{Example|foo=bar|date=January 2001}}&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;includeonly&amp;gt;{{#ifeq:{{SUBPAGENAME}}|sandbox |&lt;br /&gt;
| &amp;lt;!-- Categories below this line, please; interwikis at Wikidata --&amp;gt;&lt;br /&gt;
[[Category:Wikipedia metatemplates]]&lt;br /&gt;
[[Category:Modules that add a tracking category]]&lt;br /&gt;
}}&amp;lt;/includeonly&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kolk</name></author>	</entry>

	<entry>
		<id>http://wiki.isofts.kiev.ua/index.php?title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:Protection_banner/config&amp;diff=675</id>
		<title>Модуль:Protection banner/config</title>
		<link rel="alternate" type="text/html" href="http://wiki.isofts.kiev.ua/index.php?title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:Protection_banner/config&amp;diff=675"/>
				<updated>2016-11-24T15:23:19Z</updated>
		
		<summary type="html">&lt;p&gt;Kolk: Імпортовано 1 версія&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;-- This module provides configuration data for [[Module:Protection banner]].&lt;br /&gt;
&lt;br /&gt;
return {&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
--&lt;br /&gt;
--                                BANNER DATA&lt;br /&gt;
--&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
--[[&lt;br /&gt;
-- Banner data consists of six fields:&lt;br /&gt;
-- * text - the main protection text that appears at the top of protection&lt;br /&gt;
--   banners.&lt;br /&gt;
-- * explanation - the text that appears below the main protection text, used&lt;br /&gt;
--   to explain the details of the protection.&lt;br /&gt;
-- * tooltip - the tooltip text you see when you move the mouse over a small&lt;br /&gt;
--   padlock icon.&lt;br /&gt;
-- * link - the page that the small padlock icon links to.&lt;br /&gt;
-- * alt - the alt text for the small padlock icon. This is also used as tooltip&lt;br /&gt;
--   text for the large protection banners.&lt;br /&gt;
-- * image - the padlock image used in both protection banners and small padlock&lt;br /&gt;
--   icons.&lt;br /&gt;
--&lt;br /&gt;
-- The module checks in three separate tables to find a value for each field.&lt;br /&gt;
-- First it checks the banners table, which has values specific to the reason&lt;br /&gt;
-- for the page being protected. Then the module checks the defaultBanners&lt;br /&gt;
-- table, which has values specific to each protection level. Finally, the&lt;br /&gt;
-- module checks the masterBanner table, which holds data for protection&lt;br /&gt;
-- templates to use if no data has been found in the previous two tables.&lt;br /&gt;
--&lt;br /&gt;
-- The values in the banner data can take parameters. These are specified&lt;br /&gt;
-- using ${TEXTLIKETHIS} (a dollar sign preceding a parameter name&lt;br /&gt;
-- enclosed in curly braces).&lt;br /&gt;
--&lt;br /&gt;
--                          Available parameters:&lt;br /&gt;
--&lt;br /&gt;
-- ${CURRENTVERSION} - a link to the page history or the move log, with the&lt;br /&gt;
-- display message &amp;quot;current-version-edit-display&amp;quot; or&lt;br /&gt;
-- &amp;quot;current-version-move-display&amp;quot;.&lt;br /&gt;
--&lt;br /&gt;
-- ${EDITREQUEST} - a link to create an edit request for the current page.&lt;br /&gt;
--&lt;br /&gt;
-- ${EXPIRY} - the protection expiry date in the format DD Month YYYY. If&lt;br /&gt;
-- protection is indefinite or is not set, this is the blank string.&lt;br /&gt;
--&lt;br /&gt;
-- ${EXPLANATIONBLURB} - an explanation blurb, e.g. &amp;quot;Please discuss any changes&lt;br /&gt;
-- on the talk page; you may submit a request to ask an administrator to make&lt;br /&gt;
-- an edit if it is minor or supported by consensus.&amp;quot;&lt;br /&gt;
--&lt;br /&gt;
-- ${IMAGELINK} - a link to set the image to, depending on the protection&lt;br /&gt;
-- action and protection level.&lt;br /&gt;
--&lt;br /&gt;
-- ${INTROBLURB} - the PROTECTIONBLURB parameter, plus the expiry if an expiry&lt;br /&gt;
-- is set. E.g. &amp;quot;Editing of this page by new or unregistered users is currently &lt;br /&gt;
-- disabled until dd Month YYYY.&amp;quot;&lt;br /&gt;
--&lt;br /&gt;
-- ${INTROFRAGMENT} - the same as ${INTROBLURB}, but without final punctuation&lt;br /&gt;
-- so that it can be used in run-on sentences.&lt;br /&gt;
--&lt;br /&gt;
-- ${PAGETYPE} - the type of the page, e.g. &amp;quot;article&amp;quot; or &amp;quot;template&amp;quot;.&lt;br /&gt;
-- Defined in the cfg.pagetypes table.&lt;br /&gt;
--&lt;br /&gt;
-- ${PROTECTIONBLURB} - a blurb explaining the protection level of the page, e.g.&lt;br /&gt;
-- &amp;quot;Editing of this page by new or unregistered users is currently disabled&amp;quot;&lt;br /&gt;
--&lt;br /&gt;
-- ${PROTECTIONDATE} - the protection date, if it has been supplied to the&lt;br /&gt;
-- template.&lt;br /&gt;
--&lt;br /&gt;
-- ${PROTECTIONLEVEL} - the protection level, e.g. &amp;quot;fully protected&amp;quot; or&lt;br /&gt;
-- &amp;quot;semi-protected&amp;quot;.&lt;br /&gt;
--&lt;br /&gt;
-- ${PROTECTIONLOG} - a link to the protection log or the pending changes log,&lt;br /&gt;
-- depending on the protection action.&lt;br /&gt;
--&lt;br /&gt;
-- ${TALKPAGE} - a link to the talk page. If a section is specified, links&lt;br /&gt;
-- straight to that talk page section.&lt;br /&gt;
--&lt;br /&gt;
-- ${TOOLTIPBLURB} - uses the PAGETYPE, PROTECTIONTYPE and EXPIRY parameters to&lt;br /&gt;
-- create a blurb like &amp;quot;This template is semi-protected&amp;quot;, or &amp;quot;This article is&lt;br /&gt;
-- move-protected until DD Month YYYY&amp;quot;.&lt;br /&gt;
--&lt;br /&gt;
-- ${VANDAL} - links for the specified username (or the root page name)&lt;br /&gt;
-- using Module:Vandal-m.&lt;br /&gt;
--&lt;br /&gt;
--                                 Functions&lt;br /&gt;
--&lt;br /&gt;
-- For advanced users, it is possible to use Lua functions instead of strings&lt;br /&gt;
-- in the banner config tables. Using functions gives flexibility that is not&lt;br /&gt;
-- possible just by using parameters. Functions take two arguments, the&lt;br /&gt;
-- protection object and the template arguments, and they must output a string.&lt;br /&gt;
--&lt;br /&gt;
-- For example:&lt;br /&gt;
--&lt;br /&gt;
-- text = function (protectionObj, args)&lt;br /&gt;
--     if protectionObj.level == 'autoconfirmed' then&lt;br /&gt;
--         return 'foo'&lt;br /&gt;
--     else&lt;br /&gt;
--         return 'bar'&lt;br /&gt;
--     end&lt;br /&gt;
-- end&lt;br /&gt;
--&lt;br /&gt;
-- Some protection object properties and methods that may be useful:&lt;br /&gt;
-- protectionObj.action - the protection action&lt;br /&gt;
-- protectionObj.level - the protection level&lt;br /&gt;
-- protectionObj.reason - the protection reason&lt;br /&gt;
-- protectionObj.expiry - the expiry. Nil if unset, the string &amp;quot;indef&amp;quot; if set&lt;br /&gt;
--     to indefinite, and the protection time in unix time if temporary.&lt;br /&gt;
-- protectionObj.protectionDate - the protection date in unix time, or nil if&lt;br /&gt;
--     unspecified.&lt;br /&gt;
-- protectionObj.bannerConfig - the banner config found by the module. Beware&lt;br /&gt;
--     of editing the config field used by the function, as it could create an&lt;br /&gt;
--     infinite loop.&lt;br /&gt;
-- protectionObj:isProtected - returns a boolean showing whether the page is&lt;br /&gt;
--     protected.&lt;br /&gt;
-- protectionObj:isTemporary - returns a boolean showing whether the expiry is&lt;br /&gt;
--     temporary.&lt;br /&gt;
-- protectionObj:isIncorrect - returns a boolean showing whether the protection&lt;br /&gt;
--     template is incorrect.&lt;br /&gt;
--]]&lt;br /&gt;
&lt;br /&gt;
-- The master banner data, used if no values have been found in banners or&lt;br /&gt;
-- defaultBanners.&lt;br /&gt;
masterBanner = {&lt;br /&gt;
	text = '${INTROBLURB}',&lt;br /&gt;
	explanation = '${EXPLANATIONBLURB}',&lt;br /&gt;
	tooltip = '${TOOLTIPBLURB}',&lt;br /&gt;
	link = '${IMAGELINK}',&lt;br /&gt;
	alt = 'Page ${PROTECTIONLEVEL}'&lt;br /&gt;
},&lt;br /&gt;
&lt;br /&gt;
-- The default banner data. This holds banner data for different protection&lt;br /&gt;
-- levels.&lt;br /&gt;
-- *required* - this table needs edit, move, autoreview and upload subtables.&lt;br /&gt;
defaultBanners = {&lt;br /&gt;
	edit = {},&lt;br /&gt;
	move = {},&lt;br /&gt;
	autoreview = {&lt;br /&gt;
		autoconfirmed = {&lt;br /&gt;
			alt = 'Page protected with pending changes level 1',&lt;br /&gt;
			tooltip = 'All edits by unregistered and new users are subject to review',&lt;br /&gt;
			image = 'Padlock-silver-light.svg'&lt;br /&gt;
		},&lt;br /&gt;
		default = {&lt;br /&gt;
			alt = 'Page protected with pending changes level 2',&lt;br /&gt;
			tooltip = 'All edits by users who are not reviewers or administrators are'&lt;br /&gt;
				.. ' subject to review',&lt;br /&gt;
			image = 'Padlock-orange.svg'&lt;br /&gt;
		}&lt;br /&gt;
	},&lt;br /&gt;
	upload = {}&lt;br /&gt;
},&lt;br /&gt;
&lt;br /&gt;
-- The banner data. This holds banner data for different protection reasons.&lt;br /&gt;
-- In fact, the reasons specified in this table control which reasons are&lt;br /&gt;
-- valid inputs to the first positional parameter.&lt;br /&gt;
--&lt;br /&gt;
-- There is also a non-standard &amp;quot;description&amp;quot; field that can be used for items&lt;br /&gt;
-- in this table. This is a description of the protection reason for use in the&lt;br /&gt;
-- module documentation.&lt;br /&gt;
--&lt;br /&gt;
-- *required* - this table needs edit, move, autoreview and upload subtables.&lt;br /&gt;
banners = {&lt;br /&gt;
	edit = {&lt;br /&gt;
		blp = {&lt;br /&gt;
			description = 'For pages protected to promote compliance with the'&lt;br /&gt;
				.. ' [[Wikipedia:Biographies of living persons'&lt;br /&gt;
				.. '|biographies of living persons]] policy',&lt;br /&gt;
			text = '${INTROFRAGMENT} to promote compliance with'&lt;br /&gt;
				.. ' [[Wikipedia:Biographies of living persons'&lt;br /&gt;
				.. &amp;quot;|Wikipedia's&amp;amp;nbsp;policy on&amp;amp;nbsp;the&amp;amp;nbsp;biographies&amp;quot;&lt;br /&gt;
				.. ' of&amp;amp;nbsp;living&amp;amp;nbsp;people]].',&lt;br /&gt;
			tooltip = '${TOOLTIPFRAGMENT} to promote compliance with the policy on'&lt;br /&gt;
				.. ' biographies of living people',&lt;br /&gt;
		},&lt;br /&gt;
		dmca = {&lt;br /&gt;
			description = 'For pages protected by the Wikimedia Foundation'&lt;br /&gt;
				.. ' due to [[Digital Millennium Copyright Act]] takedown requests',&lt;br /&gt;
			explanation = function (protectionObj, args)&lt;br /&gt;
				local ret = 'Pursuant to a rights owner notice under the Digital'&lt;br /&gt;
					.. ' Millennium Copyright Act (DMCA) regarding some content'&lt;br /&gt;
					.. ' in this article, the Wikimedia Foundation acted under'&lt;br /&gt;
					.. ' applicable law and took down and restricted the content'&lt;br /&gt;
					.. ' in question.'&lt;br /&gt;
				if args.notice then&lt;br /&gt;
					ret = ret .. ' A copy of the received notice can be found here: '&lt;br /&gt;
						.. args.notice .. '.'&lt;br /&gt;
				end&lt;br /&gt;
				ret = ret .. ' For more information, including websites discussing'&lt;br /&gt;
					.. ' how to file a counter-notice, please see'&lt;br /&gt;
					.. &amp;quot; [[Wikipedia:Office actions]] and the article's ${TALKPAGE}.&amp;quot;&lt;br /&gt;
					.. &amp;quot;'''Do not remove this template from the article until the&amp;quot;&lt;br /&gt;
					.. &amp;quot; restrictions are withdrawn'''.&amp;quot;&lt;br /&gt;
				return ret&lt;br /&gt;
			end,&lt;br /&gt;
			image = 'Padlock-black.svg',&lt;br /&gt;
		},&lt;br /&gt;
		dispute = {&lt;br /&gt;
			description = 'For pages protected due to editing disputes',&lt;br /&gt;
			text = function (protectionObj, args)&lt;br /&gt;
				-- Find the value of &amp;quot;disputes&amp;quot;.&lt;br /&gt;
				local display = 'disputes'&lt;br /&gt;
				local disputes&lt;br /&gt;
				if args.section then&lt;br /&gt;
					disputes = string.format(&lt;br /&gt;
						'[[%s:%s#%s|%s]]',&lt;br /&gt;
						mw.site.namespaces[protectionObj.title.namespace].talk.name,&lt;br /&gt;
						protectionObj.title.text,&lt;br /&gt;
						args.section,&lt;br /&gt;
						display&lt;br /&gt;
					)&lt;br /&gt;
				else&lt;br /&gt;
					disputes = display&lt;br /&gt;
				end&lt;br /&gt;
&lt;br /&gt;
				-- Make the blurb, depending on the expiry.&lt;br /&gt;
				local msg&lt;br /&gt;
				if type(protectionObj.expiry) == 'number' then&lt;br /&gt;
					msg = '${INTROFRAGMENT} or until editing %s have been resolved.'&lt;br /&gt;
				else&lt;br /&gt;
					msg = '${INTROFRAGMENT} until editing %s have been resolved.'&lt;br /&gt;
				end&lt;br /&gt;
				return string.format(msg, disputes)&lt;br /&gt;
			end,&lt;br /&gt;
			explanation = &amp;quot;This protection is '''not''' an endorsement of the&amp;quot;&lt;br /&gt;
				.. ' ${CURRENTVERSION}. ${EXPLANATIONBLURB}',&lt;br /&gt;
			tooltip = '${TOOLTIPFRAGMENT} due to editing disputes',&lt;br /&gt;
		},&lt;br /&gt;
		ecp = {&lt;br /&gt;
			description = 'For articles in topic areas authorized by'&lt;br /&gt;
				.. ' [[Wikipedia:Arbitration Committee|ArbCom]] or'&lt;br /&gt;
				.. ' meets the criteria for community use',&lt;br /&gt;
			tooltip = 'This ${PAGETYPE} is ${PROTECTIONLEVEL}'&lt;br /&gt;
				.. ' under extended confirmed editing restrictions',&lt;br /&gt;
			alt = 'Extended-protected ${PAGETYPE}',&lt;br /&gt;
		},&lt;br /&gt;
		mainpage = {&lt;br /&gt;
			description = 'For pages protected for being displayed on the [[Main Page]]',&lt;br /&gt;
			text = 'This file is currently'&lt;br /&gt;
				.. ' [[Wikipedia:This page is protected|protected]] from'&lt;br /&gt;
				.. ' editing because it is currently or will soon be displayed'&lt;br /&gt;
				.. ' on the [[Main Page]].',&lt;br /&gt;
			explanation = 'Images on the Main Page are protected due to their high'&lt;br /&gt;
				.. ' visibility. Please discuss any necessary changes on the ${TALKPAGE}.'&lt;br /&gt;
				.. '&amp;lt;br /&amp;gt;&amp;lt;span style=&amp;quot;font-size:90%;&amp;quot;&amp;gt;'&lt;br /&gt;
				.. &amp;quot;'''Administrators:''' Once this image is definitely off the Main Page,&amp;quot;&lt;br /&gt;
				.. ' please unprotect this file, or reduce to semi-protection,'&lt;br /&gt;
				.. ' as appropriate.&amp;lt;/span&amp;gt;',&lt;br /&gt;
		},&lt;br /&gt;
		office = {&lt;br /&gt;
			description = 'For pages protected by the Wikimedia Foundation',&lt;br /&gt;
			text = function (protectionObj, args)&lt;br /&gt;
				local ret = 'This ${PAGETYPE} is currently under the'&lt;br /&gt;
					.. ' scrutiny of the'&lt;br /&gt;
					.. ' [[Wikipedia:Office actions|Wikimedia Foundation Office]]'&lt;br /&gt;
					.. ' and is protected.'&lt;br /&gt;
				if protectionObj.protectionDate then&lt;br /&gt;
					ret = ret .. ' It has been protected since ${PROTECTIONDATE}.'&lt;br /&gt;
				end&lt;br /&gt;
				return ret&lt;br /&gt;
			end,&lt;br /&gt;
			explanation = &amp;quot;If you can edit this page, please discuss all changes and&amp;quot;&lt;br /&gt;
				.. &amp;quot; additions on the ${TALKPAGE} first. '''Do not remove protection from this&amp;quot;&lt;br /&gt;
				.. &amp;quot; page unless you are authorized by the Wikimedia Foundation to do&amp;quot;&lt;br /&gt;
				.. &amp;quot; so.'''&amp;quot;,&lt;br /&gt;
			image = 'Padlock-black.svg',&lt;br /&gt;
		},&lt;br /&gt;
		reset = {&lt;br /&gt;
			description = 'For pages protected by the Wikimedia Foundation and'&lt;br /&gt;
				.. ' &amp;quot;reset&amp;quot; to a bare-bones version',&lt;br /&gt;
 			text = 'This ${PAGETYPE} is currently under the'&lt;br /&gt;
					.. ' scrutiny of the'&lt;br /&gt;
					.. ' [[Wikipedia:Office actions|Wikimedia Foundation Office]]'&lt;br /&gt;
					.. ' and is protected.',&lt;br /&gt;
			explanation = function (protectionObj, args)&lt;br /&gt;
				local ret = ''&lt;br /&gt;
				if protectionObj.protectionDate then&lt;br /&gt;
					ret = ret .. 'On ${PROTECTIONDATE} this ${PAGETYPE} was'&lt;br /&gt;
				else&lt;br /&gt;
					ret = ret .. 'This ${PAGETYPE} has been'&lt;br /&gt;
				end&lt;br /&gt;
				ret = ret .. ' reduced to a'&lt;br /&gt;
				.. ' simplified, &amp;quot;bare bones&amp;quot; version so that it may be completely'&lt;br /&gt;
				.. ' rewritten to ensure it meets the policies of'&lt;br /&gt;
				.. ' [[WP:NPOV|Neutral Point of View]] and [[WP:V|Verifiability]].'&lt;br /&gt;
				.. ' Standard Wikipedia policies will apply to its rewriting—which'&lt;br /&gt;
				.. ' will eventually be open to all editors—and will be strictly'&lt;br /&gt;
				.. ' enforced. The ${PAGETYPE} has been ${PROTECTIONLEVEL} while'&lt;br /&gt;
				.. ' it is being rebuilt.\n\n'&lt;br /&gt;
				.. 'Any insertion of material directly from'&lt;br /&gt;
				.. ' pre-protection revisions of the ${PAGETYPE} will be removed, as'&lt;br /&gt;
				.. ' will any material added to the ${PAGETYPE} that is not properly'&lt;br /&gt;
				.. ' sourced. The associated talk page(s) were also cleared on the'&lt;br /&gt;
				.. &amp;quot; same date.\n\n&amp;quot;&lt;br /&gt;
				.. &amp;quot;If you can edit this page, please discuss all changes and&amp;quot;&lt;br /&gt;
				.. &amp;quot; additions on the ${TALKPAGE} first. '''Do not override&amp;quot;&lt;br /&gt;
				.. &amp;quot; this action, and do not remove protection from this page,&amp;quot;&lt;br /&gt;
				.. &amp;quot; unless you are authorized by the Wikimedia Foundation&amp;quot;&lt;br /&gt;
				.. &amp;quot; to do so. No editor may remove this notice.'''&amp;quot;&lt;br /&gt;
&lt;br /&gt;
				return ret&lt;br /&gt;
			end,&lt;br /&gt;
			image = 'Padlock-black.svg',&lt;br /&gt;
		},&lt;br /&gt;
		sock = {&lt;br /&gt;
			description = 'For pages protected due to'&lt;br /&gt;
				.. ' [[Wikipedia:Sock puppetry|sock puppetry]]',&lt;br /&gt;
			text = '${INTROFRAGMENT} to prevent [[Wikipedia:Sock puppetry|sock puppets]] of'&lt;br /&gt;
				.. ' [[Wikipedia:Blocking policy|blocked]] or'&lt;br /&gt;
				.. ' [[Wikipedia:Banning policy|banned users]]'&lt;br /&gt;
				.. ' from editing it.',&lt;br /&gt;
			tooltip = '${TOOLTIPFRAGMENT} to prevent sock puppets of blocked or banned users from'&lt;br /&gt;
				.. ' editing it',&lt;br /&gt;
		},&lt;br /&gt;
		template = {&lt;br /&gt;
			description = 'For [[Wikipedia:High-risk templates|high-risk]]'&lt;br /&gt;
				.. ' templates and Lua modules',&lt;br /&gt;
			text = 'This is a permanently [[Help:Protection|protected]] ${PAGETYPE},'&lt;br /&gt;
				.. ' as it is [[Wikipedia:High-risk templates|high-risk]].',&lt;br /&gt;
			explanation = 'Please discuss any changes on the ${TALKPAGE}; you may'&lt;br /&gt;
				.. ' ${EDITREQUEST} to ask an'&lt;br /&gt;
				.. ' [[Wikipedia:Administrators|administrator]] or'&lt;br /&gt;
				.. ' [[Wikipedia:Template editor|template editor]] to make an edit if'&lt;br /&gt;
				.. ' it is [[Help:Minor edit#When to mark an edit as a minor edit'&lt;br /&gt;
				.. '|uncontroversial]] or supported by'&lt;br /&gt;
				.. ' [[Wikipedia:Consensus|consensus]]. You can also'&lt;br /&gt;
				.. ' [[Wikipedia:Requests for page protection|request]] that the page be'&lt;br /&gt;
				.. ' unprotected.',&lt;br /&gt;
			tooltip = 'This high-risk ${PAGETYPE} is permanently ${PROTECTIONLEVEL}'&lt;br /&gt;
				.. ' to prevent vandalism',&lt;br /&gt;
			alt = 'Permanently protected ${PAGETYPE}',&lt;br /&gt;
		},&lt;br /&gt;
		usertalk = {&lt;br /&gt;
			description = 'For pages protected against disruptive edits by a'&lt;br /&gt;
				.. ' particular user',&lt;br /&gt;
			text = '${INTROFRAGMENT} to prevent ${VANDAL} from using it to make disruptive edits,'&lt;br /&gt;
				.. ' such as abusing the'&lt;br /&gt;
				.. ' &amp;amp;#123;&amp;amp;#123;[[Template:unblock|unblock]]&amp;amp;#125;&amp;amp;#125; template.',&lt;br /&gt;
			explanation = 'If you cannot edit this user talk page and you need to'&lt;br /&gt;
				.. ' make a change or leave a message, you can'&lt;br /&gt;
				.. ' [[Wikipedia:Requests for page protection'&lt;br /&gt;
				.. '#Current requests for edits to a protected page'&lt;br /&gt;
				.. '|request an edit]],'&lt;br /&gt;
				.. ' [[Wikipedia:Requests for page protection'&lt;br /&gt;
				.. '#Current requests for reduction in protection level'&lt;br /&gt;
				.. '|request unprotection]],'&lt;br /&gt;
				.. ' [[Special:Userlogin|log in]],'&lt;br /&gt;
				.. ' or [[Special:UserLogin/signup|create an account]].',&lt;br /&gt;
		},&lt;br /&gt;
		vandalism = {&lt;br /&gt;
			description = 'For pages protected against'&lt;br /&gt;
				.. ' [[Wikipedia:Vandalism|vandalism]]',&lt;br /&gt;
			text = '${INTROFRAGMENT} due to [[Wikipedia:Vandalism|vandalism]].',&lt;br /&gt;
			explanation = function (protectionObj, args)&lt;br /&gt;
				local ret = ''&lt;br /&gt;
				if protectionObj.level == 'sysop' then&lt;br /&gt;
					ret = ret .. &amp;quot;This protection is '''not''' an endorsement of the&amp;quot;&lt;br /&gt;
						.. ' ${CURRENTVERSION}. '&lt;br /&gt;
				end&lt;br /&gt;
				return ret .. '${EXPLANATIONBLURB}'&lt;br /&gt;
			end,&lt;br /&gt;
			tooltip = '${TOOLTIPFRAGMENT} due to vandalism',&lt;br /&gt;
		}&lt;br /&gt;
	},&lt;br /&gt;
	move = {&lt;br /&gt;
		dispute = {&lt;br /&gt;
			description = 'For pages protected against page moves due to'&lt;br /&gt;
				.. ' disputes over the page title',&lt;br /&gt;
			explanation = &amp;quot;This protection is '''not''' an endorsement of the&amp;quot;&lt;br /&gt;
				.. ' ${CURRENTVERSION}. ${EXPLANATIONBLURB}',&lt;br /&gt;
			image = 'Padlock-olive.svg'&lt;br /&gt;
		},&lt;br /&gt;
		vandalism = {&lt;br /&gt;
			description = 'For pages protected against'&lt;br /&gt;
				.. ' [[Wikipedia:Vandalism#Page-move vandalism'&lt;br /&gt;
				.. ' |page-move vandalism]]'&lt;br /&gt;
		}&lt;br /&gt;
	},&lt;br /&gt;
	autoreview = {},&lt;br /&gt;
	upload = {}&lt;br /&gt;
},&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
--&lt;br /&gt;
--                            GENERAL DATA TABLES&lt;br /&gt;
--&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
-- Protection blurbs&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
-- This table produces the protection blurbs available with the&lt;br /&gt;
-- ${PROTECTIONBLURB} parameter. It is sorted by protection action and&lt;br /&gt;
-- protection level, and is checked by the module in the following order:&lt;br /&gt;
-- 1. page's protection action, page's protection level&lt;br /&gt;
-- 2. page's protection action, default protection level&lt;br /&gt;
-- 3. &amp;quot;edit&amp;quot; protection action, default protection level&lt;br /&gt;
--&lt;br /&gt;
-- It is possible to use banner parameters inside this table.&lt;br /&gt;
-- *required* - this table needs edit, move, autoreview and upload subtables.&lt;br /&gt;
protectionBlurbs = {&lt;br /&gt;
	edit = {&lt;br /&gt;
		default = 'This ${PAGETYPE} is currently [[Help:Protection|'&lt;br /&gt;
			.. 'protected]] from editing',&lt;br /&gt;
		autoconfirmed = 'Editing of this ${PAGETYPE} by [[Wikipedia:User access'&lt;br /&gt;
			.. ' levels#New users|new]] or [[Wikipedia:User access levels#Unregistered'&lt;br /&gt;
			.. ' users|unregistered]] users is currently [[Help:Protection|disabled]]',&lt;br /&gt;
		extendedconfirmed = 'This ${PAGETYPE} is ${PROTECTIONLEVEL} as a result of'&lt;br /&gt;
			.. ' [[Wikipedia:Arbitration Committee|ArbCom]] enforcement or meets the'&lt;br /&gt;
			.. ' [[Wikipedia:Protection policy#extended|criteria for community use]]',&lt;br /&gt;
	},&lt;br /&gt;
	move = {&lt;br /&gt;
		default = 'This ${PAGETYPE} is currently [[Help:Protection|protected]]'&lt;br /&gt;
			.. ' from [[Help:Moving a page|page moves]]'&lt;br /&gt;
	},&lt;br /&gt;
	autoreview = {&lt;br /&gt;
		autoconfirmed = 'All edits made to this ${PAGETYPE} by'&lt;br /&gt;
			.. ' [[Wikipedia:User access levels#New users|new]] or'&lt;br /&gt;
			.. ' [[Wikipedia:User access levels#Unregistered users|unregistered]]'&lt;br /&gt;
			.. ' users are currently'&lt;br /&gt;
			.. ' [[Wikipedia:Pending changes|subject to review]]',&lt;br /&gt;
		default = 'All edits made to this ${PAGETYPE} by users who are not'&lt;br /&gt;
			.. ' [[Wikipedia:Reviewing|reviewers]] or'&lt;br /&gt;
			.. ' [[Wikipedia:Administrators|administrators]] are currently'&lt;br /&gt;
			.. ' [[Wikipedia:Pending changes|subject to review]]'&lt;br /&gt;
	},&lt;br /&gt;
	upload = {&lt;br /&gt;
		default = 'Uploading new versions of this ${PAGETYPE} is currently disabled'&lt;br /&gt;
	}&lt;br /&gt;
},&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
-- Explanation blurbs&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
-- This table produces the explanation blurbs available with the&lt;br /&gt;
-- ${EXPLANATIONBLURB} parameter. It is sorted by protection action,&lt;br /&gt;
-- protection level, and whether the page is a talk page or not. If the page is&lt;br /&gt;
-- a talk page it will have a talk key of &amp;quot;talk&amp;quot;; otherwise it will have a talk&lt;br /&gt;
-- key of &amp;quot;subject&amp;quot;. The table is checked in the following order:&lt;br /&gt;
-- 1. page's protection action, page's protection level, page's talk key&lt;br /&gt;
-- 2. page's protection action, page's protection level, default talk key&lt;br /&gt;
-- 3. page's protection action, default protection level, page's talk key&lt;br /&gt;
-- 4. page's protection action, default protection level, default talk key&lt;br /&gt;
--&lt;br /&gt;
-- It is possible to use banner parameters inside this table.&lt;br /&gt;
-- *required* - this table needs edit, move, autoreview and upload subtables.&lt;br /&gt;
explanationBlurbs = {&lt;br /&gt;
	edit = {&lt;br /&gt;
		autoconfirmed = {&lt;br /&gt;
			subject = 'See the [[Wikipedia:Protection policy|'&lt;br /&gt;
				.. 'protection policy]] and ${PROTECTIONLOG} for more details. If you'&lt;br /&gt;
				.. ' cannot edit this ${PAGETYPE} and you wish to make a change, you can'&lt;br /&gt;
				.. ' ${EDITREQUEST}, discuss changes on the ${TALKPAGE},'&lt;br /&gt;
				.. ' [[Wikipedia:Requests for page protection'&lt;br /&gt;
				.. '#Current requests for reduction in protection level'&lt;br /&gt;
				.. '|request unprotection]], [[Special:Userlogin|log in]], or'&lt;br /&gt;
				.. ' [[Special:UserLogin/signup|create an account]].',&lt;br /&gt;
			default = 'See the [[Wikipedia:Protection policy|'&lt;br /&gt;
				.. 'protection policy]] and ${PROTECTIONLOG} for more details. If you'&lt;br /&gt;
				.. ' cannot edit this ${PAGETYPE} and you wish to make a change, you can'&lt;br /&gt;
				.. ' [[Wikipedia:Requests for page protection'&lt;br /&gt;
				.. '#Current requests for reduction in protection level'&lt;br /&gt;
				.. '|request unprotection]], [[Special:Userlogin|log in]], or'&lt;br /&gt;
				.. ' [[Special:UserLogin/signup|create an account]].',&lt;br /&gt;
		},&lt;br /&gt;
		extendedconfirmed = {&lt;br /&gt;
			default = 'Extended confirmed protection prevents edits from all IP editors'&lt;br /&gt;
				.. ' and registered users with fewer than 30 days tenure and 500 edits.'&lt;br /&gt;
				.. ' The [[Wikipedia:Protection policy#extended|policy on community use]]'&lt;br /&gt;
				.. ' specifies that extended confirmed protection can be applied to combat'&lt;br /&gt;
				.. ' disruption, given that semi-protection has proven to be ineffective.'&lt;br /&gt;
				.. ' Please discuss any changes on the ${TALKPAGE}; you may'&lt;br /&gt;
				.. ' ${EDITREQUEST} to ask for unconversial changes supported by'&lt;br /&gt;
				.. ' [[Wikipedia:Consensus|consensus]].'&lt;br /&gt;
		},&lt;br /&gt;
		default = {&lt;br /&gt;
			subject = 'See the [[Wikipedia:Protection policy|'&lt;br /&gt;
				.. 'protection policy]] and ${PROTECTIONLOG} for more details.'&lt;br /&gt;
				.. ' Please discuss any changes on the ${TALKPAGE}; you'&lt;br /&gt;
				.. ' may ${EDITREQUEST} to ask an'&lt;br /&gt;
				.. ' [[Wikipedia:Administrators|administrator]] to make an edit if it'&lt;br /&gt;
				.. ' is [[Help:Minor edit#When to mark an edit as a minor edit'&lt;br /&gt;
				.. '|uncontroversial]] or supported by [[Wikipedia:Consensus'&lt;br /&gt;
				.. '|consensus]]. You may also [[Wikipedia:Requests for'&lt;br /&gt;
				.. ' page protection#Current requests for reduction in protection level'&lt;br /&gt;
				.. '|request]] that this page be unprotected.',&lt;br /&gt;
			default = 'See the [[Wikipedia:Protection policy|'&lt;br /&gt;
				.. 'protection policy]] and ${PROTECTIONLOG} for more details.'&lt;br /&gt;
				.. ' You may [[Wikipedia:Requests for page'&lt;br /&gt;
				.. ' protection#Current requests for edits to a protected page|request an'&lt;br /&gt;
				.. ' edit]] to this page, or [[Wikipedia:Requests for'&lt;br /&gt;
				.. ' page protection#Current requests for reduction in protection level'&lt;br /&gt;
				.. '|ask]] for it to be unprotected.'&lt;br /&gt;
		}&lt;br /&gt;
	},&lt;br /&gt;
	move = {&lt;br /&gt;
		default = {&lt;br /&gt;
			subject = 'See the [[Wikipedia:Protection policy|'&lt;br /&gt;
				.. 'protection policy]] and ${PROTECTIONLOG} for more details.'&lt;br /&gt;
				.. ' The page may still be edited but cannot be moved'&lt;br /&gt;
				.. ' until unprotected. Please discuss any suggested moves on the'&lt;br /&gt;
				.. ' ${TALKPAGE} or at [[Wikipedia:Requested moves]]. You can also'&lt;br /&gt;
				.. ' [[Wikipedia:Requests for page protection|request]] that the page be'&lt;br /&gt;
				.. ' unprotected.',&lt;br /&gt;
			default = 'See the [[Wikipedia:Protection policy|'&lt;br /&gt;
				.. 'protection policy]] and ${PROTECTIONLOG} for more details.'&lt;br /&gt;
				.. ' The page may still be edited but cannot be moved'&lt;br /&gt;
				.. ' until unprotected. Please discuss any suggested moves at'&lt;br /&gt;
				.. ' [[Wikipedia:Requested moves]]. You can also'&lt;br /&gt;
				.. ' [[Wikipedia:Requests for page protection|request]] that the page be'&lt;br /&gt;
				.. ' unprotected.'&lt;br /&gt;
		}&lt;br /&gt;
	},&lt;br /&gt;
	autoreview = {&lt;br /&gt;
		default = {&lt;br /&gt;
			reviewer = 'See the [[Wikipedia:Protection policy|'&lt;br /&gt;
				.. 'protection policy]] and ${PROTECTIONLOG} for more details.'&lt;br /&gt;
				.. ' Edits to this ${PAGETYPE} will not be visible to readers'&lt;br /&gt;
				.. ' until they are accepted by a reviewer or an administrator.'&lt;br /&gt;
				.. ' To avoid the need for your edits to be reviewed, you may'&lt;br /&gt;
				.. ' [[Wikipedia:Requests for page protection'&lt;br /&gt;
				.. '#Current requests for reduction in protection level'&lt;br /&gt;
				.. '|request unprotection]]. Experienced editors may also'&lt;br /&gt;
				.. ' request the [[Wikipedia:Reviewing|reviewer user right]].',&lt;br /&gt;
			default = 'See the [[Wikipedia:Protection policy|'&lt;br /&gt;
				.. 'protection policy]] and ${PROTECTIONLOG} for more details.'&lt;br /&gt;
				.. ' Edits to this ${PAGETYPE} by new and unregistered users'&lt;br /&gt;
				.. ' will not be visible to readers until they are accepted by'&lt;br /&gt;
				.. ' a reviewer. To avoid the need for your edits to be'&lt;br /&gt;
				.. ' reviewed, you may'&lt;br /&gt;
				.. ' [[Wikipedia:Requests for page protection'&lt;br /&gt;
				.. '#Current requests for reduction in protection level'&lt;br /&gt;
				.. '|request unprotection]], [[Special:Userlogin|log in]], or'&lt;br /&gt;
				.. ' [[Special:UserLogin/signup|create an account]].'&lt;br /&gt;
		},&lt;br /&gt;
	},&lt;br /&gt;
	upload = {&lt;br /&gt;
		default = {&lt;br /&gt;
			default = 'See the [[Wikipedia:Protection policy|'&lt;br /&gt;
				.. 'protection policy]] and ${PROTECTIONLOG} for more details.'&lt;br /&gt;
				.. ' The page may still be edited but new versions of the file'&lt;br /&gt;
				.. ' cannot be uploaded until it is unprotected. You can'&lt;br /&gt;
				.. ' request that a new version be uploaded by using a'&lt;br /&gt;
				.. ' [[Wikipedia:Edit requests|protected edit request]], or you'&lt;br /&gt;
				.. ' can  [[Wikipedia:Requests for page protection|request]]'&lt;br /&gt;
				.. ' that the file be unprotected.'&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
},&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
-- Protection levels&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
-- This table provides the data for the ${PROTECTIONLEVEL} parameter, which&lt;br /&gt;
-- produces a short label for different protection levels. It is sorted by&lt;br /&gt;
-- protection action and protection level, and is checked in the following&lt;br /&gt;
-- order:&lt;br /&gt;
-- 1. page's protection action, page's protection level&lt;br /&gt;
-- 2. page's protection action, default protection level&lt;br /&gt;
-- 3. &amp;quot;edit&amp;quot; protection action, default protection level&lt;br /&gt;
--&lt;br /&gt;
-- It is possible to use banner parameters inside this table.&lt;br /&gt;
-- *required* - this table needs edit, move, autoreview and upload subtables.&lt;br /&gt;
protectionLevels = {&lt;br /&gt;
	edit = {&lt;br /&gt;
		default = 'protected',&lt;br /&gt;
		templateeditor = 'template-protected',&lt;br /&gt;
		extendedconfirmed = 'extended-protected',&lt;br /&gt;
		autoconfirmed = 'semi-protected',&lt;br /&gt;
	},&lt;br /&gt;
	move = {&lt;br /&gt;
		default = 'move-protected'&lt;br /&gt;
	},&lt;br /&gt;
	autoreview = {&lt;br /&gt;
	},&lt;br /&gt;
	upload = {&lt;br /&gt;
		default = 'upload-protected'&lt;br /&gt;
	}&lt;br /&gt;
},&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
-- Images&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
-- This table lists different padlock images for each protection action and&lt;br /&gt;
-- protection level. It is used if an image is not specified in any of the&lt;br /&gt;
-- banner data tables, and if the page does not satisfy the conditions for using&lt;br /&gt;
-- the ['image-filename-indef'] image. It is checked in the following order:&lt;br /&gt;
-- 1. page's protection action, page's protection level&lt;br /&gt;
-- 2. page's protection action, default protection level&lt;br /&gt;
images = {&lt;br /&gt;
	edit = {&lt;br /&gt;
		default = 'Padlock.svg',&lt;br /&gt;
		templateeditor = 'Padlock-pink.svg',&lt;br /&gt;
		extendedconfirmed = 'Padlock-blue.svg',&lt;br /&gt;
		autoconfirmed = 'Padlock-silver.svg'&lt;br /&gt;
	},&lt;br /&gt;
	move = {&lt;br /&gt;
		default = 'Padlock-olive.svg',&lt;br /&gt;
	},&lt;br /&gt;
	autoreview = {&lt;br /&gt;
		autoconfirmed = 'Padlock-silver-light.svg',&lt;br /&gt;
		default = 'Padlock-orange.svg'&lt;br /&gt;
	},&lt;br /&gt;
	upload = {&lt;br /&gt;
		default = 'Padlock-purple.svg'&lt;br /&gt;
	}&lt;br /&gt;
},&lt;br /&gt;
&lt;br /&gt;
-- Pages with a reason specified in this table will show the special &amp;quot;indef&amp;quot;&lt;br /&gt;
-- padlock, defined in the 'image-filename-indef' message, if no expiry is set.&lt;br /&gt;
indefImageReasons = {&lt;br /&gt;
	template = true&lt;br /&gt;
},&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
-- Image links&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
-- This table provides the data for the ${IMAGELINK} parameter, which gets&lt;br /&gt;
-- the image link for small padlock icons based on the page's protection action&lt;br /&gt;
-- and protection level. It is checked in the following order:&lt;br /&gt;
-- 1. page's protection action, page's protection level&lt;br /&gt;
-- 2. page's protection action, default protection level&lt;br /&gt;
-- 3. &amp;quot;edit&amp;quot; protection action, default protection level&lt;br /&gt;
--&lt;br /&gt;
-- It is possible to use banner parameters inside this table.&lt;br /&gt;
-- *required* - this table needs edit, move, autoreview and upload subtables.&lt;br /&gt;
imageLinks = {&lt;br /&gt;
	edit = {&lt;br /&gt;
		default = 'Wikipedia:Protection policy#full',&lt;br /&gt;
		templateeditor = 'Wikipedia:Protection policy#template',&lt;br /&gt;
		extendedconfirmed = 'Wikipedia:Protection policy#extended',&lt;br /&gt;
		autoconfirmed = 'Wikipedia:Protection policy#semi'&lt;br /&gt;
	},&lt;br /&gt;
	move = {&lt;br /&gt;
		default = 'Wikipedia:Protection policy#move'&lt;br /&gt;
	},&lt;br /&gt;
	autoreview = {&lt;br /&gt;
		autoconfirmed = 'Wikipedia:Protection policy#pc1',&lt;br /&gt;
		reviewer = 'Wikipedia:Protection policy#pc2'&lt;br /&gt;
	},&lt;br /&gt;
	upload = {&lt;br /&gt;
		default = 'Wikipedia:Protection policy#upload'&lt;br /&gt;
	}&lt;br /&gt;
},&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
-- Padlock indicator names&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
-- This table provides the &amp;quot;name&amp;quot; attribute for the &amp;lt;indicator&amp;gt; extension tag&lt;br /&gt;
-- with which small padlock icons are generated. All indicator tags on a page&lt;br /&gt;
-- are displayed in alphabetical order based on this attribute, and with&lt;br /&gt;
-- indicator tags with duplicate names, the last tag on the page wins.&lt;br /&gt;
-- The attribute is chosen based on the protection action; table keys must be a&lt;br /&gt;
-- protection action name or the string &amp;quot;default&amp;quot;.&lt;br /&gt;
padlockIndicatorNames = {&lt;br /&gt;
	autoreview = 'pp-autoreview',&lt;br /&gt;
	default = 'pp-default'&lt;br /&gt;
},&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
-- Protection categories&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
--[[&lt;br /&gt;
-- The protection categories are stored in the protectionCategories table.&lt;br /&gt;
-- Keys to this table are made up of the following strings:&lt;br /&gt;
--&lt;br /&gt;
-- 1. the expiry date&lt;br /&gt;
-- 2. the namespace&lt;br /&gt;
-- 3. the protection reason (e.g. &amp;quot;dispute&amp;quot; or &amp;quot;vandalism&amp;quot;)&lt;br /&gt;
-- 4. the protection level (e.g. &amp;quot;sysop&amp;quot; or &amp;quot;autoconfirmed&amp;quot;)&lt;br /&gt;
-- 5. the action (e.g. &amp;quot;edit&amp;quot; or &amp;quot;move&amp;quot;)&lt;br /&gt;
-- &lt;br /&gt;
-- When the module looks up a category in the table, first it will will check to&lt;br /&gt;
-- see a key exists that corresponds to all five parameters. For example, a&lt;br /&gt;
-- user page semi-protected from vandalism for two weeks would have the key&lt;br /&gt;
-- &amp;quot;temp-user-vandalism-autoconfirmed-edit&amp;quot;. If no match is found, the module&lt;br /&gt;
-- changes the first part of the key to &amp;quot;all&amp;quot; and checks the table again. It&lt;br /&gt;
-- keeps checking increasingly generic key combinations until it finds the&lt;br /&gt;
-- field, or until it reaches the key &amp;quot;all-all-all-all-all&amp;quot;.&lt;br /&gt;
--&lt;br /&gt;
-- The module uses a binary matrix to determine the order in which to search.&lt;br /&gt;
-- This is best demonstrated by a table. In this table, the &amp;quot;0&amp;quot; values&lt;br /&gt;
-- represent &amp;quot;all&amp;quot;, and the &amp;quot;1&amp;quot; values represent the original data (e.g.&lt;br /&gt;
-- &amp;quot;indef&amp;quot; or &amp;quot;file&amp;quot; or &amp;quot;vandalism&amp;quot;).&lt;br /&gt;
--&lt;br /&gt;
--        expiry    namespace reason   level     action&lt;br /&gt;
-- order&lt;br /&gt;
-- 1      1         1         1        1         1&lt;br /&gt;
-- 2      0         1         1        1         1&lt;br /&gt;
-- 3      1         0         1        1         1&lt;br /&gt;
-- 4      0         0         1        1         1&lt;br /&gt;
-- 5      1         1         0        1         1&lt;br /&gt;
-- 6      0         1         0        1         1&lt;br /&gt;
-- 7      1         0         0        1         1&lt;br /&gt;
-- 8      0         0         0        1         1&lt;br /&gt;
-- 9      1         1         1        0         1&lt;br /&gt;
-- 10     0         1         1        0         1&lt;br /&gt;
-- 11     1         0         1        0         1&lt;br /&gt;
-- 12     0         0         1        0         1&lt;br /&gt;
-- 13     1         1         0        0         1&lt;br /&gt;
-- 14     0         1         0        0         1&lt;br /&gt;
-- 15     1         0         0        0         1&lt;br /&gt;
-- 16     0         0         0        0         1&lt;br /&gt;
-- 17     1         1         1        1         0&lt;br /&gt;
-- 18     0         1         1        1         0&lt;br /&gt;
-- 19     1         0         1        1         0&lt;br /&gt;
-- 20     0         0         1        1         0&lt;br /&gt;
-- 21     1         1         0        1         0&lt;br /&gt;
-- 22     0         1         0        1         0&lt;br /&gt;
-- 23     1         0         0        1         0&lt;br /&gt;
-- 24     0         0         0        1         0&lt;br /&gt;
-- 25     1         1         1        0         0&lt;br /&gt;
-- 26     0         1         1        0         0&lt;br /&gt;
-- 27     1         0         1        0         0&lt;br /&gt;
-- 28     0         0         1        0         0&lt;br /&gt;
-- 29     1         1         0        0         0&lt;br /&gt;
-- 30     0         1         0        0         0&lt;br /&gt;
-- 31     1         0         0        0         0&lt;br /&gt;
-- 32     0         0         0        0         0&lt;br /&gt;
--&lt;br /&gt;
-- In this scheme the action has the highest priority, as it is the last&lt;br /&gt;
-- to change, and the expiry has the least priority, as it changes the most.&lt;br /&gt;
-- The priorities of the expiry, the protection level and the action are&lt;br /&gt;
-- fixed, but the priorities of the reason and the namespace can be swapped&lt;br /&gt;
-- through the use of the cfg.bannerDataNamespaceHasPriority table.&lt;br /&gt;
--]]&lt;br /&gt;
&lt;br /&gt;
-- If the reason specified to the template is listed in this table,&lt;br /&gt;
-- namespace data will take priority over reason data in the protectionCategories&lt;br /&gt;
-- table.&lt;br /&gt;
reasonsWithNamespacePriority = {&lt;br /&gt;
	vandalism = true,&lt;br /&gt;
},&lt;br /&gt;
&lt;br /&gt;
-- The string to use as a namespace key for the protectionCategories table for each&lt;br /&gt;
-- namespace number.&lt;br /&gt;
categoryNamespaceKeys = {&lt;br /&gt;
	[  2] = 'user',&lt;br /&gt;
	[  3] = 'user',&lt;br /&gt;
	[  4] = 'project',&lt;br /&gt;
	[  6] = 'file',&lt;br /&gt;
	[  8] = 'mediawiki',&lt;br /&gt;
	[ 10] = 'template',&lt;br /&gt;
	[ 12] = 'project',&lt;br /&gt;
	[ 14] = 'category',&lt;br /&gt;
	[100] = 'portal',&lt;br /&gt;
	[828] = 'module',&lt;br /&gt;
},&lt;br /&gt;
&lt;br /&gt;
protectionCategories = {&lt;br /&gt;
	['all|all|all|all|all']                  = 'Wikipedia protected pages',&lt;br /&gt;
	['all|all|office|all|all']               = 'Wikipedia Office-protected pages',&lt;br /&gt;
	['all|all|reset|all|all']                = 'Wikipedia Office-protected pages',&lt;br /&gt;
	['all|all|dmca|all|all']                 = 'Wikipedia Office-protected pages',&lt;br /&gt;
	['all|all|mainpage|all|all']             = 'Wikipedia fully-protected main page files',&lt;br /&gt;
	['all|all|all|extendedconfirmed|all']    = 'Wikipedia pages under 30-500 editing restriction',&lt;br /&gt;
	['all|all|ecp|extendedconfirmed|all']    = 'Wikipedia pages under 30-500 editing restriction',&lt;br /&gt;
	['all|template|all|all|edit']            = 'Wikipedia fully-protected templates',&lt;br /&gt;
	['all|all|all|autoconfirmed|edit']       = 'Wikipedia semi-protected pages',&lt;br /&gt;
	['indef|all|all|autoconfirmed|edit']     = 'Wikipedia indefinitely semi-protected pages',&lt;br /&gt;
	['all|all|blp|autoconfirmed|edit']       = 'Wikipedia indefinitely semi-protected biographies of living people',&lt;br /&gt;
	['temp|all|blp|autoconfirmed|edit']      = 'Wikipedia temporarily semi-protected biographies of living people',&lt;br /&gt;
	['all|all|dispute|autoconfirmed|edit']   = 'Wikipedia pages semi-protected due to dispute',&lt;br /&gt;
	['all|all|sock|autoconfirmed|edit']      = 'Wikipedia pages semi-protected from banned users',&lt;br /&gt;
	['all|all|vandalism|autoconfirmed|edit'] = 'Wikipedia pages semi-protected against vandalism',&lt;br /&gt;
	['all|category|all|autoconfirmed|edit']  = 'Wikipedia semi-protected categories',&lt;br /&gt;
	['all|file|all|autoconfirmed|edit']      = 'Wikipedia semi-protected files',&lt;br /&gt;
	['all|portal|all|autoconfirmed|edit']    = 'Wikipedia semi-protected portals',&lt;br /&gt;
	['all|project|all|autoconfirmed|edit']   = 'Wikipedia semi-protected project pages',&lt;br /&gt;
	['all|talk|all|autoconfirmed|edit']      = 'Wikipedia semi-protected talk pages',&lt;br /&gt;
	['all|template|all|autoconfirmed|edit']  = 'Wikipedia semi-protected templates',&lt;br /&gt;
	['all|user|all|autoconfirmed|edit']      = 'Wikipedia semi-protected user and user talk pages',&lt;br /&gt;
	['all|template|all|templateeditor|edit'] = 'Wikipedia template-protected templates',&lt;br /&gt;
	['all|all|blp|sysop|edit']               = 'Wikipedia indefinitely protected biographies of living people',&lt;br /&gt;
	['temp|all|blp|sysop|edit']              = 'Wikipedia temporarily protected biographies of living people',&lt;br /&gt;
	['all|all|dispute|sysop|edit']           = 'Wikipedia pages protected due to dispute',&lt;br /&gt;
	['all|all|sock|sysop|edit']              = 'Wikipedia pages protected from banned users',&lt;br /&gt;
	['all|all|vandalism|sysop|edit']         = 'Wikipedia pages protected against vandalism',&lt;br /&gt;
	['all|category|all|sysop|edit']          = 'Wikipedia protected categories',&lt;br /&gt;
	['all|file|all|sysop|edit']              = 'Wikipedia fully-protected files',&lt;br /&gt;
	['all|project|all|sysop|edit']           = 'Wikipedia fully-protected project pages',&lt;br /&gt;
	['all|talk|all|sysop|edit']              = 'Wikipedia fully-protected talk pages',&lt;br /&gt;
	['all|template|all|sysop|edit']          = 'Wikipedia fully-protected templates',&lt;br /&gt;
	['all|user|all|sysop|edit']              = 'Wikipedia protected user and user talk pages',&lt;br /&gt;
	['all|module|all|all|edit']              = 'Wikipedia fully-protected modules',&lt;br /&gt;
	['all|module|all|templateeditor|edit']   = 'Wikipedia template-protected modules',&lt;br /&gt;
	['all|module|all|autoconfirmed|edit']    = 'Wikipedia semi-protected modules',&lt;br /&gt;
	['all|all|all|sysop|move']               = 'Wikipedia move-protected pages',&lt;br /&gt;
	['indef|all|all|sysop|move']             = 'Wikipedia indefinitely move-protected pages',&lt;br /&gt;
	['all|all|dispute|sysop|move']           = 'Wikipedia pages move-protected due to dispute',&lt;br /&gt;
	['all|all|vandalism|sysop|move']         = 'Wikipedia pages move-protected due to vandalism',&lt;br /&gt;
	['all|portal|all|sysop|move']            = 'Wikipedia move-protected portals',&lt;br /&gt;
	['all|portal|all|sysop|move']            = 'Wikipedia move-protected portals',&lt;br /&gt;
	['all|project|all|sysop|move']           = 'Wikipedia move-protected project pages',&lt;br /&gt;
	['all|talk|all|sysop|move']              = 'Wikipedia move-protected talk pages',&lt;br /&gt;
	['all|template|all|sysop|move']          = 'Wikipedia move-protected templates',&lt;br /&gt;
	['all|user|all|sysop|move']              = 'Wikipedia move-protected user and user talk pages',&lt;br /&gt;
	['all|all|all|autoconfirmed|autoreview'] = 'Wikipedia pending changes protected pages (level 1)',&lt;br /&gt;
	['all|all|all|reviewer|autoreview']      = 'Wikipedia pending changes protected pages (level 2)',&lt;br /&gt;
	['all|file|all|all|upload']              = 'Wikipedia upload-protected files',&lt;br /&gt;
},&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
-- Expiry category config&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
-- This table configures the expiry category behaviour for each protection&lt;br /&gt;
-- action.&lt;br /&gt;
-- * If set to true, setting that action will always categorise the page if&lt;br /&gt;
--   an expiry parameter is not set.&lt;br /&gt;
-- * If set to false, setting that action will never categorise the page.&lt;br /&gt;
-- * If set to nil, the module will categorise the page if:&lt;br /&gt;
--   1) an expiry parameter is not set, and&lt;br /&gt;
--   2) a reason is provided, and&lt;br /&gt;
--   3) the specified reason is not blacklisted in the reasonsWithoutExpiryCheck&lt;br /&gt;
--      table.&lt;br /&gt;
&lt;br /&gt;
expiryCheckActions = {&lt;br /&gt;
	edit = nil,&lt;br /&gt;
	move = false,&lt;br /&gt;
	autoreview = true,&lt;br /&gt;
	upload = false&lt;br /&gt;
},&lt;br /&gt;
&lt;br /&gt;
reasonsWithoutExpiryCheck = {&lt;br /&gt;
	blp = true,&lt;br /&gt;
	template = true,&lt;br /&gt;
},&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
-- Pagetypes&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
-- This table produces the page types available with the ${PAGETYPE} parameter.&lt;br /&gt;
-- Keys are namespace numbers, or the string &amp;quot;default&amp;quot; for the default value.&lt;br /&gt;
pagetypes = {&lt;br /&gt;
	[0] = 'article',&lt;br /&gt;
	[6] = 'file',&lt;br /&gt;
	[10] = 'template',&lt;br /&gt;
	[14] = 'category',&lt;br /&gt;
	[828] = 'module',&lt;br /&gt;
	default = 'page'&lt;br /&gt;
},&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
-- Strings marking indefinite protection&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
-- This table contains values passed to the expiry parameter that mean the page&lt;br /&gt;
-- is protected indefinitely.&lt;br /&gt;
indefStrings = {&lt;br /&gt;
	['indef'] = true,&lt;br /&gt;
	['indefinite'] = true,&lt;br /&gt;
	['indefinitely'] = true,&lt;br /&gt;
	['infinite'] = true,&lt;br /&gt;
},&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
-- Group hierarchy&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
-- This table maps each group to all groups that have a superset of the original&lt;br /&gt;
-- group's page editing permissions.&lt;br /&gt;
hierarchy = {&lt;br /&gt;
	sysop = {},&lt;br /&gt;
	reviewer = {'sysop'},&lt;br /&gt;
	filemover = {'sysop'},&lt;br /&gt;
	templateeditor = {'sysop'},&lt;br /&gt;
	extendedconfirmed = {'sysop'},&lt;br /&gt;
	autoconfirmed = {'reviewer', 'filemover', 'templateeditor', 'extendedconfirmed'},&lt;br /&gt;
	user = {'autoconfirmed'},&lt;br /&gt;
	['*'] = {'user'}&lt;br /&gt;
},&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
-- Wrapper templates and their default arguments&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
-- This table contains wrapper templates used with the module, and their&lt;br /&gt;
-- default arguments. Templates specified in this table should contain the&lt;br /&gt;
-- following invocation, and no other template content:&lt;br /&gt;
--&lt;br /&gt;
-- {{#invoke:Protection banner|main}}&lt;br /&gt;
--&lt;br /&gt;
-- If other content is desired, it can be added between&lt;br /&gt;
-- &amp;lt;noinclude&amp;gt;...&amp;lt;/noinclude&amp;gt; tags.&lt;br /&gt;
--&lt;br /&gt;
-- When a user calls one of these wrapper templates, they will use the&lt;br /&gt;
-- default arguments automatically. However, users can override any of the&lt;br /&gt;
-- arguments.&lt;br /&gt;
wrappers = {&lt;br /&gt;
	['Template:Pp']                         = {},&lt;br /&gt;
	['Template:Pp-30-500']                  = {'ecp'},&lt;br /&gt;
	['Template:Pp-blp']                     = {'blp'},&lt;br /&gt;
	-- we don't need Template:Pp-create&lt;br /&gt;
	['Template:Pp-dispute']                 = {'dispute'},&lt;br /&gt;
	['Template:Pp-main-page']               = {'mainpage'},&lt;br /&gt;
	['Template:Pp-move']                    = {action = 'move'},&lt;br /&gt;
	['Template:Pp-move-dispute']            = {'dispute', action = 'move'},&lt;br /&gt;
	-- we don't need Template:Pp-move-indef&lt;br /&gt;
	['Template:Pp-move-vandalism']          = {'vandalism', action = 'move'},&lt;br /&gt;
	['Template:Pp-office']                  = {'office'},&lt;br /&gt;
	['Template:Pp-office-dmca']             = {'dmca'},&lt;br /&gt;
	['Template:Pp-pc1']                     = {action = 'autoreview', small = true},&lt;br /&gt;
	['Template:Pp-pc2']                     = {action = 'autoreview', small = true},&lt;br /&gt;
	['Template:Pp-reset']                   = {'reset'},&lt;br /&gt;
	['Template:Pp-semi-indef']              = {expiry = 'indef', small = true},&lt;br /&gt;
	['Template:Pp-sock']                    = {'sock'},&lt;br /&gt;
	['Template:Pp-template']                = {'template', small = true},&lt;br /&gt;
	['Template:Pp-upload']                  = {action = 'upload'},&lt;br /&gt;
	['Template:Pp-usertalk']                = {'usertalk'},&lt;br /&gt;
	['Template:Pp-vandalism']               = {'vandalism'},&lt;br /&gt;
},&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
-- &lt;br /&gt;
--                                 MESSAGES&lt;br /&gt;
-- &lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
msg = {&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
-- Intro blurb and intro fragment&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
-- These messages specify what is produced by the ${INTROBLURB} and&lt;br /&gt;
-- ${INTROFRAGMENT} parameters. If the protection is temporary they use the&lt;br /&gt;
-- intro-blurb-expiry or intro-fragment-expiry, and if not they use&lt;br /&gt;
-- intro-blurb-noexpiry or intro-fragment-noexpiry.&lt;br /&gt;
-- It is possible to use banner parameters in these messages.&lt;br /&gt;
['intro-blurb-expiry'] = '${PROTECTIONBLURB} until ${EXPIRY}.',&lt;br /&gt;
['intro-blurb-noexpiry'] = '${PROTECTIONBLURB}.',&lt;br /&gt;
['intro-fragment-expiry'] = '${PROTECTIONBLURB} until ${EXPIRY},',&lt;br /&gt;
['intro-fragment-noexpiry'] = '${PROTECTIONBLURB}',&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
-- Tooltip blurb&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
-- These messages specify what is produced by the ${TOOLTIPBLURB} parameter.&lt;br /&gt;
-- If the protection is temporary the tooltip-blurb-expiry message is used, and&lt;br /&gt;
-- if not the tooltip-blurb-noexpiry message is used.&lt;br /&gt;
-- It is possible to use banner parameters in these messages.&lt;br /&gt;
['tooltip-blurb-expiry'] = 'This ${PAGETYPE} is ${PROTECTIONLEVEL} until ${EXPIRY}.',&lt;br /&gt;
['tooltip-blurb-noexpiry'] = 'This ${PAGETYPE} is ${PROTECTIONLEVEL}.',&lt;br /&gt;
['tooltip-fragment-expiry'] = 'This ${PAGETYPE} is ${PROTECTIONLEVEL} until ${EXPIRY},',&lt;br /&gt;
['tooltip-fragment-noexpiry'] = 'This ${PAGETYPE} is ${PROTECTIONLEVEL}',&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
-- Special explanation blurb&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
-- An explanation blurb for pages that cannot be unprotected, e.g. for pages&lt;br /&gt;
-- in the MediaWiki namespace.&lt;br /&gt;
-- It is possible to use banner parameters in this message.&lt;br /&gt;
['explanation-blurb-nounprotect'] = 'See the [[Wikipedia:Protection policy|'&lt;br /&gt;
	.. 'protection policy]] and ${PROTECTIONLOG} for more details.'&lt;br /&gt;
	.. ' Please discuss any changes on the ${TALKPAGE}; you'&lt;br /&gt;
	.. ' may ${EDITREQUEST} to ask an'&lt;br /&gt;
	.. ' [[Wikipedia:Administrators|administrator]] to make an edit if it'&lt;br /&gt;
	.. ' is [[Help:Minor edit#When to mark an edit as a minor edit'&lt;br /&gt;
	.. '|uncontroversial]] or supported by [[Wikipedia:Consensus'&lt;br /&gt;
	.. '|consensus]].',&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
-- Protection log display values&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
-- These messages determine the display values for the protection log link&lt;br /&gt;
-- or the pending changes log link produced by the ${PROTECTIONLOG} parameter.&lt;br /&gt;
-- It is possible to use banner parameters in these messages.&lt;br /&gt;
['protection-log-display'] = 'protection log',&lt;br /&gt;
['pc-log-display'] = 'pending changes log',&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
-- Current version display values&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
-- These messages determine the display values for the page history link&lt;br /&gt;
-- or the move log link produced by the ${CURRENTVERSION} parameter.&lt;br /&gt;
-- It is possible to use banner parameters in these messages.&lt;br /&gt;
['current-version-move-display'] = 'current title',&lt;br /&gt;
['current-version-edit-display'] = 'current version',&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
-- Talk page&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
-- This message determines the display value of the talk page link produced&lt;br /&gt;
-- with the ${TALKPAGE} parameter.&lt;br /&gt;
-- It is possible to use banner parameters in this message.&lt;br /&gt;
['talk-page-link-display'] = 'talk page',&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
-- Edit requests&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
-- This message determines the display value of the edit request link produced&lt;br /&gt;
-- with the ${EDITREQUEST} parameter.&lt;br /&gt;
-- It is possible to use banner parameters in this message.&lt;br /&gt;
['edit-request-display'] = 'submit an edit request',&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
-- Expiry date format&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
-- This is the format for the blurb expiry date. It should be valid input for&lt;br /&gt;
-- the first parameter of the #time parser function.&lt;br /&gt;
['expiry-date-format'] = 'F j, Y',&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
-- Tracking categories&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
-- These messages determine which tracking categories the module outputs.&lt;br /&gt;
['tracking-category-incorrect'] = 'Wikipedia pages with incorrect protection templates',&lt;br /&gt;
['tracking-category-expiry'] = 'Wikipedia protected pages without expiry',&lt;br /&gt;
['tracking-category-template'] = 'Wikipedia template-protected pages other than templates and modules',&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
-- Images&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
-- These are images that are not defined by their protection action and protection level.&lt;br /&gt;
['image-filename-indef'] = 'Padlock.svg',&lt;br /&gt;
['image-filename-default'] = 'Transparent.gif',&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
-- End messages&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
-- End configuration&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
}&lt;/div&gt;</summary>
		<author><name>Kolk</name></author>	</entry>

	<entry>
		<id>http://wiki.isofts.kiev.ua/index.php?title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:Protection_banner&amp;diff=673</id>
		<title>Модуль:Protection banner</title>
		<link rel="alternate" type="text/html" href="http://wiki.isofts.kiev.ua/index.php?title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:Protection_banner&amp;diff=673"/>
				<updated>2016-11-24T15:23:18Z</updated>
		
		<summary type="html">&lt;p&gt;Kolk: Імпортовано 1 версія&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;-- This module implements {{pp-meta}} and its daughter templates such as&lt;br /&gt;
-- {{pp-dispute}}, {{pp-vandalism}} and {{pp-sock}}.&lt;br /&gt;
&lt;br /&gt;
-- Initialise necessary modules.&lt;br /&gt;
require('Module:No globals')&lt;br /&gt;
local makeFileLink = require('Module:File link')._main&lt;br /&gt;
local effectiveProtectionLevel = require('Module:Effective protection level')._main&lt;br /&gt;
local effectiveProtectionExpiry = require('Module:Effective protection expiry')._main&lt;br /&gt;
local yesno = require('Module:Yesno')&lt;br /&gt;
&lt;br /&gt;
-- Lazily initialise modules and objects we don't always need.&lt;br /&gt;
local getArgs, makeMessageBox, lang&lt;br /&gt;
&lt;br /&gt;
-- Set constants.&lt;br /&gt;
local CONFIG_MODULE = 'Module:Protection banner/config'&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
-- Helper functions&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
local function makeCategoryLink(cat, sort)&lt;br /&gt;
	if cat then&lt;br /&gt;
		return string.format(&lt;br /&gt;
			'[[%s:%s|%s]]',&lt;br /&gt;
			mw.site.namespaces[14].name,&lt;br /&gt;
			cat,&lt;br /&gt;
			sort&lt;br /&gt;
		)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Validation function for the expiry and the protection date&lt;br /&gt;
local function validateDate(dateString, dateType)&lt;br /&gt;
	if not lang then&lt;br /&gt;
		lang = mw.language.getContentLanguage()&lt;br /&gt;
	end&lt;br /&gt;
	local success, result = pcall(lang.formatDate, lang, 'U', dateString)&lt;br /&gt;
	if success then&lt;br /&gt;
		result = tonumber(result)&lt;br /&gt;
		if result then&lt;br /&gt;
			return result&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	error(string.format(&lt;br /&gt;
		'invalid %s: %s',&lt;br /&gt;
		dateType,&lt;br /&gt;
		tostring(dateString)&lt;br /&gt;
	), 4)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function makeFullUrl(page, query, display)&lt;br /&gt;
	return string.format(&lt;br /&gt;
		'[%s %s]',&lt;br /&gt;
		tostring(mw.uri.fullUrl(page, query)),&lt;br /&gt;
		display&lt;br /&gt;
	)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Given a directed graph formatted as node -&amp;gt; table of direct successors,&lt;br /&gt;
-- get a table of all nodes reachable from a given node (though always&lt;br /&gt;
-- including the given node).&lt;br /&gt;
local function getReachableNodes(graph, start)&lt;br /&gt;
	local toWalk, retval = {[start] = true}, {}&lt;br /&gt;
	while true do&lt;br /&gt;
		-- Can't use pairs() since we're adding and removing things as we're iterating&lt;br /&gt;
		local k = next(toWalk) -- This always gets the &amp;quot;first&amp;quot; key&lt;br /&gt;
		if k == nil then&lt;br /&gt;
			return retval&lt;br /&gt;
		end&lt;br /&gt;
		toWalk[k] = nil&lt;br /&gt;
		retval[k] = true&lt;br /&gt;
		for _,v in ipairs(graph[k]) do&lt;br /&gt;
			if not retval[v] then&lt;br /&gt;
				toWalk[v] = true&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
-- Protection class&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
local Protection = {}&lt;br /&gt;
Protection.__index = Protection&lt;br /&gt;
&lt;br /&gt;
Protection.supportedActions = {&lt;br /&gt;
	edit = true,&lt;br /&gt;
	move = true,&lt;br /&gt;
	autoreview = true,&lt;br /&gt;
	upload = true&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Protection.bannerConfigFields = {&lt;br /&gt;
	'text',&lt;br /&gt;
	'explanation',&lt;br /&gt;
	'tooltip',&lt;br /&gt;
	'alt',&lt;br /&gt;
	'link',&lt;br /&gt;
	'image'&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
function Protection.new(args, cfg, title)&lt;br /&gt;
	local obj = {}&lt;br /&gt;
	obj._cfg = cfg&lt;br /&gt;
	obj.title = title or mw.title.getCurrentTitle()&lt;br /&gt;
&lt;br /&gt;
	-- Set action&lt;br /&gt;
	if not args.action then&lt;br /&gt;
		obj.action = 'edit'&lt;br /&gt;
	elseif Protection.supportedActions[args.action] then&lt;br /&gt;
		obj.action = args.action&lt;br /&gt;
	else&lt;br /&gt;
		error(string.format(&lt;br /&gt;
			'invalid action: %s',&lt;br /&gt;
			tostring(args.action)&lt;br /&gt;
		), 3)&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Set level&lt;br /&gt;
	obj.level = args.demolevel or effectiveProtectionLevel(obj.action, obj.title)&lt;br /&gt;
	if not obj.level or (obj.action == 'move' and obj.level == 'autoconfirmed') then&lt;br /&gt;
		-- Users need to be autoconfirmed to move pages anyway, so treat&lt;br /&gt;
		-- semi-move-protected pages as unprotected.&lt;br /&gt;
		obj.level = '*'&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Set expiry&lt;br /&gt;
	local effectiveExpiry = effectiveProtectionExpiry(obj.action, obj.title)&lt;br /&gt;
	if effectiveExpiry == 'infinity' then&lt;br /&gt;
		obj.expiry = 'indef'&lt;br /&gt;
	elseif effectiveExpiry ~= 'unknown' then&lt;br /&gt;
		obj.expiry = validateDate(effectiveExpiry, 'expiry date')&lt;br /&gt;
	elseif args.expiry then&lt;br /&gt;
		if cfg.indefStrings[args.expiry] then&lt;br /&gt;
			obj.expiry = 'indef'&lt;br /&gt;
		elseif type(args.expiry) == 'number' then&lt;br /&gt;
			obj.expiry = args.expiry&lt;br /&gt;
		else&lt;br /&gt;
			obj.expiry = validateDate(args.expiry, 'expiry date')&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Set reason&lt;br /&gt;
	if args[1] then&lt;br /&gt;
		obj.reason = mw.ustring.lower(args[1])&lt;br /&gt;
		if obj.reason:find('|') then&lt;br /&gt;
			error('reasons cannot contain the pipe character (&amp;quot;|&amp;quot;)', 3)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Set protection date&lt;br /&gt;
	if args.date then&lt;br /&gt;
		obj.protectionDate = validateDate(args.date, 'protection date')&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	-- Set banner config&lt;br /&gt;
	do&lt;br /&gt;
		obj.bannerConfig = {}&lt;br /&gt;
		local configTables = {}&lt;br /&gt;
		if cfg.banners[obj.action] then&lt;br /&gt;
			configTables[#configTables + 1] = cfg.banners[obj.action][obj.reason]&lt;br /&gt;
		end&lt;br /&gt;
		if cfg.defaultBanners[obj.action] then&lt;br /&gt;
			configTables[#configTables + 1] = cfg.defaultBanners[obj.action][obj.level]&lt;br /&gt;
			configTables[#configTables + 1] = cfg.defaultBanners[obj.action].default&lt;br /&gt;
		end&lt;br /&gt;
		configTables[#configTables + 1] = cfg.masterBanner&lt;br /&gt;
		for i, field in ipairs(Protection.bannerConfigFields) do&lt;br /&gt;
			for j, t in ipairs(configTables) do&lt;br /&gt;
				if t[field] then&lt;br /&gt;
					obj.bannerConfig[field] = t[field]&lt;br /&gt;
					break&lt;br /&gt;
				end&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return setmetatable(obj, Protection)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function Protection:isProtected()&lt;br /&gt;
	return self.level ~= '*'&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function Protection:isTemporary()&lt;br /&gt;
	return type(self.expiry) == 'number'&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function Protection:makeProtectionCategory()&lt;br /&gt;
	local cfg = self._cfg&lt;br /&gt;
	local title = self.title&lt;br /&gt;
	&lt;br /&gt;
	-- Exit if the page is not protected.&lt;br /&gt;
	if not self:isProtected() then&lt;br /&gt;
		return ''&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	-- Get the expiry key fragment.&lt;br /&gt;
	local expiryFragment&lt;br /&gt;
	if self.expiry == 'indef' then&lt;br /&gt;
		expiryFragment = self.expiry&lt;br /&gt;
	elseif type(self.expiry) == 'number' then&lt;br /&gt;
		expiryFragment = 'temp'&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Get the namespace key fragment.&lt;br /&gt;
	local namespaceFragment = cfg.categoryNamespaceKeys[title.namespace]&lt;br /&gt;
	if not namespaceFragment and title.namespace % 2 == 1 then&lt;br /&gt;
			namespaceFragment = 'talk'&lt;br /&gt;
	end&lt;br /&gt;
 &lt;br /&gt;
	-- Define the order that key fragments are tested in. This is done with an&lt;br /&gt;
	-- array of tables containing the value to be tested, along with its&lt;br /&gt;
	-- position in the cfg.protectionCategories table.&lt;br /&gt;
	local order = {&lt;br /&gt;
		{val = expiryFragment,    keypos = 1},&lt;br /&gt;
		{val = namespaceFragment, keypos = 2},&lt;br /&gt;
		{val = self.reason,       keypos = 3},&lt;br /&gt;
		{val = self.level,        keypos = 4},&lt;br /&gt;
		{val = self.action,       keypos = 5}&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	--[[&lt;br /&gt;
	-- The old protection templates used an ad-hoc protection category system,&lt;br /&gt;
	-- with some templates prioritising namespaces in their categories, and&lt;br /&gt;
	-- others prioritising the protection reason. To emulate this in this module&lt;br /&gt;
	-- we use the config table cfg.reasonsWithNamespacePriority to set the&lt;br /&gt;
	-- reasons for which namespaces have priority over protection reason.&lt;br /&gt;
	-- If we are dealing with one of those reasons, move the namespace table to&lt;br /&gt;
	-- the end of the order table, i.e. give it highest priority. If not, the&lt;br /&gt;
	-- reason should have highest priority, so move that to the end of the table&lt;br /&gt;
	-- instead.&lt;br /&gt;
	--]]&lt;br /&gt;
	table.insert(order, table.remove(order, self.reason and cfg.reasonsWithNamespacePriority[self.reason] and 2 or 3))&lt;br /&gt;
 &lt;br /&gt;
	--[[&lt;br /&gt;
	-- Define the attempt order. Inactive subtables (subtables with nil &amp;quot;value&amp;quot;&lt;br /&gt;
	-- fields) are moved to the end, where they will later be given the key&lt;br /&gt;
	-- &amp;quot;all&amp;quot;. This is to cut down on the number of table lookups in&lt;br /&gt;
	-- cfg.protectionCategories, which grows exponentially with the number of&lt;br /&gt;
	-- non-nil keys. We keep track of the number of active subtables with the&lt;br /&gt;
	-- noActive parameter.&lt;br /&gt;
	--]]&lt;br /&gt;
	local noActive, attemptOrder&lt;br /&gt;
	do&lt;br /&gt;
		local active, inactive = {}, {}&lt;br /&gt;
		for i, t in ipairs(order) do&lt;br /&gt;
			if t.val then&lt;br /&gt;
				active[#active + 1] = t&lt;br /&gt;
			else&lt;br /&gt;
				inactive[#inactive + 1] = t&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
		noActive = #active&lt;br /&gt;
		attemptOrder = active&lt;br /&gt;
		for i, t in ipairs(inactive) do&lt;br /&gt;
			attemptOrder[#attemptOrder + 1] = t&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
 &lt;br /&gt;
	--[[&lt;br /&gt;
	-- Check increasingly generic key combinations until we find a match. If a&lt;br /&gt;
	-- specific category exists for the combination of key fragments we are&lt;br /&gt;
	-- given, that match will be found first. If not, we keep trying different&lt;br /&gt;
	-- key fragment combinations until we match using the key&lt;br /&gt;
	-- &amp;quot;all-all-all-all-all&amp;quot;.&lt;br /&gt;
	--&lt;br /&gt;
	-- To generate the keys, we index the key subtables using a binary matrix&lt;br /&gt;
	-- with indexes i and j. j is only calculated up to the number of active&lt;br /&gt;
	-- subtables. For example, if there were three active subtables, the matrix&lt;br /&gt;
	-- would look like this, with 0 corresponding to the key fragment &amp;quot;all&amp;quot;, and&lt;br /&gt;
	-- 1 corresponding to other key fragments.&lt;br /&gt;
	-- &lt;br /&gt;
	--   j 1  2  3&lt;br /&gt;
	-- i  &lt;br /&gt;
	-- 1   1  1  1&lt;br /&gt;
	-- 2   0  1  1&lt;br /&gt;
	-- 3   1  0  1&lt;br /&gt;
	-- 4   0  0  1&lt;br /&gt;
	-- 5   1  1  0&lt;br /&gt;
	-- 6   0  1  0&lt;br /&gt;
	-- 7   1  0  0&lt;br /&gt;
	-- 8   0  0  0&lt;br /&gt;
	-- &lt;br /&gt;
	-- Values of j higher than the number of active subtables are set&lt;br /&gt;
	-- to the string &amp;quot;all&amp;quot;.&lt;br /&gt;
	--&lt;br /&gt;
	-- A key for cfg.protectionCategories is constructed for each value of i.&lt;br /&gt;
	-- The position of the value in the key is determined by the keypos field in&lt;br /&gt;
	-- each subtable.&lt;br /&gt;
	--]]&lt;br /&gt;
	local cats = cfg.protectionCategories&lt;br /&gt;
	for i = 1, 2^noActive do&lt;br /&gt;
		local key = {}&lt;br /&gt;
		for j, t in ipairs(attemptOrder) do&lt;br /&gt;
			if j &amp;gt; noActive then&lt;br /&gt;
				key[t.keypos] = 'all'&lt;br /&gt;
			else&lt;br /&gt;
				local quotient = i / 2 ^ (j - 1)&lt;br /&gt;
				quotient = math.ceil(quotient)&lt;br /&gt;
				if quotient % 2 == 1 then&lt;br /&gt;
					key[t.keypos] = t.val&lt;br /&gt;
				else&lt;br /&gt;
					key[t.keypos] = 'all'&lt;br /&gt;
				end&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
		key = table.concat(key, '|')&lt;br /&gt;
		local attempt = cats[key]&lt;br /&gt;
		if attempt then&lt;br /&gt;
			return makeCategoryLink(attempt, title.text)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return ''&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function Protection:needsExpiry()&lt;br /&gt;
	local cfg = self._cfg&lt;br /&gt;
	local actionNeedsCheck = cfg.expiryCheckActions[self.action]&lt;br /&gt;
	return not self.expiry and (&lt;br /&gt;
		actionNeedsCheck or (&lt;br /&gt;
			actionNeedsCheck == nil&lt;br /&gt;
			and self.reason -- the old {{pp-protected}} didn't check for expiry&lt;br /&gt;
			and not cfg.reasonsWithoutExpiryCheck[self.reason]&lt;br /&gt;
		)&lt;br /&gt;
	)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function Protection:isIncorrect()&lt;br /&gt;
	local expiry = self.expiry&lt;br /&gt;
	return not self:isProtected()&lt;br /&gt;
		or type(expiry) == 'number' and expiry &amp;lt; os.time()&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function Protection:isTemplateProtectedNonTemplate()&lt;br /&gt;
	local action, namespace = self.action, self.title.namespace&lt;br /&gt;
	return self.level == 'templateeditor'&lt;br /&gt;
		and (&lt;br /&gt;
			(action ~= 'edit' and action ~= 'move')&lt;br /&gt;
			or (namespace ~= 10 and namespace ~= 828)&lt;br /&gt;
		)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function Protection:makeCategoryLinks()&lt;br /&gt;
	local msg = self._cfg.msg&lt;br /&gt;
	local ret = { self:makeProtectionCategory() }&lt;br /&gt;
	if self:needsExpiry() then&lt;br /&gt;
		ret[#ret + 1] = makeCategoryLink(&lt;br /&gt;
			msg['tracking-category-expiry'],&lt;br /&gt;
			self.title.text&lt;br /&gt;
		)&lt;br /&gt;
	end&lt;br /&gt;
	if self:isIncorrect() then&lt;br /&gt;
		ret[#ret + 1] = makeCategoryLink(&lt;br /&gt;
			msg['tracking-category-incorrect'],&lt;br /&gt;
			self.title.text&lt;br /&gt;
		)&lt;br /&gt;
	end&lt;br /&gt;
	if self:isTemplateProtectedNonTemplate() then&lt;br /&gt;
		ret[#ret + 1] = makeCategoryLink(&lt;br /&gt;
			msg['tracking-category-template'],&lt;br /&gt;
			self.title.text&lt;br /&gt;
		)&lt;br /&gt;
	end&lt;br /&gt;
	return table.concat(ret)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
-- Blurb class&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
local Blurb = {}&lt;br /&gt;
Blurb.__index = Blurb&lt;br /&gt;
&lt;br /&gt;
Blurb.bannerTextFields = {&lt;br /&gt;
	text = true,&lt;br /&gt;
	explanation = true,&lt;br /&gt;
	tooltip = true,&lt;br /&gt;
	alt = true,&lt;br /&gt;
	link = true&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
function Blurb.new(protectionObj, args, cfg)&lt;br /&gt;
	return setmetatable({&lt;br /&gt;
		_cfg = cfg,&lt;br /&gt;
		_protectionObj = protectionObj,&lt;br /&gt;
		_args = args&lt;br /&gt;
	}, Blurb)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Private methods --&lt;br /&gt;
&lt;br /&gt;
function Blurb:_formatDate(num)&lt;br /&gt;
	-- Formats a Unix timestamp into dd Month, YYYY format.&lt;br /&gt;
	lang = lang or mw.language.getContentLanguage()&lt;br /&gt;
	local success, date = pcall(&lt;br /&gt;
		lang.formatDate,&lt;br /&gt;
		lang,&lt;br /&gt;
		self._cfg.msg['expiry-date-format'] or 'j F Y',&lt;br /&gt;
		'@' .. tostring(num)&lt;br /&gt;
	)&lt;br /&gt;
	if success then&lt;br /&gt;
		return date&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function Blurb:_getExpandedMessage(msgKey)&lt;br /&gt;
	return self:_substituteParameters(self._cfg.msg[msgKey])&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function Blurb:_substituteParameters(msg)&lt;br /&gt;
	if not self._params then&lt;br /&gt;
		local parameterFuncs = {}&lt;br /&gt;
&lt;br /&gt;
		parameterFuncs.CURRENTVERSION     = self._makeCurrentVersionParameter&lt;br /&gt;
		parameterFuncs.EDITREQUEST        = self._makeEditRequestParameter&lt;br /&gt;
		parameterFuncs.EXPIRY             = self._makeExpiryParameter&lt;br /&gt;
		parameterFuncs.EXPLANATIONBLURB   = self._makeExplanationBlurbParameter&lt;br /&gt;
		parameterFuncs.IMAGELINK          = self._makeImageLinkParameter&lt;br /&gt;
		parameterFuncs.INTROBLURB         = self._makeIntroBlurbParameter&lt;br /&gt;
		parameterFuncs.INTROFRAGMENT      = self._makeIntroFragmentParameter&lt;br /&gt;
		parameterFuncs.PAGETYPE           = self._makePagetypeParameter&lt;br /&gt;
		parameterFuncs.PROTECTIONBLURB    = self._makeProtectionBlurbParameter&lt;br /&gt;
		parameterFuncs.PROTECTIONDATE     = self._makeProtectionDateParameter&lt;br /&gt;
		parameterFuncs.PROTECTIONLEVEL    = self._makeProtectionLevelParameter&lt;br /&gt;
		parameterFuncs.PROTECTIONLOG      = self._makeProtectionLogParameter&lt;br /&gt;
		parameterFuncs.TALKPAGE           = self._makeTalkPageParameter&lt;br /&gt;
		parameterFuncs.TOOLTIPBLURB       = self._makeTooltipBlurbParameter&lt;br /&gt;
		parameterFuncs.TOOLTIPFRAGMENT    = self._makeTooltipFragmentParameter&lt;br /&gt;
		parameterFuncs.VANDAL             = self._makeVandalTemplateParameter&lt;br /&gt;
		&lt;br /&gt;
		self._params = setmetatable({}, {&lt;br /&gt;
			__index = function (t, k)&lt;br /&gt;
				local param&lt;br /&gt;
				if parameterFuncs[k] then&lt;br /&gt;
					param = parameterFuncs[k](self)&lt;br /&gt;
				end&lt;br /&gt;
				param = param or ''&lt;br /&gt;
				t[k] = param&lt;br /&gt;
				return param&lt;br /&gt;
			end&lt;br /&gt;
		})&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	msg = msg:gsub('${(%u+)}', self._params)&lt;br /&gt;
	return msg&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function Blurb:_makeCurrentVersionParameter()&lt;br /&gt;
	-- A link to the page history or the move log, depending on the kind of&lt;br /&gt;
	-- protection.&lt;br /&gt;
	local pagename = self._protectionObj.title.prefixedText&lt;br /&gt;
	if self._protectionObj.action == 'move' then&lt;br /&gt;
		-- We need the move log link.&lt;br /&gt;
		return makeFullUrl(&lt;br /&gt;
			'Special:Log',&lt;br /&gt;
			{type = 'move', page = pagename},&lt;br /&gt;
			self:_getExpandedMessage('current-version-move-display')&lt;br /&gt;
		)&lt;br /&gt;
	else&lt;br /&gt;
		-- We need the history link.&lt;br /&gt;
		return makeFullUrl(&lt;br /&gt;
			pagename,&lt;br /&gt;
			{action = 'history'},&lt;br /&gt;
			self:_getExpandedMessage('current-version-edit-display')&lt;br /&gt;
		)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function Blurb:_makeEditRequestParameter()&lt;br /&gt;
	local mEditRequest = require('Module:Submit an edit request')&lt;br /&gt;
	local action = self._protectionObj.action&lt;br /&gt;
	local level = self._protectionObj.level&lt;br /&gt;
	&lt;br /&gt;
	-- Get the edit request type.&lt;br /&gt;
	local requestType&lt;br /&gt;
	if action == 'edit' then&lt;br /&gt;
		if level == 'autoconfirmed' then&lt;br /&gt;
			requestType = 'semi'&lt;br /&gt;
		elseif level == 'extendedconfirmed' then&lt;br /&gt;
			requestType = 'extended'&lt;br /&gt;
		elseif level == 'templateeditor' then&lt;br /&gt;
			requestType = 'template'&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	requestType = requestType or 'full'&lt;br /&gt;
	&lt;br /&gt;
	-- Get the display value.&lt;br /&gt;
	local display = self:_getExpandedMessage('edit-request-display')&lt;br /&gt;
&lt;br /&gt;
	return mEditRequest._link{type = requestType, display = display}&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function Blurb:_makeExpiryParameter()&lt;br /&gt;
	local expiry = self._protectionObj.expiry&lt;br /&gt;
	if type(expiry) == 'number' then&lt;br /&gt;
		return self:_formatDate(expiry)&lt;br /&gt;
	else&lt;br /&gt;
		return expiry&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function Blurb:_makeExplanationBlurbParameter()&lt;br /&gt;
	-- Cover special cases first.&lt;br /&gt;
	if self._protectionObj.title.namespace == 8 then&lt;br /&gt;
		-- MediaWiki namespace&lt;br /&gt;
		return self:_getExpandedMessage('explanation-blurb-nounprotect')&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Get explanation blurb table keys&lt;br /&gt;
	local action = self._protectionObj.action&lt;br /&gt;
	local level = self._protectionObj.level&lt;br /&gt;
	local talkKey = self._protectionObj.title.isTalkPage and 'talk' or 'subject'&lt;br /&gt;
&lt;br /&gt;
	-- Find the message in the explanation blurb table and substitute any&lt;br /&gt;
	-- parameters.&lt;br /&gt;
	local explanations = self._cfg.explanationBlurbs&lt;br /&gt;
	local msg&lt;br /&gt;
	if explanations[action][level] and explanations[action][level][talkKey] then&lt;br /&gt;
		msg = explanations[action][level][talkKey]&lt;br /&gt;
	elseif explanations[action][level] and explanations[action][level].default then&lt;br /&gt;
		msg = explanations[action][level].default&lt;br /&gt;
	elseif explanations[action].default and explanations[action].default[talkKey] then&lt;br /&gt;
		msg = explanations[action].default[talkKey]&lt;br /&gt;
	elseif explanations[action].default and explanations[action].default.default then&lt;br /&gt;
		msg = explanations[action].default.default&lt;br /&gt;
	else&lt;br /&gt;
		error(string.format(&lt;br /&gt;
			'could not find explanation blurb for action &amp;quot;%s&amp;quot;, level &amp;quot;%s&amp;quot; and talk key &amp;quot;%s&amp;quot;',&lt;br /&gt;
			action,&lt;br /&gt;
			level,&lt;br /&gt;
			talkKey&lt;br /&gt;
		), 8)&lt;br /&gt;
	end&lt;br /&gt;
	return self:_substituteParameters(msg)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function Blurb:_makeImageLinkParameter()&lt;br /&gt;
	local imageLinks = self._cfg.imageLinks&lt;br /&gt;
	local action = self._protectionObj.action&lt;br /&gt;
	local level = self._protectionObj.level&lt;br /&gt;
	local msg&lt;br /&gt;
	if imageLinks[action][level] then&lt;br /&gt;
		msg = imageLinks[action][level]&lt;br /&gt;
	elseif imageLinks[action].default then&lt;br /&gt;
		msg = imageLinks[action].default&lt;br /&gt;
	else&lt;br /&gt;
		msg = imageLinks.edit.default&lt;br /&gt;
	end&lt;br /&gt;
	return self:_substituteParameters(msg)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function Blurb:_makeIntroBlurbParameter()&lt;br /&gt;
	if self._protectionObj:isTemporary() then&lt;br /&gt;
		return self:_getExpandedMessage('intro-blurb-expiry')&lt;br /&gt;
	else&lt;br /&gt;
		return self:_getExpandedMessage('intro-blurb-noexpiry')&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function Blurb:_makeIntroFragmentParameter()&lt;br /&gt;
	if self._protectionObj:isTemporary() then&lt;br /&gt;
		return self:_getExpandedMessage('intro-fragment-expiry')&lt;br /&gt;
	else&lt;br /&gt;
		return self:_getExpandedMessage('intro-fragment-noexpiry')&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function Blurb:_makePagetypeParameter()&lt;br /&gt;
	local pagetypes = self._cfg.pagetypes&lt;br /&gt;
	return pagetypes[self._protectionObj.title.namespace]&lt;br /&gt;
		or pagetypes.default&lt;br /&gt;
		or error('no default pagetype defined', 8)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function Blurb:_makeProtectionBlurbParameter()&lt;br /&gt;
	local protectionBlurbs = self._cfg.protectionBlurbs&lt;br /&gt;
	local action = self._protectionObj.action&lt;br /&gt;
	local level = self._protectionObj.level&lt;br /&gt;
	local msg&lt;br /&gt;
	if protectionBlurbs[action][level] then&lt;br /&gt;
		msg = protectionBlurbs[action][level]&lt;br /&gt;
	elseif protectionBlurbs[action].default then&lt;br /&gt;
		msg = protectionBlurbs[action].default&lt;br /&gt;
	elseif protectionBlurbs.edit.default then&lt;br /&gt;
		msg = protectionBlurbs.edit.default&lt;br /&gt;
	else&lt;br /&gt;
		error('no protection blurb defined for protectionBlurbs.edit.default', 8)&lt;br /&gt;
	end&lt;br /&gt;
	return self:_substituteParameters(msg)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function Blurb:_makeProtectionDateParameter()&lt;br /&gt;
	local protectionDate = self._protectionObj.protectionDate&lt;br /&gt;
	if type(protectionDate) == 'number' then&lt;br /&gt;
		return self:_formatDate(protectionDate)&lt;br /&gt;
	else&lt;br /&gt;
		return protectionDate&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function Blurb:_makeProtectionLevelParameter()&lt;br /&gt;
	local protectionLevels = self._cfg.protectionLevels&lt;br /&gt;
	local action = self._protectionObj.action&lt;br /&gt;
	local level = self._protectionObj.level&lt;br /&gt;
	local msg&lt;br /&gt;
	if protectionLevels[action][level] then&lt;br /&gt;
		msg = protectionLevels[action][level]&lt;br /&gt;
	elseif protectionLevels[action].default then&lt;br /&gt;
		msg = protectionLevels[action].default&lt;br /&gt;
	elseif protectionLevels.edit.default then&lt;br /&gt;
		msg = protectionLevels.edit.default&lt;br /&gt;
	else&lt;br /&gt;
		error('no protection level defined for protectionLevels.edit.default', 8)&lt;br /&gt;
	end&lt;br /&gt;
	return self:_substituteParameters(msg)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function Blurb:_makeProtectionLogParameter()&lt;br /&gt;
	local pagename = self._protectionObj.title.prefixedText&lt;br /&gt;
	if self._protectionObj.action == 'autoreview' then&lt;br /&gt;
		-- We need the pending changes log.&lt;br /&gt;
		return makeFullUrl(&lt;br /&gt;
			'Special:Log',&lt;br /&gt;
			{type = 'stable', page = pagename},&lt;br /&gt;
			self:_getExpandedMessage('pc-log-display')&lt;br /&gt;
		)&lt;br /&gt;
	else&lt;br /&gt;
		-- We need the protection log.&lt;br /&gt;
		return makeFullUrl(&lt;br /&gt;
			'Special:Log',&lt;br /&gt;
			{type = 'protect', page = pagename},&lt;br /&gt;
			self:_getExpandedMessage('protection-log-display')&lt;br /&gt;
		)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function Blurb:_makeTalkPageParameter()&lt;br /&gt;
	return string.format(&lt;br /&gt;
		'[[%s:%s#%s|%s]]',&lt;br /&gt;
		mw.site.namespaces[self._protectionObj.title.namespace].talk.name,&lt;br /&gt;
		self._protectionObj.title.text,&lt;br /&gt;
		self._args.section or 'top',&lt;br /&gt;
		self:_getExpandedMessage('talk-page-link-display')&lt;br /&gt;
	)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function Blurb:_makeTooltipBlurbParameter()&lt;br /&gt;
	if self._protectionObj:isTemporary() then&lt;br /&gt;
		return self:_getExpandedMessage('tooltip-blurb-expiry')&lt;br /&gt;
	else&lt;br /&gt;
		return self:_getExpandedMessage('tooltip-blurb-noexpiry')&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function Blurb:_makeTooltipFragmentParameter()&lt;br /&gt;
	if self._protectionObj:isTemporary() then&lt;br /&gt;
		return self:_getExpandedMessage('tooltip-fragment-expiry')&lt;br /&gt;
	else&lt;br /&gt;
		return self:_getExpandedMessage('tooltip-fragment-noexpiry')&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function Blurb:_makeVandalTemplateParameter()&lt;br /&gt;
	return require('Module:Vandal-m')._main{&lt;br /&gt;
		self._args.user or self._protectionObj.title.baseText&lt;br /&gt;
	}&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Public methods --&lt;br /&gt;
&lt;br /&gt;
function Blurb:makeBannerText(key)&lt;br /&gt;
	-- Validate input.&lt;br /&gt;
	if not key or not Blurb.bannerTextFields[key] then&lt;br /&gt;
		error(string.format(&lt;br /&gt;
			'&amp;quot;%s&amp;quot; is not a valid banner config field',&lt;br /&gt;
			tostring(key)&lt;br /&gt;
		), 2)&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Generate the text.&lt;br /&gt;
	local msg = self._protectionObj.bannerConfig[key]&lt;br /&gt;
	if type(msg) == 'string' then&lt;br /&gt;
		return self:_substituteParameters(msg)&lt;br /&gt;
	elseif type(msg) == 'function' then&lt;br /&gt;
		msg = msg(self._protectionObj, self._args)&lt;br /&gt;
		if type(msg) ~= 'string' then&lt;br /&gt;
			error(string.format(&lt;br /&gt;
				'bad output from banner config function with key &amp;quot;%s&amp;quot;'&lt;br /&gt;
					.. ' (expected string, got %s)',&lt;br /&gt;
				tostring(key),&lt;br /&gt;
				type(msg)&lt;br /&gt;
			), 4)&lt;br /&gt;
		end&lt;br /&gt;
		return self:_substituteParameters(msg)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
-- BannerTemplate class&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
local BannerTemplate = {}&lt;br /&gt;
BannerTemplate.__index = BannerTemplate&lt;br /&gt;
&lt;br /&gt;
function BannerTemplate.new(protectionObj, cfg)&lt;br /&gt;
	local obj = {}&lt;br /&gt;
	obj._cfg = cfg&lt;br /&gt;
&lt;br /&gt;
	-- Set the image filename.&lt;br /&gt;
	local imageFilename = protectionObj.bannerConfig.image&lt;br /&gt;
	if imageFilename then&lt;br /&gt;
		obj._imageFilename = imageFilename&lt;br /&gt;
	else&lt;br /&gt;
		-- If an image filename isn't specified explicitly in the banner config,&lt;br /&gt;
		-- generate it from the protection status and the namespace.&lt;br /&gt;
		local action = protectionObj.action&lt;br /&gt;
		local level = protectionObj.level&lt;br /&gt;
		local namespace = protectionObj.title.namespace&lt;br /&gt;
		local reason = protectionObj.reason&lt;br /&gt;
		&lt;br /&gt;
		-- Deal with special cases first.&lt;br /&gt;
		if (&lt;br /&gt;
			namespace == 10&lt;br /&gt;
			or namespace == 828&lt;br /&gt;
			or reason and obj._cfg.indefImageReasons[reason]&lt;br /&gt;
			)&lt;br /&gt;
			and action == 'edit'&lt;br /&gt;
			and level == 'sysop'&lt;br /&gt;
			and not protectionObj:isTemporary()&lt;br /&gt;
		then&lt;br /&gt;
			-- Fully protected modules and templates get the special red &amp;quot;indef&amp;quot;&lt;br /&gt;
			-- padlock.&lt;br /&gt;
			obj._imageFilename = obj._cfg.msg['image-filename-indef']&lt;br /&gt;
		else&lt;br /&gt;
			-- Deal with regular protection types.&lt;br /&gt;
			local images = obj._cfg.images&lt;br /&gt;
			if images[action] then&lt;br /&gt;
				if images[action][level] then&lt;br /&gt;
					obj._imageFilename = images[action][level]&lt;br /&gt;
				elseif images[action].default then&lt;br /&gt;
					obj._imageFilename = images[action].default&lt;br /&gt;
				end&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return setmetatable(obj, BannerTemplate)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function BannerTemplate:renderImage()&lt;br /&gt;
	local filename = self._imageFilename&lt;br /&gt;
		or self._cfg.msg['image-filename-default']&lt;br /&gt;
		or 'Transparent.gif'&lt;br /&gt;
	return makeFileLink{&lt;br /&gt;
		file = filename,&lt;br /&gt;
		size = (self.imageWidth or 20) .. 'px',&lt;br /&gt;
		alt = self._imageAlt,&lt;br /&gt;
		link = self._imageLink,&lt;br /&gt;
		caption = self.imageCaption&lt;br /&gt;
	}&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
-- Banner class&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
local Banner = setmetatable({}, BannerTemplate)&lt;br /&gt;
Banner.__index = Banner&lt;br /&gt;
&lt;br /&gt;
function Banner.new(protectionObj, blurbObj, cfg)&lt;br /&gt;
	local obj = BannerTemplate.new(protectionObj, cfg) -- This doesn't need the blurb.&lt;br /&gt;
	obj.imageWidth = 40&lt;br /&gt;
	obj.imageCaption = blurbObj:makeBannerText('alt') -- Large banners use the alt text for the tooltip.&lt;br /&gt;
	obj._reasonText = blurbObj:makeBannerText('text')&lt;br /&gt;
	obj._explanationText = blurbObj:makeBannerText('explanation')&lt;br /&gt;
	obj._page = protectionObj.title.prefixedText -- Only makes a difference in testing.&lt;br /&gt;
	return setmetatable(obj, Banner)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function Banner:__tostring()&lt;br /&gt;
	-- Renders the banner.&lt;br /&gt;
	makeMessageBox = makeMessageBox or require('Module:Message box').main&lt;br /&gt;
	local reasonText = self._reasonText or error('no reason text set', 2)&lt;br /&gt;
	local explanationText = self._explanationText&lt;br /&gt;
	local mbargs = {&lt;br /&gt;
		page = self._page,&lt;br /&gt;
		type = 'protection',&lt;br /&gt;
		image = self:renderImage(),&lt;br /&gt;
		text = string.format(&lt;br /&gt;
			&amp;quot;'''%s'''%s&amp;quot;,&lt;br /&gt;
			reasonText,&lt;br /&gt;
			explanationText and '&amp;lt;br /&amp;gt;' .. explanationText or ''&lt;br /&gt;
		)&lt;br /&gt;
	}&lt;br /&gt;
	return makeMessageBox('mbox', mbargs)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
-- Padlock class&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
local Padlock = setmetatable({}, BannerTemplate)&lt;br /&gt;
Padlock.__index = Padlock&lt;br /&gt;
&lt;br /&gt;
function Padlock.new(protectionObj, blurbObj, cfg)&lt;br /&gt;
	local obj = BannerTemplate.new(protectionObj, cfg) -- This doesn't need the blurb.&lt;br /&gt;
	obj.imageWidth = 20&lt;br /&gt;
	obj.imageCaption = blurbObj:makeBannerText('tooltip')&lt;br /&gt;
	obj._imageAlt = blurbObj:makeBannerText('alt')&lt;br /&gt;
	obj._imageLink = blurbObj:makeBannerText('link')&lt;br /&gt;
	obj._indicatorName = cfg.padlockIndicatorNames[protectionObj.action]&lt;br /&gt;
		or cfg.padlockIndicatorNames.default&lt;br /&gt;
		or 'pp-default'&lt;br /&gt;
	return setmetatable(obj, Padlock)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function Padlock:__tostring()&lt;br /&gt;
	local frame = mw.getCurrentFrame()&lt;br /&gt;
	-- The nowiki tag helps prevent whitespace at the top of articles.&lt;br /&gt;
	return frame:extensionTag{name = 'nowiki'} .. frame:extensionTag{&lt;br /&gt;
		name = 'indicator',&lt;br /&gt;
		args = {name = self._indicatorName},&lt;br /&gt;
		content = self:renderImage()&lt;br /&gt;
	}&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
-- Exports&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
function p._exportClasses()&lt;br /&gt;
	-- This is used for testing purposes.&lt;br /&gt;
	return {&lt;br /&gt;
		Protection = Protection,&lt;br /&gt;
		Blurb = Blurb,&lt;br /&gt;
		BannerTemplate = BannerTemplate,&lt;br /&gt;
		Banner = Banner,&lt;br /&gt;
		Padlock = Padlock,&lt;br /&gt;
	}&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p._main(args, cfg, title)&lt;br /&gt;
	args = args or {}&lt;br /&gt;
	cfg = cfg or require(CONFIG_MODULE)&lt;br /&gt;
&lt;br /&gt;
	local protectionObj = Protection.new(args, cfg, title)&lt;br /&gt;
&lt;br /&gt;
	local ret = {}&lt;br /&gt;
&lt;br /&gt;
	-- If a page's edit protection is equally or more restrictive than its&lt;br /&gt;
	-- protection from some other action, then don't bother displaying anything&lt;br /&gt;
	-- for the other action (except categories).&lt;br /&gt;
	if protectionObj.action == 'edit' or&lt;br /&gt;
		args.demolevel or&lt;br /&gt;
		not getReachableNodes(&lt;br /&gt;
			cfg.hierarchy,&lt;br /&gt;
			protectionObj.level&lt;br /&gt;
		)[effectiveProtectionLevel('edit', protectionObj.title)]&lt;br /&gt;
	then&lt;br /&gt;
		-- Initialise the blurb object&lt;br /&gt;
		local blurbObj = Blurb.new(protectionObj, args, cfg)&lt;br /&gt;
	&lt;br /&gt;
		-- Render the banner&lt;br /&gt;
		if protectionObj:isProtected() then&lt;br /&gt;
			ret[#ret + 1] = tostring(&lt;br /&gt;
				(yesno(args.small) and Padlock or Banner)&lt;br /&gt;
				.new(protectionObj, blurbObj, cfg)&lt;br /&gt;
			)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Render the categories&lt;br /&gt;
	if yesno(args.category) ~= false then&lt;br /&gt;
		ret[#ret + 1] = protectionObj:makeCategoryLinks()&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	return table.concat(ret)	&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.main(frame, cfg)&lt;br /&gt;
	cfg = cfg or require(CONFIG_MODULE)&lt;br /&gt;
&lt;br /&gt;
	-- Find default args, if any.&lt;br /&gt;
	local parent = frame.getParent and frame:getParent()&lt;br /&gt;
	local defaultArgs = parent and cfg.wrappers[parent:getTitle():gsub('/sandbox$', '')]&lt;br /&gt;
&lt;br /&gt;
	-- Find user args, and use the parent frame if we are being called from a&lt;br /&gt;
	-- wrapper template.&lt;br /&gt;
	getArgs = getArgs or require('Module:Arguments').getArgs&lt;br /&gt;
	local userArgs = getArgs(frame, {&lt;br /&gt;
		parentOnly = defaultArgs,&lt;br /&gt;
		frameOnly = not defaultArgs&lt;br /&gt;
	})&lt;br /&gt;
&lt;br /&gt;
	-- Build the args table. User-specified args overwrite default args.&lt;br /&gt;
	local args = {}&lt;br /&gt;
	for k, v in pairs(defaultArgs or {}) do&lt;br /&gt;
		args[k] = v&lt;br /&gt;
	end&lt;br /&gt;
	for k, v in pairs(userArgs) do&lt;br /&gt;
		args[k] = v&lt;br /&gt;
	end&lt;br /&gt;
	return p._main(args, cfg)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>Kolk</name></author>	</entry>

	<entry>
		<id>http://wiki.isofts.kiev.ua/index.php?title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:Hatnote/doc&amp;diff=671</id>
		<title>Модуль:Hatnote/doc</title>
		<link rel="alternate" type="text/html" href="http://wiki.isofts.kiev.ua/index.php?title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:Hatnote/doc&amp;diff=671"/>
				<updated>2016-11-24T15:23:17Z</updated>
		
		<summary type="html">&lt;p&gt;Kolk: Імпортовано 1 версія&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{high-risk|1,000,000+}}&lt;br /&gt;
&lt;br /&gt;
This is a meta-module that provides various functions for making [[Wikipedia:Hatnote|hatnotes]]. It implements the {{tl|hatnote}} template, for use in hatnotes at the top of pages, and the {{tl|format link}} template, which is used to format a wikilink for use in hatnotes. It also contains a number of helper functions for use in other Lua hatnote modules.&lt;br /&gt;
&lt;br /&gt;
== Use from wikitext ==&lt;br /&gt;
&lt;br /&gt;
The functions in this module cannot be used directly from #invoke, and must be used through templates instead. Please see [[Template:Hatnote]] and [[Template:Format link]] for documentation.&lt;br /&gt;
&lt;br /&gt;
== Use from other Lua modules ==&lt;br /&gt;
&lt;br /&gt;
To load this module from another Lua module, use the following code.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local mHatnote = require('Module:Hatnote')&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can then use the functions as documented below.&lt;br /&gt;
&lt;br /&gt;
=== Hatnote ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
mHatnote._hatnote(s, options)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Formats the string &amp;lt;var&amp;gt;s&amp;lt;/var&amp;gt; as a hatnote. This encloses &amp;lt;var&amp;gt;s&amp;lt;/var&amp;gt; in the tags {{tag|div|params=class=&amp;quot;hatnote&amp;quot;}}. Options are provided in the &amp;lt;var&amp;gt;options&amp;lt;/var&amp;gt; table. Options include:&lt;br /&gt;
* &amp;lt;var&amp;gt;options.extraclasses&amp;lt;/var&amp;gt; - a string of extra classes to provide&lt;br /&gt;
* &amp;lt;var&amp;gt;options.selfref&amp;lt;/var&amp;gt; - if this is not nil or false, adds the class &amp;quot;selfref&amp;quot;, used to denote self-references to Wikipedia (see [[Template:Selfref]]))&lt;br /&gt;
The CSS of the hatnote class is defined in [[MediaWiki:Common.css]].&lt;br /&gt;
&lt;br /&gt;
; Example 1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
mHatnote._hatnote('This is a hatnote.')&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Produces:&lt;br /&gt;
{{tag|div|content=This is a hatnote.|params=class=&amp;quot;hatnote&amp;quot;}}&lt;br /&gt;
&lt;br /&gt;
Displays as:&lt;br /&gt;
{{hatnote|This is a hatnote.}}&lt;br /&gt;
&lt;br /&gt;
; Example 2&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
mHatnote._hatnote('This is a hatnote.', {extraclasses = 'boilerplate seealso', selfref = true})&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Produces:&lt;br /&gt;
{{tag|div|content=This is a hatnote.|params=class=&amp;quot;hatnote boilerplate seealso selfref&amp;quot;}}&lt;br /&gt;
&lt;br /&gt;
Displayed as:&lt;br /&gt;
{{hatnote|This is a hatnote.|extraclasses=boilerplate seealso|selfref=true}}&lt;br /&gt;
&lt;br /&gt;
=== Format link ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
mHatnote._formatLink(link, display)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Formats &amp;lt;var&amp;gt;link&amp;lt;/var&amp;gt; as a wikilink for display in hatnote templates, with optional display value &amp;lt;var&amp;gt;display&amp;lt;/var&amp;gt;. Categories and files are automatically escaped with the [[Help:Colon trick|colon trick]], and links to sections are automatically formatted as ''page § section'', rather than the MediaWiki default of ''page#section''.&lt;br /&gt;
&lt;br /&gt;
;Examples:&lt;br /&gt;
: {{code|mHatnote._formatLink('Lion')|lua}} &amp;amp;rarr; &amp;lt;nowiki&amp;gt;[[Lion]]&amp;lt;/nowiki&amp;gt; &amp;amp;rarr; {{format hatnote link|Lion}}&lt;br /&gt;
: {{code|mHatnote._formatLink('Lion#Etymology')|lua}} &amp;amp;rarr; &amp;lt;nowiki&amp;gt;[[Lion#Etymology|Lion § Etymology]]&amp;lt;/nowiki&amp;gt; &amp;amp;rarr; {{format hatnote link|Lion#Etymology}}&lt;br /&gt;
: {{code|mHatnote._formatLink('Category:Lions')|lua}} &amp;amp;rarr; &amp;lt;nowiki&amp;gt;[[:Category:Lions]]&amp;lt;/nowiki&amp;gt; &amp;amp;rarr; {{format hatnote link|Category:Lions}}&lt;br /&gt;
: {{code|mHatnote._formatLink('Lion#Etymology', 'Etymology of lion')|lua}} &amp;amp;rarr; &amp;lt;nowiki&amp;gt;[[Lion#Etymology|Etymology of lion]]&amp;lt;/nowiki&amp;gt; &amp;amp;rarr; {{format hatnote link|Lion#Etymology|Etymology of lion}}&lt;br /&gt;
&lt;br /&gt;
=== Format pages ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
mHatnote.formatPages(...)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Formats a list of pages using the [[#Format link|_formatLink]] function, and returns the result as an array. For example, the code {{code|mHatnote.formatPages('Lion', 'Category:Lions', 'Lion#Etymology')|lua}} would produce an array like {{code|{'[[Lion]]', '[[:Category:Lions]]', '[[Lion#Etymology|Lion § Etymology]]'}|lua}}.&lt;br /&gt;
&lt;br /&gt;
=== Format page tables ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
mHatnote.formatPageTables(...)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Takes a list of page/display tables, formats them with the [[#Format link|_formatLink]] function, and returns the result as an array. Each item in the list must be a table. The first value in the table is the link, and is required. The second value in the table is the display value, and is optional. For example, the code {{code|mHatnote.formatPages({'Lion', 'the Lion article'}, {'Category:Lions'}, {'Lion#Etymology', 'the etymology of lion'})|lua}} would produce an array like {{code|{'[[Lion|the Lion article]]', '[[:Category:Lions]]', '[[Lion#Etymology|the etymology of lion]]'}|lua}}.&lt;br /&gt;
&lt;br /&gt;
=== Find namespace id ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
mHatnote.findNamespaceId(link, removeColon)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finds the [[WP:NS|namespace id]] of the string &amp;lt;var&amp;gt;link&amp;lt;/var&amp;gt;, which should be a valid page name, with or without the section name. This function will not work if the page name is enclosed with square brackets. When trying to parse the namespace name, colons are removed from the start of the link by default. This is helpful if users have specified colons when they are not strictly necessary. If you do not need to check for initial colons, set &amp;lt;var&amp;gt;removeColon&amp;lt;/var&amp;gt; to false.&lt;br /&gt;
&lt;br /&gt;
;Examples:&lt;br /&gt;
: {{code|mHatnote.findNamespaceId('Lion')|lua}} &amp;amp;rarr; 0&lt;br /&gt;
: {{code|mHatnote.findNamespaceId('Category:Lions')|lua}} &amp;amp;rarr; 14&lt;br /&gt;
: {{code|mHatnote.findNamespaceId(':Category:Lions')|lua}} &amp;amp;rarr; 14&lt;br /&gt;
: {{code|mHatnote.findNamespaceId(':Category:Lions', false)|lua}} &amp;amp;rarr; 0 (the namespace is detected as &amp;quot;:Category&amp;quot;, rather than &amp;quot;Category&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
=== Make wikitext error ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
mHatnote.makeWikitextError(msg, helpLink, addTrackingCategory)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Formats the string &amp;lt;var&amp;gt;msg&amp;lt;/var&amp;gt; as a red wikitext error message, with optional link to a help page &amp;lt;var&amp;gt;helpLink&amp;lt;/var&amp;gt;. Normally this function also adds [[:Category:Hatnote templates with errors]]; however, if &amp;lt;var&amp;gt;addTrackingCategory&amp;lt;/var&amp;gt; is not false after being passed through [[Module:Yesno]], then the category is suppressed. This means that the category can be suppressed with &amp;lt;var&amp;gt;addTrackingCategory&amp;lt;/var&amp;gt; values including &amp;quot;no&amp;quot;, &amp;quot;n&amp;quot;, 0, &amp;quot;false&amp;quot;, and {{code|false|lua}}.&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
:{{code|mHatnote.makeWikitextError('an error has occurred')|lua}} &amp;amp;rarr; &amp;lt;strong class=&amp;quot;error&amp;quot;&amp;gt;Error: an error has occurred.&amp;lt;/strong&amp;gt;&lt;br /&gt;
:{{code|mHatnote.makeWikitextError('an error has occurred', 'Template:Example#Errors')|lua}} &amp;amp;rarr; &amp;lt;strong class=&amp;quot;error&amp;quot;&amp;gt;Error: an error has occurred ([[Template:Example#Errors|help]]).&amp;lt;/strong&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
For examples of how this module is used in other Lua modules, see the following (listed in order of complexity):&lt;br /&gt;
&lt;br /&gt;
* [[Module:Details]]&lt;br /&gt;
* [[Module:Further]]&lt;br /&gt;
* [[Module:See also]]&lt;br /&gt;
* [[Module:Main]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;includeonly&amp;gt;{{#ifeq:{{SUBPAGENAME}}|sandbox||&lt;br /&gt;
&amp;lt;!-- Categories go here and interwikis go in Wikidata. --&amp;gt;&lt;br /&gt;
[[Category:Hatnote modules| ]]&lt;br /&gt;
[[Category:Modules that add a tracking category]]&lt;br /&gt;
&lt;br /&gt;
}}&amp;lt;/includeonly&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kolk</name></author>	</entry>

	<entry>
		<id>http://wiki.isofts.kiev.ua/index.php?title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:Effective_protection_expiry&amp;diff=669</id>
		<title>Модуль:Effective protection expiry</title>
		<link rel="alternate" type="text/html" href="http://wiki.isofts.kiev.ua/index.php?title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:Effective_protection_expiry&amp;diff=669"/>
				<updated>2016-11-24T15:23:14Z</updated>
		
		<summary type="html">&lt;p&gt;Kolk: Імпортовано 1 версія&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;local p = {}&lt;br /&gt;
&lt;br /&gt;
-- Returns the expiry of a restriction of an action on a given title, or unknown if it cannot be known.&lt;br /&gt;
-- If no title is specified, the title of the page being displayed is used.&lt;br /&gt;
function p._main(action, pagename)&lt;br /&gt;
	local title&lt;br /&gt;
	if type(pagename) == 'table' and pagename.prefixedText then&lt;br /&gt;
		title = pagename&lt;br /&gt;
	elseif pagename then&lt;br /&gt;
		title = mw.title.new(pagename)&lt;br /&gt;
	else&lt;br /&gt;
		title = mw.title.getCurrentTitle()&lt;br /&gt;
	end&lt;br /&gt;
	pagename = title.prefixedText&lt;br /&gt;
	if action == 'autoreview' then&lt;br /&gt;
		local stabilitySettings = mw.ext.FlaggedRevs.getStabilitySettings(title)&lt;br /&gt;
		return stabilitySettings and stabilitySettings.expiry or 'unknown'&lt;br /&gt;
	elseif action ~= 'edit' and action ~= 'move' and action ~= 'create' and action ~= 'upload' then&lt;br /&gt;
		error( 'First parameter must be one of edit, move, create, upload, autoreview', 2 )&lt;br /&gt;
	end&lt;br /&gt;
	local rawExpiry = mw.getCurrentFrame():callParserFunction('PROTECTIONEXPIRY', action, pagename)&lt;br /&gt;
	if rawExpiry == 'infinity' then&lt;br /&gt;
		return 'infinity'&lt;br /&gt;
	elseif rawExpiry == '' then&lt;br /&gt;
		return 'unknown'&lt;br /&gt;
	else&lt;br /&gt;
		local year, month, day, hour, minute, second = rawExpiry:match(&lt;br /&gt;
			'^(%d%d%d%d)(%d%d)(%d%d)(%d%d)(%d%d)(%d%d)$'&lt;br /&gt;
		)&lt;br /&gt;
		if year then&lt;br /&gt;
			return string.format(&lt;br /&gt;
				'%s-%s-%sT%s:%s:%s',&lt;br /&gt;
				year, month, day, hour, minute, second&lt;br /&gt;
			)&lt;br /&gt;
		else&lt;br /&gt;
			error('internal error in Module:Effective protection expiry; malformed expiry timestamp')&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
setmetatable(p, { __index = function(t, k)&lt;br /&gt;
	return function(frame)&lt;br /&gt;
		return t._main(k, frame.args[1])&lt;br /&gt;
	end&lt;br /&gt;
end })&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>Kolk</name></author>	</entry>

	<entry>
		<id>http://wiki.isofts.kiev.ua/index.php?title=%D0%A8%D0%B0%D0%B1%D0%BB%D0%BE%D0%BD:Tag&amp;diff=667</id>
		<title>Шаблон:Tag</title>
		<link rel="alternate" type="text/html" href="http://wiki.isofts.kiev.ua/index.php?title=%D0%A8%D0%B0%D0%B1%D0%BB%D0%BE%D0%BD:Tag&amp;diff=667"/>
				<updated>2016-11-24T15:23:12Z</updated>
		
		<summary type="html">&lt;p&gt;Kolk: Імпортовано 1 версія&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;code class=&amp;quot;{{#ifeq:{{{wrap|}}}|yes|wrap|nowrap}}&amp;quot; style=&amp;quot;{{#ifeq:{{{style|}}}|plain|border:none;background:transparent;|{{{style|}}}}}&amp;quot;&amp;gt;&amp;lt;!--&lt;br /&gt;
 Opening tag&lt;br /&gt;
--&amp;gt;{{#switch:{{{2|pair}}}&lt;br /&gt;
  |c|close =&lt;br /&gt;
  |s|single&lt;br /&gt;
  |o|open&lt;br /&gt;
  |p|pair = &amp;amp;lt;{{{1|tag}}}{{#if:{{{params|}}}|&amp;amp;#32;{{{params}}}}}&lt;br /&gt;
 }}&amp;lt;!--&lt;br /&gt;
 Content between tags&lt;br /&gt;
--&amp;gt;{{#switch:{{{2|pair}}}&lt;br /&gt;
  |c|close = {{{content|}}}&lt;br /&gt;
  |s|single = &amp;amp;#32;&amp;amp;#47;&amp;amp;gt;&lt;br /&gt;
  |o|open = &amp;amp;gt;{{{content|}}}&lt;br /&gt;
  |p|pair = {{#ifeq:{{{1|tag}}}|!--||&amp;amp;gt;}}{{{content|...}}}&lt;br /&gt;
 }}&amp;lt;!--&lt;br /&gt;
 Closing tag&lt;br /&gt;
--&amp;gt;{{#switch:{{{2|pair}}}&lt;br /&gt;
  |s|single&lt;br /&gt;
  |o|open =&lt;br /&gt;
  |c|close&lt;br /&gt;
  |p|pair = {{#ifeq:{{{1|tag}}}|!--|--&amp;amp;gt;|&amp;amp;lt;&amp;amp;#47;{{{1|tag}}}&amp;amp;gt;}}&lt;br /&gt;
 }}&amp;lt;!--&lt;br /&gt;
--&amp;gt;&amp;lt;/code&amp;gt;&amp;lt;noinclude&amp;gt;&lt;br /&gt;
{{Documentation}}&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kolk</name></author>	</entry>

	<entry>
		<id>http://wiki.isofts.kiev.ua/index.php?title=%D0%A8%D0%B0%D0%B1%D0%BB%D0%BE%D0%BD:High-risk&amp;diff=665</id>
		<title>Шаблон:High-risk</title>
		<link rel="alternate" type="text/html" href="http://wiki.isofts.kiev.ua/index.php?title=%D0%A8%D0%B0%D0%B1%D0%BB%D0%BE%D0%BD:High-risk&amp;diff=665"/>
				<updated>2016-11-24T15:23:09Z</updated>
		
		<summary type="html">&lt;p&gt;Kolk: Імпортовано 1 версія&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{ombox&lt;br /&gt;
| type = content&lt;br /&gt;
| image = [[File:Ambox warning orange.svg|40px|alt=]]&lt;br /&gt;
| imageright =&lt;br /&gt;
| text = &lt;br /&gt;
'''This {{&lt;br /&gt;
#switch:{{NAMESPACE}}&lt;br /&gt;
|Module=Lua module&lt;br /&gt;
|#default=template&lt;br /&gt;
}} is used on &amp;lt;span class=&amp;quot;plainlinks&amp;quot;&amp;gt;[https://tools.wmflabs.org/templatecount/index.php?lang=en&amp;amp;namespace={{NAMESPACENUMBER:{{FULLPAGENAME}}}}&amp;amp;name={{urlencode:{{&lt;br /&gt;
#switch: {{SUBPAGENAME}}&lt;br /&gt;
| doc | sandbox = {{BASEPAGENAME}}&lt;br /&gt;
| #default      = {{PAGENAME}}&lt;br /&gt;
}}}} {{#if:{{{1|}}}|{{formatnum:{{{1}}}}}|a very large number of}} pages].'''&amp;lt;/span&amp;gt;&amp;lt;br /&amp;gt;To avoid large-scale disruption and unnecessary server load, any changes to this {{&lt;br /&gt;
#switch:{{NAMESPACE}}&lt;br /&gt;
|Module=module&lt;br /&gt;
|#default=template&lt;br /&gt;
}} should first be tested in its [[{{&lt;br /&gt;
#switch: {{SUBPAGENAME}}&lt;br /&gt;
| doc | sandbox = {{SUBJECTSPACE}}:{{BASEPAGENAME}}&lt;br /&gt;
| #default      = {{SUBJECTPAGENAME}}&lt;br /&gt;
}}/sandbox|/sandbox]] or [[{{&lt;br /&gt;
#switch: {{SUBPAGENAME}}&lt;br /&gt;
| doc | sandbox = {{SUBJECTSPACE}}:{{BASEPAGENAME}}&lt;br /&gt;
| #default      = {{SUBJECTPAGENAME}}&lt;br /&gt;
}}/testcases|/testcases]] subpages{{&lt;br /&gt;
#switch:{{NAMESPACE}}&lt;br /&gt;
|Module=.&lt;br /&gt;
|#default=&amp;amp;#32;or in your own [[Wikipedia:Subpages#How to create user subpages|user subpage]].&lt;br /&gt;
}} The tested changes can then be added to this page in one single edit. Please consider discussing any changes {{#if:{{{2|}}}|at [[{{{2}}}]]|on the [[{{&lt;br /&gt;
#switch: {{SUBPAGENAME}}&lt;br /&gt;
| doc | sandbox = {{TALKSPACE}}:{{BASEPAGENAME}}&lt;br /&gt;
| #default      = {{TALKPAGENAME}}&lt;br /&gt;
}}|talk page]]}} before implementing them.&lt;br /&gt;
}}&amp;lt;noinclude&amp;gt;&lt;br /&gt;
{{Documentation}}&lt;br /&gt;
&amp;lt;!-- Add categories to the /doc subpage; interwikis go to Wikidata, thank you! --&amp;gt;&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kolk</name></author>	</entry>

	<entry>
		<id>http://wiki.isofts.kiev.ua/index.php?title=%D0%A8%D0%B0%D0%B1%D0%BB%D0%BE%D0%BD:Hatnote&amp;diff=663</id>
		<title>Шаблон:Hatnote</title>
		<link rel="alternate" type="text/html" href="http://wiki.isofts.kiev.ua/index.php?title=%D0%A8%D0%B0%D0%B1%D0%BB%D0%BE%D0%BD:Hatnote&amp;diff=663"/>
				<updated>2016-11-24T15:23:07Z</updated>
		
		<summary type="html">&lt;p&gt;Kolk: Імпортовано 1 версія&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;includeonly&amp;gt;{{#invoke:Hatnote|hatnote}}&amp;lt;/includeonly&amp;gt;&amp;lt;noinclude&amp;gt;&lt;br /&gt;
{{documentation}}&lt;br /&gt;
&amp;lt;!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --&amp;gt;&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kolk</name></author>	</entry>

	<entry>
		<id>http://wiki.isofts.kiev.ua/index.php?title=%D0%A8%D0%B0%D0%B1%D0%BB%D0%BE%D0%BD:Format_link&amp;diff=661</id>
		<title>Шаблон:Format link</title>
		<link rel="alternate" type="text/html" href="http://wiki.isofts.kiev.ua/index.php?title=%D0%A8%D0%B0%D0%B1%D0%BB%D0%BE%D0%BD:Format_link&amp;diff=661"/>
				<updated>2016-11-24T15:23:05Z</updated>
		
		<summary type="html">&lt;p&gt;Kolk: Імпортовано 1 версія&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;includeonly&amp;gt;{{#invoke:hatnote|formatLink}}&amp;lt;/includeonly&amp;gt;&amp;lt;noinclude&amp;gt;&lt;br /&gt;
{{documentation}}&lt;br /&gt;
&amp;lt;!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --&amp;gt;&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kolk</name></author>	</entry>

	<entry>
		<id>http://wiki.isofts.kiev.ua/index.php?title=%D0%A8%D0%B0%D0%B1%D0%BB%D0%BE%D0%BD:Format_hatnote_link&amp;diff=659</id>
		<title>Шаблон:Format hatnote link</title>
		<link rel="alternate" type="text/html" href="http://wiki.isofts.kiev.ua/index.php?title=%D0%A8%D0%B0%D0%B1%D0%BB%D0%BE%D0%BD:Format_hatnote_link&amp;diff=659"/>
				<updated>2016-11-24T15:23:03Z</updated>
		
		<summary type="html">&lt;p&gt;Kolk: Імпортовано 1 версія&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Template:Format link]]&lt;br /&gt;
{{R from move}}&lt;/div&gt;</summary>
		<author><name>Kolk</name></author>	</entry>

	<entry>
		<id>http://wiki.isofts.kiev.ua/index.php?title=%D0%A8%D0%B0%D0%B1%D0%BB%D0%BE%D0%BD:Code&amp;diff=657</id>
		<title>Шаблон:Code</title>
		<link rel="alternate" type="text/html" href="http://wiki.isofts.kiev.ua/index.php?title=%D0%A8%D0%B0%D0%B1%D0%BB%D0%BE%D0%BD:Code&amp;diff=657"/>
				<updated>2016-11-24T15:23:02Z</updated>
		
		<summary type="html">&lt;p&gt;Kolk: Імпортовано 1 версія&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{#tag:syntaxhighlight|{{{code|{{{1}}}}}}|lang={{{lang|{{{2|text}}}}}}|class={{{class|}}}|id={{{id|}}}|style={{{style|}}}|inline=1}}&amp;lt;noinclude&amp;gt;&lt;br /&gt;
{{documentation}}&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kolk</name></author>	</entry>

	<entry>
		<id>http://wiki.isofts.kiev.ua/index.php?title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:Message_box/configuration&amp;diff=655</id>
		<title>Модуль:Message box/configuration</title>
		<link rel="alternate" type="text/html" href="http://wiki.isofts.kiev.ua/index.php?title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:Message_box/configuration&amp;diff=655"/>
				<updated>2016-11-24T15:23:00Z</updated>
		
		<summary type="html">&lt;p&gt;Kolk: Імпортовано 1 версія&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;--------------------------------------------------------------------------------&lt;br /&gt;
--                          Message box configuration                         --&lt;br /&gt;
--                                                                            --&lt;br /&gt;
-- This module contains configuration data for [[Module:Message box]].        --&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
return {&lt;br /&gt;
	ambox = {&lt;br /&gt;
		types = {&lt;br /&gt;
			speedy = {&lt;br /&gt;
				class = 'ambox-speedy',&lt;br /&gt;
				image = 'Ambox warning pn.svg'&lt;br /&gt;
			},&lt;br /&gt;
			delete = {&lt;br /&gt;
				class = 'ambox-delete',&lt;br /&gt;
				image = 'Ambox warning pn.svg'&lt;br /&gt;
			},&lt;br /&gt;
			content = {&lt;br /&gt;
				class = 'ambox-content',&lt;br /&gt;
				image = 'Ambox important.svg'&lt;br /&gt;
			},&lt;br /&gt;
			style = {&lt;br /&gt;
				class = 'ambox-style',&lt;br /&gt;
				image = 'Edit-clear.svg'&lt;br /&gt;
			},&lt;br /&gt;
			move = {&lt;br /&gt;
				class = 'ambox-move',&lt;br /&gt;
				image = 'Merge-split-transwiki default.svg'&lt;br /&gt;
			},&lt;br /&gt;
			protection = {&lt;br /&gt;
				class = 'ambox-protection',&lt;br /&gt;
				image = 'Padlock-silver-medium.svg'&lt;br /&gt;
			},&lt;br /&gt;
			notice = {&lt;br /&gt;
				class = 'ambox-notice',&lt;br /&gt;
				image = 'Information icon4.svg'&lt;br /&gt;
			}&lt;br /&gt;
		},&lt;br /&gt;
		default                     = 'notice',&lt;br /&gt;
		allowBlankParams            = {'talk', 'sect', 'date', 'issue', 'fix', 'subst', 'hidden'},&lt;br /&gt;
		allowSmall                  = true,&lt;br /&gt;
		smallParam                  = 'left',&lt;br /&gt;
		smallClass                  = 'mbox-small-left',&lt;br /&gt;
		substCheck                  = true,&lt;br /&gt;
		classes                     = {'metadata', 'plainlinks', 'ambox'},&lt;br /&gt;
		imageEmptyCell              = true,&lt;br /&gt;
		imageCheckBlank             = true,&lt;br /&gt;
		imageSmallSize              = '20x20px',&lt;br /&gt;
		imageCellDiv                = true,&lt;br /&gt;
		useCollapsibleTextFields    = true,&lt;br /&gt;
		imageRightNone              = true,&lt;br /&gt;
		sectionDefault              = 'article',&lt;br /&gt;
		allowMainspaceCategories    = true,&lt;br /&gt;
		templateCategory            = 'Article message templates',&lt;br /&gt;
	        templateCategoryRequireName = true,&lt;br /&gt;
		templateErrorCategory       = 'Article message templates with missing parameters',&lt;br /&gt;
		templateErrorParamsToCheck  = {'issue', 'fix', 'subst'},&lt;br /&gt;
		removalNotice               = '[[Help:Maintenance template removal|Learn how and when to remove this template message]]'&lt;br /&gt;
	},&lt;br /&gt;
	&lt;br /&gt;
	cmbox = {&lt;br /&gt;
		types = {&lt;br /&gt;
			speedy = {&lt;br /&gt;
				class = 'cmbox-speedy',&lt;br /&gt;
				image = 'Ambox warning pn.svg'&lt;br /&gt;
			},&lt;br /&gt;
			delete = {&lt;br /&gt;
				class = 'cmbox-delete',&lt;br /&gt;
				image = 'Ambox warning pn.svg'&lt;br /&gt;
			},&lt;br /&gt;
			content = {&lt;br /&gt;
				class = 'cmbox-content',&lt;br /&gt;
				image = 'Ambox important.svg'&lt;br /&gt;
			},&lt;br /&gt;
			style = {&lt;br /&gt;
				class = 'cmbox-style',&lt;br /&gt;
				image = 'Edit-clear.svg'&lt;br /&gt;
			},&lt;br /&gt;
			move = {&lt;br /&gt;
				class = 'cmbox-move',&lt;br /&gt;
				image = 'Merge-split-transwiki default.svg'&lt;br /&gt;
			},&lt;br /&gt;
			protection = {&lt;br /&gt;
				class = 'cmbox-protection',&lt;br /&gt;
				image = 'Padlock-silver-medium.svg'&lt;br /&gt;
			},&lt;br /&gt;
			notice = {&lt;br /&gt;
				class = 'cmbox-notice',&lt;br /&gt;
				image = 'Information icon4.svg'&lt;br /&gt;
			}&lt;br /&gt;
		},&lt;br /&gt;
		default              = 'notice',&lt;br /&gt;
		showInvalidTypeError = true,&lt;br /&gt;
		classes              = {'plainlinks', 'cmbox'},&lt;br /&gt;
		imageEmptyCell       = true&lt;br /&gt;
	},&lt;br /&gt;
	&lt;br /&gt;
	fmbox = {&lt;br /&gt;
		types = {&lt;br /&gt;
			warning = {&lt;br /&gt;
				class = 'fmbox-warning',&lt;br /&gt;
				image = 'Ambox warning pn.svg'&lt;br /&gt;
			},&lt;br /&gt;
			editnotice = {&lt;br /&gt;
				class = 'fmbox-editnotice',&lt;br /&gt;
				image = 'Information icon4.svg'&lt;br /&gt;
			},&lt;br /&gt;
			system = {&lt;br /&gt;
				class = 'fmbox-system',&lt;br /&gt;
				image = 'Information icon4.svg'&lt;br /&gt;
			}&lt;br /&gt;
		},&lt;br /&gt;
		default              = 'system',&lt;br /&gt;
		showInvalidTypeError = true,&lt;br /&gt;
		classes              = {'plainlinks', 'fmbox'},&lt;br /&gt;
		imageEmptyCell       = false,&lt;br /&gt;
		imageRightNone       = false&lt;br /&gt;
	},&lt;br /&gt;
	&lt;br /&gt;
	imbox = {&lt;br /&gt;
		types = {&lt;br /&gt;
			speedy = {&lt;br /&gt;
				class = 'imbox-speedy',&lt;br /&gt;
				image = 'Ambox warning pn.svg'&lt;br /&gt;
			},&lt;br /&gt;
			delete = {&lt;br /&gt;
				class = 'imbox-delete',&lt;br /&gt;
				image = 'Ambox warning pn.svg'&lt;br /&gt;
			},&lt;br /&gt;
			content = {&lt;br /&gt;
				class = 'imbox-content',&lt;br /&gt;
				image = 'Ambox important.svg'&lt;br /&gt;
			},&lt;br /&gt;
			style = {&lt;br /&gt;
				class = 'imbox-style',&lt;br /&gt;
				image = 'Edit-clear.svg'&lt;br /&gt;
			},&lt;br /&gt;
			move = {&lt;br /&gt;
				class = 'imbox-move',&lt;br /&gt;
				image = 'Merge-split-transwiki default.svg'&lt;br /&gt;
			},&lt;br /&gt;
			protection = {&lt;br /&gt;
				class = 'imbox-protection',&lt;br /&gt;
				image = 'Padlock-silver-medium.svg'&lt;br /&gt;
			},&lt;br /&gt;
			license = {&lt;br /&gt;
				class = 'imbox-license licensetpl',&lt;br /&gt;
				image = 'Imbox license.png' -- @todo We need an SVG version of this&lt;br /&gt;
			},&lt;br /&gt;
			featured = {&lt;br /&gt;
				class = 'imbox-featured',&lt;br /&gt;
				image = 'Cscr-featured.svg'&lt;br /&gt;
			},&lt;br /&gt;
			notice = {&lt;br /&gt;
				class = 'imbox-notice',&lt;br /&gt;
				image = 'Information icon4.svg'&lt;br /&gt;
			}&lt;br /&gt;
		},&lt;br /&gt;
		default              = 'notice',&lt;br /&gt;
		showInvalidTypeError = true,&lt;br /&gt;
		classes              = {'imbox'},&lt;br /&gt;
		usePlainlinksParam   = true,&lt;br /&gt;
		imageEmptyCell       = true,&lt;br /&gt;
		below                = true,&lt;br /&gt;
		templateCategory     = 'File message boxes'&lt;br /&gt;
	},&lt;br /&gt;
	&lt;br /&gt;
	ombox = {&lt;br /&gt;
		types = {&lt;br /&gt;
			speedy = {&lt;br /&gt;
				class = 'ombox-speedy',&lt;br /&gt;
				image = 'Ambox warning pn.svg'&lt;br /&gt;
			},&lt;br /&gt;
			delete = {&lt;br /&gt;
				class = 'ombox-delete',&lt;br /&gt;
				image = 'Ambox warning pn.svg'&lt;br /&gt;
			},&lt;br /&gt;
			content = {&lt;br /&gt;
				class = 'ombox-content',&lt;br /&gt;
				image = 'Ambox important.svg'&lt;br /&gt;
			},&lt;br /&gt;
			style = {&lt;br /&gt;
				class = 'ombox-style',&lt;br /&gt;
				image = 'Edit-clear.svg'&lt;br /&gt;
			},&lt;br /&gt;
			move = {&lt;br /&gt;
				class = 'ombox-move',&lt;br /&gt;
				image = 'Merge-split-transwiki default.svg'&lt;br /&gt;
			},&lt;br /&gt;
			protection = {&lt;br /&gt;
				class = 'ombox-protection',&lt;br /&gt;
				image = 'Padlock-silver-medium.svg'&lt;br /&gt;
			},&lt;br /&gt;
			notice = {&lt;br /&gt;
				class = 'ombox-notice',&lt;br /&gt;
				image = 'Information icon4.svg'&lt;br /&gt;
			}&lt;br /&gt;
		},&lt;br /&gt;
		default              = 'notice',&lt;br /&gt;
		showInvalidTypeError = true,&lt;br /&gt;
		classes              = {'plainlinks', 'ombox'},&lt;br /&gt;
		allowSmall           = true,&lt;br /&gt;
		imageEmptyCell       = true,&lt;br /&gt;
		imageRightNone       = true&lt;br /&gt;
	},&lt;br /&gt;
	&lt;br /&gt;
	tmbox = {&lt;br /&gt;
		types = {&lt;br /&gt;
			speedy = {&lt;br /&gt;
				class = 'tmbox-speedy',&lt;br /&gt;
				image = 'Ambox warning pn.svg'&lt;br /&gt;
			},&lt;br /&gt;
			delete = {&lt;br /&gt;
				class = 'tmbox-delete',&lt;br /&gt;
				image = 'Ambox warning pn.svg'&lt;br /&gt;
			},&lt;br /&gt;
			content = {&lt;br /&gt;
				class = 'tmbox-content',&lt;br /&gt;
				image = 'Ambox important.svg'&lt;br /&gt;
			},&lt;br /&gt;
			style = {&lt;br /&gt;
				class = 'tmbox-style',&lt;br /&gt;
				image = 'Edit-clear.svg'&lt;br /&gt;
			},&lt;br /&gt;
			move = {&lt;br /&gt;
				class = 'tmbox-move',&lt;br /&gt;
				image = 'Merge-split-transwiki default.svg'&lt;br /&gt;
			},&lt;br /&gt;
			protection = {&lt;br /&gt;
				class = 'tmbox-protection',&lt;br /&gt;
				image = 'Padlock-silver-medium.svg'&lt;br /&gt;
			},&lt;br /&gt;
			notice = {&lt;br /&gt;
				class = 'tmbox-notice',&lt;br /&gt;
				image = 'Information icon4.svg'&lt;br /&gt;
			}&lt;br /&gt;
		},&lt;br /&gt;
		default              = 'notice',&lt;br /&gt;
		showInvalidTypeError = true,&lt;br /&gt;
		classes              = {'plainlinks', 'tmbox'},&lt;br /&gt;
		allowSmall           = true,&lt;br /&gt;
		imageRightNone       = true,&lt;br /&gt;
		imageEmptyCell       = true,&lt;br /&gt;
		imageEmptyCellStyle  = true,&lt;br /&gt;
		templateCategory     = 'Talk message boxes'&lt;br /&gt;
	}&lt;br /&gt;
}&lt;/div&gt;</summary>
		<author><name>Kolk</name></author>	</entry>

	<entry>
		<id>http://wiki.isofts.kiev.ua/index.php?title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:InfoboxImage&amp;diff=653</id>
		<title>Модуль:InfoboxImage</title>
		<link rel="alternate" type="text/html" href="http://wiki.isofts.kiev.ua/index.php?title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:InfoboxImage&amp;diff=653"/>
				<updated>2016-11-24T15:22:56Z</updated>
		
		<summary type="html">&lt;p&gt;Kolk: Імпортовано 1 версія&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;-- Inputs:&lt;br /&gt;
--    image - Can either be a bare filename (with or without the File:/Image: prefix) or a fully formatted image link&lt;br /&gt;
--    page - page to display for multipage images (DjVu)&lt;br /&gt;
--    size - size to display the image&lt;br /&gt;
--    maxsize - maximum size for image&lt;br /&gt;
--    sizedefault - default size to display the image if size param is blank&lt;br /&gt;
--    alt - alt text for image&lt;br /&gt;
--    title - title text for image&lt;br /&gt;
--    border - set to yes if border&lt;br /&gt;
--    center - set to yes, if the image has to be centered&lt;br /&gt;
--    upright - upright image param&lt;br /&gt;
--    suppressplaceholder - if yes then checks to see if image is a placeholder and suppresses it&lt;br /&gt;
--    link - page to visit when clicking on image&lt;br /&gt;
-- Outputs:&lt;br /&gt;
--    Formatted image.&lt;br /&gt;
-- More details available at the &amp;quot;Module:InfoboxImage/doc&amp;quot; page&lt;br /&gt;
&lt;br /&gt;
local i = {};&lt;br /&gt;
&lt;br /&gt;
local placeholder_image = {&lt;br /&gt;
    &amp;quot;Blue - Replace this image female.svg&amp;quot;,&lt;br /&gt;
    &amp;quot;Blue - Replace this image male.svg&amp;quot;,&lt;br /&gt;
    &amp;quot;Female no free image yet.png&amp;quot;,&lt;br /&gt;
    &amp;quot;Flag of None (square).svg&amp;quot;,&lt;br /&gt;
    &amp;quot;Flag of None.svg&amp;quot;,&lt;br /&gt;
    &amp;quot;Flag of.svg&amp;quot;,&lt;br /&gt;
    &amp;quot;Green - Replace this image female.svg&amp;quot;,&lt;br /&gt;
    &amp;quot;Green - Replace this image male.svg&amp;quot;,&lt;br /&gt;
    &amp;quot;Image is needed female.svg&amp;quot;,&lt;br /&gt;
    &amp;quot;Image is needed male.svg&amp;quot;,&lt;br /&gt;
    &amp;quot;Location map of None.svg&amp;quot;,&lt;br /&gt;
    &amp;quot;Male no free image yet.png&amp;quot;,&lt;br /&gt;
    &amp;quot;Missing flag.png&amp;quot;,&lt;br /&gt;
    &amp;quot;No flag.svg&amp;quot;,&lt;br /&gt;
    &amp;quot;No free portrait.svg&amp;quot;,&lt;br /&gt;
    &amp;quot;No portrait (female).svg&amp;quot;,&lt;br /&gt;
    &amp;quot;No portrait (male).svg&amp;quot;,&lt;br /&gt;
    &amp;quot;Red - Replace this image female.svg&amp;quot;,&lt;br /&gt;
    &amp;quot;Red - Replace this image male.svg&amp;quot;,&lt;br /&gt;
    &amp;quot;Replace this image female (blue).svg&amp;quot;,&lt;br /&gt;
    &amp;quot;Replace this image female.svg&amp;quot;,&lt;br /&gt;
    &amp;quot;Replace this image male (blue).svg&amp;quot;,&lt;br /&gt;
    &amp;quot;Replace this image male.svg&amp;quot;,&lt;br /&gt;
    &amp;quot;Silver - Replace this image female.svg&amp;quot;,&lt;br /&gt;
    &amp;quot;Silver - Replace this image male.svg&amp;quot;,&lt;br /&gt;
    &amp;quot;Replace this image.svg&amp;quot;,&lt;br /&gt;
	&amp;quot;Cricket no pic.png&amp;quot;,&lt;br /&gt;
	&amp;quot;CarersLogo.gif&amp;quot;,&lt;br /&gt;
	&amp;quot;Diagram Needed.svg&amp;quot;,&lt;br /&gt;
	&amp;quot;Example.jpg&amp;quot;,&lt;br /&gt;
	&amp;quot;Image placeholder.png&amp;quot;,&lt;br /&gt;
	&amp;quot;No male portrait.svg&amp;quot;,&lt;br /&gt;
	&amp;quot;Nocover-upload.png&amp;quot;,&lt;br /&gt;
	&amp;quot;NoDVDcover copy.png&amp;quot;,&lt;br /&gt;
	&amp;quot;Noribbon.svg&amp;quot;,&lt;br /&gt;
	&amp;quot;No portrait-BFD-test.svg&amp;quot;,&lt;br /&gt;
	&amp;quot;Placeholder barnstar ribbon.png&amp;quot;,&lt;br /&gt;
	&amp;quot;Project Trains no image.png&amp;quot;,&lt;br /&gt;
	&amp;quot;Image-request.png&amp;quot;,&lt;br /&gt;
	&amp;quot;Sin bandera.svg&amp;quot;,&lt;br /&gt;
	&amp;quot;Sin escudo.svg&amp;quot;,&lt;br /&gt;
	&amp;quot;Replace this image - temple.png&amp;quot;,&lt;br /&gt;
	&amp;quot;Replace this image butterfly.png&amp;quot;,&lt;br /&gt;
	&amp;quot;Replace this image.svg&amp;quot;,&lt;br /&gt;
	&amp;quot;Replace this image1.svg&amp;quot;,&lt;br /&gt;
	&amp;quot;Resolution angle.png&amp;quot;,&lt;br /&gt;
	&amp;quot;Image-No portrait-text-BFD-test.svg&amp;quot;,&lt;br /&gt;
	&amp;quot;Insert image here.svg&amp;quot;,&lt;br /&gt;
	&amp;quot;No image available.png&amp;quot;,&lt;br /&gt;
	&amp;quot;NO IMAGE YET square.png&amp;quot;,&lt;br /&gt;
	&amp;quot;NO IMAGE YET.png&amp;quot;,&lt;br /&gt;
	&amp;quot;No Photo Available.svg&amp;quot;,&lt;br /&gt;
	&amp;quot;No Screenshot.svg&amp;quot;,&lt;br /&gt;
	&amp;quot;No-image-available.jpg&amp;quot;,&lt;br /&gt;
	&amp;quot;Null.png&amp;quot;,&lt;br /&gt;
	&amp;quot;PictureNeeded.gif&amp;quot;,&lt;br /&gt;
	&amp;quot;Place holder.jpg&amp;quot;,&lt;br /&gt;
	&amp;quot;Unbenannt.JPG&amp;quot;,&lt;br /&gt;
	&amp;quot;UploadACopyrightFreeImage.svg&amp;quot;,&lt;br /&gt;
	&amp;quot;UploadAnImage.gif&amp;quot;,&lt;br /&gt;
	&amp;quot;UploadAnImage.svg&amp;quot;,&lt;br /&gt;
	&amp;quot;UploadAnImageShort.svg&amp;quot;,&lt;br /&gt;
	&amp;quot;CarersLogo.gif&amp;quot;,&lt;br /&gt;
	&amp;quot;Diagram Needed.svg&amp;quot;,&lt;br /&gt;
	&amp;quot;No male portrait.svg&amp;quot;,&lt;br /&gt;
	&amp;quot;NoDVDcover copy.png&amp;quot;,&lt;br /&gt;
	&amp;quot;Placeholder barnstar ribbon.png&amp;quot;,&lt;br /&gt;
	&amp;quot;Project Trains no image.png&amp;quot;,&lt;br /&gt;
	&amp;quot;Image-request.png&amp;quot;,&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
function i.IsPlaceholder(image)&lt;br /&gt;
    -- change underscores to spaces&lt;br /&gt;
    image = mw.ustring.gsub(image, &amp;quot;_&amp;quot;, &amp;quot; &amp;quot;);&lt;br /&gt;
    assert(image ~= nil, 'mw.ustring.gsub(image, &amp;quot;_&amp;quot;, &amp;quot; &amp;quot;) must not return nil')&lt;br /&gt;
    -- if image starts with [[ then remove that and anything after |&lt;br /&gt;
    if mw.ustring.sub(image,1,2) == &amp;quot;[[&amp;quot; then&lt;br /&gt;
        image = mw.ustring.sub(image,3);&lt;br /&gt;
        image = mw.ustring.gsub(image, &amp;quot;([^|]*)|.*&amp;quot;, &amp;quot;%1&amp;quot;);&lt;br /&gt;
        assert(image ~= nil, 'mw.ustring.gsub(image, &amp;quot;([^|]*)|.*&amp;quot;, &amp;quot;%1&amp;quot;) must not return nil')&lt;br /&gt;
    end&lt;br /&gt;
    -- Trim spaces&lt;br /&gt;
    image = mw.ustring.gsub(image, '^[ ]*(.-)[ ]*$', '%1');&lt;br /&gt;
    assert(image ~= nil, &amp;quot;mw.ustring.gsub(image, '^[ ]*(.-)[ ]*$', '%1') must not return nil&amp;quot;)&lt;br /&gt;
    -- remove prefix if exists&lt;br /&gt;
    local allNames = mw.site.namespaces[6].aliases&lt;br /&gt;
    allNames[#allNames + 1] = mw.site.namespaces[6].name&lt;br /&gt;
    allNames[#allNames + 1] = mw.site.namespaces[6].canonicalName&lt;br /&gt;
    for i, name in ipairs(allNames) do&lt;br /&gt;
        if mw.ustring.lower(mw.ustring.sub(image, 1, mw.ustring.len(name) + 1)) == mw.ustring.lower(name .. &amp;quot;:&amp;quot;) then&lt;br /&gt;
            image = mw.ustring.sub(image, mw.ustring.len(name) + 2);&lt;br /&gt;
            break&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
    -- Trim spaces&lt;br /&gt;
    image = mw.ustring.gsub(image, '^[ ]*(.-)[ ]*$', '%1');&lt;br /&gt;
    -- capitalise first letter&lt;br /&gt;
    image = mw.ustring.upper(mw.ustring.sub(image,1,1)) .. mw.ustring.sub(image,2);&lt;br /&gt;
&lt;br /&gt;
    for i,j in pairs(placeholder_image) do&lt;br /&gt;
        if image == j then&lt;br /&gt;
            return true&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
    return false&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function i.InfoboxImage(frame)&lt;br /&gt;
    local image = frame.args[&amp;quot;image&amp;quot;];&lt;br /&gt;
    &lt;br /&gt;
    if image == &amp;quot;&amp;quot; or image == nil then&lt;br /&gt;
        return &amp;quot;&amp;quot;;&lt;br /&gt;
    end&lt;br /&gt;
    if image == &amp;quot;&amp;amp;nbsp;&amp;quot; then&lt;br /&gt;
        return image;&lt;br /&gt;
    end&lt;br /&gt;
    if frame.args[&amp;quot;suppressplaceholder&amp;quot;] ~= &amp;quot;no&amp;quot; then&lt;br /&gt;
        if i.IsPlaceholder(image) == true then&lt;br /&gt;
            return &amp;quot;&amp;quot;;&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    if mw.ustring.lower(mw.ustring.sub(image,1,5)) == &amp;quot;http:&amp;quot; then&lt;br /&gt;
        return &amp;quot;&amp;quot;;&lt;br /&gt;
    end&lt;br /&gt;
    if mw.ustring.lower(mw.ustring.sub(image,1,6)) == &amp;quot;[http:&amp;quot; then&lt;br /&gt;
        return &amp;quot;&amp;quot;;&lt;br /&gt;
    end&lt;br /&gt;
    if mw.ustring.lower(mw.ustring.sub(image,1,7)) == &amp;quot;[[http:&amp;quot; then&lt;br /&gt;
        return &amp;quot;&amp;quot;;&lt;br /&gt;
    end&lt;br /&gt;
    if mw.ustring.lower(mw.ustring.sub(image,1,6)) == &amp;quot;https:&amp;quot; then&lt;br /&gt;
        return &amp;quot;&amp;quot;;&lt;br /&gt;
    end&lt;br /&gt;
    if mw.ustring.lower(mw.ustring.sub(image,1,7)) == &amp;quot;[https:&amp;quot; then&lt;br /&gt;
        return &amp;quot;&amp;quot;;&lt;br /&gt;
    end&lt;br /&gt;
    if mw.ustring.lower(mw.ustring.sub(image,1,8)) == &amp;quot;[[https:&amp;quot; then&lt;br /&gt;
        return &amp;quot;&amp;quot;;&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    if mw.ustring.sub(image,1,2) == &amp;quot;[[&amp;quot; then&lt;br /&gt;
        -- search for thumbnail images and add to tracking cat if found&lt;br /&gt;
        if mw.title.getCurrentTitle().namespace == 0 and (mw.ustring.find(image, &amp;quot;|%s*thumb%s*[|%]]&amp;quot;) or mw.ustring.find(image, &amp;quot;|%s*thumbnail%s*[|%]]&amp;quot;)) then&lt;br /&gt;
            return image .. &amp;quot;[[Category:Pages using infoboxes with thumbnail images]]&amp;quot;;&lt;br /&gt;
        elseif mw.title.getCurrentTitle().namespace == 0 then&lt;br /&gt;
            return image .. &amp;quot;[[Category:Pages using deprecated image syntax]]&amp;quot;;&lt;br /&gt;
        else&lt;br /&gt;
            return image;&lt;br /&gt;
        end&lt;br /&gt;
    elseif mw.ustring.sub(image,1,2) == &amp;quot;{{&amp;quot; and mw.ustring.sub(image,1,3) ~= &amp;quot;{{{&amp;quot; then&lt;br /&gt;
        return image;&lt;br /&gt;
    elseif mw.ustring.sub(image,1,1) == &amp;quot;&amp;lt;&amp;quot; then&lt;br /&gt;
        return image;&lt;br /&gt;
    elseif mw.ustring.sub(image,1,5) == mw.ustring.char(127)..&amp;quot;UNIQ&amp;quot; then&lt;br /&gt;
        -- Found strip marker at begining, so pass don't process at all&lt;br /&gt;
        return image;&lt;br /&gt;
    elseif mw.ustring.sub(image,4,9) == &amp;quot;`UNIQ-&amp;quot; then&lt;br /&gt;
        -- Found strip marker at begining, so pass don't process at all&lt;br /&gt;
        return image;&lt;br /&gt;
    else&lt;br /&gt;
        local result = &amp;quot;&amp;quot;;&lt;br /&gt;
        local page = frame.args[&amp;quot;page&amp;quot;];&lt;br /&gt;
        local size = frame.args[&amp;quot;size&amp;quot;];&lt;br /&gt;
        local maxsize = frame.args[&amp;quot;maxsize&amp;quot;];&lt;br /&gt;
        local sizedefault = frame.args[&amp;quot;sizedefault&amp;quot;];&lt;br /&gt;
        local alt = frame.args[&amp;quot;alt&amp;quot;];&lt;br /&gt;
        local link = frame.args[&amp;quot;link&amp;quot;];&lt;br /&gt;
        local title = frame.args[&amp;quot;title&amp;quot;];&lt;br /&gt;
        local border = frame.args[&amp;quot;border&amp;quot;];&lt;br /&gt;
        local upright = frame.args[&amp;quot;upright&amp;quot;] or &amp;quot;&amp;quot;;&lt;br /&gt;
        local thumbtime = frame.args[&amp;quot;thumbtime&amp;quot;] or &amp;quot;&amp;quot;;&lt;br /&gt;
        local center= frame.args[&amp;quot;center&amp;quot;];&lt;br /&gt;
        &lt;br /&gt;
        -- remove prefix if exists&lt;br /&gt;
        local allNames = mw.site.namespaces[6].aliases&lt;br /&gt;
        allNames[#allNames + 1] = mw.site.namespaces[6].name&lt;br /&gt;
        allNames[#allNames + 1] = mw.site.namespaces[6].canonicalName&lt;br /&gt;
        for i, name in ipairs(allNames) do&lt;br /&gt;
            if mw.ustring.lower(mw.ustring.sub(image, 1, mw.ustring.len(name) + 1)) == mw.ustring.lower(name .. &amp;quot;:&amp;quot;) then&lt;br /&gt;
                image = mw.ustring.sub(image, mw.ustring.len(name) + 2);&lt;br /&gt;
                break&lt;br /&gt;
            end&lt;br /&gt;
        end&lt;br /&gt;
        &lt;br /&gt;
        if maxsize ~= &amp;quot;&amp;quot; and maxsize ~= nil then&lt;br /&gt;
            -- if no sizedefault then set to maxsize&lt;br /&gt;
            if sizedefault == &amp;quot;&amp;quot; or sizedefault == nil then&lt;br /&gt;
                sizedefault = maxsize&lt;br /&gt;
            end&lt;br /&gt;
            -- check to see if size bigger than maxsize&lt;br /&gt;
            if size ~= &amp;quot;&amp;quot; and size ~= nil then&lt;br /&gt;
                local sizenumber = tonumber(mw.ustring.match(size,&amp;quot;%d*&amp;quot;)) or 0;&lt;br /&gt;
                local maxsizenumber = tonumber(mw.ustring.match(maxsize,&amp;quot;%d*&amp;quot;)) or 0;&lt;br /&gt;
                if sizenumber&amp;gt;maxsizenumber and maxsizenumber&amp;gt;0 then&lt;br /&gt;
                    size = maxsize;&lt;br /&gt;
                end&lt;br /&gt;
            end&lt;br /&gt;
        end&lt;br /&gt;
        -- add px to size if just a number&lt;br /&gt;
        if (tonumber(size) or 0) &amp;gt; 0 then&lt;br /&gt;
            size = size .. &amp;quot;px&amp;quot;;&lt;br /&gt;
        end&lt;br /&gt;
        &lt;br /&gt;
        result = &amp;quot;[[File:&amp;quot; .. image;&lt;br /&gt;
        if page ~= &amp;quot;&amp;quot; and page ~= nil then&lt;br /&gt;
            result = result .. &amp;quot;|page=&amp;quot; .. page;&lt;br /&gt;
        end&lt;br /&gt;
        if size ~= &amp;quot;&amp;quot; and size ~= nil then&lt;br /&gt;
            result = result .. &amp;quot;|&amp;quot; .. size;&lt;br /&gt;
        elseif sizedefault ~= &amp;quot;&amp;quot; and sizedefault ~= nil then&lt;br /&gt;
            result = result .. &amp;quot;|&amp;quot; .. sizedefault;&lt;br /&gt;
        else&lt;br /&gt;
            result = result .. &amp;quot;|frameless&amp;quot;;&lt;br /&gt;
        end&lt;br /&gt;
        if center == &amp;quot;yes&amp;quot; then&lt;br /&gt;
            result = result .. &amp;quot;|center&amp;quot;&lt;br /&gt;
        end&lt;br /&gt;
        if alt ~= &amp;quot;&amp;quot; and alt ~= nil then&lt;br /&gt;
            result = result .. &amp;quot;|alt=&amp;quot; .. alt;&lt;br /&gt;
        end&lt;br /&gt;
        if link ~= &amp;quot;&amp;quot; and link ~= nil then&lt;br /&gt;
            result = result .. &amp;quot;|link=&amp;quot; .. link;&lt;br /&gt;
        end&lt;br /&gt;
        if border == &amp;quot;yes&amp;quot; then&lt;br /&gt;
            result = result .. &amp;quot;|border&amp;quot;;&lt;br /&gt;
        end&lt;br /&gt;
        if upright == &amp;quot;yes&amp;quot; then&lt;br /&gt;
            result = result .. &amp;quot;|upright&amp;quot;;&lt;br /&gt;
        elseif upright ~= &amp;quot;&amp;quot; then&lt;br /&gt;
            result = result .. &amp;quot;|upright=&amp;quot; .. upright;&lt;br /&gt;
        end&lt;br /&gt;
        if thumbtime ~= &amp;quot;&amp;quot; then&lt;br /&gt;
            result = result .. &amp;quot;|thumbtime=&amp;quot; .. thumbtime;&lt;br /&gt;
        end&lt;br /&gt;
        if title ~= &amp;quot;&amp;quot; and title ~= nil then&lt;br /&gt;
            result = result .. &amp;quot;|&amp;quot; .. title;&lt;br /&gt;
        elseif alt ~= &amp;quot;&amp;quot; and alt ~= nil then&lt;br /&gt;
            result = result .. &amp;quot;|&amp;quot; .. alt;&lt;br /&gt;
        end&lt;br /&gt;
        result = result .. &amp;quot;]]&amp;quot;;&lt;br /&gt;
        &lt;br /&gt;
        return result;&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return i;&lt;/div&gt;</summary>
		<author><name>Kolk</name></author>	</entry>

	<entry>
		<id>http://wiki.isofts.kiev.ua/index.php?title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:Infobox&amp;diff=651</id>
		<title>Модуль:Infobox</title>
		<link rel="alternate" type="text/html" href="http://wiki.isofts.kiev.ua/index.php?title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:Infobox&amp;diff=651"/>
				<updated>2016-11-24T15:22:55Z</updated>
		
		<summary type="html">&lt;p&gt;Kolk: Імпортовано 1 версія&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;--&lt;br /&gt;
-- This module implements {{Infobox}}&lt;br /&gt;
--&lt;br /&gt;
 &lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
local navbar = require('Module:Navbar')._navbar&lt;br /&gt;
&lt;br /&gt;
local args = {}&lt;br /&gt;
local origArgs&lt;br /&gt;
local root&lt;br /&gt;
&lt;br /&gt;
local function union(t1, t2)&lt;br /&gt;
    -- Returns the union of the values of two tables, as a sequence.&lt;br /&gt;
    local vals = {}&lt;br /&gt;
    for k, v in pairs(t1) do&lt;br /&gt;
        vals[v] = true&lt;br /&gt;
    end&lt;br /&gt;
    for k, v in pairs(t2) do&lt;br /&gt;
        vals[v] = true&lt;br /&gt;
    end&lt;br /&gt;
    local ret = {}&lt;br /&gt;
    for k, v in pairs(vals) do&lt;br /&gt;
        table.insert(ret, k)&lt;br /&gt;
    end&lt;br /&gt;
    return ret&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function getArgNums(prefix)&lt;br /&gt;
    -- Returns a table containing the numbers of the arguments that exist&lt;br /&gt;
    -- for the specified prefix. For example, if the prefix was 'data', and&lt;br /&gt;
    -- 'data1', 'data2', and 'data5' exist, it would return {1, 2, 5}.&lt;br /&gt;
    local nums = {}&lt;br /&gt;
    for k, v in pairs(args) do&lt;br /&gt;
        local num = tostring(k):match('^' .. prefix .. '([1-9]%d*)$')&lt;br /&gt;
        if num then table.insert(nums, tonumber(num)) end&lt;br /&gt;
    end&lt;br /&gt;
    table.sort(nums)&lt;br /&gt;
    return nums&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function addRow(rowArgs)&lt;br /&gt;
    -- Adds a row to the infobox, with either a header cell&lt;br /&gt;
    -- or a label/data cell combination.&lt;br /&gt;
    if rowArgs.header then&lt;br /&gt;
        root&lt;br /&gt;
            :tag('tr')&lt;br /&gt;
                :addClass(rowArgs.rowclass)&lt;br /&gt;
                :cssText(rowArgs.rowstyle)&lt;br /&gt;
                :attr('id', rowArgs.rowid)&lt;br /&gt;
                :tag('th')&lt;br /&gt;
                    :attr('colspan', 2)&lt;br /&gt;
                    :attr('id', rowArgs.headerid)&lt;br /&gt;
                    :addClass(rowArgs.class)&lt;br /&gt;
                    :addClass(args.headerclass)&lt;br /&gt;
                    :css('text-align', 'center')&lt;br /&gt;
                    :cssText(args.headerstyle)&lt;br /&gt;
                    :wikitext(rowArgs.header)&lt;br /&gt;
    elseif rowArgs.data then&lt;br /&gt;
        local row = root:tag('tr')&lt;br /&gt;
        row:addClass(rowArgs.rowclass)&lt;br /&gt;
        row:cssText(rowArgs.rowstyle)&lt;br /&gt;
        row:attr('id', rowArgs.rowid)&lt;br /&gt;
        if rowArgs.label then&lt;br /&gt;
            row&lt;br /&gt;
                :tag('th')&lt;br /&gt;
                    :attr('scope', 'row')&lt;br /&gt;
                    :attr('id', rowArgs.labelid)&lt;br /&gt;
                    :cssText(args.labelstyle)&lt;br /&gt;
                    :wikitext(rowArgs.label)&lt;br /&gt;
                    :done()&lt;br /&gt;
        end&lt;br /&gt;
        &lt;br /&gt;
        local dataCell = row:tag('td')&lt;br /&gt;
        if not rowArgs.label then &lt;br /&gt;
            dataCell&lt;br /&gt;
                :attr('colspan', 2)&lt;br /&gt;
                :css('text-align', 'center') &lt;br /&gt;
        end&lt;br /&gt;
        dataCell&lt;br /&gt;
            :attr('id', rowArgs.dataid)&lt;br /&gt;
            :addClass(rowArgs.class)&lt;br /&gt;
            :cssText(rowArgs.datastyle)&lt;br /&gt;
            :newline()&lt;br /&gt;
            :wikitext(rowArgs.data)&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function renderTitle()&lt;br /&gt;
    if not args.title then return end&lt;br /&gt;
&lt;br /&gt;
    root&lt;br /&gt;
        :tag('caption')&lt;br /&gt;
            :addClass(args.titleclass)&lt;br /&gt;
            :cssText(args.titlestyle)&lt;br /&gt;
            :wikitext(args.title)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function renderAboveRow()&lt;br /&gt;
    if not args.above then return end&lt;br /&gt;
    &lt;br /&gt;
    root&lt;br /&gt;
        :tag('tr')&lt;br /&gt;
            :tag('th')&lt;br /&gt;
                :attr('colspan', 2)&lt;br /&gt;
                :addClass(args.aboveclass)&lt;br /&gt;
                :css('text-align', 'center')&lt;br /&gt;
                :css('font-size', '125%')&lt;br /&gt;
                :css('font-weight', 'bold')&lt;br /&gt;
                :cssText(args.abovestyle)&lt;br /&gt;
                :wikitext(args.above)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function renderBelowRow()&lt;br /&gt;
    if not args.below then return end&lt;br /&gt;
    &lt;br /&gt;
    root&lt;br /&gt;
        :tag('tr')&lt;br /&gt;
            :tag('td')&lt;br /&gt;
                :attr('colspan', '2')&lt;br /&gt;
                :addClass(args.belowclass)&lt;br /&gt;
                :css('text-align', 'center')&lt;br /&gt;
                :cssText(args.belowstyle)&lt;br /&gt;
                :newline()&lt;br /&gt;
                :wikitext(args.below)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function renderSubheaders()&lt;br /&gt;
    if args.subheader then&lt;br /&gt;
        args.subheader1 = args.subheader&lt;br /&gt;
    end&lt;br /&gt;
    if args.subheaderrowclass then&lt;br /&gt;
        args.subheaderrowclass1 = args.subheaderrowclass&lt;br /&gt;
    end&lt;br /&gt;
    local subheadernums = getArgNums('subheader')&lt;br /&gt;
    for k, num in ipairs(subheadernums) do&lt;br /&gt;
        addRow({&lt;br /&gt;
            data = args['subheader' .. tostring(num)],&lt;br /&gt;
            datastyle = args.subheaderstyle or args['subheaderstyle' .. tostring(num)],&lt;br /&gt;
            class = args.subheaderclass,&lt;br /&gt;
            rowclass = args['subheaderrowclass' .. tostring(num)]&lt;br /&gt;
        })&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function renderImages()&lt;br /&gt;
    if args.image then&lt;br /&gt;
        args.image1 = args.image&lt;br /&gt;
    end&lt;br /&gt;
    if args.caption then&lt;br /&gt;
        args.caption1 = args.caption&lt;br /&gt;
    end&lt;br /&gt;
    local imagenums = getArgNums('image')&lt;br /&gt;
    for k, num in ipairs(imagenums) do&lt;br /&gt;
        local caption = args['caption' .. tostring(num)]&lt;br /&gt;
        local data = mw.html.create():wikitext(args['image' .. tostring(num)])&lt;br /&gt;
        if caption then&lt;br /&gt;
            data&lt;br /&gt;
                :tag('div')&lt;br /&gt;
                    :cssText(args.captionstyle)&lt;br /&gt;
                    :wikitext(caption)&lt;br /&gt;
        end&lt;br /&gt;
        addRow({&lt;br /&gt;
            data = tostring(data),&lt;br /&gt;
            datastyle = args.imagestyle,&lt;br /&gt;
            class = args.imageclass,&lt;br /&gt;
            rowclass = args['imagerowclass' .. tostring(num)]&lt;br /&gt;
        })&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function renderRows()&lt;br /&gt;
    -- Gets the union of the header and data argument numbers,&lt;br /&gt;
    -- and renders them all in order using addRow.&lt;br /&gt;
    local rownums = union(getArgNums('header'), getArgNums('data'))&lt;br /&gt;
    table.sort(rownums)&lt;br /&gt;
    for k, num in ipairs(rownums) do&lt;br /&gt;
        addRow({&lt;br /&gt;
            header = args['header' .. tostring(num)],&lt;br /&gt;
            label = args['label' .. tostring(num)],&lt;br /&gt;
            data = args['data' .. tostring(num)],&lt;br /&gt;
            datastyle = args.datastyle,&lt;br /&gt;
            class = args['class' .. tostring(num)],&lt;br /&gt;
            rowclass = args['rowclass' .. tostring(num)],&lt;br /&gt;
            rowstyle = args['rowstyle' .. tostring(num)],&lt;br /&gt;
            dataid = args['dataid' .. tostring(num)],&lt;br /&gt;
            labelid = args['labelid' .. tostring(num)],&lt;br /&gt;
            headerid = args['headerid' .. tostring(num)],&lt;br /&gt;
            rowid = args['rowid' .. tostring(num)]&lt;br /&gt;
        })&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function renderNavBar()&lt;br /&gt;
    if not args.name then return end&lt;br /&gt;
    &lt;br /&gt;
    root&lt;br /&gt;
        :tag('tr')&lt;br /&gt;
            :tag('td')&lt;br /&gt;
                :attr('colspan', '2')&lt;br /&gt;
                :css('text-align', 'right')&lt;br /&gt;
                :wikitext(navbar{&lt;br /&gt;
                    args.name,&lt;br /&gt;
                    mini = 1,&lt;br /&gt;
                })&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function renderItalicTitle()&lt;br /&gt;
    local italicTitle = args['italic title'] and mw.ustring.lower(args['italic title'])&lt;br /&gt;
    if italicTitle == '' or italicTitle == 'force' or italicTitle == 'yes' then&lt;br /&gt;
        root:wikitext(mw.getCurrentFrame():expandTemplate({title = 'italic title'}))&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function renderTrackingCategories()&lt;br /&gt;
    if args.decat ~= 'yes' then&lt;br /&gt;
        if #(getArgNums('data')) == 0 and mw.title.getCurrentTitle().namespace == 0 then&lt;br /&gt;
            root:wikitext('[[Category:Articles which use infobox templates with no data rows]]')&lt;br /&gt;
        end&lt;br /&gt;
        if args.child == 'yes' and args.title then&lt;br /&gt;
            root:wikitext('[[Category:Pages which use embedded infobox templates with the title parameter]]')&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function _infobox()&lt;br /&gt;
    -- Specify the overall layout of the infobox, with special settings&lt;br /&gt;
    -- if the infobox is used as a 'child' inside another infobox.&lt;br /&gt;
    if args.child ~= 'yes' then&lt;br /&gt;
        root = mw.html.create('table')&lt;br /&gt;
        &lt;br /&gt;
        root&lt;br /&gt;
            :addClass('infobox')&lt;br /&gt;
            :addClass(args.bodyclass)&lt;br /&gt;
            &lt;br /&gt;
            if args.subbox == 'yes' then&lt;br /&gt;
                root&lt;br /&gt;
                    :css('padding', '0')&lt;br /&gt;
                    :css('border', 'none')&lt;br /&gt;
                    :css('margin', '-3px')&lt;br /&gt;
                    :css('width', 'auto')&lt;br /&gt;
                    :css('min-width', '100%')&lt;br /&gt;
                    :css('font-size', '100%')&lt;br /&gt;
                    :css('clear', 'none')&lt;br /&gt;
                    :css('float', 'none')&lt;br /&gt;
                    :css('background-color', 'transparent')&lt;br /&gt;
            else&lt;br /&gt;
                root&lt;br /&gt;
                    :css('width', '22em')&lt;br /&gt;
            end&lt;br /&gt;
        root&lt;br /&gt;
            :cssText(args.bodystyle)&lt;br /&gt;
    &lt;br /&gt;
        renderTitle()&lt;br /&gt;
        renderAboveRow()&lt;br /&gt;
    else&lt;br /&gt;
        root = mw.html.create()&lt;br /&gt;
        &lt;br /&gt;
        root&lt;br /&gt;
            :wikitext(args.title)&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    renderSubheaders()&lt;br /&gt;
    renderImages() &lt;br /&gt;
    renderRows() &lt;br /&gt;
    renderBelowRow()  &lt;br /&gt;
    renderNavBar()&lt;br /&gt;
    renderItalicTitle()&lt;br /&gt;
    renderTrackingCategories()&lt;br /&gt;
    &lt;br /&gt;
    return tostring(root)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function preprocessSingleArg(argName)&lt;br /&gt;
    -- If the argument exists and isn't blank, add it to the argument table.&lt;br /&gt;
    -- Blank arguments are treated as nil to match the behaviour of ParserFunctions.&lt;br /&gt;
    if origArgs[argName] and origArgs[argName] ~= '' then&lt;br /&gt;
        args[argName] = origArgs[argName]&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function preprocessArgs(prefixTable, step)&lt;br /&gt;
    -- Assign the parameters with the given prefixes to the args table, in order, in batches&lt;br /&gt;
    -- of the step size specified. This is to prevent references etc. from appearing in the&lt;br /&gt;
    -- wrong order. The prefixTable should be an array containing tables, each of which has&lt;br /&gt;
    -- two possible fields, a &amp;quot;prefix&amp;quot; string and a &amp;quot;depend&amp;quot; table. The function always parses&lt;br /&gt;
    -- parameters containing the &amp;quot;prefix&amp;quot; string, but only parses parameters in the &amp;quot;depend&amp;quot;&lt;br /&gt;
    -- table if the prefix parameter is present and non-blank.&lt;br /&gt;
    if type(prefixTable) ~= 'table' then&lt;br /&gt;
        error(&amp;quot;Non-table value detected for the prefix table&amp;quot;, 2)&lt;br /&gt;
    end&lt;br /&gt;
    if type(step) ~= 'number' then&lt;br /&gt;
        error(&amp;quot;Invalid step value detected&amp;quot;, 2)&lt;br /&gt;
    end&lt;br /&gt;
    &lt;br /&gt;
    -- Get arguments without a number suffix, and check for bad input.&lt;br /&gt;
    for i,v in ipairs(prefixTable) do&lt;br /&gt;
        if type(v) ~= 'table' or type(v.prefix) ~= &amp;quot;string&amp;quot; or (v.depend and type(v.depend) ~= 'table') then&lt;br /&gt;
            error('Invalid input detected to preprocessArgs prefix table', 2)&lt;br /&gt;
        end&lt;br /&gt;
        preprocessSingleArg(v.prefix)&lt;br /&gt;
        -- Only parse the depend parameter if the prefix parameter is present and not blank.&lt;br /&gt;
        if args[v.prefix] and v.depend then&lt;br /&gt;
            for j, dependValue in ipairs(v.depend) do&lt;br /&gt;
                if type(dependValue) ~= 'string' then&lt;br /&gt;
                    error('Invalid &amp;quot;depend&amp;quot; parameter value detected in preprocessArgs')&lt;br /&gt;
                end&lt;br /&gt;
                preprocessSingleArg(dependValue)&lt;br /&gt;
            end&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    -- Get arguments with number suffixes.&lt;br /&gt;
    local a = 1 -- Counter variable.&lt;br /&gt;
    local moreArgumentsExist = true&lt;br /&gt;
    while moreArgumentsExist == true do&lt;br /&gt;
        moreArgumentsExist = false&lt;br /&gt;
        for i = a, a + step - 1 do&lt;br /&gt;
            for j,v in ipairs(prefixTable) do&lt;br /&gt;
                local prefixArgName = v.prefix .. tostring(i)&lt;br /&gt;
                if origArgs[prefixArgName] then&lt;br /&gt;
                    moreArgumentsExist = true -- Do another loop if any arguments are found, even blank ones.&lt;br /&gt;
                    preprocessSingleArg(prefixArgName)&lt;br /&gt;
                end&lt;br /&gt;
                -- Process the depend table if the prefix argument is present and not blank, or&lt;br /&gt;
                -- we are processing &amp;quot;prefix1&amp;quot; and &amp;quot;prefix&amp;quot; is present and not blank, and&lt;br /&gt;
                -- if the depend table is present.&lt;br /&gt;
                if v.depend and (args[prefixArgName] or (i == 1 and args[v.prefix])) then&lt;br /&gt;
                    for j,dependValue in ipairs(v.depend) do&lt;br /&gt;
                        local dependArgName = dependValue .. tostring(i)&lt;br /&gt;
                        preprocessSingleArg(dependArgName)&lt;br /&gt;
                    end&lt;br /&gt;
                end&lt;br /&gt;
            end&lt;br /&gt;
        end&lt;br /&gt;
        a = a + step&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
 &lt;br /&gt;
function p.infobox(frame)&lt;br /&gt;
    -- If called via #invoke, use the args passed into the invoking template.&lt;br /&gt;
    -- Otherwise, for testing purposes, assume args are being passed directly in.&lt;br /&gt;
    if frame == mw.getCurrentFrame() then&lt;br /&gt;
        origArgs = frame:getParent().args&lt;br /&gt;
    else&lt;br /&gt;
        origArgs = frame&lt;br /&gt;
    end&lt;br /&gt;
    &lt;br /&gt;
    -- Parse the data parameters in the same order that the old {{infobox}} did, so that&lt;br /&gt;
    -- references etc. will display in the expected places. Parameters that depend on&lt;br /&gt;
    -- another parameter are only processed if that parameter is present, to avoid&lt;br /&gt;
    -- phantom references appearing in article reference lists.&lt;br /&gt;
    preprocessSingleArg('child')&lt;br /&gt;
    preprocessSingleArg('bodyclass')&lt;br /&gt;
    preprocessSingleArg('subbox')&lt;br /&gt;
    preprocessSingleArg('bodystyle')&lt;br /&gt;
    preprocessSingleArg('title')&lt;br /&gt;
    preprocessSingleArg('titleclass')&lt;br /&gt;
    preprocessSingleArg('titlestyle')&lt;br /&gt;
    preprocessSingleArg('above')&lt;br /&gt;
    preprocessSingleArg('aboveclass')&lt;br /&gt;
    preprocessSingleArg('abovestyle')&lt;br /&gt;
    preprocessArgs({&lt;br /&gt;
        {prefix = 'subheader', depend = {'subheaderstyle', 'subheaderrowclass'}}&lt;br /&gt;
    }, 10)&lt;br /&gt;
    preprocessSingleArg('subheaderstyle')&lt;br /&gt;
    preprocessSingleArg('subheaderclass')&lt;br /&gt;
    preprocessArgs({&lt;br /&gt;
        {prefix = 'image', depend = {'caption', 'imagerowclass'}}&lt;br /&gt;
    }, 10)&lt;br /&gt;
    preprocessSingleArg('captionstyle')&lt;br /&gt;
    preprocessSingleArg('imagestyle')&lt;br /&gt;
    preprocessSingleArg('imageclass')&lt;br /&gt;
    preprocessArgs({&lt;br /&gt;
        {prefix = 'header'},&lt;br /&gt;
        {prefix = 'data', depend = {'label'}},&lt;br /&gt;
        {prefix = 'rowclass'},&lt;br /&gt;
        {prefix = 'rowstyle'},&lt;br /&gt;
        {prefix = 'class'},&lt;br /&gt;
        {prefix = 'dataid'},&lt;br /&gt;
        {prefix = 'labelid'},&lt;br /&gt;
        {prefix = 'headerid'},&lt;br /&gt;
        {prefix = 'rowid'}&lt;br /&gt;
    }, 50)&lt;br /&gt;
    preprocessSingleArg('headerclass')&lt;br /&gt;
    preprocessSingleArg('headerstyle')&lt;br /&gt;
    preprocessSingleArg('labelstyle')&lt;br /&gt;
    preprocessSingleArg('datastyle')&lt;br /&gt;
    preprocessSingleArg('below')&lt;br /&gt;
    preprocessSingleArg('belowclass')&lt;br /&gt;
    preprocessSingleArg('belowstyle')&lt;br /&gt;
    preprocessSingleArg('name')&lt;br /&gt;
    args['italic title'] = origArgs['italic title'] -- different behaviour if blank or absent&lt;br /&gt;
    preprocessSingleArg('decat')&lt;br /&gt;
 &lt;br /&gt;
    return _infobox()&lt;br /&gt;
end&lt;br /&gt;
 &lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>Kolk</name></author>	</entry>

	<entry>
		<id>http://wiki.isofts.kiev.ua/index.php?title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:Authority_control&amp;diff=649</id>
		<title>Модуль:Authority control</title>
		<link rel="alternate" type="text/html" href="http://wiki.isofts.kiev.ua/index.php?title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:Authority_control&amp;diff=649"/>
				<updated>2016-11-24T15:22:54Z</updated>
		
		<summary type="html">&lt;p&gt;Kolk: Імпортовано 1 версія&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;require('Module:No globals')&lt;br /&gt;
&lt;br /&gt;
local function getCatForId( id )&lt;br /&gt;
    local title = mw.title.getCurrentTitle()&lt;br /&gt;
    local namespace = title.namespace&lt;br /&gt;
    if namespace == 0 then&lt;br /&gt;
        return '[[Category:Wikipedia articles with ' .. id .. ' identifiers]]'&lt;br /&gt;
    elseif namespace == 2 and not title.isSubpage then&lt;br /&gt;
        return '[[Category:User pages with ' .. id .. ' identifiers]]'&lt;br /&gt;
    else&lt;br /&gt;
        return '[[Category:Miscellaneous pages with ' .. id .. ' identifiers]]'&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function viafLink( id )&lt;br /&gt;
    if not string.match( id, '^%d+$' ) then&lt;br /&gt;
        return false&lt;br /&gt;
    end&lt;br /&gt;
    return '[https://viaf.org/viaf/' .. id .. ' ' .. id .. ']' .. getCatForId( 'VIAF' )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function kulturnavLink( id )&lt;br /&gt;
    return '[http://kulturnav.org/language/en/' .. id .. ' id]' &lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function sikartLink( id )&lt;br /&gt;
    return '[http://www.sikart.ch/KuenstlerInnen.aspx?id=' .. id .. '&amp;amp;lng=en ' .. id .. ']' &lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function tlsLink( id )&lt;br /&gt;
	local id2 = mw.ustring.gsub(id, '%s', function(s) return mw.uri.encode(s, 'WIKI') end)&lt;br /&gt;
    return '[http://tls.theaterwissenschaft.ch/wiki/' .. id2 .. ' ' .. id .. ']' &lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
local function ciniiLink( id )&lt;br /&gt;
    return '[http://ci.nii.ac.jp/author/' .. id .. '?l=en ' .. id .. ']' &lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function bneLink( id )&lt;br /&gt;
    return '[http://catalogo.bne.es/uhtbin/authoritybrowse.cgi?action=display&amp;amp;authority_id=' .. id .. ' ' .. id .. ']' &lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
local function uscongressLink( id )&lt;br /&gt;
    return '[http://bioguide.congress.gov/scripts/biodisplay.pl?index=' .. id .. ' ' .. id .. ']' &lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function narapersonLink( id )&lt;br /&gt;
    return '[https://research.archives.gov/person/' .. id .. ' ' .. id .. ']' &lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function naraorganizationLink( id )&lt;br /&gt;
    return '[https://research.archives.gov/organization/' .. id .. ' ' .. id .. ']' &lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function botanistLink( id )&lt;br /&gt;
	local id2 = mw.ustring.gsub(id, '%s', function(s) return mw.uri.encode(s, 'PATH') end)&lt;br /&gt;
    return '[http://www.ipni.org/ipni/advAuthorSearch.do?find_abbreviation=' .. id2 .. ' ' .. id .. ']' &lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function mgpLink( id )&lt;br /&gt;
    -- TODO Implement some sanity checking regex&lt;br /&gt;
    return '[http://www.genealogy.ams.org/id.php?id=' .. id .. ' ' .. id .. ']' &lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function rslLink( id )&lt;br /&gt;
    -- TODO Implement some sanity checking regex&lt;br /&gt;
    return '[http://aleph.rsl.ru/F?func=find-b&amp;amp;find_code=SYS&amp;amp;adjacent=Y&amp;amp;local_base=RSL11&amp;amp;request=' .. id .. '&amp;amp;CON_LNG=ENG ' .. id .. ']'&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function leonoreLink( id )&lt;br /&gt;
-- Identifiants allant de LH/1/1 à LH/2794/54 (légionnaires)&lt;br /&gt;
-- Identifiants allant de C/0/1 à C/0/84 (84 légionnaires célèbres)&lt;br /&gt;
-- Identifiants allant de 19800035/1/1 à 19800035/385/51670 (légionnaires décédés entre 1954 et 1977, et quelques dossiers de légionnaires décédés avant 1954)&lt;br /&gt;
    if not string.match( id, '^LH/%d%d?%d?%d?/%d%d?%d?$' ) and&lt;br /&gt;
       not string.match( id, '^C/0/%d%d?$' ) and&lt;br /&gt;
	   not string.match( id, '^19800035/%d%d?%d?%d?/%d%d?%d?%d?%d?$' ) then&lt;br /&gt;
        return false&lt;br /&gt;
    end&lt;br /&gt;
    return '[http://www.culture.gouv.fr/public/mistral/leonore_fr?ACTION=CHERCHER&amp;amp;FIELD_1=COTE&amp;amp;VALUE_1=' .. id .. ' ' .. id .. ']' &lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function sbnLink( id )&lt;br /&gt;
    if not string.match( id, '^IT\\ICCU\\%d%d%d%d%d%d%d%d%d%d$' ) and not string.match( id, '^IT\\ICCU\\%u%u[%d%u]%u\\%d%d%d%d%d%d$' ) then&lt;br /&gt;
        return false&lt;br /&gt;
    end&lt;br /&gt;
    return '[http://opac.sbn.it/opacsbn/opac/iccu/scheda_authority.jsp?bid=' .. id .. ' ' .. id .. ']' .. getCatForId( 'SBN' )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function nkcLink( id )&lt;br /&gt;
	return '[http://aleph.nkp.cz/F/?func=find-c&amp;amp;local_base=aut&amp;amp;ccl_term=ica=' .. id .. '&amp;amp;CON_LNG=ENG ' .. id .. ']' &lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function nclLink( id )&lt;br /&gt;
    if not string.match( id, '^%d+$' ) then&lt;br /&gt;
        return false&lt;br /&gt;
    end&lt;br /&gt;
    return '[http://aleweb.ncl.edu.tw/F/?func=accref&amp;amp;acc_sequence=' .. id .. '&amp;amp;CON_LNG=ENG ' .. id .. ']' &lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function ndlLink( id )&lt;br /&gt;
	return '[http://id.ndl.go.jp/auth/ndlna/' .. id .. ' ' .. id .. ']' &lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function sudocLink( id )&lt;br /&gt;
    if not string.match( id, '^%d%d%d%d%d%d%d%d[%dxX]$' ) then&lt;br /&gt;
        return false&lt;br /&gt;
    end&lt;br /&gt;
    return '[http://www.idref.fr/' .. id .. ' ' .. id .. ']' &lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function hlsLink( id )&lt;br /&gt;
    if not string.match( id, '^%d+$' ) then&lt;br /&gt;
        return false&lt;br /&gt;
    end&lt;br /&gt;
    return '[http://www.hls-dhs-dss.ch/textes/f/F' .. id .. '.php ' .. id .. ']'&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function lirLink( id )&lt;br /&gt;
    if not string.match( id, '^%d+$' ) then&lt;br /&gt;
        return false&lt;br /&gt;
    end&lt;br /&gt;
    return '[http://www.e-lir.ch/e-LIR___Lexicon.' .. id .. '.450.0.html ' .. id .. ']'&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function splitLccn( id )&lt;br /&gt;
    if id:match( '^%l%l?%l?%d%d%d%d%d%d%d%d%d?%d?$' ) then&lt;br /&gt;
        id = id:gsub( '^(%l+)(%d+)(%d%d%d%d%d%d)$', '%1/%2/%3' )&lt;br /&gt;
    end&lt;br /&gt;
    if id:match( '^%l%l?%l?/%d%d%d?%d?/%d+$' ) then&lt;br /&gt;
         return mw.text.split( id, '/' )&lt;br /&gt;
    end&lt;br /&gt;
    return false&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function append(str, c, length)&lt;br /&gt;
    while str:len() &amp;lt; length do&lt;br /&gt;
        str = c .. str&lt;br /&gt;
    end&lt;br /&gt;
    return str&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function lccnLink( id )&lt;br /&gt;
    local parts = splitLccn( id )&lt;br /&gt;
    if not parts then&lt;br /&gt;
        return false&lt;br /&gt;
    end&lt;br /&gt;
    local lccnType = parts[1] ~= 'sh' and 'names' or 'subjects'&lt;br /&gt;
    id = parts[1] .. parts[2] .. append( parts[3], '0', 6 )&lt;br /&gt;
    return '[http://id.loc.gov/authorities/' .. lccnType .. '/' .. id .. ' ' .. id .. ']' .. getCatForId( 'LCCN' )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function mbLink( id )&lt;br /&gt;
    -- TODO Implement some sanity checking regex&lt;br /&gt;
    return '[//musicbrainz.org/artist/' .. id .. ' ' .. id .. ']' .. getCatForId( 'MusicBrainz' )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--Returns the ISNI check digit isni must be a string where the 15 first elements are digits&lt;br /&gt;
local function getIsniCheckDigit( isni )&lt;br /&gt;
    local total = 0&lt;br /&gt;
    for i = 1, 15 do&lt;br /&gt;
        local digit = isni:byte( i ) - 48 --Get integer value&lt;br /&gt;
        total = (total + digit) * 2&lt;br /&gt;
    end&lt;br /&gt;
    local remainder = total % 11&lt;br /&gt;
    local result = (12 - remainder) % 11&lt;br /&gt;
    if result == 10 then&lt;br /&gt;
        return &amp;quot;X&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
    return tostring( result )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--Validate ISNI (and ORCID) and retuns it as a 16 characters string or returns false if it's invalid&lt;br /&gt;
--See http://support.orcid.org/knowledgebase/articles/116780-structure-of-the-orcid-identifier&lt;br /&gt;
local function validateIsni( id )&lt;br /&gt;
    id = id:gsub( '[ %-]', '' ):upper()&lt;br /&gt;
    if not id:match( '^%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d[%dX]$' ) then&lt;br /&gt;
        return false&lt;br /&gt;
    end&lt;br /&gt;
    if getIsniCheckDigit( id ) ~= string.char( id:byte( 16 ) ) then&lt;br /&gt;
        return false&lt;br /&gt;
    end&lt;br /&gt;
    return id&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function isniLink( id )&lt;br /&gt;
    id = validateIsni( id )&lt;br /&gt;
    if not id then&lt;br /&gt;
        return false&lt;br /&gt;
    end&lt;br /&gt;
    return '[http://isni.org/isni/' .. id .. ' ' .. id:sub( 1, 4 ) .. ' ' .. id:sub( 5, 8 ) .. ' '  .. id:sub( 9, 12 ) .. ' '  .. id:sub( 13, 16 ) .. ']' .. getCatForId( 'ISNI' )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function orcidLink( id )&lt;br /&gt;
    id = validateIsni( id )&lt;br /&gt;
    if not id then&lt;br /&gt;
        return false&lt;br /&gt;
    end&lt;br /&gt;
    id = id:sub( 1, 4 ) .. '-' .. id:sub( 5, 8 ) .. '-'  .. id:sub( 9, 12 ) .. '-'  .. id:sub( 13, 16 )&lt;br /&gt;
    return '[https://orcid.org/' .. id .. ' ' .. id .. ']' .. getCatForId( 'ORCID' )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function gndLink( id )&lt;br /&gt;
    return '[http://d-nb.info/gnd/' .. id .. ' ' .. id .. ']' .. getCatForId( 'GND' )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function selibrLink( id )&lt;br /&gt;
	if not string.match( id, '^%d+$' ) then&lt;br /&gt;
        return false&lt;br /&gt;
    end&lt;br /&gt;
    return '[//libris.kb.se/auth/' .. id .. ' ' .. id .. ']' .. getCatForId( 'SELIBR' )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function bnfLink( id )&lt;br /&gt;
    --Add cb prefix if it has been removed&lt;br /&gt;
    if not string.match( id, '^cb.+$' ) then&lt;br /&gt;
        id = 'cb' .. id&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    return '[http://catalogue.bnf.fr/ark:/12148/' .. id .. ' ' .. id .. '] [http://data.bnf.fr/ark:/12148/' .. id .. ' (data)]' .. getCatForId( 'BNF' )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function bpnLink( id )&lt;br /&gt;
    if not string.match( id, '^%d+$' ) then&lt;br /&gt;
        return false&lt;br /&gt;
    end&lt;br /&gt;
    return '[http://www.biografischportaal.nl/en/persoon/' .. id .. ' ' .. id .. ']' .. getCatForId( 'BPN' )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function ridLink( id )&lt;br /&gt;
    return '[http://www.researcherid.com/rid/' .. id .. ' ' .. id .. ']' .. getCatForId( 'RID' )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function bibsysLink( id )&lt;br /&gt;
    return '[http://ask.bibsys.no/ask/action/result?cmd=&amp;amp;kilde=biblio&amp;amp;cql=bs.autid+%3D+' .. id .. '&amp;amp;feltselect=bs.autid ' .. id .. ']' .. getCatForId( 'BIBSYS' )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function ulanLink( id )&lt;br /&gt;
    return '[//www.getty.edu/vow/ULANFullDisplay?find=&amp;amp;role=&amp;amp;nation=&amp;amp;subjectid=' .. id .. ' ' .. id .. ']' .. getCatForId( 'ULAN' )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function nlaLink( id )&lt;br /&gt;
	return '[//nla.gov.au/anbd.aut-an' .. id .. ' ' .. id .. ']' .. getCatForId( 'NLA' )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function rkdartistsLink( id )&lt;br /&gt;
	return '[https://rkd.nl/en/explore/artists/' .. id .. ' ' .. id .. ']' .. getCatForId( 'RKDartists' )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function getIdsFromWikidata( item, property )&lt;br /&gt;
    local ids = {}&lt;br /&gt;
    if not item.claims[property] then&lt;br /&gt;
        return ids&lt;br /&gt;
    end&lt;br /&gt;
    for _, statement in pairs( item:getBestStatements( property )) do&lt;br /&gt;
		if statement.mainsnak.datavalue then&lt;br /&gt;
			table.insert( ids, statement.mainsnak.datavalue.value )&lt;br /&gt;
		end&lt;br /&gt;
    end&lt;br /&gt;
    return ids&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function matchesWikidataRequirements( item, reqs )&lt;br /&gt;
    for _, group in pairs( reqs ) do&lt;br /&gt;
        local property = 'p' .. group[1]&lt;br /&gt;
        local qid = group[2]&lt;br /&gt;
        if item.claims[property] ~= nil then&lt;br /&gt;
            for _, statement in pairs ( item.claims[property] ) do&lt;br /&gt;
            	if statement.mainsnak.datavalue ~= nil then&lt;br /&gt;
	                if statement.mainsnak.datavalue.value['numeric-id'] == qid then&lt;br /&gt;
    	                return true&lt;br /&gt;
        	        end&lt;br /&gt;
        	    end&lt;br /&gt;
            end&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
    return false&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function createRow( id, label, rawValue, link, withUid )&lt;br /&gt;
    if link then&lt;br /&gt;
        if withUid then&lt;br /&gt;
            return '*&amp;lt;span style=&amp;quot;white-space:nowrap;&amp;quot;&amp;gt;' .. label .. ' &amp;lt;span class=&amp;quot;uid&amp;quot;&amp;gt;' .. link .. '&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;\n'&lt;br /&gt;
        else&lt;br /&gt;
            return '*&amp;lt;span style=&amp;quot;white-space:nowrap;&amp;quot;&amp;gt;' .. label .. ' ' .. link .. '&amp;lt;/span&amp;gt;\n'&lt;br /&gt;
        end&lt;br /&gt;
    else&lt;br /&gt;
        return '* &amp;lt;span class=&amp;quot;error&amp;quot;&amp;gt;The ' .. id .. ' id ' .. rawValue .. ' is not valid.&amp;lt;/span&amp;gt;[[Category:Wikipedia articles with faulty authority control identifiers (' .. id .. ')]]\n'&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--In this order: name of the parameter, label, propertyId in Wikidata, formatting function&lt;br /&gt;
local conf = {&lt;br /&gt;
    { 'VIAF', '[[Virtual International Authority File|VIAF]]', 214, viafLink },&lt;br /&gt;
    { 'LCCN', '[[Library of Congress Control Number|LCCN]]', 244, lccnLink },&lt;br /&gt;
    { 'ISNI', '[[International Standard Name Identifier|ISNI]]', 213, isniLink },&lt;br /&gt;
    { 'ORCID', '[[ORCID]]', 496, orcidLink },&lt;br /&gt;
    { 'GND', '[[Integrated Authority File|GND]]', 227, gndLink },&lt;br /&gt;
    { 'SELIBR', '[[LIBRIS|SELIBR]]', 906, selibrLink },&lt;br /&gt;
    { 'SUDOC', '[[Système universitaire de documentation|SUDOC]]', 269, sudocLink },&lt;br /&gt;
    { 'BNF', '[[Bibliothèque nationale de France|BNF]]', 268, bnfLink },&lt;br /&gt;
    { 'BPN', '[[Biografisch Portaal|BPN]]', 651, bpnLink },&lt;br /&gt;
    { 'RID', '[[ResearcherID]]', 1053, ridLink },&lt;br /&gt;
    { 'BIBSYS', '[[BIBSYS]]', 1015, bibsysLink },&lt;br /&gt;
    { 'ULAN', '[[Union List of Artist Names|ULAN]]', 245, ulanLink },&lt;br /&gt;
    { 'HDS', '[[Historical Dictionary of Switzerland|HDS]]', 902, hlsLink },&lt;br /&gt;
    { 'LIR', '[[Historical Dictionary of Switzerland#Lexicon_Istoric_Retic|LIR]]', 886, lirLink },&lt;br /&gt;
    { 'MBA', '[[MusicBrainz]]', 434, mbLink },&lt;br /&gt;
    { 'MGP', '[[Mathematics Genealogy Project|MGP]]', 549, mgpLink },&lt;br /&gt;
    { 'NLA', '[[National Library of Australia|NLA]]', 409, nlaLink },&lt;br /&gt;
    { 'NDL', '[[National Diet Library|NDL]]', 349, ndlLink },&lt;br /&gt;
    { 'NCL', '[[National Central Library|NCL]]', 1048, nclLink },&lt;br /&gt;
    { 'NKC', '[[National Library of the Czech Republic|NKC]]', 691, nkcLink },&lt;br /&gt;
    { 'Léonore', '[[Base Léonore|Léonore]]', 640, leonoreLink },&lt;br /&gt;
    { 'SBN', '[[Istituto Centrale per il Catalogo Unico|ICCU]]', 396, sbnLink },&lt;br /&gt;
    { 'RLS', '[[Russian State Library|RLS]]', 947, rslLink },&lt;br /&gt;
    { 'Botanist', '[[Author citation (botany)|Botanist]]', 428, botanistLink },&lt;br /&gt;
    { 'NARA-person', '[[National Archives and Records Administration|NARA]]', 1222, narapersonLink },&lt;br /&gt;
    { 'NARA-organization', '[[National Archives and Records Administration|NARA]]', 1223, naraorganizationLink },&lt;br /&gt;
    { 'USCongress', '[[Biographical Directory of the United States Congress|US Congress]]', 1157, uscongressLink },&lt;br /&gt;
    { 'BNE', '[[Biblioteca Nacional de España|BNE]]', 950, bneLink },&lt;br /&gt;
    { 'CINII', '[[CiNii]]', 271, ciniiLink },&lt;br /&gt;
    { 'TLS', '[[Theaterlexikon der Schweiz|TLS]]', 1362, tlsLink },&lt;br /&gt;
    { 'SIKART', '[[SIKART]]', 781, sikartLink },&lt;br /&gt;
    { 'KULTURNAV', '[[KulturNav]]', 1248, kulturnavLink },&lt;br /&gt;
    { 'RKDartists', '[[Netherlands Institute for Art History#Online artist pages|RKD]]', 650, rkdartistsLink },&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
-- Check that the Wikidata item has this property--&amp;gt;value before adding it&lt;br /&gt;
local reqs = {}&lt;br /&gt;
&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
function p.authorityControl( frame )&lt;br /&gt;
    local parentArgs = frame:getParent().args&lt;br /&gt;
    --Create rows&lt;br /&gt;
    local elements = {}&lt;br /&gt;
&lt;br /&gt;
    --redirect PND to GND&lt;br /&gt;
    if (parentArgs.GND == nil or parentArgs.GND == '') and parentArgs.PND ~= nil and parentArgs.PND ~= '' then&lt;br /&gt;
        parentArgs.GND = parentArgs.PND&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    --Wikidata fallback if requested&lt;br /&gt;
    local item = mw.wikibase.getEntityObject()&lt;br /&gt;
    if item ~= nil and item.claims ~= nil then&lt;br /&gt;
        for _, params in pairs( conf ) do&lt;br /&gt;
            if params[3] ~= 0 then&lt;br /&gt;
                local val = parentArgs[params[1]]&lt;br /&gt;
                if not val or val == '' then&lt;br /&gt;
                	local canUseWikidata = nil&lt;br /&gt;
                    if reqs[params[1]] ~= nil then&lt;br /&gt;
                        canUseWikidata = matchesWikidataRequirements( item, reqs[params[1]] )&lt;br /&gt;
                    else&lt;br /&gt;
                        canUseWikidata = true&lt;br /&gt;
                    end&lt;br /&gt;
                    if canUseWikidata then&lt;br /&gt;
                        local wikidataIds = getIdsFromWikidata( item, 'P' .. params[3] )&lt;br /&gt;
                        if wikidataIds[1] then&lt;br /&gt;
                            parentArgs[params[1]] = wikidataIds[1]&lt;br /&gt;
                        end&lt;br /&gt;
                    end&lt;br /&gt;
                end&lt;br /&gt;
            end&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    --Worldcat&lt;br /&gt;
    if parentArgs['WORLDCATID'] and parentArgs['WORLDCATID'] ~= '' then&lt;br /&gt;
        table.insert( elements, createRow( 'WORLDCATID', '', parentArgs['WORLDCATID'], '[//www.worldcat.org/identities/' .. parentArgs['WORLDCATID'] .. ' WorldCat Identities]', false ) ) --Validation?&lt;br /&gt;
    elseif parentArgs['VIAF'] and string.match( parentArgs['VIAF'], '^%d+$' ) then -- Hackishly copy the validation code; this should go away when we move to using P1793 and P1630&lt;br /&gt;
        table.insert( elements, createRow( 'VIAF', '', parentArgs['VIAF'], '[//www.worldcat.org/identities/containsVIAFID/' .. parentArgs['VIAF'] .. ' WorldCat Identities]', false ) )&lt;br /&gt;
    elseif parentArgs['LCCN'] and parentArgs['LCCN'] ~= '' then&lt;br /&gt;
        local lccnParts = splitLccn( parentArgs['LCCN'] )&lt;br /&gt;
        if lccnParts and lccnParts[1] ~= 'sh' then&lt;br /&gt;
            table.insert( elements, createRow( 'LCCN', '', parentArgs['LCCN'], '[//www.worldcat.org/identities/lccn-' .. lccnParts[1] .. lccnParts[2] .. '-' .. lccnParts[3] .. ' WorldCat Identities]', false ) )&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    --Configured rows&lt;br /&gt;
    local rct = 0&lt;br /&gt;
    for k, params in pairs( conf ) do&lt;br /&gt;
        local val = parentArgs[params[1]]&lt;br /&gt;
        if val and val ~= '' then&lt;br /&gt;
            table.insert( elements, createRow( params[1], params[2] .. ':', val, params[4]( val ), true ) )&lt;br /&gt;
            rct = rct + 1&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
    local Navbox = require('Module:Navbox')&lt;br /&gt;
    local elementscats = ''&lt;br /&gt;
    if rct &amp;gt; 13 then&lt;br /&gt;
    	elementscats  = '[[Category:AC with ' .. rct .. ' elements]]'&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	if #elements ~= 0 then&lt;br /&gt;
		return Navbox._navbox( {&lt;br /&gt;
			name  = 'Authority control',&lt;br /&gt;
			bodyclass = 'hlist',&lt;br /&gt;
			group1 = '[[Help:Authority control|Authority control]]' .. elementscats,&lt;br /&gt;
			list1 = table.concat( elements )&lt;br /&gt;
			} )&lt;br /&gt;
	else&lt;br /&gt;
		return &amp;quot;&amp;quot;&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>Kolk</name></author>	</entry>

	<entry>
		<id>http://wiki.isofts.kiev.ua/index.php?title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:Navbox&amp;diff=647</id>
		<title>Модуль:Navbox</title>
		<link rel="alternate" type="text/html" href="http://wiki.isofts.kiev.ua/index.php?title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:Navbox&amp;diff=647"/>
				<updated>2016-11-24T15:22:52Z</updated>
		
		<summary type="html">&lt;p&gt;Kolk: Імпортовано 1 версія&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;--&lt;br /&gt;
-- This module implements {{Navbox}}&lt;br /&gt;
--&lt;br /&gt;
&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
local navbar = require('Module:Navbar')._navbar&lt;br /&gt;
local getArgs -- lazily initialized&lt;br /&gt;
&lt;br /&gt;
local args&lt;br /&gt;
local tableRowAdded = false&lt;br /&gt;
local border&lt;br /&gt;
local listnums = {}&lt;br /&gt;
&lt;br /&gt;
local function trim(s)&lt;br /&gt;
    return (mw.ustring.gsub(s, &amp;quot;^%s*(.-)%s*$&amp;quot;, &amp;quot;%1&amp;quot;))&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function addNewline(s)&lt;br /&gt;
    if s:match('^[*:;#]') or s:match('^{|') then&lt;br /&gt;
        return '\n' .. s ..'\n'&lt;br /&gt;
    else&lt;br /&gt;
        return s&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function addTableRow(tbl)&lt;br /&gt;
    -- If any other rows have already been added, then we add a 2px gutter row.&lt;br /&gt;
    if tableRowAdded then&lt;br /&gt;
        tbl&lt;br /&gt;
            :tag('tr')&lt;br /&gt;
                :css('height', '2px')&lt;br /&gt;
                :tag('td')&lt;br /&gt;
                    :attr('colspan',2)&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    tableRowAdded = true&lt;br /&gt;
&lt;br /&gt;
    return tbl:tag('tr')&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function renderNavBar(titleCell)&lt;br /&gt;
    -- Depending on the presence of the navbar and/or show/hide link, we may need to add a spacer div on the left&lt;br /&gt;
    -- or right to keep the title centered.&lt;br /&gt;
    local spacerSide = nil&lt;br /&gt;
&lt;br /&gt;
    if args.navbar == 'off' then&lt;br /&gt;
        -- No navbar, and client wants no spacer, i.e. wants the title to be shifted to the left. If there's&lt;br /&gt;
        -- also no show/hide link, then we need a spacer on the right to achieve the left shift.&lt;br /&gt;
        if args.state == 'plain' then spacerSide = 'right' end&lt;br /&gt;
    elseif args.navbar == 'plain' or (not args.name and mw.getCurrentFrame():getParent():getTitle():gsub('/sandbox$', '') == 'Template:Navbox') then&lt;br /&gt;
        -- No navbar. Need a spacer on the left to balance out the width of the show/hide link.&lt;br /&gt;
        if args.state ~= 'plain' then spacerSide = 'left' end&lt;br /&gt;
    else&lt;br /&gt;
        -- Will render navbar (or error message). If there's no show/hide link, need a spacer on the right&lt;br /&gt;
        -- to balance out the width of the navbar.&lt;br /&gt;
        if args.state == 'plain' then spacerSide = 'right' end&lt;br /&gt;
&lt;br /&gt;
        titleCell:wikitext(navbar{&lt;br /&gt;
            args.name,&lt;br /&gt;
            mini = 1,&lt;br /&gt;
            fontstyle = (args.basestyle or '') .. ';' .. (args.titlestyle or '') ..  ';background:none transparent;border:none;'&lt;br /&gt;
        })&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    -- Render the spacer div.&lt;br /&gt;
    if spacerSide then&lt;br /&gt;
        titleCell&lt;br /&gt;
            :tag('span')&lt;br /&gt;
                :css('float', spacerSide)&lt;br /&gt;
                :css('width', '6em')&lt;br /&gt;
                :wikitext('&amp;amp;nbsp;')&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--&lt;br /&gt;
--   Title row&lt;br /&gt;
--&lt;br /&gt;
local function renderTitleRow(tbl)&lt;br /&gt;
    if not args.title then return end&lt;br /&gt;
&lt;br /&gt;
    local titleRow = addTableRow(tbl)&lt;br /&gt;
&lt;br /&gt;
    if args.titlegroup then&lt;br /&gt;
        titleRow&lt;br /&gt;
            :tag('th')&lt;br /&gt;
                :attr('scope', 'row')&lt;br /&gt;
                :addClass('navbox-group')&lt;br /&gt;
                :addClass(args.titlegroupclass)&lt;br /&gt;
                :cssText(args.basestyle)&lt;br /&gt;
                :cssText(args.groupstyle)&lt;br /&gt;
                :cssText(args.titlegroupstyle)&lt;br /&gt;
                :wikitext(args.titlegroup)&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    local titleCell = titleRow:tag('th'):attr('scope', 'col')&lt;br /&gt;
&lt;br /&gt;
    if args.titlegroup then&lt;br /&gt;
        titleCell&lt;br /&gt;
            :css('border-left', '2px solid #fdfdfd')&lt;br /&gt;
            :css('width', '100%')&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    local titleColspan = 2&lt;br /&gt;
    if args.imageleft then titleColspan = titleColspan + 1 end&lt;br /&gt;
    if args.image then titleColspan = titleColspan + 1 end&lt;br /&gt;
    if args.titlegroup then titleColspan = titleColspan - 1 end&lt;br /&gt;
&lt;br /&gt;
    titleCell&lt;br /&gt;
        :cssText(args.basestyle)&lt;br /&gt;
        :cssText(args.titlestyle)&lt;br /&gt;
        :addClass('navbox-title')&lt;br /&gt;
        :attr('colspan', titleColspan)&lt;br /&gt;
&lt;br /&gt;
    renderNavBar(titleCell)&lt;br /&gt;
&lt;br /&gt;
    titleCell&lt;br /&gt;
        :tag('div')&lt;br /&gt;
            :attr('id', mw.uri.anchorEncode(args.title))&lt;br /&gt;
            :addClass(args.titleclass)&lt;br /&gt;
            :css('font-size', '114%')&lt;br /&gt;
            :wikitext(addNewline(args.title))&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--&lt;br /&gt;
--   Above/Below rows&lt;br /&gt;
--&lt;br /&gt;
&lt;br /&gt;
local function getAboveBelowColspan()&lt;br /&gt;
    local ret = 2&lt;br /&gt;
    if args.imageleft then ret = ret + 1 end&lt;br /&gt;
    if args.image then ret = ret + 1 end&lt;br /&gt;
    return ret&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function renderAboveRow(tbl)&lt;br /&gt;
    if not args.above then return end&lt;br /&gt;
&lt;br /&gt;
    addTableRow(tbl)&lt;br /&gt;
        :tag('td')&lt;br /&gt;
            :addClass('navbox-abovebelow')&lt;br /&gt;
            :addClass(args.aboveclass)&lt;br /&gt;
            :cssText(args.basestyle)&lt;br /&gt;
            :cssText(args.abovestyle)&lt;br /&gt;
            :attr('colspan', getAboveBelowColspan())&lt;br /&gt;
            :tag('div')&lt;br /&gt;
                :wikitext(addNewline(args.above))&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function renderBelowRow(tbl)&lt;br /&gt;
    if not args.below then return end&lt;br /&gt;
&lt;br /&gt;
    addTableRow(tbl)&lt;br /&gt;
        :tag('td')&lt;br /&gt;
            :addClass('navbox-abovebelow')&lt;br /&gt;
            :addClass(args.belowclass)&lt;br /&gt;
            :cssText(args.basestyle)&lt;br /&gt;
            :cssText(args.belowstyle)&lt;br /&gt;
            :attr('colspan', getAboveBelowColspan())&lt;br /&gt;
            :tag('div')&lt;br /&gt;
                :wikitext(addNewline(args.below))&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--&lt;br /&gt;
--   List rows&lt;br /&gt;
--&lt;br /&gt;
local function renderListRow(tbl, listnum)&lt;br /&gt;
    local row = addTableRow(tbl)&lt;br /&gt;
&lt;br /&gt;
    if listnum == 1 and args.imageleft then&lt;br /&gt;
        row&lt;br /&gt;
            :tag('td')&lt;br /&gt;
                :addClass('navbox-image')&lt;br /&gt;
                :addClass(args.imageclass)&lt;br /&gt;
                :css('width', '0%')&lt;br /&gt;
                :css('padding', '0px 2px 0px 0px')&lt;br /&gt;
                :cssText(args.imageleftstyle)&lt;br /&gt;
                :attr('rowspan', 2 * #listnums - 1)&lt;br /&gt;
                :tag('div')&lt;br /&gt;
                    :wikitext(addNewline(args.imageleft))&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    if args['group' .. listnum] then&lt;br /&gt;
        local groupCell = row:tag('th')&lt;br /&gt;
&lt;br /&gt;
        groupCell&lt;br /&gt;
            :attr('scope', 'row')&lt;br /&gt;
            :addClass('navbox-group')&lt;br /&gt;
            :addClass(args.groupclass)&lt;br /&gt;
            :cssText(args.basestyle)&lt;br /&gt;
&lt;br /&gt;
        if args.groupwidth then&lt;br /&gt;
            groupCell:css('width', args.groupwidth)&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        groupCell&lt;br /&gt;
            :cssText(args.groupstyle)&lt;br /&gt;
            :cssText(args['group' .. listnum .. 'style'])&lt;br /&gt;
            :wikitext(args['group' .. listnum])&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    local listCell = row:tag('td')&lt;br /&gt;
&lt;br /&gt;
    if args['group' .. listnum] then&lt;br /&gt;
        listCell&lt;br /&gt;
            :css('text-align', 'left')&lt;br /&gt;
            :css('border-left-width', '2px')&lt;br /&gt;
            :css('border-left-style', 'solid')&lt;br /&gt;
    else&lt;br /&gt;
        listCell:attr('colspan', 2)&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    if not args.groupwidth then&lt;br /&gt;
        listCell:css('width', '100%')&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    local isOdd = (listnum % 2) == 1&lt;br /&gt;
    local rowstyle = args.evenstyle&lt;br /&gt;
    if isOdd then rowstyle = args.oddstyle end&lt;br /&gt;
&lt;br /&gt;
    local evenOdd&lt;br /&gt;
    if args.evenodd == 'swap' then&lt;br /&gt;
        if isOdd then evenOdd = 'even' else evenOdd = 'odd' end&lt;br /&gt;
    else&lt;br /&gt;
        if isOdd then evenOdd = args.evenodd or 'odd' else evenOdd = args.evenodd or 'even' end&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    listCell&lt;br /&gt;
        :css('padding', '0px')&lt;br /&gt;
        :cssText(args.liststyle)&lt;br /&gt;
        :cssText(rowstyle)&lt;br /&gt;
        :cssText(args['list' .. listnum .. 'style'])&lt;br /&gt;
        :addClass('navbox-list')&lt;br /&gt;
        :addClass('navbox-' .. evenOdd)&lt;br /&gt;
        :addClass(args.listclass)&lt;br /&gt;
        :tag('div')&lt;br /&gt;
            :css('padding', (listnum == 1 and args.list1padding) or args.listpadding or '0em 0.25em')&lt;br /&gt;
            :wikitext(addNewline(args['list' .. listnum]))&lt;br /&gt;
&lt;br /&gt;
    if listnum == 1 and args.image then&lt;br /&gt;
        row&lt;br /&gt;
            :tag('td')&lt;br /&gt;
                :addClass('navbox-image')&lt;br /&gt;
                :addClass(args.imageclass)&lt;br /&gt;
                :css('width', '0%')&lt;br /&gt;
                :css('padding', '0px 0px 0px 2px')&lt;br /&gt;
                :cssText(args.imagestyle)&lt;br /&gt;
                :attr('rowspan', 2 * #listnums - 1)&lt;br /&gt;
                :tag('div')&lt;br /&gt;
                    :wikitext(addNewline(args.image))&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--&lt;br /&gt;
--   Tracking categories&lt;br /&gt;
--&lt;br /&gt;
&lt;br /&gt;
local function needsHorizontalLists()&lt;br /&gt;
    if border == 'child' or border == 'subgroup'  or args.tracking == 'no' then return false end&lt;br /&gt;
&lt;br /&gt;
    local listClasses = {'plainlist', 'hlist', 'hlist hnum', 'hlist hwrap', 'hlist vcard', 'vcard hlist', 'hlist vevent'}&lt;br /&gt;
    for i, cls in ipairs(listClasses) do&lt;br /&gt;
        if args.listclass == cls or args.bodyclass == cls then&lt;br /&gt;
            return false&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    return true&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function hasBackgroundColors()&lt;br /&gt;
    return mw.ustring.match(args.titlestyle or '','background') or mw.ustring.match(args.groupstyle or '','background') or mw.ustring.match(args.basestyle or '','background')&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function isIllegible()&lt;br /&gt;
    local styleratio = require('Module:Color contrast')._styleratio&lt;br /&gt;
&lt;br /&gt;
    for key, style in pairs(args) do&lt;br /&gt;
        if tostring(key):match(&amp;quot;style$&amp;quot;) then&lt;br /&gt;
            if styleratio{mw.text.unstripNoWiki(style)} &amp;lt; 4.5 then&lt;br /&gt;
                return true &lt;br /&gt;
            end&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
    return false&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function getTrackingCategories()&lt;br /&gt;
    local cats = {}&lt;br /&gt;
    if needsHorizontalLists() then table.insert(cats, 'Navigational boxes without horizontal lists') end&lt;br /&gt;
    if hasBackgroundColors() then table.insert(cats, 'Navboxes using background colours') end&lt;br /&gt;
    if isIllegible() then table.insert(cats, 'Potentially illegible navboxes') end&lt;br /&gt;
    return cats&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function renderTrackingCategories(builder)&lt;br /&gt;
    local title = mw.title.getCurrentTitle()&lt;br /&gt;
    if title.namespace ~= 10 then return end -- not in template space&lt;br /&gt;
    local subpage = title.subpageText&lt;br /&gt;
    if subpage == 'doc' or subpage == 'sandbox' or subpage == 'testcases' then return end&lt;br /&gt;
&lt;br /&gt;
    for i, cat in ipairs(getTrackingCategories()) do&lt;br /&gt;
        builder:wikitext('[[Category:' .. cat .. ']]')&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--&lt;br /&gt;
--   Main navbox tables&lt;br /&gt;
--&lt;br /&gt;
local function renderMainTable()&lt;br /&gt;
    local tbl = mw.html.create('table')&lt;br /&gt;
        :addClass('nowraplinks')&lt;br /&gt;
        :addClass(args.bodyclass)&lt;br /&gt;
&lt;br /&gt;
    if args.title and (args.state ~= 'plain' and args.state ~= 'off') then&lt;br /&gt;
        tbl&lt;br /&gt;
            :addClass('collapsible')&lt;br /&gt;
            :addClass(args.state or 'autocollapse')&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    tbl:css('border-spacing', 0)&lt;br /&gt;
    if border == 'subgroup' or border == 'child' or border == 'none' then&lt;br /&gt;
        tbl&lt;br /&gt;
            :addClass('navbox-subgroup')&lt;br /&gt;
            :cssText(args.bodystyle)&lt;br /&gt;
            :cssText(args.style)&lt;br /&gt;
    else -- regular navobx - bodystyle and style will be applied to the wrapper table&lt;br /&gt;
        tbl&lt;br /&gt;
            :addClass('navbox-inner')&lt;br /&gt;
            :css('background', 'transparent')&lt;br /&gt;
            :css('color', 'inherit')&lt;br /&gt;
    end&lt;br /&gt;
    tbl:cssText(args.innerstyle)&lt;br /&gt;
&lt;br /&gt;
    renderTitleRow(tbl)&lt;br /&gt;
    renderAboveRow(tbl)&lt;br /&gt;
    for i, listnum in ipairs(listnums) do&lt;br /&gt;
        renderListRow(tbl, listnum)&lt;br /&gt;
    end&lt;br /&gt;
    renderBelowRow(tbl)&lt;br /&gt;
&lt;br /&gt;
    return tbl&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p._navbox(navboxArgs)&lt;br /&gt;
    args = navboxArgs&lt;br /&gt;
&lt;br /&gt;
    for k, v in pairs(args) do&lt;br /&gt;
        local listnum = ('' .. k):match('^list(%d+)$')&lt;br /&gt;
        if listnum then table.insert(listnums, tonumber(listnum)) end&lt;br /&gt;
    end&lt;br /&gt;
    table.sort(listnums)&lt;br /&gt;
&lt;br /&gt;
    border = trim(args.border or args[1] or '')&lt;br /&gt;
&lt;br /&gt;
    -- render the main body of the navbox&lt;br /&gt;
    local tbl = renderMainTable()&lt;br /&gt;
&lt;br /&gt;
    -- render the appropriate wrapper around the navbox, depending on the border param&lt;br /&gt;
    local res = mw.html.create()&lt;br /&gt;
    if border == 'none' then&lt;br /&gt;
        local nav = res:tag('div')&lt;br /&gt;
            :attr('role', 'navigation')&lt;br /&gt;
            :node(tbl)&lt;br /&gt;
        if args.title then&lt;br /&gt;
            nav:attr('aria-labelledby', mw.uri.anchorEncode(args.title))&lt;br /&gt;
        else&lt;br /&gt;
            nav:attr('aria-label', 'Navbox')&lt;br /&gt;
        end&lt;br /&gt;
    elseif border == 'subgroup' or border == 'child' then&lt;br /&gt;
        -- We assume that this navbox is being rendered in a list cell of a parent navbox, and is&lt;br /&gt;
        -- therefore inside a div with padding:0em 0.25em. We start with a &amp;lt;/div&amp;gt; to avoid the&lt;br /&gt;
        -- padding being applied, and at the end add a &amp;lt;div&amp;gt; to balance out the parent's &amp;lt;/div&amp;gt;&lt;br /&gt;
        res&lt;br /&gt;
            :wikitext('&amp;lt;/div&amp;gt;') -- XXX: hack due to lack of unclosed support in mw.html.&lt;br /&gt;
            :node(tbl)&lt;br /&gt;
            :wikitext('&amp;lt;div&amp;gt;') -- XXX: hack due to lack of unclosed support in mw.html.&lt;br /&gt;
    else&lt;br /&gt;
        local nav = res:tag('div')&lt;br /&gt;
            :attr('role', 'navigation')&lt;br /&gt;
            :addClass('navbox')&lt;br /&gt;
            :cssText(args.bodystyle)&lt;br /&gt;
            :cssText(args.style)&lt;br /&gt;
            :css('padding', '3px')&lt;br /&gt;
            :node(tbl)&lt;br /&gt;
        if args.title then&lt;br /&gt;
            nav:attr('aria-labelledby', mw.uri.anchorEncode(args.title))&lt;br /&gt;
        else&lt;br /&gt;
            nav:attr('aria-label', 'Navbox')&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    renderTrackingCategories(res)&lt;br /&gt;
&lt;br /&gt;
    return tostring(res)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.navbox(frame)&lt;br /&gt;
    if not getArgs then&lt;br /&gt;
        getArgs = require('Module:Arguments').getArgs&lt;br /&gt;
    end&lt;br /&gt;
    args = getArgs(frame, {wrappers = 'Template:Navbox'})&lt;br /&gt;
&lt;br /&gt;
    -- Read the arguments in the order they'll be output in, to make references number in the right order.&lt;br /&gt;
    local _&lt;br /&gt;
    _ = args.title&lt;br /&gt;
    _ = args.above&lt;br /&gt;
    for i = 1, 20 do&lt;br /&gt;
        _ = args[&amp;quot;group&amp;quot; .. tostring(i)]&lt;br /&gt;
        _ = args[&amp;quot;list&amp;quot; .. tostring(i)]&lt;br /&gt;
    end&lt;br /&gt;
    _ = args.below&lt;br /&gt;
&lt;br /&gt;
    return p._navbox(args)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>Kolk</name></author>	</entry>

	<entry>
		<id>http://wiki.isofts.kiev.ua/index.php?title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:Message_box&amp;diff=645</id>
		<title>Модуль:Message box</title>
		<link rel="alternate" type="text/html" href="http://wiki.isofts.kiev.ua/index.php?title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:Message_box&amp;diff=645"/>
				<updated>2016-11-24T15:22:51Z</updated>
		
		<summary type="html">&lt;p&gt;Kolk: Імпортовано 1 версія&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;-- This is a meta-module for producing message box templates, including&lt;br /&gt;
-- {{mbox}}, {{ambox}}, {{imbox}}, {{tmbox}}, {{ombox}}, {{cmbox}} and {{fmbox}}.&lt;br /&gt;
&lt;br /&gt;
-- Load necessary modules.&lt;br /&gt;
require('Module:No globals')&lt;br /&gt;
local getArgs&lt;br /&gt;
local categoryHandler = require('Module:Category handler')._main&lt;br /&gt;
local yesno = require('Module:Yesno')&lt;br /&gt;
&lt;br /&gt;
-- Get a language object for formatDate and ucfirst.&lt;br /&gt;
local lang = mw.language.getContentLanguage()&lt;br /&gt;
&lt;br /&gt;
-- Define constants&lt;br /&gt;
local CONFIG_MODULE = 'Module:Message box/configuration'&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
-- Helper functions&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
local function getTitleObject(...)&lt;br /&gt;
	-- Get the title object, passing the function through pcall&lt;br /&gt;
	-- in case we are over the expensive function count limit.&lt;br /&gt;
	local success, title = pcall(mw.title.new, ...)&lt;br /&gt;
	if success then&lt;br /&gt;
		return title&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function union(t1, t2)&lt;br /&gt;
	-- Returns the union of two arrays.&lt;br /&gt;
	local vals = {}&lt;br /&gt;
	for i, v in ipairs(t1) do&lt;br /&gt;
		vals[v] = true&lt;br /&gt;
	end&lt;br /&gt;
	for i, v in ipairs(t2) do&lt;br /&gt;
		vals[v] = true&lt;br /&gt;
	end&lt;br /&gt;
	local ret = {}&lt;br /&gt;
	for k in pairs(vals) do&lt;br /&gt;
		table.insert(ret, k)&lt;br /&gt;
	end&lt;br /&gt;
	table.sort(ret)&lt;br /&gt;
	return ret&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function getArgNums(args, prefix)&lt;br /&gt;
	local nums = {}&lt;br /&gt;
	for k, v in pairs(args) do&lt;br /&gt;
		local num = mw.ustring.match(tostring(k), '^' .. prefix .. '([1-9]%d*)$')&lt;br /&gt;
		if num then&lt;br /&gt;
			table.insert(nums, tonumber(num))&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	table.sort(nums)&lt;br /&gt;
	return nums&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
-- Box class definition&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
local MessageBox = {}&lt;br /&gt;
MessageBox.__index = MessageBox&lt;br /&gt;
&lt;br /&gt;
function MessageBox.new(boxType, args, cfg)&lt;br /&gt;
	args = args or {}&lt;br /&gt;
	local obj = {}&lt;br /&gt;
&lt;br /&gt;
	-- Set the title object and the namespace.&lt;br /&gt;
	obj.title = getTitleObject(args.page) or mw.title.getCurrentTitle()&lt;br /&gt;
&lt;br /&gt;
	-- Set the config for our box type.&lt;br /&gt;
	obj.cfg = cfg[boxType]&lt;br /&gt;
	if not obj.cfg then&lt;br /&gt;
		local ns = obj.title.namespace&lt;br /&gt;
		-- boxType is &amp;quot;mbox&amp;quot; or invalid input&lt;br /&gt;
		if ns == 0 then&lt;br /&gt;
			obj.cfg = cfg.ambox -- main namespace&lt;br /&gt;
		elseif ns == 6 then&lt;br /&gt;
			obj.cfg = cfg.imbox -- file namespace&lt;br /&gt;
		elseif ns == 14 then&lt;br /&gt;
			obj.cfg = cfg.cmbox -- category namespace&lt;br /&gt;
		else&lt;br /&gt;
			local nsTable = mw.site.namespaces[ns]&lt;br /&gt;
			if nsTable and nsTable.isTalk then&lt;br /&gt;
				obj.cfg = cfg.tmbox -- any talk namespace&lt;br /&gt;
			else&lt;br /&gt;
				obj.cfg = cfg.ombox -- other namespaces or invalid input&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Set the arguments, and remove all blank arguments except for the ones&lt;br /&gt;
	-- listed in cfg.allowBlankParams.&lt;br /&gt;
	do&lt;br /&gt;
		local newArgs = {}&lt;br /&gt;
		for k, v in pairs(args) do&lt;br /&gt;
			if v ~= '' then&lt;br /&gt;
				newArgs[k] = v&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
		for i, param in ipairs(obj.cfg.allowBlankParams or {}) do&lt;br /&gt;
			newArgs[param] = args[param]&lt;br /&gt;
		end&lt;br /&gt;
		obj.args = newArgs&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Define internal data structure.&lt;br /&gt;
	obj.categories = {}&lt;br /&gt;
	obj.classes = {}&lt;br /&gt;
&lt;br /&gt;
	return setmetatable(obj, MessageBox)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function MessageBox:addCat(ns, cat, sort)&lt;br /&gt;
	if not cat then&lt;br /&gt;
		return nil&lt;br /&gt;
	end&lt;br /&gt;
	if sort then&lt;br /&gt;
		cat = string.format('[[Category:%s|%s]]', cat, sort)&lt;br /&gt;
	else&lt;br /&gt;
		cat = string.format('[[Category:%s]]', cat)&lt;br /&gt;
	end&lt;br /&gt;
	self.categories[ns] = self.categories[ns] or {}&lt;br /&gt;
	table.insert(self.categories[ns], cat)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function MessageBox:addClass(class)&lt;br /&gt;
	if not class then&lt;br /&gt;
		return nil&lt;br /&gt;
	end&lt;br /&gt;
	table.insert(self.classes, class)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function MessageBox:setParameters()&lt;br /&gt;
	local args = self.args&lt;br /&gt;
	local cfg = self.cfg&lt;br /&gt;
&lt;br /&gt;
	-- Get type data.&lt;br /&gt;
	self.type = args.type&lt;br /&gt;
	local typeData = cfg.types[self.type]&lt;br /&gt;
	self.invalidTypeError = cfg.showInvalidTypeError&lt;br /&gt;
		and self.type&lt;br /&gt;
		and not typeData&lt;br /&gt;
	typeData = typeData or cfg.types[cfg.default]&lt;br /&gt;
	self.typeClass = typeData.class&lt;br /&gt;
	self.typeImage = typeData.image&lt;br /&gt;
&lt;br /&gt;
	-- Find if the box has been wrongly substituted.&lt;br /&gt;
	self.isSubstituted = cfg.substCheck and args.subst == 'SUBST'&lt;br /&gt;
&lt;br /&gt;
	-- Find whether we are using a small message box.&lt;br /&gt;
	self.isSmall = cfg.allowSmall and (&lt;br /&gt;
		cfg.smallParam and args.small == cfg.smallParam&lt;br /&gt;
		or not cfg.smallParam and yesno(args.small)&lt;br /&gt;
	)&lt;br /&gt;
&lt;br /&gt;
	-- Add attributes, classes and styles.&lt;br /&gt;
	self.id = args.id&lt;br /&gt;
	self:addClass(&lt;br /&gt;
		cfg.usePlainlinksParam and yesno(args.plainlinks or true) and 'plainlinks'&lt;br /&gt;
	)&lt;br /&gt;
	for _, class in ipairs(cfg.classes or {}) do&lt;br /&gt;
		self:addClass(class)&lt;br /&gt;
	end&lt;br /&gt;
	if self.isSmall then&lt;br /&gt;
		self:addClass(cfg.smallClass or 'mbox-small')&lt;br /&gt;
	end&lt;br /&gt;
	self:addClass(self.typeClass)&lt;br /&gt;
	self:addClass(args.class)&lt;br /&gt;
	self.style = args.style&lt;br /&gt;
	self.attrs = args.attrs&lt;br /&gt;
&lt;br /&gt;
	-- Set text style.&lt;br /&gt;
	self.textstyle = args.textstyle&lt;br /&gt;
&lt;br /&gt;
	-- Find if we are on the template page or not. This functionality is only&lt;br /&gt;
	-- used if useCollapsibleTextFields is set, or if both cfg.templateCategory&lt;br /&gt;
	-- and cfg.templateCategoryRequireName are set.&lt;br /&gt;
	self.useCollapsibleTextFields = cfg.useCollapsibleTextFields&lt;br /&gt;
	if self.useCollapsibleTextFields&lt;br /&gt;
		or cfg.templateCategory&lt;br /&gt;
		and cfg.templateCategoryRequireName&lt;br /&gt;
	then&lt;br /&gt;
		self.name = args.name&lt;br /&gt;
		if self.name then&lt;br /&gt;
			local templateName = mw.ustring.match(&lt;br /&gt;
				self.name,&lt;br /&gt;
				'^[tT][eE][mM][pP][lL][aA][tT][eE][%s_]*:[%s_]*(.*)$'&lt;br /&gt;
			) or self.name&lt;br /&gt;
			templateName = 'Template:' .. templateName&lt;br /&gt;
			self.templateTitle = getTitleObject(templateName)&lt;br /&gt;
		end&lt;br /&gt;
		self.isTemplatePage = self.templateTitle&lt;br /&gt;
			and mw.title.equals(self.title, self.templateTitle)&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Process data for collapsible text fields. At the moment these are only&lt;br /&gt;
	-- used in {{ambox}}.&lt;br /&gt;
	if self.useCollapsibleTextFields then&lt;br /&gt;
		-- Get the self.issue value.&lt;br /&gt;
		if self.isSmall and args.smalltext then&lt;br /&gt;
			self.issue = args.smalltext&lt;br /&gt;
		else&lt;br /&gt;
			local sect&lt;br /&gt;
			if args.sect == '' then&lt;br /&gt;
				sect = 'This ' .. (cfg.sectionDefault or 'page')&lt;br /&gt;
			elseif type(args.sect) == 'string' then&lt;br /&gt;
				sect = 'This ' .. args.sect&lt;br /&gt;
			end&lt;br /&gt;
			local issue = args.issue&lt;br /&gt;
			issue = type(issue) == 'string' and issue ~= '' and issue or nil&lt;br /&gt;
			local text = args.text&lt;br /&gt;
			text = type(text) == 'string' and text or nil&lt;br /&gt;
			local issues = {}&lt;br /&gt;
			table.insert(issues, sect)&lt;br /&gt;
			table.insert(issues, issue)&lt;br /&gt;
			table.insert(issues, text)&lt;br /&gt;
			self.issue = table.concat(issues, ' ')&lt;br /&gt;
		end&lt;br /&gt;
&lt;br /&gt;
		-- Get the self.talk value.&lt;br /&gt;
		local talk = args.talk&lt;br /&gt;
		-- Show talk links on the template page or template subpages if the talk&lt;br /&gt;
		-- parameter is blank.&lt;br /&gt;
		if talk == ''&lt;br /&gt;
			and self.templateTitle&lt;br /&gt;
			and (&lt;br /&gt;
				mw.title.equals(self.templateTitle, self.title)&lt;br /&gt;
				or self.title:isSubpageOf(self.templateTitle)&lt;br /&gt;
			)&lt;br /&gt;
		then&lt;br /&gt;
			talk = '#'&lt;br /&gt;
		elseif talk == '' then&lt;br /&gt;
			talk = nil&lt;br /&gt;
		end&lt;br /&gt;
		if talk then&lt;br /&gt;
			-- If the talk value is a talk page, make a link to that page. Else&lt;br /&gt;
			-- assume that it's a section heading, and make a link to the talk&lt;br /&gt;
			-- page of the current page with that section heading.&lt;br /&gt;
			local talkTitle = getTitleObject(talk)&lt;br /&gt;
			local talkArgIsTalkPage = true&lt;br /&gt;
			if not talkTitle or not talkTitle.isTalkPage then&lt;br /&gt;
				talkArgIsTalkPage = false&lt;br /&gt;
				talkTitle = getTitleObject(&lt;br /&gt;
					self.title.text,&lt;br /&gt;
					mw.site.namespaces[self.title.namespace].talk.id&lt;br /&gt;
				)&lt;br /&gt;
			end&lt;br /&gt;
			if talkTitle and talkTitle.exists then&lt;br /&gt;
				local talkText = 'Relevant discussion may be found on'&lt;br /&gt;
				if talkArgIsTalkPage then&lt;br /&gt;
					talkText = string.format(&lt;br /&gt;
						'%s [[%s|%s]].',&lt;br /&gt;
						talkText,&lt;br /&gt;
						talk,&lt;br /&gt;
						talkTitle.prefixedText&lt;br /&gt;
					)&lt;br /&gt;
				else&lt;br /&gt;
					talkText = string.format(&lt;br /&gt;
						'%s the [[%s#%s|talk page]].',&lt;br /&gt;
						talkText,&lt;br /&gt;
						talkTitle.prefixedText,&lt;br /&gt;
						talk&lt;br /&gt;
					)&lt;br /&gt;
				end&lt;br /&gt;
				self.talk = talkText&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
&lt;br /&gt;
		-- Get other values.&lt;br /&gt;
		self.fix = args.fix ~= '' and args.fix or nil&lt;br /&gt;
		local date&lt;br /&gt;
		if args.date and args.date ~= '' then&lt;br /&gt;
			date = args.date&lt;br /&gt;
		elseif args.date == '' and self.isTemplatePage then&lt;br /&gt;
			date = lang:formatDate('F Y')&lt;br /&gt;
		end&lt;br /&gt;
		if date then&lt;br /&gt;
			self.date = string.format(&amp;quot; &amp;lt;small&amp;gt;''(%s)''&amp;lt;/small&amp;gt;&amp;quot;, date)&lt;br /&gt;
		end&lt;br /&gt;
		self.info = args.info&lt;br /&gt;
		if yesno(args.removalnotice) then&lt;br /&gt;
			self.removalNotice = cfg.removalNotice&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Set the non-collapsible text field. At the moment this is used by all box&lt;br /&gt;
	-- types other than ambox, and also by ambox when small=yes.&lt;br /&gt;
	if self.isSmall then&lt;br /&gt;
		self.text = args.smalltext or args.text&lt;br /&gt;
	else&lt;br /&gt;
		self.text = args.text&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Set the below row.&lt;br /&gt;
	self.below = cfg.below and args.below&lt;br /&gt;
&lt;br /&gt;
	-- General image settings.&lt;br /&gt;
	self.imageCellDiv = not self.isSmall and cfg.imageCellDiv&lt;br /&gt;
	self.imageEmptyCell = cfg.imageEmptyCell&lt;br /&gt;
	if cfg.imageEmptyCellStyle then&lt;br /&gt;
		self.imageEmptyCellStyle = 'border:none;padding:0px;width:1px'&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Left image settings.&lt;br /&gt;
	local imageLeft = self.isSmall and args.smallimage or args.image&lt;br /&gt;
	if cfg.imageCheckBlank and imageLeft ~= 'blank' and imageLeft ~= 'none'&lt;br /&gt;
		or not cfg.imageCheckBlank and imageLeft ~= 'none'&lt;br /&gt;
	then&lt;br /&gt;
		self.imageLeft = imageLeft&lt;br /&gt;
		if not imageLeft then&lt;br /&gt;
			local imageSize = self.isSmall&lt;br /&gt;
				and (cfg.imageSmallSize or '30x30px')&lt;br /&gt;
				or '40x40px'&lt;br /&gt;
			self.imageLeft = string.format('[[File:%s|%s|link=|alt=]]', self.typeImage&lt;br /&gt;
				or 'Imbox notice.png', imageSize)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Right image settings.&lt;br /&gt;
	local imageRight = self.isSmall and args.smallimageright or args.imageright&lt;br /&gt;
	if not (cfg.imageRightNone and imageRight == 'none') then&lt;br /&gt;
		self.imageRight = imageRight&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function MessageBox:setMainspaceCategories()&lt;br /&gt;
	local args = self.args&lt;br /&gt;
	local cfg = self.cfg&lt;br /&gt;
&lt;br /&gt;
	if not cfg.allowMainspaceCategories then&lt;br /&gt;
		return nil&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local nums = {}&lt;br /&gt;
	for _, prefix in ipairs{'cat', 'category', 'all'} do&lt;br /&gt;
		args[prefix .. '1'] = args[prefix]&lt;br /&gt;
		nums = union(nums, getArgNums(args, prefix))&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- The following is roughly equivalent to the old {{Ambox/category}}.&lt;br /&gt;
	local date = args.date&lt;br /&gt;
	date = type(date) == 'string' and date&lt;br /&gt;
	local preposition = 'from'&lt;br /&gt;
	for _, num in ipairs(nums) do&lt;br /&gt;
		local mainCat = args['cat' .. tostring(num)]&lt;br /&gt;
			or args['category' .. tostring(num)]&lt;br /&gt;
		local allCat = args['all' .. tostring(num)]&lt;br /&gt;
		mainCat = type(mainCat) == 'string' and mainCat&lt;br /&gt;
		allCat = type(allCat) == 'string' and allCat&lt;br /&gt;
		if mainCat and date and date ~= '' then&lt;br /&gt;
			local catTitle = string.format('%s %s %s', mainCat, preposition, date)&lt;br /&gt;
			self:addCat(0, catTitle)&lt;br /&gt;
			catTitle = getTitleObject('Category:' .. catTitle)&lt;br /&gt;
			if not catTitle or not catTitle.exists then&lt;br /&gt;
				self:addCat(0, 'Articles with invalid date parameter in template')&lt;br /&gt;
			end&lt;br /&gt;
		elseif mainCat and (not date or date == '') then&lt;br /&gt;
			self:addCat(0, mainCat)&lt;br /&gt;
		end&lt;br /&gt;
		if allCat then&lt;br /&gt;
			self:addCat(0, allCat)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function MessageBox:setTemplateCategories()&lt;br /&gt;
	local args = self.args&lt;br /&gt;
	local cfg = self.cfg&lt;br /&gt;
&lt;br /&gt;
	-- Add template categories.&lt;br /&gt;
	if cfg.templateCategory then&lt;br /&gt;
		if cfg.templateCategoryRequireName then&lt;br /&gt;
			if self.isTemplatePage then&lt;br /&gt;
				self:addCat(10, cfg.templateCategory)&lt;br /&gt;
			end&lt;br /&gt;
		elseif not self.title.isSubpage then&lt;br /&gt;
			self:addCat(10, cfg.templateCategory)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Add template error categories.&lt;br /&gt;
	if cfg.templateErrorCategory then&lt;br /&gt;
		local templateErrorCategory = cfg.templateErrorCategory&lt;br /&gt;
		local templateCat, templateSort&lt;br /&gt;
		if not self.name and not self.title.isSubpage then&lt;br /&gt;
			templateCat = templateErrorCategory&lt;br /&gt;
		elseif self.isTemplatePage then&lt;br /&gt;
			local paramsToCheck = cfg.templateErrorParamsToCheck or {}&lt;br /&gt;
			local count = 0&lt;br /&gt;
			for i, param in ipairs(paramsToCheck) do&lt;br /&gt;
				if not args[param] then&lt;br /&gt;
					count = count + 1&lt;br /&gt;
				end&lt;br /&gt;
			end&lt;br /&gt;
			if count &amp;gt; 0 then&lt;br /&gt;
				templateCat = templateErrorCategory&lt;br /&gt;
				templateSort = tostring(count)&lt;br /&gt;
			end&lt;br /&gt;
			if self.categoryNums and #self.categoryNums &amp;gt; 0 then&lt;br /&gt;
				templateCat = templateErrorCategory&lt;br /&gt;
				templateSort = 'C'&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
		self:addCat(10, templateCat, templateSort)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function MessageBox:setAllNamespaceCategories()&lt;br /&gt;
	-- Set categories for all namespaces.&lt;br /&gt;
	if self.invalidTypeError then&lt;br /&gt;
		local allSort = (self.title.namespace == 0 and 'Main:' or '') .. self.title.prefixedText&lt;br /&gt;
		self:addCat('all', 'Wikipedia message box parameter needs fixing', allSort)&lt;br /&gt;
	end&lt;br /&gt;
	if self.isSubstituted then&lt;br /&gt;
		self:addCat('all', 'Pages with incorrectly substituted templates')&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function MessageBox:setCategories()&lt;br /&gt;
	if self.title.namespace == 0 then&lt;br /&gt;
		self:setMainspaceCategories()&lt;br /&gt;
	elseif self.title.namespace == 10 then&lt;br /&gt;
		self:setTemplateCategories()&lt;br /&gt;
	end&lt;br /&gt;
	self:setAllNamespaceCategories()&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function MessageBox:renderCategories()&lt;br /&gt;
	-- Convert category tables to strings and pass them through&lt;br /&gt;
	-- [[Module:Category handler]].&lt;br /&gt;
	return categoryHandler{&lt;br /&gt;
		main = table.concat(self.categories[0] or {}),&lt;br /&gt;
		template = table.concat(self.categories[10] or {}),&lt;br /&gt;
		all = table.concat(self.categories.all or {}),&lt;br /&gt;
		nocat = self.args.nocat,&lt;br /&gt;
		page = self.args.page&lt;br /&gt;
	}&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function MessageBox:export()&lt;br /&gt;
	local root = mw.html.create()&lt;br /&gt;
&lt;br /&gt;
	-- Add the subst check error.&lt;br /&gt;
	if self.isSubstituted and self.name then&lt;br /&gt;
		root:tag('b')&lt;br /&gt;
			:addClass('error')&lt;br /&gt;
			:wikitext(string.format(&lt;br /&gt;
				'Template &amp;lt;code&amp;gt;%s[[Template:%s|%s]]%s&amp;lt;/code&amp;gt; has been incorrectly substituted.',&lt;br /&gt;
				mw.text.nowiki('{{'), self.name, self.name, mw.text.nowiki('}}')&lt;br /&gt;
			))&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Create the box table.&lt;br /&gt;
	local boxTable = root:tag('table')&lt;br /&gt;
	boxTable:attr('id', self.id or nil)&lt;br /&gt;
	for i, class in ipairs(self.classes or {}) do&lt;br /&gt;
		boxTable:addClass(class or nil)&lt;br /&gt;
	end&lt;br /&gt;
	boxTable&lt;br /&gt;
		:cssText(self.style or nil)&lt;br /&gt;
		:attr('role', 'presentation')&lt;br /&gt;
&lt;br /&gt;
	if self.attrs then&lt;br /&gt;
		boxTable:attr(self.attrs)&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Add the left-hand image.&lt;br /&gt;
	local row = boxTable:tag('tr')&lt;br /&gt;
	if self.imageLeft then&lt;br /&gt;
		local imageLeftCell = row:tag('td'):addClass('mbox-image')&lt;br /&gt;
		if self.imageCellDiv then&lt;br /&gt;
			-- If we are using a div, redefine imageLeftCell so that the image&lt;br /&gt;
			-- is inside it. Divs use style=&amp;quot;width: 52px;&amp;quot;, which limits the&lt;br /&gt;
			-- image width to 52px. If any images in a div are wider than that,&lt;br /&gt;
			-- they may overlap with the text or cause other display problems.&lt;br /&gt;
			imageLeftCell = imageLeftCell:tag('div'):css('width', '52px')&lt;br /&gt;
		end&lt;br /&gt;
		imageLeftCell:wikitext(self.imageLeft or nil)&lt;br /&gt;
	elseif self.imageEmptyCell then&lt;br /&gt;
		-- Some message boxes define an empty cell if no image is specified, and&lt;br /&gt;
		-- some don't. The old template code in templates where empty cells are&lt;br /&gt;
		-- specified gives the following hint: &amp;quot;No image. Cell with some width&lt;br /&gt;
		-- or padding necessary for text cell to have 100% width.&amp;quot;&lt;br /&gt;
		row:tag('td')&lt;br /&gt;
			:addClass('mbox-empty-cell')&lt;br /&gt;
			:cssText(self.imageEmptyCellStyle or nil)&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Add the text.&lt;br /&gt;
	local textCell = row:tag('td'):addClass('mbox-text')&lt;br /&gt;
	if self.useCollapsibleTextFields then&lt;br /&gt;
		-- The message box uses advanced text parameters that allow things to be&lt;br /&gt;
		-- collapsible. At the moment, only ambox uses this.&lt;br /&gt;
		textCell:cssText(self.textstyle or nil)&lt;br /&gt;
		local textCellSpan = textCell:tag('span')&lt;br /&gt;
		textCellSpan&lt;br /&gt;
			:addClass('mbox-text-span')&lt;br /&gt;
			:wikitext(self.issue or nil)&lt;br /&gt;
		if (self.talk or self.fix) and not self.isSmall then&lt;br /&gt;
			textCellSpan:tag('span')&lt;br /&gt;
				:addClass('hide-when-compact')&lt;br /&gt;
				:wikitext(self.talk and (' ' .. self.talk) or nil)&lt;br /&gt;
				:wikitext(self.fix and (' ' .. self.fix) or nil)&lt;br /&gt;
		end&lt;br /&gt;
		textCellSpan:wikitext(self.date and (' ' .. self.date) or nil)&lt;br /&gt;
		if self.info and not self.isSmall then&lt;br /&gt;
			textCellSpan&lt;br /&gt;
				:tag('span')&lt;br /&gt;
				:addClass('hide-when-compact')&lt;br /&gt;
				:wikitext(self.info and (' ' .. self.info) or nil)&lt;br /&gt;
		end&lt;br /&gt;
		if self.removalNotice then&lt;br /&gt;
			textCellSpan:tag('small')&lt;br /&gt;
				:addClass('hide-when-compact')&lt;br /&gt;
				:tag('i')&lt;br /&gt;
					:wikitext(string.format(&amp;quot; (%s)&amp;quot;, self.removalNotice))&lt;br /&gt;
		end&lt;br /&gt;
	else&lt;br /&gt;
		-- Default text formatting - anything goes.&lt;br /&gt;
		textCell&lt;br /&gt;
			:cssText(self.textstyle or nil)&lt;br /&gt;
			:wikitext(self.text or nil)&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Add the right-hand image.&lt;br /&gt;
	if self.imageRight then&lt;br /&gt;
		local imageRightCell = row:tag('td'):addClass('mbox-imageright')&lt;br /&gt;
		if self.imageCellDiv then&lt;br /&gt;
			-- If we are using a div, redefine imageRightCell so that the image&lt;br /&gt;
			-- is inside it.&lt;br /&gt;
			imageRightCell = imageRightCell:tag('div'):css('width', '52px')&lt;br /&gt;
		end&lt;br /&gt;
		imageRightCell&lt;br /&gt;
			:wikitext(self.imageRight or nil)&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Add the below row.&lt;br /&gt;
	if self.below then&lt;br /&gt;
		boxTable:tag('tr')&lt;br /&gt;
			:tag('td')&lt;br /&gt;
				:attr('colspan', self.imageRight and '3' or '2')&lt;br /&gt;
				:addClass('mbox-text')&lt;br /&gt;
				:cssText(self.textstyle or nil)&lt;br /&gt;
				:wikitext(self.below or nil)&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Add error message for invalid type parameters.&lt;br /&gt;
	if self.invalidTypeError then&lt;br /&gt;
		root:tag('div')&lt;br /&gt;
			:css('text-align', 'center')&lt;br /&gt;
			:wikitext(string.format(&lt;br /&gt;
				'This message box is using an invalid &amp;quot;type=%s&amp;quot; parameter and needs fixing.',&lt;br /&gt;
				self.type or ''&lt;br /&gt;
			))&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Add categories.&lt;br /&gt;
	root:wikitext(self:renderCategories() or nil)&lt;br /&gt;
&lt;br /&gt;
	return tostring(root)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
-- Exports&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
local p, mt = {}, {}&lt;br /&gt;
&lt;br /&gt;
function p._exportClasses()&lt;br /&gt;
	-- For testing.&lt;br /&gt;
	return {&lt;br /&gt;
		MessageBox = MessageBox&lt;br /&gt;
	}&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.main(boxType, args, cfgTables)&lt;br /&gt;
	local box = MessageBox.new(boxType, args, cfgTables or mw.loadData(CONFIG_MODULE))&lt;br /&gt;
	box:setParameters()&lt;br /&gt;
	box:setCategories()&lt;br /&gt;
	return box:export()&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function mt.__index(t, k)&lt;br /&gt;
	return function (frame)&lt;br /&gt;
		if not getArgs then&lt;br /&gt;
			getArgs = require('Module:Arguments').getArgs&lt;br /&gt;
		end&lt;br /&gt;
		return t.main(k, getArgs(frame, {trim = false, removeBlanks = false}))&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return setmetatable(p, mt)&lt;/div&gt;</summary>
		<author><name>Kolk</name></author>	</entry>

	<entry>
		<id>http://wiki.isofts.kiev.ua/index.php?title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:Sidebar&amp;diff=643</id>
		<title>Модуль:Sidebar</title>
		<link rel="alternate" type="text/html" href="http://wiki.isofts.kiev.ua/index.php?title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:Sidebar&amp;diff=643"/>
				<updated>2016-11-24T15:22:50Z</updated>
		
		<summary type="html">&lt;p&gt;Kolk: Імпортовано 1 версія&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;--&lt;br /&gt;
-- This module implements {{Sidebar}}&lt;br /&gt;
--&lt;br /&gt;
require('Module:No globals')&lt;br /&gt;
&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
local getArgs = require('Module:Arguments').getArgs&lt;br /&gt;
local navbar = require('Module:Navbar')._navbar&lt;br /&gt;
&lt;br /&gt;
local function trimAndAddAutomaticNewline(s)&lt;br /&gt;
	-- For compatibility with the original {{sidebar with collapsible lists}}&lt;br /&gt;
	-- implementation, which passed some parameters through {{#if}} to trim&lt;br /&gt;
	-- their whitespace. This also triggered the automatic newline behavior.&lt;br /&gt;
	-- ([[meta:Help:Newlines and spaces#Automatic newline]])&lt;br /&gt;
	s = mw.ustring.gsub(s, &amp;quot;^%s*(.-)%s*$&amp;quot;, &amp;quot;%1&amp;quot;)&lt;br /&gt;
	if mw.ustring.find(s, '^[#*:;]') or mw.ustring.find(s, '^{|') then&lt;br /&gt;
		return '\n' .. s&lt;br /&gt;
	else&lt;br /&gt;
		return s&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.sidebar(frame, args)&lt;br /&gt;
	if not args then&lt;br /&gt;
		args = getArgs(frame)&lt;br /&gt;
	end&lt;br /&gt;
	local root = mw.html.create()&lt;br /&gt;
	local child = args.child and mw.text.trim(args.child) == 'yes'&lt;br /&gt;
&lt;br /&gt;
	if not child then&lt;br /&gt;
		root = root&lt;br /&gt;
			:tag('table')&lt;br /&gt;
			:addClass('vertical-navbox')&lt;br /&gt;
			:addClass(args.wraplinks ~= 'true' and 'nowraplinks' or nil)&lt;br /&gt;
			:addClass(args.bodyclass or args.class)&lt;br /&gt;
			:css('float', args.float or 'right')&lt;br /&gt;
			:css('clear', (args.float == 'none' and 'both') or args.float or 'right')&lt;br /&gt;
			:css('width', args.width or '22.0em')&lt;br /&gt;
			:css('margin', args.float == 'left' and '0 1.0em 1.0em 0' or '0 0 1.0em 1.0em')&lt;br /&gt;
			:css('background', '#f9f9f9')&lt;br /&gt;
			:css('border', '1px solid #aaa')&lt;br /&gt;
			:css('padding', '0.2em')&lt;br /&gt;
			:css('border-spacing', '0.4em 0')&lt;br /&gt;
			:css('text-align', 'center')&lt;br /&gt;
			:css('line-height', '1.4em')&lt;br /&gt;
			:css('font-size', '88%')&lt;br /&gt;
			:cssText(args.bodystyle or args.style)&lt;br /&gt;
&lt;br /&gt;
		if args.outertitle then&lt;br /&gt;
			root&lt;br /&gt;
				:tag('caption')&lt;br /&gt;
					:addClass(args.outertitleclass)&lt;br /&gt;
					:css('padding-bottom', '0.2em')&lt;br /&gt;
					:css('font-size', '125%')&lt;br /&gt;
					:css('line-height', '1.2em')&lt;br /&gt;
					:css('font-weight', 'bold')&lt;br /&gt;
					:cssText(args.outertitlestyle)&lt;br /&gt;
					:wikitext(args.outertitle)&lt;br /&gt;
		end&lt;br /&gt;
&lt;br /&gt;
		if args.topimage then&lt;br /&gt;
			local imageCell = root:tag('tr'):tag('td')&lt;br /&gt;
&lt;br /&gt;
			imageCell&lt;br /&gt;
				:addClass(args.topimageclass)&lt;br /&gt;
				:css('padding', '0.4em 0')&lt;br /&gt;
				:cssText(args.topimagestyle)&lt;br /&gt;
				:wikitext(args.topimage)&lt;br /&gt;
&lt;br /&gt;
			if args.topcaption then&lt;br /&gt;
				imageCell&lt;br /&gt;
					:tag('div')&lt;br /&gt;
						:css('padding-top', '0.2em')&lt;br /&gt;
						:css('line-height', '1.2em')&lt;br /&gt;
						:cssText(args.topcaptionstyle)&lt;br /&gt;
						:wikitext(args.topcaption)&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
&lt;br /&gt;
		if args.pretitle then&lt;br /&gt;
			root&lt;br /&gt;
				:tag('tr')&lt;br /&gt;
					:tag('td')&lt;br /&gt;
						:addClass(args.pretitleclass)&lt;br /&gt;
						:cssText(args.basestyle)&lt;br /&gt;
						:css('padding-top', args.topimage and '0.2em' or '0.4em')&lt;br /&gt;
						:css('line-height', '1.2em')&lt;br /&gt;
						:cssText(args.pretitlestyle)&lt;br /&gt;
						:wikitext(args.pretitle)&lt;br /&gt;
		end&lt;br /&gt;
&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if args.title then&lt;br /&gt;
		if child then&lt;br /&gt;
			root&lt;br /&gt;
				:wikitext(args.title)&lt;br /&gt;
				:wikitext('&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;') -- @todo replace this with unclosed again once mw.html gets it&lt;br /&gt;
		else&lt;br /&gt;
			root&lt;br /&gt;
				:tag('tr')&lt;br /&gt;
					:tag('th')&lt;br /&gt;
						:addClass(args.titleclass)&lt;br /&gt;
						:cssText(args.basestyle)&lt;br /&gt;
						:css('padding', '0.2em 0.4em 0.2em')&lt;br /&gt;
						:css('padding-top', args.pretitle and 0)&lt;br /&gt;
						:css('font-size', '145%')&lt;br /&gt;
						:css('line-height', '1.2em')&lt;br /&gt;
						:cssText(args.titlestyle)&lt;br /&gt;
						:wikitext(args.title)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if args.image then&lt;br /&gt;
		local imageCell = root:tag('tr'):tag('td')&lt;br /&gt;
&lt;br /&gt;
		imageCell&lt;br /&gt;
			:addClass(args.imageclass)&lt;br /&gt;
			:css('padding', '0.2em 0 0.4em')&lt;br /&gt;
			:cssText(args.imagestyle)&lt;br /&gt;
			:wikitext(args.image)&lt;br /&gt;
&lt;br /&gt;
		if args.caption then&lt;br /&gt;
			imageCell&lt;br /&gt;
				:tag('div')&lt;br /&gt;
					:css('padding-top', '0.2em')&lt;br /&gt;
					:css('line-height', '1.2em')&lt;br /&gt;
					:cssText(args.captionstyle)&lt;br /&gt;
					:wikitext(args.caption)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if args.above then&lt;br /&gt;
		root&lt;br /&gt;
			:tag('tr')&lt;br /&gt;
				:tag('td')&lt;br /&gt;
					:addClass(args.aboveclass)&lt;br /&gt;
					:css('padding', '0.3em 0.4em 0.3em')&lt;br /&gt;
					:css('font-weight', 'bold')&lt;br /&gt;
					:cssText(args.abovestyle)&lt;br /&gt;
					:newline() -- newline required for bullet-points to work&lt;br /&gt;
					:wikitext(args.above)&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local rowNums = {}&lt;br /&gt;
	for k, v in pairs(args) do&lt;br /&gt;
		k = '' .. k&lt;br /&gt;
		local num = k:match('^heading(%d+)$') or k:match('^content(%d+)$')&lt;br /&gt;
		if num then table.insert(rowNums, tonumber(num)) end&lt;br /&gt;
	end&lt;br /&gt;
	table.sort(rowNums)&lt;br /&gt;
	-- remove duplicates from the list (e.g. 3 will be duplicated if both heading3 and content3 are specified)&lt;br /&gt;
	for i = #rowNums, 1, -1 do&lt;br /&gt;
		if rowNums[i] == rowNums[i - 1] then&lt;br /&gt;
			table.remove(rowNums, i)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	for i, num in ipairs(rowNums) do&lt;br /&gt;
		local heading = args['heading' .. num]&lt;br /&gt;
		if heading then&lt;br /&gt;
			root&lt;br /&gt;
				:tag('tr')&lt;br /&gt;
					:tag('th')&lt;br /&gt;
						:addClass(args.headingclass)&lt;br /&gt;
						:css('padding', '0.1em')&lt;br /&gt;
						:cssText(args.basestyle)&lt;br /&gt;
						:cssText(args.headingstyle)&lt;br /&gt;
						:cssText(args['heading' .. num .. 'style'])&lt;br /&gt;
						:newline()&lt;br /&gt;
						:wikitext(heading)&lt;br /&gt;
		end&lt;br /&gt;
&lt;br /&gt;
		local content = args['content' .. num]&lt;br /&gt;
		if content then&lt;br /&gt;
			root&lt;br /&gt;
				:tag('tr')&lt;br /&gt;
					:tag('td')&lt;br /&gt;
						:addClass(args.contentclass)&lt;br /&gt;
						:css('padding', '0 0.1em 0.4em')&lt;br /&gt;
						:cssText(args.contentstyle)&lt;br /&gt;
						:cssText(args['content' .. num .. 'style'])&lt;br /&gt;
						:newline()&lt;br /&gt;
						:wikitext(content)&lt;br /&gt;
						:done()&lt;br /&gt;
					:newline() -- Without a linebreak after the &amp;lt;/td&amp;gt;, a nested list like &amp;quot;* {{hlist| ...}}&amp;quot; doesn't parse correctly.&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if args.below then&lt;br /&gt;
		root&lt;br /&gt;
			:tag('tr')&lt;br /&gt;
				:tag('td')&lt;br /&gt;
					:addClass(args.belowclass)&lt;br /&gt;
					:css('padding', '0.3em 0.4em 0.3em')&lt;br /&gt;
					:css('font-weight', 'bold')&lt;br /&gt;
					:cssText(args.belowstyle)&lt;br /&gt;
					:newline()&lt;br /&gt;
					:wikitext(args.below)&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if not child then&lt;br /&gt;
		local navbarArg = args.navbar or args.tnavbar&lt;br /&gt;
		if navbarArg ~= 'none' and navbarArg ~= 'off' and (args.name or frame:getParent():getTitle():gsub('/sandbox$', '') ~= 'Template:Sidebar') then&lt;br /&gt;
			root&lt;br /&gt;
				:tag('tr')&lt;br /&gt;
					:tag('td')&lt;br /&gt;
						:css('text-align', 'right')&lt;br /&gt;
						:css('font-size', '115%')&lt;br /&gt;
						:cssText(args.navbarstyle or args.tnavbarstyle)&lt;br /&gt;
						:wikitext(navbar{&lt;br /&gt;
							args.name,&lt;br /&gt;
							mini = 1,&lt;br /&gt;
							fontstyle = args.navbarfontstyle or args.tnavbarfontstyle&lt;br /&gt;
						})&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	return tostring(root)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.collapsible(frame)&lt;br /&gt;
	local args = getArgs(frame)&lt;br /&gt;
&lt;br /&gt;
	args.abovestyle = 'border-top: 1px solid #aaa; border-bottom: 1px solid #aaa;' .. (args.abovestyle or '')&lt;br /&gt;
	args.belowstyle = 'border-top: 1px solid #aaa; border-bottom: 1px solid #aaa;' .. (args.belowstyle or '')&lt;br /&gt;
	args.navbarstyle = 'padding-top: 0.6em;' .. (args.navbarstyle or args.tnavbarstyle or '')&lt;br /&gt;
	if not args.name and frame:getParent():getTitle():gsub('/sandbox$', '') == 'Template:Sidebar with collapsible lists' then&lt;br /&gt;
		args.navbar = 'none'&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local contentArgs = {}&lt;br /&gt;
&lt;br /&gt;
	for k, v in pairs(args) do&lt;br /&gt;
		local num = string.match(k, '^list(%d+)$')&lt;br /&gt;
		if num then&lt;br /&gt;
			local expand = args.expanded and (args.expanded == 'all' or args.expanded == args['list' .. num .. 'name'])&lt;br /&gt;
&lt;br /&gt;
			local row = mw.html.create('div')&lt;br /&gt;
			row&lt;br /&gt;
				:addClass('NavFrame')&lt;br /&gt;
				:addClass((not expand) and 'collapsed' or nil)&lt;br /&gt;
				:css('border', 'none')&lt;br /&gt;
				:css('padding', 0)&lt;br /&gt;
				:cssText(args.listframestyle)&lt;br /&gt;
				:cssText(args['list' .. num .. 'framestyle'])&lt;br /&gt;
				:tag('div')&lt;br /&gt;
					:addClass('NavHead')&lt;br /&gt;
					:addClass(args.listtitleclass)&lt;br /&gt;
					:css('font-size', '105%')&lt;br /&gt;
					:css('background', 'transparent')&lt;br /&gt;
					:css('text-align', 'left')&lt;br /&gt;
					:cssText(args.basestyle)&lt;br /&gt;
					:cssText(args.listtitlestyle)&lt;br /&gt;
					:cssText(args['list' .. num .. 'titlestyle'])&lt;br /&gt;
					:wikitext(trimAndAddAutomaticNewline(args['list' .. num .. 'title'] or 'List'))&lt;br /&gt;
					:done()&lt;br /&gt;
				:tag('div')&lt;br /&gt;
					:addClass('NavContent')&lt;br /&gt;
					:addClass(args.listclass)&lt;br /&gt;
					:addClass(args['list' .. num .. 'class'])&lt;br /&gt;
					:css('font-size', '105%')&lt;br /&gt;
					:css('padding', '0.2em 0 0.4em')&lt;br /&gt;
					:css('text-align', 'center')&lt;br /&gt;
					:cssText(args.liststyle)&lt;br /&gt;
					:cssText(args['list' .. num .. 'style'])&lt;br /&gt;
					:wikitext(trimAndAddAutomaticNewline(args['list' .. num]))&lt;br /&gt;
&lt;br /&gt;
			contentArgs['content' .. num] = tostring(row)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	for k, v in pairs(contentArgs) do&lt;br /&gt;
		args[k] = v&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	return p.sidebar(frame, args)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>Kolk</name></author>	</entry>

	<entry>
		<id>http://wiki.isofts.kiev.ua/index.php?title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:Unsubst&amp;diff=641</id>
		<title>Модуль:Unsubst</title>
		<link rel="alternate" type="text/html" href="http://wiki.isofts.kiev.ua/index.php?title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:Unsubst&amp;diff=641"/>
				<updated>2016-11-24T15:22:49Z</updated>
		
		<summary type="html">&lt;p&gt;Kolk: Імпортовано 1 версія&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;local p = {}&lt;br /&gt;
&lt;br /&gt;
local specialParams = {&lt;br /&gt;
	['$N'] = 'template name', -- Deprecated, but keeping until it is removed from transcluding templates&lt;br /&gt;
	['$B'] = 'template content',&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
p[''] = function ( frame )&lt;br /&gt;
	if not frame:getParent() then&lt;br /&gt;
		error( '{{#invoke:Unsubst|}} makes no sense without a parent frame' )&lt;br /&gt;
	end&lt;br /&gt;
	if not frame.args['$B'] then&lt;br /&gt;
		error( '{{#invoke:Unsubst|}} requires parameter $B (template content)' )&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	if mw.isSubsting() then&lt;br /&gt;
		---- substing&lt;br /&gt;
		-- Combine passed args with passed defaults&lt;br /&gt;
		local args = {}&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;
&lt;br /&gt;
		-- Build an equivalent template invocation&lt;br /&gt;
		-- First, find the title to use&lt;br /&gt;
		local titleobj = mw.title.new(frame:getParent():getTitle())&lt;br /&gt;
		local title&lt;br /&gt;
		if titleobj.namespace == 10 then -- NS_TEMPLATE&lt;br /&gt;
			title = titleobj.text&lt;br /&gt;
		elseif titleobj.namespace == 0 then -- NS_MAIN&lt;br /&gt;
			title = ':' .. titleobj.text&lt;br /&gt;
		else&lt;br /&gt;
			title = titleobj.prefixedText&lt;br /&gt;
		end&lt;br /&gt;
&lt;br /&gt;
		-- Build the invocation body with numbered args first, then named&lt;br /&gt;
		local ret = '{{' .. title&lt;br /&gt;
		for k, v in ipairs( args ) do&lt;br /&gt;
			if string.find( v, '=', 1, true ) then&lt;br /&gt;
				-- likely something like 1=foo=bar, we need to do it as a named arg&lt;br /&gt;
				break&lt;br /&gt;
			end&lt;br /&gt;
			ret = ret .. '|' .. v&lt;br /&gt;
			args[k] = nil&lt;br /&gt;
		end&lt;br /&gt;
		for k, v in pairs( args ) do&lt;br /&gt;
			ret = ret .. '|' .. k .. '=' .. v&lt;br /&gt;
		end&lt;br /&gt;
		&lt;br /&gt;
		return ret .. '}}'&lt;br /&gt;
	else&lt;br /&gt;
		---- Not substing&lt;br /&gt;
		-- Just return the &amp;quot;body&amp;quot;&lt;br /&gt;
		return frame.args['$B'] .. (frame.args['$N'] and frame:getParent():getTitle() == mw.title.getCurrentTitle().prefixedText and '[[Category:Calls to Module:Unsubst that use $N]]' or '')&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>Kolk</name></author>	</entry>

	<entry>
		<id>http://wiki.isofts.kiev.ua/index.php?title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:Hatnote&amp;diff=639</id>
		<title>Модуль:Hatnote</title>
		<link rel="alternate" type="text/html" href="http://wiki.isofts.kiev.ua/index.php?title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:Hatnote&amp;diff=639"/>
				<updated>2016-11-24T15:22:48Z</updated>
		
		<summary type="html">&lt;p&gt;Kolk: Імпортовано 1 версія&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;--------------------------------------------------------------------------------&lt;br /&gt;
--                              Module:Hatnote                                --&lt;br /&gt;
--                                                                            --&lt;br /&gt;
-- This module produces hatnote links and links to related articles. It       --&lt;br /&gt;
-- implements the {{hatnote}} and {{format link}} meta-templates and includes --&lt;br /&gt;
-- helper functions for other Lua hatnote modules.                            --&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
local libraryUtil = require('libraryUtil')&lt;br /&gt;
local checkType = libraryUtil.checkType&lt;br /&gt;
local mArguments -- lazily initialise [[Module:Arguments]]&lt;br /&gt;
local yesno -- lazily initialise [[Module:Yesno]]&lt;br /&gt;
&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
-- Helper functions&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
local function getArgs(frame)&lt;br /&gt;
	-- Fetches the arguments from the parent frame. Whitespace is trimmed and&lt;br /&gt;
	-- blanks are removed.&lt;br /&gt;
	mArguments = require('Module:Arguments')&lt;br /&gt;
	return mArguments.getArgs(frame, {parentOnly = true})&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function removeInitialColon(s)&lt;br /&gt;
	-- Removes the initial colon from a string, if present.&lt;br /&gt;
	return s:match('^:?(.*)')&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.findNamespaceId(link, removeColon)&lt;br /&gt;
	-- Finds the namespace id (namespace number) of a link or a pagename. This&lt;br /&gt;
	-- function will not work if the link is enclosed in double brackets. Colons&lt;br /&gt;
	-- are trimmed from the start of the link by default. To skip colon&lt;br /&gt;
	-- trimming, set the removeColon parameter to false.&lt;br /&gt;
	checkType('findNamespaceId', 1, link, 'string')&lt;br /&gt;
	checkType('findNamespaceId', 2, removeColon, 'boolean', true)&lt;br /&gt;
	if removeColon ~= false then&lt;br /&gt;
		link = removeInitialColon(link)&lt;br /&gt;
	end&lt;br /&gt;
	local namespace = link:match('^(.-):')&lt;br /&gt;
	if namespace then&lt;br /&gt;
		local nsTable = mw.site.namespaces[namespace]&lt;br /&gt;
		if nsTable then&lt;br /&gt;
			return nsTable.id&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return 0&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.formatPages(...)&lt;br /&gt;
	-- Formats a list of pages using formatLink and returns it as an array. Nil&lt;br /&gt;
	-- values are not allowed.&lt;br /&gt;
	local pages = {...}&lt;br /&gt;
	local ret = {}&lt;br /&gt;
	for i, page in ipairs(pages) do&lt;br /&gt;
		ret[i] = p._formatLink(page)&lt;br /&gt;
	end&lt;br /&gt;
	return ret&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.formatPageTables(...)&lt;br /&gt;
	-- Takes a list of page/display tables and returns it as a list of&lt;br /&gt;
	-- formatted links. Nil values are not allowed.&lt;br /&gt;
	local pages = {...}&lt;br /&gt;
	local links = {}&lt;br /&gt;
	for i, t in ipairs(pages) do&lt;br /&gt;
		checkType('formatPageTables', i, t, 'table')&lt;br /&gt;
		local link = t[1]&lt;br /&gt;
		local display = t[2]&lt;br /&gt;
		links[i] = p._formatLink(link, display)&lt;br /&gt;
	end&lt;br /&gt;
	return links&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.makeWikitextError(msg, helpLink, addTrackingCategory, title)&lt;br /&gt;
	-- Formats an error message to be returned to wikitext. If&lt;br /&gt;
	-- addTrackingCategory is not false after being returned from&lt;br /&gt;
	-- [[Module:Yesno]], and if we are not on a talk page, a tracking category&lt;br /&gt;
	-- is added.&lt;br /&gt;
	checkType('makeWikitextError', 1, msg, 'string')&lt;br /&gt;
	checkType('makeWikitextError', 2, helpLink, 'string', true)&lt;br /&gt;
	yesno = require('Module:Yesno')&lt;br /&gt;
	title = title or mw.title.getCurrentTitle()&lt;br /&gt;
	-- Make the help link text.&lt;br /&gt;
	local helpText&lt;br /&gt;
	if helpLink then&lt;br /&gt;
		helpText = ' ([[' .. helpLink .. '|help]])'&lt;br /&gt;
	else&lt;br /&gt;
		helpText = ''&lt;br /&gt;
	end&lt;br /&gt;
	-- Make the category text.&lt;br /&gt;
	local category&lt;br /&gt;
	if not title.isTalkPage and yesno(addTrackingCategory) ~= false then&lt;br /&gt;
		category = 'Hatnote templates with errors'&lt;br /&gt;
		category = string.format(&lt;br /&gt;
			'[[%s:%s]]',&lt;br /&gt;
			mw.site.namespaces[14].name,&lt;br /&gt;
			category&lt;br /&gt;
		)&lt;br /&gt;
	else&lt;br /&gt;
		category = ''&lt;br /&gt;
	end&lt;br /&gt;
	return string.format(&lt;br /&gt;
		'&amp;lt;strong class=&amp;quot;error&amp;quot;&amp;gt;Error: %s%s.&amp;lt;/strong&amp;gt;%s',&lt;br /&gt;
		msg,&lt;br /&gt;
		helpText,&lt;br /&gt;
		category&lt;br /&gt;
	)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.disambiguate(page, disambiguator)&lt;br /&gt;
	-- Formats a page title with a disambiguation parenthetical,&lt;br /&gt;
	-- i.e. &amp;quot;Example&amp;quot; → &amp;quot;Example (disambiguation)&amp;quot;.&lt;br /&gt;
	checkType('disambiguate', 1, page, 'string')&lt;br /&gt;
	checkType('disambiguate', 2, disambiguator, 'string', true)&lt;br /&gt;
	disambiguator = disambiguator or 'disambiguation'&lt;br /&gt;
	return string.format('%s (%s)', page, disambiguator)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
-- Format link&lt;br /&gt;
--&lt;br /&gt;
-- Makes a wikilink from the given link and display values. Links are escaped&lt;br /&gt;
-- with colons if necessary, and links to sections are detected and displayed&lt;br /&gt;
-- with &amp;quot; § &amp;quot; as a separator rather than the standard MediaWiki &amp;quot;#&amp;quot;. Used in&lt;br /&gt;
-- the {{format hatnote link}} template.&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
function p.formatLink(frame)&lt;br /&gt;
	local args = getArgs(frame)&lt;br /&gt;
	local link = args[1]&lt;br /&gt;
	local display = args[2]&lt;br /&gt;
	if not link then&lt;br /&gt;
		return p.makeWikitextError(&lt;br /&gt;
			'no link specified',&lt;br /&gt;
			'Template:Format hatnote link#Errors',&lt;br /&gt;
			args.category&lt;br /&gt;
		)&lt;br /&gt;
	end&lt;br /&gt;
	return p._formatLink(link, display)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p._formatLink(link, display)&lt;br /&gt;
	checkType('_formatLink', 1, link, 'string')&lt;br /&gt;
	checkType('_formatLink', 2, display, 'string', true)&lt;br /&gt;
&lt;br /&gt;
	-- Remove the initial colon for links where it was specified manually.&lt;br /&gt;
	link = removeInitialColon(link)&lt;br /&gt;
&lt;br /&gt;
	-- Find whether a faux display value has been added with the {{!}} magic&lt;br /&gt;
	-- word.&lt;br /&gt;
	if not display then&lt;br /&gt;
		local prePipe, postPipe = link:match('^(.-)|(.*)$')&lt;br /&gt;
		link = prePipe or link&lt;br /&gt;
		display = postPipe&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Find the display value.&lt;br /&gt;
	if not display then&lt;br /&gt;
		local page, section = link:match('^(.-)#(.*)$')&lt;br /&gt;
		if page then&lt;br /&gt;
			display = page .. ' §&amp;amp;nbsp;' .. section&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Assemble the link.&lt;br /&gt;
	if display then&lt;br /&gt;
		return string.format(&lt;br /&gt;
			'[[:%s|%s]]',&lt;br /&gt;
			string.gsub(link, '|(.*)$', ''), --display overwrites manual piping&lt;br /&gt;
			display&lt;br /&gt;
		)&lt;br /&gt;
	else&lt;br /&gt;
		return string.format('[[:%s]]', link)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
-- Hatnote&lt;br /&gt;
--&lt;br /&gt;
-- Produces standard hatnote text. Implements the {{hatnote}} template.&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
function p.hatnote(frame)&lt;br /&gt;
	local args = getArgs(frame)&lt;br /&gt;
	local s = args[1]&lt;br /&gt;
	local options = {}&lt;br /&gt;
	if not s then&lt;br /&gt;
		return p.makeWikitextError(&lt;br /&gt;
			'no text specified',&lt;br /&gt;
			'Template:Hatnote#Errors',&lt;br /&gt;
			args.category&lt;br /&gt;
		)&lt;br /&gt;
	end&lt;br /&gt;
	options.extraclasses = args.extraclasses&lt;br /&gt;
	options.selfref = args.selfref&lt;br /&gt;
	return p._hatnote(s, options)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p._hatnote(s, options)&lt;br /&gt;
	checkType('_hatnote', 1, s, 'string')&lt;br /&gt;
	checkType('_hatnote', 2, options, 'table', true)&lt;br /&gt;
	options = options or {}&lt;br /&gt;
	local classes = {'hatnote'}&lt;br /&gt;
	local extraclasses = options.extraclasses&lt;br /&gt;
	local selfref = options.selfref&lt;br /&gt;
	if type(extraclasses) == 'string' then&lt;br /&gt;
		classes[#classes + 1] = extraclasses&lt;br /&gt;
	end&lt;br /&gt;
	if selfref then&lt;br /&gt;
		classes[#classes + 1] = 'selfref'&lt;br /&gt;
	end&lt;br /&gt;
	return string.format(&lt;br /&gt;
		'&amp;lt;div role=&amp;quot;note&amp;quot; class=&amp;quot;%s&amp;quot;&amp;gt;%s&amp;lt;/div&amp;gt;',&lt;br /&gt;
		table.concat(classes, ' '),&lt;br /&gt;
		s&lt;br /&gt;
	)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>Kolk</name></author>	</entry>

	<entry>
		<id>http://wiki.isofts.kiev.ua/index.php?title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:Citation&amp;diff=637</id>
		<title>Модуль:Citation</title>
		<link rel="alternate" type="text/html" href="http://wiki.isofts.kiev.ua/index.php?title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:Citation&amp;diff=637"/>
				<updated>2016-11-24T15:22:47Z</updated>
		
		<summary type="html">&lt;p&gt;Kolk: Імпортовано 1 версія&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;---------------------------------------------------------------------&lt;br /&gt;
-- Module:Citation - Lua module for Citation auxiliary templates&lt;br /&gt;
---------------------------------------------------------------------&lt;br /&gt;
-- For the {{citation}} formatting functions, see: Module:Citation/CS1&lt;br /&gt;
--                               (see NOTES at bottom)&lt;br /&gt;
--require &amp;quot;mw.text&amp;quot;&lt;br /&gt;
&lt;br /&gt;
local z = {&lt;br /&gt;
    wikitext = require(&amp;quot;Module:Wikitext&amp;quot;),&lt;br /&gt;
    extensiontags = {&lt;br /&gt;
        nowiki = true,&lt;br /&gt;
        ref = true,&lt;br /&gt;
        gallery = true,&lt;br /&gt;
        pre = true,&lt;br /&gt;
        source = true,&lt;br /&gt;
        categorytree = true,&lt;br /&gt;
        charinsert = true,&lt;br /&gt;
        hiero = true,&lt;br /&gt;
        imagemap = true,&lt;br /&gt;
        inputbox = true,&lt;br /&gt;
        math = true,&lt;br /&gt;
        poem = true,&lt;br /&gt;
        ref = true,&lt;br /&gt;
        references = true,&lt;br /&gt;
        syntaxhighlight = true,&lt;br /&gt;
        timeline = true,&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
function trim( str )&lt;br /&gt;
    if str == nil then&lt;br /&gt;
        return nil;&lt;br /&gt;
    end&lt;br /&gt;
    return str:match( &amp;quot;^%s*(.-)%s*$&amp;quot; );&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function hideinprint(content)&lt;br /&gt;
    return content&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function onlyinprint(content)&lt;br /&gt;
    return &amp;quot;&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- This returns a string with HTML character entities for wikitext markup characters.&lt;br /&gt;
function wikiescape(text)&lt;br /&gt;
    text = text:gsub( '[&amp;amp;\'%[%]{|}]', {    &lt;br /&gt;
            ['&amp;amp;'] = '&amp;amp;#38;',    &lt;br /&gt;
            [&amp;quot;'&amp;quot;] = '&amp;amp;#39;',    &lt;br /&gt;
            ['['] = '&amp;amp;#91;',    &lt;br /&gt;
            [']'] = '&amp;amp;#93;',	&lt;br /&gt;
            ['{'] = '&amp;amp;#123;',	&lt;br /&gt;
            ['|'] = '&amp;amp;#124;',	&lt;br /&gt;
            ['}'] = '&amp;amp;#125;' } );&lt;br /&gt;
    return text;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function createTag(t, frame)&lt;br /&gt;
    local name = t.name or &amp;quot;!-- --&amp;quot;&lt;br /&gt;
    local content = t.contents or &amp;quot;&amp;quot;&lt;br /&gt;
    local attrs = {}&lt;br /&gt;
    if ( z.extensiontags[name] ) then&lt;br /&gt;
        -- We have to preprocess these, so that they are properly turned into so-called &amp;quot;strip markers&amp;quot; in the generated wikitext.&lt;br /&gt;
        if ( not frame ) then error (&amp;quot;Please supply an extra frame argument to the createTag() function.&amp;quot;) end&lt;br /&gt;
        local params = {}&lt;br /&gt;
        for n,v in pairs(t.params) do&lt;br /&gt;
            table.insert(params, &amp;quot;|&amp;quot; .. n .. &amp;quot;=&amp;quot; .. v)&lt;br /&gt;
        end&lt;br /&gt;
        return frame:preprocess(&amp;quot;{{#tag:&amp;quot; .. name .. &amp;quot;|&amp;quot; .. content .. table.concat(params) .. &amp;quot;}}&amp;quot;)&lt;br /&gt;
    else   &lt;br /&gt;
        for n,v in pairs(t.params) do&lt;br /&gt;
            if (v) then&lt;br /&gt;
                table.insert(attrs, n .. &amp;quot;=\&amp;quot;&amp;quot; .. wikiescape(v) .. &amp;quot;\&amp;quot;&amp;quot;)&lt;br /&gt;
            else&lt;br /&gt;
                table.insert(attrs, n)&lt;br /&gt;
            end&lt;br /&gt;
        end&lt;br /&gt;
        if (&amp;quot;&amp;quot; == content) then&lt;br /&gt;
            return &amp;quot;&amp;lt;&amp;quot; .. name .. &amp;quot; &amp;quot; .. table.concat(attrs, &amp;quot; &amp;quot;) .. &amp;quot;/&amp;gt;&amp;quot;&lt;br /&gt;
        else&lt;br /&gt;
            return &amp;quot;&amp;lt;&amp;quot; .. name .. &amp;quot; &amp;quot; .. table.concat(attrs, &amp;quot; &amp;quot;) .. &amp;quot;&amp;gt;&amp;quot; .. content .. &amp;quot;&amp;lt;/&amp;quot; .. name .. &amp;quot;&amp;gt;&amp;quot;&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[[&lt;br /&gt;
This is a clone of mw.text.nowiki.  When the mw.text library is installed,&lt;br /&gt;
this can be replaced by a call to that library. ]]&lt;br /&gt;
function nowiki( s )&lt;br /&gt;
    -- string.gsub is safe here, because we're only caring about ASCII chars&lt;br /&gt;
    s = string.gsub( s, '[&amp;quot;&amp;amp;\'&amp;lt;=&amp;gt;%[%]{|}]', {&lt;br /&gt;
        ['&amp;quot;'] = '&amp;amp;#34;',&lt;br /&gt;
        ['&amp;amp;'] = '&amp;amp;#38;',&lt;br /&gt;
        [&amp;quot;'&amp;quot;] = '&amp;amp;#39;',&lt;br /&gt;
        ['&amp;lt;'] = '&amp;amp;#60;',&lt;br /&gt;
        ['='] = '&amp;amp;#61;',&lt;br /&gt;
        ['&amp;gt;'] = '&amp;amp;#62;',&lt;br /&gt;
        ['['] = '&amp;amp;#91;',&lt;br /&gt;
        [']'] = '&amp;amp;#93;',&lt;br /&gt;
        ['{'] = '&amp;amp;#123;',&lt;br /&gt;
        ['|'] = '&amp;amp;#124;',&lt;br /&gt;
        ['}'] = '&amp;amp;#125;',&lt;br /&gt;
    } )&lt;br /&gt;
    s = string.sub( string.gsub( '\n' .. s, '\n[#*:;]', {&lt;br /&gt;
        [&amp;quot;\n#&amp;quot;] = &amp;quot;\n&amp;amp;#35;&amp;quot;,&lt;br /&gt;
        [&amp;quot;\n*&amp;quot;] = &amp;quot;\n&amp;amp;#42;&amp;quot;,&lt;br /&gt;
        [&amp;quot;\n:&amp;quot;] = &amp;quot;\n&amp;amp;#58;&amp;quot;,&lt;br /&gt;
        [&amp;quot;\n;&amp;quot;] = &amp;quot;\n&amp;amp;#59;&amp;quot;,&lt;br /&gt;
    } ), 2 )&lt;br /&gt;
    s = string.gsub( s, '://', '&amp;amp;#58;//' )&lt;br /&gt;
    s = string.gsub( s, 'ISBN ', 'ISBN&amp;amp;#32;' )&lt;br /&gt;
    s = string.gsub( s, 'RFC ', 'RFC&amp;amp;#32;' )&lt;br /&gt;
&lt;br /&gt;
    return s&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function externallinkid(args)&lt;br /&gt;
    local sep = args.separator or &amp;quot;&amp;amp;nbsp;&amp;quot;&lt;br /&gt;
    args.suffix = args.suffix or &amp;quot;&amp;quot;&lt;br /&gt;
    local url_string = args.id&lt;br /&gt;
    if args.encode == true or args.encode == nil then&lt;br /&gt;
        url_string = mw.uri.encode( url_string );&lt;br /&gt;
    end&lt;br /&gt;
    &lt;br /&gt;
    local t0 = onlyinprint(args.label .. sep .. args.id)&lt;br /&gt;
    local t1 = hideinprint(&amp;quot;[[&amp;quot; .. args.link .. &amp;quot;|&amp;quot; .. args.label .. &amp;quot;]]&amp;quot; .. sep .. &amp;quot;[&amp;quot; .. args.prefix .. url_string .. args.suffix .. &amp;quot; &amp;quot; .. nowiki(args.id) .. &amp;quot;]&amp;quot;)&lt;br /&gt;
    &lt;br /&gt;
    return t0 .. t1&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function doi(id, inactive, nocat)&lt;br /&gt;
    local cat = &amp;quot;&amp;quot;&lt;br /&gt;
    local text;&lt;br /&gt;
    if ( inactive ~= nil ) then &lt;br /&gt;
        text = &amp;quot;[[Digital object identifier|doi]]:&amp;quot; .. id;&lt;br /&gt;
        cat = cat .. &amp;quot;[[Category:Pages with DOIs inactive since &amp;quot; .. selectyear(inactive) .. &amp;quot;]]&amp;quot;&lt;br /&gt;
        inactive = &amp;quot; (inactive &amp;quot; .. inactive .. &amp;quot;)&amp;quot; &lt;br /&gt;
    else &lt;br /&gt;
        text = externallinkid({link=&amp;quot;Digital object identifier&amp;quot;,label=&amp;quot;doi&amp;quot;,prefix=&amp;quot;//dx.doi.org/&amp;quot;,id=id,separator=&amp;quot;:&amp;quot;})&lt;br /&gt;
        inactive = &amp;quot;&amp;quot; &lt;br /&gt;
    end&lt;br /&gt;
    if ( string.sub(id,1,3) ~= &amp;quot;10.&amp;quot; ) then&lt;br /&gt;
        cat = cat .. &amp;quot;[[Category:Pages with DOI errors]]&amp;quot; .. '&amp;lt;span class=&amp;quot;error&amp;quot;&amp;gt; Bad DOI (expected &amp;quot;10.&amp;quot; prefix) in code number&amp;lt;/span&amp;gt;'&lt;br /&gt;
    end&lt;br /&gt;
    if ( nocat and nocat ~= &amp;quot;&amp;quot; ) then cat = &amp;quot;&amp;quot; end&lt;br /&gt;
    return text .. inactive .. cat    &lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function selectyear( str )&lt;br /&gt;
    local lang = mw.getContentLanguage();&lt;br /&gt;
    local good, result;&lt;br /&gt;
    good, result = pcall( lang.formatDate, lang, 'Y', str )&lt;br /&gt;
    if good then &lt;br /&gt;
        return result;&lt;br /&gt;
    else&lt;br /&gt;
        return '';&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function anchorid(label, args)&lt;br /&gt;
    local P1 = trim(args[1]) or &amp;quot;&amp;quot;&lt;br /&gt;
    local P2 = trim(args[2]) or &amp;quot;&amp;quot;&lt;br /&gt;
    local P3 = trim(args[3]) or &amp;quot;&amp;quot;&lt;br /&gt;
    local P4 = trim(args[4]) or &amp;quot;&amp;quot;&lt;br /&gt;
    local P5 = trim(args[5]) or &amp;quot;&amp;quot;&lt;br /&gt;
    local anchor = P1 .. P2 .. P3 .. P4 .. P5;&lt;br /&gt;
    if anchor ~= '' then  -- See bug description in Citation/CS1&lt;br /&gt;
        anchor = mw.uri.anchorEncode( anchor );&lt;br /&gt;
    end&lt;br /&gt;
    &lt;br /&gt;
    return label .. anchor&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function refid(label, args)&lt;br /&gt;
    local p = args.p or &amp;quot;&amp;quot;&lt;br /&gt;
    local pp = args.pp or &amp;quot;&amp;quot;&lt;br /&gt;
    local loc = args.loc or &amp;quot;&amp;quot;&lt;br /&gt;
    return anchorid(label, args) .. p .. pp .. loc    &lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function name(args)&lt;br /&gt;
    local P1 = trim(args[1]) or &amp;quot;&amp;quot;&lt;br /&gt;
    if ( args[5] ~= nil) then&lt;br /&gt;
        return P1 .. &amp;quot; et al.&amp;quot;&lt;br /&gt;
    else&lt;br /&gt;
        local P2 = trim(args[2]) or &amp;quot;&amp;quot;&lt;br /&gt;
        local P3 = trim(args[3]) or &amp;quot;&amp;quot; &lt;br /&gt;
        local P4 = trim(args[4]) or &amp;quot;&amp;quot;&lt;br /&gt;
        if ( args[4] ~= nil ) then&lt;br /&gt;
            P4 = &amp;quot; &amp;quot; .. P4&lt;br /&gt;
            P3 = &amp;quot; &amp;amp;amp; &amp;quot; .. P3&lt;br /&gt;
            P2 = &amp;quot;, &amp;quot; .. P2&lt;br /&gt;
        elseif ( args[3] ~= nil ) then&lt;br /&gt;
            P3 = &amp;quot; &amp;quot; .. P3&lt;br /&gt;
            P2 = &amp;quot; &amp;amp;amp; &amp;quot; .. P2&lt;br /&gt;
        elseif ( args[2] ~= nil ) then&lt;br /&gt;
            P2 = &amp;quot; &amp;quot; .. P2            &lt;br /&gt;
        end&lt;br /&gt;
        return P1 .. P2 .. P3 .. P4&lt;br /&gt;
    end &lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function crossref(frame, label, args)&lt;br /&gt;
    local config = frame.args -- the arguments passed BY the template, in the wikitext of the template itself&lt;br /&gt;
    local LB = config.BracketLeft or &amp;quot;&amp;quot;&lt;br /&gt;
    local RB = config.BracketRight or &amp;quot;&amp;quot;&lt;br /&gt;
    local anchor = args.ref or args.Ref or anchorid( label, args)&lt;br /&gt;
    local text = name(args)&lt;br /&gt;
    local loc = args.loc&lt;br /&gt;
    local page&lt;br /&gt;
    local pages = args.pp or args.pages&lt;br /&gt;
    if pages == nil or pages == '' then&lt;br /&gt;
        page = args.p or args.page;&lt;br /&gt;
    end &lt;br /&gt;
    if nil == loc then loc = &amp;quot;&amp;quot; else loc = &amp;quot; &amp;quot; .. loc end&lt;br /&gt;
    if ( page ~= nil ) then&lt;br /&gt;
        local pagesep = config.PageSep or &amp;quot;, p.&amp;amp;nbsp;&amp;quot;&lt;br /&gt;
        loc = loc .. pagesep .. page&lt;br /&gt;
    end&lt;br /&gt;
    if ( pages ~= nil ) then&lt;br /&gt;
        local pagessep = config.PagesSep or &amp;quot;, pp.&amp;amp;nbsp;&amp;quot;&lt;br /&gt;
        loc = loc .. pagessep .. pages&lt;br /&gt;
    end        &lt;br /&gt;
    local pagename = args.pagename or &amp;quot;&amp;quot;&lt;br /&gt;
    local ps = args.Postscript or &amp;quot;&amp;quot;&lt;br /&gt;
    return LB .. &amp;quot;[[&amp;quot; .. pagename .. &amp;quot;#&amp;quot; .. anchor .. &amp;quot;|&amp;quot; .. text .. &amp;quot;]]&amp;quot; .. loc .. RB .. ps&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function r0(frame, name, group, page)&lt;br /&gt;
    if ( name == nil ) then return &amp;quot;&amp;quot; end&lt;br /&gt;
    if ( group == nil ) then group = &amp;quot;&amp;quot; end&lt;br /&gt;
    local p = &amp;quot;&amp;quot;&lt;br /&gt;
    if ( page ~= nil ) then &lt;br /&gt;
        local contents = &amp;quot;:&amp;quot; .. page&lt;br /&gt;
        p = createTag({name=&amp;quot;sup&amp;quot;,contents=contents,params={class=&amp;quot;reference&amp;quot;,style=&amp;quot;white-space:nowrap;&amp;quot;}}) &lt;br /&gt;
    end&lt;br /&gt;
    return createTag({name=&amp;quot;ref&amp;quot;,contents=&amp;quot;&amp;quot;,params={name=name,group=group}}, frame) .. p&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function reflist0(frame, config, args)&lt;br /&gt;
    local contents = args.refs or &amp;quot;&amp;quot;&lt;br /&gt;
    local liststyle = args.liststyle&lt;br /&gt;
    local count = args[1]&lt;br /&gt;
    local width = args.colwidth&lt;br /&gt;
    local group = args.group or config.default_group&lt;br /&gt;
    if ( nil == tonumber(count) and nil == width ) then &lt;br /&gt;
        width = count&lt;br /&gt;
        count = nil&lt;br /&gt;
    end&lt;br /&gt;
    if ( nil == liststyle ) then&lt;br /&gt;
        if ( &amp;quot;upper-alpha&amp;quot; == group or &amp;quot;lower-alpha&amp;quot; == group or &amp;quot;upper-roman&amp;quot; == group or &amp;quot;lower-roman&amp;quot; == group or &amp;quot;upper-greek&amp;quot; == group or &amp;quot;lower-greek&amp;quot; == group ) then&lt;br /&gt;
            liststyle = group&lt;br /&gt;
        else&lt;br /&gt;
            liststyle = config.default_liststyle&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
    local params = {}&lt;br /&gt;
    params.class = &amp;quot;reflist&amp;quot;    &lt;br /&gt;
    params.style = z.wikitext.liststyle(liststyle)&lt;br /&gt;
    if ( nil ~= count ) then        &lt;br /&gt;
        params.class = params.class .. &amp;quot; references-column-count references-column-count-&amp;quot; .. count&lt;br /&gt;
        params.style = params.style .. &amp;quot; &amp;quot; .. z.wikitext.columncountstyle(count)&lt;br /&gt;
    end    &lt;br /&gt;
    if ( nil ~= width ) then&lt;br /&gt;
        params.class = params.class .. &amp;quot; references-column-width&amp;quot;&lt;br /&gt;
        params.style = params.style .. &amp;quot; &amp;quot; .. z.wikitext.columnwidthstyle(width)&lt;br /&gt;
    end&lt;br /&gt;
    local references = createTag({name=&amp;quot;references&amp;quot;,contents=contents,params={group=group}}, frame)&lt;br /&gt;
    return createTag({name=&amp;quot;div&amp;quot;,contents=references,params=params})&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function refbegin0(frame, config, args)&lt;br /&gt;
    local liststyle = args.liststyle&lt;br /&gt;
    local indent = args.indent&lt;br /&gt;
    local indentsize = args.indentsize&lt;br /&gt;
    local count = args[1]&lt;br /&gt;
    local width = args.colwidth&lt;br /&gt;
    if ( nil == tonumber(count) and nil == width ) then &lt;br /&gt;
        width = count&lt;br /&gt;
        count = nil&lt;br /&gt;
    end&lt;br /&gt;
    if ( nil == liststyle ) then&lt;br /&gt;
        if ( &amp;quot;upper-alpha&amp;quot; == group or &amp;quot;lower-alpha&amp;quot; == group or &amp;quot;upper-roman&amp;quot; == group or &amp;quot;lower-roman&amp;quot; == group or &amp;quot;upper-greek&amp;quot; == group or &amp;quot;lower-greek&amp;quot; == group ) then&lt;br /&gt;
            liststyle = group&lt;br /&gt;
        else&lt;br /&gt;
            liststyle = config.default_liststyle&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
    local params = {}&lt;br /&gt;
    params.class = &amp;quot;refbegin&amp;quot;&lt;br /&gt;
    params.style = z.wikitext.liststyle(liststyle)&lt;br /&gt;
    if ( nil ~= count ) then        &lt;br /&gt;
        params.class = params.class .. &amp;quot; references-column-count references-column-count-&amp;quot; .. count&lt;br /&gt;
        params.style = params.style .. &amp;quot; &amp;quot; .. z.wikitext.columncountstyle(count)&lt;br /&gt;
    end    &lt;br /&gt;
    if ( nil ~= width ) then&lt;br /&gt;
        params.class = params.class .. &amp;quot; references-column-width&amp;quot;&lt;br /&gt;
        params.style = params.style .. &amp;quot; &amp;quot; .. z.wikitext.columnwidthstyle(width)&lt;br /&gt;
    end&lt;br /&gt;
    local dlopen&lt;br /&gt;
    if ( nil ~= indent ) then&lt;br /&gt;
        dlopen = z.wikitext.OpenHTMLTag({name=&amp;quot;dl&amp;quot;,params={style=&amp;quot;text-indent: -&amp;quot; .. (indentsize or &amp;quot;3.2&amp;quot;) .. &amp;quot;em;&amp;quot;}})&lt;br /&gt;
    else&lt;br /&gt;
        dlopen = &amp;quot;&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
    return z.wikitext.OpenHTMLTag({name=&amp;quot;div&amp;quot;,params=params}) .. dlopen&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function refend0(frame, config, args)&lt;br /&gt;
    local indent = args.indent&lt;br /&gt;
    local dlclose&lt;br /&gt;
    if ( nil ~= indent ) then&lt;br /&gt;
        dlclose = &amp;quot;&amp;lt;/dl&amp;gt;&amp;quot;&lt;br /&gt;
    else&lt;br /&gt;
        dlclose = &amp;quot;&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
    return dlclose .. &amp;quot;&amp;lt;/div&amp;gt;&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- This is used by {{doi}} to create DOI links in the style used in citations.&lt;br /&gt;
function z.doi(frame)&lt;br /&gt;
    local pframe = frame:getParent()&lt;br /&gt;
    local id = pframe.args.id or pframe.args[1] or &amp;quot;&amp;quot;&lt;br /&gt;
    return doi(id)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- This is used by {{ISSN}} to create ISSN links in the style used in citations.&lt;br /&gt;
function z.ISSN(frame)&lt;br /&gt;
    local pframe = frame:getParent()&lt;br /&gt;
    local Name = pframe.args[1] or &amp;quot;&amp;quot;&lt;br /&gt;
    return hideinprint(&amp;quot;[[International Standard Serial Number|ISSN]]&amp;amp;nbsp;[//www.worldcat.org/search?fq=x0:jrnl&amp;amp;q=n2:&amp;quot; .. Name .. &amp;quot; &amp;quot; .. Name .. &amp;quot;]&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- This is used by templates such as {{SfnRef}} to create the (encoded) anchor name for a Harvard cross-reference hyperlink.&lt;br /&gt;
function z.SFNID(frame)&lt;br /&gt;
    local pframe = frame:getParent()&lt;br /&gt;
    return anchorid('FOOTNOTE', pframe.args)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- This is used by templates such as {{Harvard citation}} to create the Harvard cross-reference text.&lt;br /&gt;
function z.Harvard(frame)&lt;br /&gt;
    local pframe = frame:getParent()&lt;br /&gt;
    return crossref(frame, pframe.args)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- This is used by templates such as {{sfn}} to create the entire cross-reference.&lt;br /&gt;
function z.sfn(frame)&lt;br /&gt;
    local pframe = frame:getParent()&lt;br /&gt;
    pframe.args.Postscript = pframe.args.postscript or pframe.args.ps or &amp;quot;.&amp;quot;;&lt;br /&gt;
    &lt;br /&gt;
    local content = crossref(frame, 'CITEREF', pframe.args)&lt;br /&gt;
    local args = { name = refid( 'FOOTNOTE', pframe.args) }&lt;br /&gt;
    return createTag({name = &amp;quot;ref&amp;quot;, contents = content, params = args}, frame)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- This is used by template {{r}}.&lt;br /&gt;
function z.r(frame)&lt;br /&gt;
    local pframe = frame:getParent()&lt;br /&gt;
    local config = frame.args -- the arguments passed BY the template, in the wikitext of the template itself&lt;br /&gt;
    local args = pframe.args -- the arguments passed TO the template, in the wikitext that instantiates the template&lt;br /&gt;
    args.page1 = args.page1 or args.page&lt;br /&gt;
    local text = &amp;quot;&amp;quot;&lt;br /&gt;
    -- This would be shorter using ipairs(), but that doesn't work on an arguments table supplied to a template.&lt;br /&gt;
    local index = 1&lt;br /&gt;
    while args[index] ~= nil do&lt;br /&gt;
        local arg = args[index]&lt;br /&gt;
        local t = r0(frame, arg, args.group, args[&amp;quot;page&amp;quot; .. index])&lt;br /&gt;
        text = text .. t&lt;br /&gt;
        index = index + 1&lt;br /&gt;
    end&lt;br /&gt;
    return text&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- This is used by template {{ref label}}.&lt;br /&gt;
function z.reflabel(frame)&lt;br /&gt;
    local pframe = frame:getParent()&lt;br /&gt;
    local config = frame.args -- the arguments passed BY the template, in the wikitext of the template itself&lt;br /&gt;
    local args = pframe.args -- the arguments passed TO the template, in the wikitext that instantiates the template&lt;br /&gt;
    local P1 = args[1] or &amp;quot;&amp;quot;&lt;br /&gt;
    local P2 = args[2] or &amp;quot;&amp;quot;&lt;br /&gt;
    local P3 = args[3] or &amp;quot;&amp;quot;&lt;br /&gt;
    local id = nil&lt;br /&gt;
    local contents = &amp;quot;[[#endnote_&amp;quot; .. P1 .. P3 .. &amp;quot;|&amp;amp;#91;&amp;quot; .. P2 .. &amp;quot;&amp;amp;#93;]]&amp;quot;&lt;br /&gt;
    local params = {}&lt;br /&gt;
    params.class=&amp;quot;reference&amp;quot;&lt;br /&gt;
    if ( args.noid == nil or args.noid == &amp;quot;&amp;quot; ) then params.id = &amp;quot;ref_&amp;quot; .. P1 .. P3 end&lt;br /&gt;
    return createTag({name=&amp;quot;sup&amp;quot;,contents=contents,params=params})&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- This is used by template {{note label}}.&lt;br /&gt;
function z.notelabel(frame)&lt;br /&gt;
    local pframe = frame:getParent()&lt;br /&gt;
    local config = frame.args -- the arguments passed BY the template, in the wikitext of the template itself&lt;br /&gt;
    local args = pframe.args -- the arguments passed TO the template, in the wikitext that instantiates the template&lt;br /&gt;
    local id = args[1] or &amp;quot;&amp;quot;&lt;br /&gt;
    local arrow = args[3] or &amp;quot;&amp;quot;&lt;br /&gt;
    local postscript = args[4] or &amp;quot;&amp;quot;&lt;br /&gt;
    local contents &lt;br /&gt;
    if arrow ~= &amp;quot;&amp;quot; then&lt;br /&gt;
        local sup_arrow = createTag({name=&amp;quot;sup&amp;quot;,contents=arrow,params={}})&lt;br /&gt;
        contents = &amp;quot;[[#ref_&amp;quot; .. id .. arrow .. &amp;quot;|&amp;lt;b&amp;gt;&amp;quot; .. sup_arrow .. &amp;quot;&amp;lt;/b&amp;gt;]]&amp;quot; .. postscript&lt;br /&gt;
        if &amp;quot;none&amp;quot; == arrow then arrow = &amp;quot;^&amp;quot; end -- Change this AFTER using it in the ID parameter and the contents.&lt;br /&gt;
    else&lt;br /&gt;
        contents = (args[2] or &amp;quot;&amp;quot;) .. postscript&lt;br /&gt;
    end&lt;br /&gt;
    local params = { class=&amp;quot;citation wikicite&amp;quot; }&lt;br /&gt;
    if id ~= &amp;quot;&amp;quot; and ( args.noid == nil or args.noid == &amp;quot;&amp;quot; ) then &lt;br /&gt;
        params.id = mw.uri.anchorEncode(&amp;quot;endnote_&amp;quot; .. id .. arrow)&lt;br /&gt;
    end&lt;br /&gt;
    return createTag({name=&amp;quot;span&amp;quot;,contents=contents,params=params})&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- This is used by templates {{reflist}} and {{notelist}}.&lt;br /&gt;
function z.reflist(frame)&lt;br /&gt;
    local pframe = frame:getParent()&lt;br /&gt;
    local config = frame.args -- the arguments passed BY the template, in the wikitext of the template itself&lt;br /&gt;
    local args = pframe.args -- the arguments passed TO the template, in the wikitext that instantiates the template&lt;br /&gt;
    return reflist0(frame, config, args)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- This is used by template {{refbegin}}.&lt;br /&gt;
function z.refbegin(frame)&lt;br /&gt;
    local pframe = frame:getParent()&lt;br /&gt;
    local config = frame.args -- the arguments passed BY the template, in the wikitext of the template itself&lt;br /&gt;
    local args = pframe.args -- the arguments passed TO the template, in the wikitext that instantiates the template&lt;br /&gt;
    return refbegin0(frame, config, args)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- This is used by template {{refend}}.&lt;br /&gt;
function z.refend(frame)&lt;br /&gt;
    local pframe = frame:getParent()&lt;br /&gt;
    local config = frame.args -- the arguments passed BY the template, in the wikitext of the template itself&lt;br /&gt;
    local args = pframe.args -- the arguments passed TO the template, in the wikitext that instantiates the template&lt;br /&gt;
    return refend0(frame, config, args)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- This is used by template {{efn}}.&lt;br /&gt;
function z.efn(frame)&lt;br /&gt;
    local pframe = frame:getParent()&lt;br /&gt;
    local config = frame.args -- the arguments passed BY the template, in the wikitext of the template itself&lt;br /&gt;
    local args = pframe.args -- the arguments passed TO the template, in the wikitext that instantiates the template&lt;br /&gt;
    return createTag({name=&amp;quot;ref&amp;quot;,contents=(args[1] or &amp;quot;&amp;quot;),params={name=args.name,group=config.default_group}}, frame)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return z&lt;br /&gt;
---------------------------------------------------------------------&lt;br /&gt;
--NOTES&lt;br /&gt;
--&lt;br /&gt;
-- NOTE A1: This Lua module was originally designed to handle a mix&lt;br /&gt;
--      of citation styles, crossing Vancouver style with Wikipedia's&lt;br /&gt;
--      local Citation Style 1 (CS1) from {Template:Citation/core}.&lt;br /&gt;
--      However, the conflicting positions of parameters, scattered&lt;br /&gt;
--      in twisted locations across this module, led to a separate&lt;br /&gt;
--      variation just to untangle the CS1 format of citations.&lt;br /&gt;
--&lt;br /&gt;
-- NOTE D2: The placement of dots and other separators between the&lt;br /&gt;
--      displayed parameters has been a continual headache, to keep&lt;br /&gt;
--      coordinated with the data in parentheses &amp;quot;(data)&amp;quot;. There&lt;br /&gt;
--      has been a need to pre-check for the existence of related&lt;br /&gt;
--      options, to keep from putting double-dots &amp;quot;..&amp;quot; in some cases.&lt;br /&gt;
--      In particular, the omission of the &amp;quot;title=&amp;quot; parameter has led&lt;br /&gt;
--      to several cases of a spurious dot &amp;quot;. .&amp;quot; because the original&lt;br /&gt;
--      design had treated the title as a mandatory parameter.&lt;br /&gt;
--&lt;br /&gt;
------------------------------------------------------------------------&lt;br /&gt;
--HISTORY:&lt;br /&gt;
--18Oct2012 Fixed lead-space in Chapter by omitting &amp;quot; &amp;quot;.&lt;br /&gt;
--18Oct2012 Fixed lead-space in Chapter/Title as end &amp;quot; &amp;quot; of Authors/Date/...&lt;br /&gt;
--19Oct2012 Put HISTORY comments to log major changes (not typos).&lt;br /&gt;
--19Oct2012 Fixed extra dot &amp;quot;..&amp;quot; in Title by omitting at end of &amp;quot;tcommon=...&amp;quot;.&lt;br /&gt;
--19Oct2012 For pages, put &amp;amp;nbsp in &amp;quot;p.&amp;amp;nbsp;&amp;quot; etc.&lt;br /&gt;
--19Oct2012 Enhanced &amp;quot;pages=&amp;quot; to detect lone page as &amp;quot;p.&amp;quot; else &amp;quot;pp.&amp;quot; prefix.&lt;br /&gt;
--19Oct2012 Fixed to show &amp;quot;.&amp;quot; after Periodical name (work, newspaper...).&lt;br /&gt;
--19Oct2012 Fixed web-link to have spaces &amp;quot;[...  Archived] from the original&amp;quot;.&lt;br /&gt;
--19Oct2012 Fixed to show &amp;quot;;&amp;quot; between authors &amp;amp; coauthors.&lt;br /&gt;
--19Oct2012 Fixed to omit extra &amp;quot;.&amp;quot; after coauthors.&lt;br /&gt;
--20Oct2012 Fixed COinS data to not urlencode all, as &amp;quot;ctx_ver=Z39.88-2004&amp;quot;&lt;br /&gt;
--20Oct2012 Fixed COinS to not end as &amp;quot;&amp;amp;&amp;quot; but use lead &amp;quot;&amp;amp;rft...=&amp;quot; form.&lt;br /&gt;
--20Oct2012 Fixed COinS to not url.encode page's &amp;quot;rfr_id=...&amp;quot; pagename.&lt;br /&gt;
--20Oct2012 Fixed COinS data when &amp;quot;web&amp;quot; to default to rft.genre &amp;quot;book&amp;quot;.&lt;br /&gt;
--05Nov2012 Add a span wrapper even when there is no Ref parameter&lt;br /&gt;
--15Feb2013 Added Agency for &amp;quot;agency=xx&amp;quot;.&lt;br /&gt;
--19Feb2013 Put NOTES comments to explain module operation.&lt;br /&gt;
--19Feb2013 Copied as Module:Citation/CS1 to alter to match wp:CS1 form.&lt;br /&gt;
--19Feb2013 Changed OrigYear to use [__] for CS1 style.&lt;br /&gt;
--19Feb2013 Fixed to not show duplicate Publisher/Agency.&lt;br /&gt;
--19Feb2013 Moved page-number parameters to after final date.&lt;br /&gt;
--19Feb2013 Fixed to not put double-dots after title again.&lt;br /&gt;
--20Feb2013 Changed to omit dot &amp;quot;.&amp;quot; if already ends with dot.&lt;br /&gt;
--20Feb2013 If class &amp;quot;journal&amp;quot; shows Publisher after Periodical/Series.&lt;br /&gt;
--20Feb2013 Shifted Format to after Language, and Others after Volume.&lt;br /&gt;
--20Feb2013 Set AccessDate + &amp;lt;span class=&amp;quot;reference-accessdate&amp;quot;&amp;gt;&lt;br /&gt;
--20Feb2013 Fixed url when deadurl=no.&lt;br /&gt;
--20Feb2013 Added sepc for separator character between parameters.&lt;br /&gt;
--20Feb2013 Put &amp;quot;OCLC&amp;quot; for &amp;quot;Online Computer Library Center&amp;quot;.&lt;br /&gt;
--20Feb2013 Fix empty &amp;quot;authorlink=&amp;quot; as person.link ~= &amp;quot;&amp;quot;.&lt;br /&gt;
--20Feb2013 Added space after AuthorSep &amp;amp; AuthorNameSep.&lt;br /&gt;
--21Feb2013 Added args.contributor (was missing parameter).&lt;br /&gt;
--21Feb2013 Fixed EditorSep (was misspelled &amp;quot;EdithorSep&amp;quot;).&lt;br /&gt;
--21Feb2013 Set OCinSdata.rft_val_fmt = &amp;quot;info:ofi/fmt:kev:mtx:book&amp;quot;&lt;br /&gt;
--21Feb2013 Checked to omit blank codes (asin= | doi= etc.).&lt;br /&gt;
--21Feb2013 Set enddot to end line if not config.CitationClass &amp;quot;citation&amp;quot;.&lt;br /&gt;
--21Feb2013 Fixed to show &amp;quot;issn=x&amp;quot; as the ISSN code.&lt;br /&gt;
--21Feb2013 Fixed to show &amp;quot;id=x&amp;quot; after Zbl code.&lt;br /&gt;
--21Feb2013 Changed to omit double-dot before date when already dot.&lt;br /&gt;
--21Feb2013 Order config.CitationClass &amp;quot;citation&amp;quot;: Volume, Issue, Publisher.&lt;br /&gt;
--21Feb2013 Put warning &amp;quot;Bad DOI (expected &amp;quot;10.&amp;quot;..)&amp;quot; in DOI result.&lt;br /&gt;
--21Feb2013 Automatically unbolded volume+comma when &amp;gt; 4 long.&lt;br /&gt;
--21Feb2013 Changed to allow lowercase &amp;quot;asin-tld&amp;quot;.&lt;br /&gt;
--22Feb2013 Fixed ref=harv to extract Year from Date.&lt;br /&gt;
--22Feb2013 Set Harvard refer. span id if config.CitationClass &amp;quot;citation&amp;quot;.&lt;br /&gt;
--22Feb2013 Fixed config.CitationClass &amp;quot;citation&amp;quot; as span class=&amp;quot;citation&amp;quot;.&lt;br /&gt;
--22Feb2013 Capitalized &amp;quot;Archived/Retrieved&amp;quot; only when sepc is dot &amp;quot;.&amp;quot;.&lt;br /&gt;
--23Feb2013 Fixed author editor for &amp;quot;in&amp;quot; or &amp;quot;In&amp;quot; and put space after sepc.&lt;br /&gt;
--23Feb2013 Changed to omit dot in &amp;quot;et al.&amp;quot; when sepc is &amp;quot;.&amp;quot; separator.&lt;br /&gt;
--23Feb2013 Fixed &amp;quot;author1-first&amp;quot; to also get args.given or args.given1.&lt;br /&gt;
--23Feb2013 Fixed args.article to set Title, after Periodical is Title.&lt;br /&gt;
--23Feb2013 Fixed to allow blank Title (such as &amp;quot;contribution=mytitle&amp;quot;).&lt;br /&gt;
--23Feb2013 Fixed double-dot &amp;quot;..&amp;quot; at end of Editors list&lt;br /&gt;
--26Feb2013 Moved &amp;quot;issue=&amp;quot; data to show before &amp;quot;page=&amp;quot;.&lt;br /&gt;
--26Feb2013 Moved &amp;quot;type=&amp;quot; data to show after &amp;quot;format=&amp;quot;.&lt;br /&gt;
--26Feb2013 For &amp;quot;pmc=&amp;quot; link, omitted suffix &amp;quot;/?tool=pmcentrez&amp;quot;.&lt;br /&gt;
--27Feb2013 For coauthors, omitted extra separator after authors.&lt;br /&gt;
--27Feb2013 For date, allowed empty date to use month/day/year.&lt;br /&gt;
--27Feb2013 Fixed double-dot &amp;quot;..&amp;quot; at end of authors/coauthors list.&lt;br /&gt;
--27Feb2013 Reset editor suffix as &amp;quot;, ed.&amp;quot; when date exists.&lt;br /&gt;
--27Feb2013 Removed duplicate display of &amp;quot;others=&amp;quot; data.&lt;br /&gt;
--27Feb2013 Removed parentheses &amp;quot;( )&amp;quot; around &amp;quot;department&amp;quot; TitleNote.&lt;br /&gt;
--05Mar2013 Moved Language to follow Periodical or Series.&lt;br /&gt;
--05Mar2013 Fixed Edition to follow Series or Volume.&lt;br /&gt;
--05Mar2013 Fixed class encyclopaedia to show article as quoted Chapter.&lt;br /&gt;
--05Mar2013 Fixed class encyclopaedia to show page as &amp;quot;pp.&amp;quot; or &amp;quot;p.&amp;quot;.&lt;br /&gt;
--07Mar2013 Changed class encyclopaedia to omit &amp;quot;( )&amp;quot; around publisher.&lt;br /&gt;
--07Mar2013 Fixed end double-dot by string.sub(idcommon,-1,-1) was &amp;quot;-1,1&amp;quot;.&lt;br /&gt;
--13Mar2013 Removed enddot &amp;quot;.&amp;quot; after &amp;quot;quote=&amp;quot; parameter.&lt;br /&gt;
--13Mar2013 Changed config.CitationClass &amp;quot;news&amp;quot; to use &amp;quot;p.&amp;quot; page format.&lt;br /&gt;
--13Mar2013 Fixed missing &amp;quot;location=&amp;quot; when &amp;quot;web&amp;quot; or &amp;quot;encyclopaedia&amp;quot;.&lt;br /&gt;
--14Mar2013 Fixed end double-dot after book/work title.&lt;br /&gt;
--14Mar2013 Fixed double-dot before &amp;quot;p.&amp;quot; or &amp;quot;pp.&amp;quot; page number.&lt;br /&gt;
--14Mar2013 Fixed config.CitationClass &amp;quot;book&amp;quot; to use p./pp. page.&lt;br /&gt;
--&lt;br /&gt;
--End&lt;/div&gt;</summary>
		<author><name>Kolk</name></author>	</entry>

	<entry>
		<id>http://wiki.isofts.kiev.ua/index.php?title=%D0%86%D0%BD%D1%81%D1%82%D0%B8%D1%82%D1%83%D1%82_%D0%BF%D1%80%D0%BE%D0%B3%D1%80%D0%B0%D0%BC%D0%BD%D0%B8%D1%85_%D1%81%D0%B8%D1%81%D1%82%D0%B5%D0%BC_%D0%9D%D0%B0%D1%86%D1%96%D0%BE%D0%BD%D0%B0%D0%BB%D1%8C%D0%BD%D0%BE%D1%97_%D0%90%D0%BA%D0%B0%D0%B4%D0%B5%D0%BC%D1%96%D1%97_%D0%BD%D0%B0%D1%83%D0%BA_%D0%A3%D0%BA%D1%80%D0%B0%D1%97%D0%BD%D0%B8&amp;diff=635</id>
		<title>Інститут програмних систем Національної Академії наук України</title>
		<link rel="alternate" type="text/html" href="http://wiki.isofts.kiev.ua/index.php?title=%D0%86%D0%BD%D1%81%D1%82%D0%B8%D1%82%D1%83%D1%82_%D0%BF%D1%80%D0%BE%D0%B3%D1%80%D0%B0%D0%BC%D0%BD%D0%B8%D1%85_%D1%81%D0%B8%D1%81%D1%82%D0%B5%D0%BC_%D0%9D%D0%B0%D1%86%D1%96%D0%BE%D0%BD%D0%B0%D0%BB%D1%8C%D0%BD%D0%BE%D1%97_%D0%90%D0%BA%D0%B0%D0%B4%D0%B5%D0%BC%D1%96%D1%97_%D0%BD%D0%B0%D1%83%D0%BA_%D0%A3%D0%BA%D1%80%D0%B0%D1%97%D0%BD%D0%B8&amp;diff=635"/>
				<updated>2016-10-13T13:33:38Z</updated>
		
		<summary type="html">&lt;p&gt;Kolk: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Картка:Академічна установа&lt;br /&gt;
|назва			= Інститут програмних систем НАН України&lt;br /&gt;
|зображення		=|&lt;br /&gt;
|зображення_розмір	= 283px&lt;br /&gt;
|зображення_підпис	=&lt;br /&gt;
|дата заснування	= [[1992]] р.&lt;br /&gt;
|приналежність		= [[Національна академія наук України|НАН України]]&lt;br /&gt;
|розташування		= {{coord|50|21|48.5|N|30|26|47|E|scale:3000_region:UA_type:landmark_scale:3000|display=inline}}&lt;br /&gt;
|адреса			= [[Проспект Академіка Глушкова|Просп. Ак. Глушкова]], 40, корп. 5, &amp;lt;br/&amp;gt;03680, МСП, Київ-187 &lt;br /&gt;
Тел. +380 (44) 526-55-07&amp;lt;br/&amp;gt;Факс +380 (44) 526-62-63&lt;br /&gt;
|веб-сторінка		= http://www.isofts.kiev.ua/&lt;br /&gt;
|e-mail			= iss@isofts.kiev.ua&lt;br /&gt;
|}}&lt;br /&gt;
&lt;br /&gt;
Інститут програмних систем НАН України (ІПС) відомий в Україні і за її межами як наукова установа, тематика якої спрямована на розвиток фундаментальних і прикладних наукових досліджень у галузі програмування та інформаційних технологій, на створення конкурентоспроможного програмного забезпечення в складних, розподілених, заснованих на мережах та концепціях баз даних і знань, комп’ютерних системах, на організацію впровадження результатів наукових досягнень у державну, соціальну та оборонну сфери життєдіяльності України шляхом створення &amp;quot;під ключ&amp;quot; складних комп'ютерних систем, на розбудову вітчизняної індустрії програмного забезпечення та розвиток інформаційного середовища України. &lt;br /&gt;
&lt;br /&gt;
[Офіційний сайт Інституту програмних систем НАН України:http://isofts.kiev.ua]&lt;br /&gt;
&lt;br /&gt;
{{coord|50|21|48.5|N|30|26|47|E|scale:3000_region:UA_type:landmark_scale:3000|display=inline}}&lt;/div&gt;</summary>
		<author><name>Kolk</name></author>	</entry>

	<entry>
		<id>http://wiki.isofts.kiev.ua/index.php?title=%D0%86%D0%BD%D1%81%D1%82%D0%B8%D1%82%D1%83%D1%82_%D0%BF%D1%80%D0%BE%D0%B3%D1%80%D0%B0%D0%BC%D0%BD%D0%B8%D1%85_%D1%81%D0%B8%D1%81%D1%82%D0%B5%D0%BC_%D0%9D%D0%B0%D1%86%D1%96%D0%BE%D0%BD%D0%B0%D0%BB%D1%8C%D0%BD%D0%BE%D1%97_%D0%90%D0%BA%D0%B0%D0%B4%D0%B5%D0%BC%D1%96%D1%97_%D0%BD%D0%B0%D1%83%D0%BA_%D0%A3%D0%BA%D1%80%D0%B0%D1%97%D0%BD%D0%B8&amp;diff=634</id>
		<title>Інститут програмних систем Національної Академії наук України</title>
		<link rel="alternate" type="text/html" href="http://wiki.isofts.kiev.ua/index.php?title=%D0%86%D0%BD%D1%81%D1%82%D0%B8%D1%82%D1%83%D1%82_%D0%BF%D1%80%D0%BE%D0%B3%D1%80%D0%B0%D0%BC%D0%BD%D0%B8%D1%85_%D1%81%D0%B8%D1%81%D1%82%D0%B5%D0%BC_%D0%9D%D0%B0%D1%86%D1%96%D0%BE%D0%BD%D0%B0%D0%BB%D1%8C%D0%BD%D0%BE%D1%97_%D0%90%D0%BA%D0%B0%D0%B4%D0%B5%D0%BC%D1%96%D1%97_%D0%BD%D0%B0%D1%83%D0%BA_%D0%A3%D0%BA%D1%80%D0%B0%D1%97%D0%BD%D0%B8&amp;diff=634"/>
				<updated>2016-10-13T13:32:00Z</updated>
		
		<summary type="html">&lt;p&gt;Kolk: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Картка:Академічна установа&lt;br /&gt;
|назва			= Інститут програмних систем НАН України&lt;br /&gt;
|зображення		=|&lt;br /&gt;
|зображення_розмір	= 283px&lt;br /&gt;
|зображення_підпис	=&lt;br /&gt;
|дата заснування	= [[1992]] р.&lt;br /&gt;
|приналежність		= [[Національна академія наук України|НАН України]]&lt;br /&gt;
|розташування		= {{coord|50|21|48.5|N|30|26|47|E|scale:3000_region:UA_type:landmark_scale:3000|display=inline}}&lt;br /&gt;
|адреса			= [[Проспект Академіка Глушкова|Просп. Ак. Глушкова]], 40, корп. 5, &amp;lt;br/&amp;gt;03680, МСП, Київ-187 &lt;br /&gt;
Тел. +380 (44) 526-55-07&amp;lt;br/&amp;gt;Факс +380 (44) 526-62-63&lt;br /&gt;
|веб-сторінка		= http://www.isofts.kiev.ua/&lt;br /&gt;
|e-mail			= iss@isofts.kiev.ua&lt;br /&gt;
|}}&lt;br /&gt;
&lt;br /&gt;
Інститут програмних систем НАН України (ІПС) відомий в Україні і за її межами як наукова установа, тематика якої спрямована на розвиток фундаментальних і прикладних наукових досліджень у галузі програмування та інформаційних технологій, на створення конкурентоспроможного програмного забезпечення в складних, розподілених, заснованих на мережах та концепціях баз даних і знань, комп’ютерних системах, на організацію впровадження результатів наукових досягнень у державну, соціальну та оборонну сфери життєдіяльності України шляхом створення &amp;quot;під ключ&amp;quot; складних комп'ютерних систем, на розбудову вітчизняної індустрії програмного забезпечення та розвиток інформаційного середовища України. &lt;br /&gt;
&lt;br /&gt;
[Офіційний сайт Інституту програмних систем НАН України:http://isofts.kiev.ua]&lt;/div&gt;</summary>
		<author><name>Kolk</name></author>	</entry>

	<entry>
		<id>http://wiki.isofts.kiev.ua/index.php?title=%D0%A8%D0%B0%D0%B1%D0%BB%D0%BE%D0%BD:Coordinates&amp;diff=633</id>
		<title>Шаблон:Coordinates</title>
		<link rel="alternate" type="text/html" href="http://wiki.isofts.kiev.ua/index.php?title=%D0%A8%D0%B0%D0%B1%D0%BB%D0%BE%D0%BD:Coordinates&amp;diff=633"/>
				<updated>2016-10-13T13:31:00Z</updated>
		
		<summary type="html">&lt;p&gt;Kolk: Перенаправлено на Шаблон:Coord&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Шаблон:Coord]]&lt;/div&gt;</summary>
		<author><name>Kolk</name></author>	</entry>

	<entry>
		<id>http://wiki.isofts.kiev.ua/index.php?title=%D0%A8%D0%B0%D0%B1%D0%BB%D0%BE%D0%BD:Coordinates&amp;diff=632</id>
		<title>Шаблон:Coordinates</title>
		<link rel="alternate" type="text/html" href="http://wiki.isofts.kiev.ua/index.php?title=%D0%A8%D0%B0%D0%B1%D0%BB%D0%BE%D0%BD:Coordinates&amp;diff=632"/>
				<updated>2016-10-13T13:30:50Z</updated>
		
		<summary type="html">&lt;p&gt;Kolk: Скасування редагування № 631 користувача Kolk (обговорення)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT Шаблон:Coord&lt;/div&gt;</summary>
		<author><name>Kolk</name></author>	</entry>

	<entry>
		<id>http://wiki.isofts.kiev.ua/index.php?title=%D0%A8%D0%B0%D0%B1%D0%BB%D0%BE%D0%BD:Coordinates&amp;diff=631</id>
		<title>Шаблон:Coordinates</title>
		<link rel="alternate" type="text/html" href="http://wiki.isofts.kiev.ua/index.php?title=%D0%A8%D0%B0%D0%B1%D0%BB%D0%BE%D0%BD:Coordinates&amp;diff=631"/>
				<updated>2016-10-13T13:29:51Z</updated>
		
		<summary type="html">&lt;p&gt;Kolk: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIR Шаблон:Coord&lt;/div&gt;</summary>
		<author><name>Kolk</name></author>	</entry>

	<entry>
		<id>http://wiki.isofts.kiev.ua/index.php?title=%D0%A8%D0%B0%D0%B1%D0%BB%D0%BE%D0%BD:Coordinates&amp;diff=630</id>
		<title>Шаблон:Coordinates</title>
		<link rel="alternate" type="text/html" href="http://wiki.isofts.kiev.ua/index.php?title=%D0%A8%D0%B0%D0%B1%D0%BB%D0%BE%D0%BD:Coordinates&amp;diff=630"/>
				<updated>2016-10-13T13:29:34Z</updated>
		
		<summary type="html">&lt;p&gt;Kolk: Створена сторінка: #REDIRECT Шаблон:Coord&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT Шаблон:Coord&lt;/div&gt;</summary>
		<author><name>Kolk</name></author>	</entry>

	<entry>
		<id>http://wiki.isofts.kiev.ua/index.php?title=%D0%86%D0%BD%D1%81%D1%82%D0%B8%D1%82%D1%83%D1%82_%D0%BF%D1%80%D0%BE%D0%B3%D1%80%D0%B0%D0%BC%D0%BD%D0%B8%D1%85_%D1%81%D0%B8%D1%81%D1%82%D0%B5%D0%BC_%D0%9D%D0%B0%D1%86%D1%96%D0%BE%D0%BD%D0%B0%D0%BB%D1%8C%D0%BD%D0%BE%D1%97_%D0%90%D0%BA%D0%B0%D0%B4%D0%B5%D0%BC%D1%96%D1%97_%D0%BD%D0%B0%D1%83%D0%BA_%D0%A3%D0%BA%D1%80%D0%B0%D1%97%D0%BD%D0%B8&amp;diff=629</id>
		<title>Інститут програмних систем Національної Академії наук України</title>
		<link rel="alternate" type="text/html" href="http://wiki.isofts.kiev.ua/index.php?title=%D0%86%D0%BD%D1%81%D1%82%D0%B8%D1%82%D1%83%D1%82_%D0%BF%D1%80%D0%BE%D0%B3%D1%80%D0%B0%D0%BC%D0%BD%D0%B8%D1%85_%D1%81%D0%B8%D1%81%D1%82%D0%B5%D0%BC_%D0%9D%D0%B0%D1%86%D1%96%D0%BE%D0%BD%D0%B0%D0%BB%D1%8C%D0%BD%D0%BE%D1%97_%D0%90%D0%BA%D0%B0%D0%B4%D0%B5%D0%BC%D1%96%D1%97_%D0%BD%D0%B0%D1%83%D0%BA_%D0%A3%D0%BA%D1%80%D0%B0%D1%97%D0%BD%D0%B8&amp;diff=629"/>
				<updated>2016-10-13T13:17:19Z</updated>
		
		<summary type="html">&lt;p&gt;Kolk: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Картка:Академічна установа&lt;br /&gt;
|назва			= Інститут програмних систем НАН України&lt;br /&gt;
|зображення		=|&lt;br /&gt;
|зображення_розмір	= 283px&lt;br /&gt;
|зображення_підпис	=&lt;br /&gt;
|дата заснування	= [[1992]] р.&lt;br /&gt;
|приналежність		= [[Національна академія наук України|НАН України]]&lt;br /&gt;
|розташування		= {{coord|50|21|48.5|N|30|26|47|E|scale:3000_region:UA_type:landmark_scale:3000|display=inline}}&lt;br /&gt;
|адреса			= [[Проспект Академіка Глушкова|Просп. Ак. Глушкова]], 40, корп. 5, &amp;lt;br/&amp;gt;03680, МСП, Київ-187 &lt;br /&gt;
Тел. +380 (44) 526-55-07&amp;lt;br/&amp;gt;Факс +380 (44) 526-62-63&lt;br /&gt;
|веб-сторінка		= http://www.isofts.kiev.ua/&lt;br /&gt;
|e-mail			= iss@isofts.kiev.ua&lt;br /&gt;
|}}&lt;br /&gt;
&lt;br /&gt;
Інститут програмних систем НАН України (ІПС) відомий в Україні і за її межами як наукова установа, тематика якої спрямована на розвиток фундаментальних і прикладних наукових досліджень у галузі програмування та інформаційних технологій, на створення конкурентоспроможного програмного забезпечення в складних, розподілених, заснованих на мережах та концепціях баз даних і знань, комп’ютерних системах, на організацію впровадження результатів наукових досягнень у державну, соціальну та оборонну сфери життєдіяльності України шляхом створення &amp;quot;під ключ&amp;quot; складних комп'ютерних систем, на розбудову вітчизняної індустрії програмного забезпечення та розвиток інформаційного середовища України. &lt;br /&gt;
&lt;br /&gt;
[Офіційний сайт Інституту програмних систем НАН України:http://isofts.kiev.ua]&lt;br /&gt;
&lt;br /&gt;
1 не работает coordinates &lt;br /&gt;
{{coord:primary|50.363669|30.446538}}&lt;br /&gt;
&lt;br /&gt;
2 {{coord|50|36|36|N|30|44|65|E|scale:3000_region:UA_type:landmark_scale:3000|display=inline}}&lt;br /&gt;
&lt;br /&gt;
50.363669, 30.446538&lt;br /&gt;
{{/Шапка}}&lt;/div&gt;</summary>
		<author><name>Kolk</name></author>	</entry>

	<entry>
		<id>http://wiki.isofts.kiev.ua/index.php?title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:Uses_Wikidata&amp;diff=626</id>
		<title>Модуль:Uses Wikidata</title>
		<link rel="alternate" type="text/html" href="http://wiki.isofts.kiev.ua/index.php?title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:Uses_Wikidata&amp;diff=626"/>
				<updated>2016-10-13T10:50:37Z</updated>
		
		<summary type="html">&lt;p&gt;Kolk: Імпортовано 1 версія&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;local p = {}&lt;br /&gt;
&lt;br /&gt;
function p.usesProperty(frame)&lt;br /&gt;
	local parent = frame.getParent(frame)&lt;br /&gt;
	local result = ''&lt;br /&gt;
	local ii = 1&lt;br /&gt;
	while true do&lt;br /&gt;
		local p_num = parent.args[ii] or ''&lt;br /&gt;
		if p_num ~= '' then&lt;br /&gt;
			local label = mw.wikibase.label(p_num) or &amp;quot;NO LABEL&amp;quot;&lt;br /&gt;
			result = result .. &amp;quot;&amp;lt;li&amp;gt;&amp;lt;b&amp;gt;&amp;lt;i&amp;gt;[[d:Property:&amp;quot; .. p_num .. &amp;quot;|&amp;quot; .. label .. &amp;quot; &amp;lt;small&amp;gt;(&amp;quot; .. string.upper(p_num) .. &amp;quot;)&amp;lt;/small&amp;gt;]]&amp;lt;/i&amp;gt;&amp;lt;/b&amp;gt; (see [[d:Special:WhatLinksHere/Property:&amp;quot; .. p_num .. &amp;quot;|uses]])&amp;lt;/li&amp;gt;&amp;quot;&lt;br /&gt;
			ii = ii + 1&lt;br /&gt;
		else break&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return result&lt;br /&gt;
end&lt;br /&gt;
 &lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>Kolk</name></author>	</entry>

	<entry>
		<id>http://wiki.isofts.kiev.ua/index.php?title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:Yesno&amp;diff=628</id>
		<title>Модуль:Yesno</title>
		<link rel="alternate" type="text/html" href="http://wiki.isofts.kiev.ua/index.php?title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:Yesno&amp;diff=628"/>
				<updated>2016-10-13T10:50:37Z</updated>
		
		<summary type="html">&lt;p&gt;Kolk: Імпортовано 1 версія&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;-- Function allowing for consistent treatment of boolean-like wikitext input.&lt;br /&gt;
-- It works similarly to the template {{yesno}}.&lt;br /&gt;
&lt;br /&gt;
return function (val, default)&lt;br /&gt;
	-- If your wiki uses non-ascii characters for any of &amp;quot;yes&amp;quot;, &amp;quot;no&amp;quot;, etc., you&lt;br /&gt;
	-- should replace &amp;quot;val:lower()&amp;quot; with &amp;quot;mw.ustring.lower(val)&amp;quot; in the&lt;br /&gt;
	-- following line.&lt;br /&gt;
	val = type(val) == 'string' and val:lower() or val&lt;br /&gt;
	if val == nil then&lt;br /&gt;
		return nil&lt;br /&gt;
	elseif val == true &lt;br /&gt;
		or val == 'yes'&lt;br /&gt;
		or val == 'y'&lt;br /&gt;
		or val == 'true'&lt;br /&gt;
		or val == 't'&lt;br /&gt;
		or tonumber(val) == 1&lt;br /&gt;
	then&lt;br /&gt;
		return true&lt;br /&gt;
	elseif val == false&lt;br /&gt;
		or val == 'no'&lt;br /&gt;
		or val == 'n'&lt;br /&gt;
		or val == 'false'&lt;br /&gt;
		or val == 'f'&lt;br /&gt;
		or tonumber(val) == 0&lt;br /&gt;
	then&lt;br /&gt;
		return false&lt;br /&gt;
	else&lt;br /&gt;
		return default&lt;br /&gt;
	end&lt;br /&gt;
end&lt;/div&gt;</summary>
		<author><name>Kolk</name></author>	</entry>

	<entry>
		<id>http://wiki.isofts.kiev.ua/index.php?title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:TableTools&amp;diff=624</id>
		<title>Модуль:TableTools</title>
		<link rel="alternate" type="text/html" href="http://wiki.isofts.kiev.ua/index.php?title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:TableTools&amp;diff=624"/>
				<updated>2016-10-13T10:50:36Z</updated>
		
		<summary type="html">&lt;p&gt;Kolk: Імпортовано 1 версія&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;--[[&lt;br /&gt;
------------------------------------------------------------------------------------&lt;br /&gt;
--                               TableTools                                       --&lt;br /&gt;
--                                                                                --&lt;br /&gt;
-- This module includes a number of functions for dealing with Lua tables.        --&lt;br /&gt;
-- It is a meta-module, meant to be called from other Lua modules, and should     --&lt;br /&gt;
-- not be called directly from #invoke.                                           --&lt;br /&gt;
------------------------------------------------------------------------------------&lt;br /&gt;
--]]&lt;br /&gt;
&lt;br /&gt;
local libraryUtil = require('libraryUtil')&lt;br /&gt;
&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
-- Define often-used variables and functions.&lt;br /&gt;
local floor = math.floor&lt;br /&gt;
local infinity = math.huge&lt;br /&gt;
local checkType = libraryUtil.checkType&lt;br /&gt;
&lt;br /&gt;
--[[&lt;br /&gt;
------------------------------------------------------------------------------------&lt;br /&gt;
-- isPositiveInteger&lt;br /&gt;
--&lt;br /&gt;
-- This function returns true if the given value is a positive integer, and false&lt;br /&gt;
-- if not. Although it doesn't operate on tables, it is included here as it is&lt;br /&gt;
-- useful for determining whether a given table key is in the array part or the&lt;br /&gt;
-- hash part of a table.&lt;br /&gt;
------------------------------------------------------------------------------------&lt;br /&gt;
--]]&lt;br /&gt;
function p.isPositiveInteger(v)&lt;br /&gt;
	if type(v) == 'number' and v &amp;gt;= 1 and floor(v) == v and v &amp;lt; infinity then&lt;br /&gt;
		return true&lt;br /&gt;
	else&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[[&lt;br /&gt;
------------------------------------------------------------------------------------&lt;br /&gt;
-- isNan&lt;br /&gt;
--&lt;br /&gt;
-- This function returns true if the given number is a NaN value, and false&lt;br /&gt;
-- if not. Although it doesn't operate on tables, it is included here as it is&lt;br /&gt;
-- useful for determining whether a value can be a valid table key. Lua will&lt;br /&gt;
-- generate an error if a NaN is used as a table key.&lt;br /&gt;
------------------------------------------------------------------------------------&lt;br /&gt;
--]]&lt;br /&gt;
function p.isNan(v)&lt;br /&gt;
	if type(v) == 'number' and tostring(v) == '-nan' then&lt;br /&gt;
		return true&lt;br /&gt;
	else&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[[&lt;br /&gt;
------------------------------------------------------------------------------------&lt;br /&gt;
-- shallowClone&lt;br /&gt;
--&lt;br /&gt;
-- This returns a clone of a table. The value returned is a new table, but all&lt;br /&gt;
-- subtables and functions are shared. Metamethods are respected, but the returned&lt;br /&gt;
-- table will have no metatable of its own.&lt;br /&gt;
------------------------------------------------------------------------------------&lt;br /&gt;
--]]&lt;br /&gt;
function p.shallowClone(t)&lt;br /&gt;
	local ret = {}&lt;br /&gt;
	for k, v in pairs(t) do&lt;br /&gt;
		ret[k] = v&lt;br /&gt;
	end&lt;br /&gt;
	return ret&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[[&lt;br /&gt;
------------------------------------------------------------------------------------&lt;br /&gt;
-- removeDuplicates&lt;br /&gt;
--&lt;br /&gt;
-- This removes duplicate values from an array. Non-positive-integer keys are&lt;br /&gt;
-- ignored. The earliest value is kept, and all subsequent duplicate values are&lt;br /&gt;
-- removed, but otherwise the array order is unchanged.&lt;br /&gt;
------------------------------------------------------------------------------------&lt;br /&gt;
--]]&lt;br /&gt;
function p.removeDuplicates(t)&lt;br /&gt;
	checkType('removeDuplicates', 1, t, 'table')&lt;br /&gt;
	local isNan = p.isNan&lt;br /&gt;
	local ret, exists = {}, {}&lt;br /&gt;
	for i, v in ipairs(t) do&lt;br /&gt;
		if isNan(v) then&lt;br /&gt;
			-- NaNs can't be table keys, and they are also unique, so we don't need to check existence.&lt;br /&gt;
			ret[#ret + 1] = v&lt;br /&gt;
		else&lt;br /&gt;
			if not exists[v] then&lt;br /&gt;
				ret[#ret + 1] = v&lt;br /&gt;
				exists[v] = true&lt;br /&gt;
			end&lt;br /&gt;
		end	&lt;br /&gt;
	end&lt;br /&gt;
	return ret&lt;br /&gt;
end			&lt;br /&gt;
&lt;br /&gt;
--[[&lt;br /&gt;
------------------------------------------------------------------------------------&lt;br /&gt;
-- numKeys&lt;br /&gt;
--&lt;br /&gt;
-- This takes a table and returns an array containing the numbers of any numerical&lt;br /&gt;
-- keys that have non-nil values, sorted in numerical order.&lt;br /&gt;
------------------------------------------------------------------------------------&lt;br /&gt;
--]]&lt;br /&gt;
function p.numKeys(t)&lt;br /&gt;
	checkType('numKeys', 1, t, 'table')&lt;br /&gt;
	local isPositiveInteger = p.isPositiveInteger&lt;br /&gt;
	local nums = {}&lt;br /&gt;
	for k, v in pairs(t) do&lt;br /&gt;
		if isPositiveInteger(k) then&lt;br /&gt;
			nums[#nums + 1] = k&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	table.sort(nums)&lt;br /&gt;
	return nums&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[[&lt;br /&gt;
------------------------------------------------------------------------------------&lt;br /&gt;
-- affixNums&lt;br /&gt;
--&lt;br /&gt;
-- This takes a table and returns an array containing the numbers of keys with the&lt;br /&gt;
-- specified prefix and suffix. For example, for the table&lt;br /&gt;
-- {a1 = 'foo', a3 = 'bar', a6 = 'baz'} and the prefix &amp;quot;a&amp;quot;, affixNums will&lt;br /&gt;
-- return {1, 3, 6}.&lt;br /&gt;
------------------------------------------------------------------------------------&lt;br /&gt;
--]]&lt;br /&gt;
function p.affixNums(t, prefix, suffix)&lt;br /&gt;
	checkType('affixNums', 1, t, 'table')&lt;br /&gt;
	checkType('affixNums', 2, prefix, 'string', true)&lt;br /&gt;
	checkType('affixNums', 3, suffix, 'string', true)&lt;br /&gt;
&lt;br /&gt;
	local function cleanPattern(s)&lt;br /&gt;
		-- Cleans a pattern so that the magic characters ()%.[]*+-?^$ are interpreted literally.&lt;br /&gt;
		s = s:gsub('([%(%)%%%.%[%]%*%+%-%?%^%$])', '%%%1')&lt;br /&gt;
		return s&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	prefix = prefix or ''&lt;br /&gt;
	suffix = suffix or ''&lt;br /&gt;
	prefix = cleanPattern(prefix)&lt;br /&gt;
	suffix = cleanPattern(suffix)&lt;br /&gt;
	local pattern = '^' .. prefix .. '([1-9]%d*)' .. suffix .. '$'&lt;br /&gt;
&lt;br /&gt;
	local nums = {}&lt;br /&gt;
	for k, v in pairs(t) do&lt;br /&gt;
		if type(k) == 'string' then			&lt;br /&gt;
			local num = mw.ustring.match(k, pattern)&lt;br /&gt;
			if num then&lt;br /&gt;
				nums[#nums + 1] = tonumber(num)&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	table.sort(nums)&lt;br /&gt;
	return nums&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[[&lt;br /&gt;
------------------------------------------------------------------------------------&lt;br /&gt;
-- numData&lt;br /&gt;
--&lt;br /&gt;
-- Given a table with keys like (&amp;quot;foo1&amp;quot;, &amp;quot;bar1&amp;quot;, &amp;quot;foo2&amp;quot;, &amp;quot;baz2&amp;quot;), returns a table&lt;br /&gt;
-- of subtables in the format &lt;br /&gt;
-- { [1] = {foo = 'text', bar = 'text'}, [2] = {foo = 'text', baz = 'text'} }&lt;br /&gt;
-- Keys that don't end with an integer are stored in a subtable named &amp;quot;other&amp;quot;.&lt;br /&gt;
-- The compress option compresses the table so that it can be iterated over with&lt;br /&gt;
-- ipairs.&lt;br /&gt;
------------------------------------------------------------------------------------&lt;br /&gt;
--]]&lt;br /&gt;
function p.numData(t, compress)&lt;br /&gt;
	checkType('numData', 1, t, 'table')&lt;br /&gt;
	checkType('numData', 2, compress, 'boolean', true)&lt;br /&gt;
	local ret = {}&lt;br /&gt;
	for k, v in pairs(t) do&lt;br /&gt;
		local prefix, num = mw.ustring.match(tostring(k), '^([^0-9]*)([1-9][0-9]*)$')&lt;br /&gt;
		if num then&lt;br /&gt;
			num = tonumber(num)&lt;br /&gt;
			local subtable = ret[num] or {}&lt;br /&gt;
			if prefix == '' then&lt;br /&gt;
				-- Positional parameters match the blank string; put them at the start of the subtable instead.&lt;br /&gt;
				prefix = 1&lt;br /&gt;
			end&lt;br /&gt;
			subtable[prefix] = v&lt;br /&gt;
			ret[num] = subtable&lt;br /&gt;
		else&lt;br /&gt;
			local subtable = ret.other or {}&lt;br /&gt;
			subtable[k] = v&lt;br /&gt;
			ret.other = subtable&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	if compress then&lt;br /&gt;
		local other = ret.other&lt;br /&gt;
		ret = p.compressSparseArray(ret)&lt;br /&gt;
		ret.other = other&lt;br /&gt;
	end&lt;br /&gt;
	return ret&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[[&lt;br /&gt;
------------------------------------------------------------------------------------&lt;br /&gt;
-- compressSparseArray&lt;br /&gt;
--&lt;br /&gt;
-- This takes an array with one or more nil values, and removes the nil values&lt;br /&gt;
-- while preserving the order, so that the array can be safely traversed with&lt;br /&gt;
-- ipairs.&lt;br /&gt;
------------------------------------------------------------------------------------&lt;br /&gt;
--]]&lt;br /&gt;
function p.compressSparseArray(t)&lt;br /&gt;
	checkType('compressSparseArray', 1, t, 'table')&lt;br /&gt;
	local ret = {}&lt;br /&gt;
	local nums = p.numKeys(t)&lt;br /&gt;
	for _, num in ipairs(nums) do&lt;br /&gt;
		ret[#ret + 1] = t[num]&lt;br /&gt;
	end&lt;br /&gt;
	return ret&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[[&lt;br /&gt;
------------------------------------------------------------------------------------&lt;br /&gt;
-- sparseIpairs&lt;br /&gt;
--&lt;br /&gt;
-- This is an iterator for sparse arrays. It can be used like ipairs, but can&lt;br /&gt;
-- handle nil values.&lt;br /&gt;
------------------------------------------------------------------------------------&lt;br /&gt;
--]]&lt;br /&gt;
function p.sparseIpairs(t)&lt;br /&gt;
	checkType('sparseIpairs', 1, t, 'table')&lt;br /&gt;
	local nums = p.numKeys(t)&lt;br /&gt;
	local i = 0&lt;br /&gt;
	local lim = #nums&lt;br /&gt;
	return function ()&lt;br /&gt;
		i = i + 1&lt;br /&gt;
		if i &amp;lt;= lim then&lt;br /&gt;
			local key = nums[i]&lt;br /&gt;
			return key, t[key]&lt;br /&gt;
		else&lt;br /&gt;
			return nil, nil&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[[&lt;br /&gt;
------------------------------------------------------------------------------------&lt;br /&gt;
-- size&lt;br /&gt;
--&lt;br /&gt;
-- This returns the size of a key/value pair table. It will also work on arrays,&lt;br /&gt;
-- but for arrays it is more efficient to use the # operator.&lt;br /&gt;
------------------------------------------------------------------------------------&lt;br /&gt;
--]]&lt;br /&gt;
function p.size(t)&lt;br /&gt;
	checkType('size', 1, t, 'table')&lt;br /&gt;
	local i = 0&lt;br /&gt;
	for k in pairs(t) do&lt;br /&gt;
		i = i + 1&lt;br /&gt;
	end&lt;br /&gt;
	return i&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>Kolk</name></author>	</entry>

	<entry>
		<id>http://wiki.isofts.kiev.ua/index.php?title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:Protection_banner/config&amp;diff=620</id>
		<title>Модуль:Protection banner/config</title>
		<link rel="alternate" type="text/html" href="http://wiki.isofts.kiev.ua/index.php?title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:Protection_banner/config&amp;diff=620"/>
				<updated>2016-10-13T10:50:35Z</updated>
		
		<summary type="html">&lt;p&gt;Kolk: Імпортовано 1 версія&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;-- This module provides configuration data for [[Module:Protection banner]].&lt;br /&gt;
&lt;br /&gt;
return {&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
--&lt;br /&gt;
--                                BANNER DATA&lt;br /&gt;
--&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
--[[&lt;br /&gt;
-- Banner data consists of six fields:&lt;br /&gt;
-- * text - the main protection text that appears at the top of protection&lt;br /&gt;
--   banners.&lt;br /&gt;
-- * explanation - the text that appears below the main protection text, used&lt;br /&gt;
--   to explain the details of the protection.&lt;br /&gt;
-- * tooltip - the tooltip text you see when you move the mouse over a small&lt;br /&gt;
--   padlock icon.&lt;br /&gt;
-- * link - the page that the small padlock icon links to.&lt;br /&gt;
-- * alt - the alt text for the small padlock icon. This is also used as tooltip&lt;br /&gt;
--   text for the large protection banners.&lt;br /&gt;
-- * image - the padlock image used in both protection banners and small padlock&lt;br /&gt;
--   icons.&lt;br /&gt;
--&lt;br /&gt;
-- The module checks in three separate tables to find a value for each field.&lt;br /&gt;
-- First it checks the banners table, which has values specific to the reason&lt;br /&gt;
-- for the page being protected. Then the module checks the defaultBanners&lt;br /&gt;
-- table, which has values specific to each protection level. Finally, the&lt;br /&gt;
-- module checks the masterBanner table, which holds data for protection&lt;br /&gt;
-- templates to use if no data has been found in the previous two tables.&lt;br /&gt;
--&lt;br /&gt;
-- The values in the banner data can take parameters. These are specified&lt;br /&gt;
-- using ${TEXTLIKETHIS} (a dollar sign preceding a parameter name&lt;br /&gt;
-- enclosed in curly braces).&lt;br /&gt;
--&lt;br /&gt;
--                          Available parameters:&lt;br /&gt;
--&lt;br /&gt;
-- ${CURRENTVERSION} - a link to the page history or the move log, with the&lt;br /&gt;
-- display message &amp;quot;current-version-edit-display&amp;quot; or&lt;br /&gt;
-- &amp;quot;current-version-move-display&amp;quot;.&lt;br /&gt;
--&lt;br /&gt;
-- ${EDITREQUEST} - a link to create an edit request for the current page.&lt;br /&gt;
--&lt;br /&gt;
-- ${EXPIRY} - the protection expiry date in the format DD Month YYYY. If&lt;br /&gt;
-- protection is indefinite or is not set, this is the blank string.&lt;br /&gt;
--&lt;br /&gt;
-- ${EXPLANATIONBLURB} - an explanation blurb, e.g. &amp;quot;Please discuss any changes&lt;br /&gt;
-- on the talk page; you may submit a request to ask an administrator to make&lt;br /&gt;
-- an edit if it is minor or supported by consensus.&amp;quot;&lt;br /&gt;
--&lt;br /&gt;
-- ${IMAGELINK} - a link to set the image to, depending on the protection&lt;br /&gt;
-- action and protection level.&lt;br /&gt;
--&lt;br /&gt;
-- ${INTROBLURB} - the PROTECTIONBLURB parameter, plus the expiry if an expiry&lt;br /&gt;
-- is set. E.g. &amp;quot;Editing of this page by new or unregistered users is currently &lt;br /&gt;
-- disabled until dd Month YYYY.&amp;quot;&lt;br /&gt;
--&lt;br /&gt;
-- ${INTROFRAGMENT} - the same as ${INTROBLURB}, but without final punctuation&lt;br /&gt;
-- so that it can be used in run-on sentences.&lt;br /&gt;
--&lt;br /&gt;
-- ${PAGETYPE} - the type of the page, e.g. &amp;quot;article&amp;quot; or &amp;quot;template&amp;quot;.&lt;br /&gt;
-- Defined in the cfg.pagetypes table.&lt;br /&gt;
--&lt;br /&gt;
-- ${PROTECTIONBLURB} - a blurb explaining the protection level of the page, e.g.&lt;br /&gt;
-- &amp;quot;Editing of this page by new or unregistered users is currently disabled&amp;quot;&lt;br /&gt;
--&lt;br /&gt;
-- ${PROTECTIONDATE} - the protection date, if it has been supplied to the&lt;br /&gt;
-- template.&lt;br /&gt;
--&lt;br /&gt;
-- ${PROTECTIONLEVEL} - the protection level, e.g. &amp;quot;fully protected&amp;quot; or&lt;br /&gt;
-- &amp;quot;semi-protected&amp;quot;.&lt;br /&gt;
--&lt;br /&gt;
-- ${PROTECTIONLOG} - a link to the protection log or the pending changes log,&lt;br /&gt;
-- depending on the protection action.&lt;br /&gt;
--&lt;br /&gt;
-- ${TALKPAGE} - a link to the talk page. If a section is specified, links&lt;br /&gt;
-- straight to that talk page section.&lt;br /&gt;
--&lt;br /&gt;
-- ${TOOLTIPBLURB} - uses the PAGETYPE, PROTECTIONTYPE and EXPIRY parameters to&lt;br /&gt;
-- create a blurb like &amp;quot;This template is semi-protected&amp;quot;, or &amp;quot;This article is&lt;br /&gt;
-- move-protected until DD Month YYYY&amp;quot;.&lt;br /&gt;
--&lt;br /&gt;
-- ${VANDAL} - links for the specified username (or the root page name)&lt;br /&gt;
-- using Module:Vandal-m.&lt;br /&gt;
--&lt;br /&gt;
--                                 Functions&lt;br /&gt;
--&lt;br /&gt;
-- For advanced users, it is possible to use Lua functions instead of strings&lt;br /&gt;
-- in the banner config tables. Using functions gives flexibility that is not&lt;br /&gt;
-- possible just by using parameters. Functions take two arguments, the&lt;br /&gt;
-- protection object and the template arguments, and they must output a string.&lt;br /&gt;
--&lt;br /&gt;
-- For example:&lt;br /&gt;
--&lt;br /&gt;
-- text = function (protectionObj, args)&lt;br /&gt;
--     if protectionObj.level == 'autoconfirmed' then&lt;br /&gt;
--         return 'foo'&lt;br /&gt;
--     else&lt;br /&gt;
--         return 'bar'&lt;br /&gt;
--     end&lt;br /&gt;
-- end&lt;br /&gt;
--&lt;br /&gt;
-- Some protection object properties and methods that may be useful:&lt;br /&gt;
-- protectionObj.action - the protection action&lt;br /&gt;
-- protectionObj.level - the protection level&lt;br /&gt;
-- protectionObj.reason - the protection reason&lt;br /&gt;
-- protectionObj.expiry - the expiry. Nil if unset, the string &amp;quot;indef&amp;quot; if set&lt;br /&gt;
--     to indefinite, and the protection time in unix time if temporary.&lt;br /&gt;
-- protectionObj.protectionDate - the protection date in unix time, or nil if&lt;br /&gt;
--     unspecified.&lt;br /&gt;
-- protectionObj.bannerConfig - the banner config found by the module. Beware&lt;br /&gt;
--     of editing the config field used by the function, as it could create an&lt;br /&gt;
--     infinite loop.&lt;br /&gt;
-- protectionObj:isProtected - returns a boolean showing whether the page is&lt;br /&gt;
--     protected.&lt;br /&gt;
-- protectionObj:isTemporary - returns a boolean showing whether the expiry is&lt;br /&gt;
--     temporary.&lt;br /&gt;
-- protectionObj:isIncorrect - returns a boolean showing whether the protection&lt;br /&gt;
--     template is incorrect.&lt;br /&gt;
--]]&lt;br /&gt;
&lt;br /&gt;
-- The master banner data, used if no values have been found in banners or&lt;br /&gt;
-- defaultBanners.&lt;br /&gt;
masterBanner = {&lt;br /&gt;
	text = '${INTROBLURB}',&lt;br /&gt;
	explanation = '${EXPLANATIONBLURB}',&lt;br /&gt;
	tooltip = '${TOOLTIPBLURB}',&lt;br /&gt;
	link = '${IMAGELINK}',&lt;br /&gt;
	alt = 'Page ${PROTECTIONLEVEL}'&lt;br /&gt;
},&lt;br /&gt;
&lt;br /&gt;
-- The default banner data. This holds banner data for different protection&lt;br /&gt;
-- levels.&lt;br /&gt;
-- *required* - this table needs edit, move, autoreview and upload subtables.&lt;br /&gt;
defaultBanners = {&lt;br /&gt;
	edit = {},&lt;br /&gt;
	move = {},&lt;br /&gt;
	autoreview = {&lt;br /&gt;
		autoconfirmed = {&lt;br /&gt;
			alt = 'Page protected with pending changes level 1',&lt;br /&gt;
			tooltip = 'All edits by unregistered and new users are subject to review',&lt;br /&gt;
			image = 'Padlock-silver-light.svg'&lt;br /&gt;
		},&lt;br /&gt;
		default = {&lt;br /&gt;
			alt = 'Page protected with pending changes level 2',&lt;br /&gt;
			tooltip = 'All edits by users who are not reviewers or administrators are'&lt;br /&gt;
				.. ' subject to review',&lt;br /&gt;
			image = 'Padlock-orange.svg'&lt;br /&gt;
		}&lt;br /&gt;
	},&lt;br /&gt;
	upload = {}&lt;br /&gt;
},&lt;br /&gt;
&lt;br /&gt;
-- The banner data. This holds banner data for different protection reasons.&lt;br /&gt;
-- In fact, the reasons specified in this table control which reasons are&lt;br /&gt;
-- valid inputs to the first positional parameter.&lt;br /&gt;
--&lt;br /&gt;
-- There is also a non-standard &amp;quot;description&amp;quot; field that can be used for items&lt;br /&gt;
-- in this table. This is a description of the protection reason for use in the&lt;br /&gt;
-- module documentation.&lt;br /&gt;
--&lt;br /&gt;
-- *required* - this table needs edit, move, autoreview and upload subtables.&lt;br /&gt;
banners = {&lt;br /&gt;
	edit = {&lt;br /&gt;
		blp = {&lt;br /&gt;
			description = 'For pages protected to promote compliance with the'&lt;br /&gt;
				.. ' [[Wikipedia:Biographies of living persons'&lt;br /&gt;
				.. '|biographies of living persons]] policy',&lt;br /&gt;
			text = '${INTROFRAGMENT} to promote compliance with'&lt;br /&gt;
				.. ' [[Wikipedia:Biographies of living persons'&lt;br /&gt;
				.. &amp;quot;|Wikipedia's&amp;amp;nbsp;policy on&amp;amp;nbsp;the&amp;amp;nbsp;biographies&amp;quot;&lt;br /&gt;
				.. ' of&amp;amp;nbsp;living&amp;amp;nbsp;people]].',&lt;br /&gt;
			tooltip = '${TOOLTIPFRAGMENT} to promote compliance with the policy on'&lt;br /&gt;
				.. ' biographies of living people',&lt;br /&gt;
		},&lt;br /&gt;
		dmca = {&lt;br /&gt;
			description = 'For pages protected by the Wikimedia Foundation'&lt;br /&gt;
				.. ' due to [[Digital Millennium Copyright Act]] takedown requests',&lt;br /&gt;
			explanation = function (protectionObj, args)&lt;br /&gt;
				local ret = 'Pursuant to a rights owner notice under the Digital'&lt;br /&gt;
					.. ' Millennium Copyright Act (DMCA) regarding some content'&lt;br /&gt;
					.. ' in this article, the Wikimedia Foundation acted under'&lt;br /&gt;
					.. ' applicable law and took down and restricted the content'&lt;br /&gt;
					.. ' in question.'&lt;br /&gt;
				if args.notice then&lt;br /&gt;
					ret = ret .. ' A copy of the received notice can be found here: '&lt;br /&gt;
						.. args.notice .. '.'&lt;br /&gt;
				end&lt;br /&gt;
				ret = ret .. ' For more information, including websites discussing'&lt;br /&gt;
					.. ' how to file a counter-notice, please see'&lt;br /&gt;
					.. &amp;quot; [[Wikipedia:Office actions]] and the article's ${TALKPAGE}.&amp;quot;&lt;br /&gt;
					.. &amp;quot;'''Do not remove this template from the article until the&amp;quot;&lt;br /&gt;
					.. &amp;quot; restrictions are withdrawn'''.&amp;quot;&lt;br /&gt;
				return ret&lt;br /&gt;
			end,&lt;br /&gt;
			image = 'Padlock-black.svg',&lt;br /&gt;
		},&lt;br /&gt;
		dispute = {&lt;br /&gt;
			description = 'For pages protected due to editing disputes',&lt;br /&gt;
			text = function (protectionObj, args)&lt;br /&gt;
				-- Find the value of &amp;quot;disputes&amp;quot;.&lt;br /&gt;
				local display = 'disputes'&lt;br /&gt;
				local disputes&lt;br /&gt;
				if args.section then&lt;br /&gt;
					disputes = string.format(&lt;br /&gt;
						'[[%s:%s#%s|%s]]',&lt;br /&gt;
						mw.site.namespaces[protectionObj.title.namespace].talk.name,&lt;br /&gt;
						protectionObj.title.text,&lt;br /&gt;
						args.section,&lt;br /&gt;
						display&lt;br /&gt;
					)&lt;br /&gt;
				else&lt;br /&gt;
					disputes = display&lt;br /&gt;
				end&lt;br /&gt;
&lt;br /&gt;
				-- Make the blurb, depending on the expiry.&lt;br /&gt;
				local msg&lt;br /&gt;
				if type(protectionObj.expiry) == 'number' then&lt;br /&gt;
					msg = '${INTROFRAGMENT} or until editing %s have been resolved.'&lt;br /&gt;
				else&lt;br /&gt;
					msg = '${INTROFRAGMENT} until editing %s have been resolved.'&lt;br /&gt;
				end&lt;br /&gt;
				return string.format(msg, disputes)&lt;br /&gt;
			end,&lt;br /&gt;
			explanation = &amp;quot;This protection is '''not''' an endorsement of the&amp;quot;&lt;br /&gt;
				.. ' ${CURRENTVERSION}. ${EXPLANATIONBLURB}',&lt;br /&gt;
			tooltip = '${TOOLTIPFRAGMENT} due to editing disputes',&lt;br /&gt;
		},&lt;br /&gt;
		ecp = {&lt;br /&gt;
			description = 'For articles in topic areas authorized by'&lt;br /&gt;
				.. ' [[Wikipedia:Arbitration Committee|ArbCom]] or'&lt;br /&gt;
				.. ' meets the criteria for community use',&lt;br /&gt;
			tooltip = 'This ${PAGETYPE} is ${PROTECTIONLEVEL}'&lt;br /&gt;
				.. ' under extended confirmed editing restrictions',&lt;br /&gt;
			alt = 'Extended-protected ${PAGETYPE}',&lt;br /&gt;
		},&lt;br /&gt;
		mainpage = {&lt;br /&gt;
			description = 'For pages protected for being displayed on the [[Main Page]]',&lt;br /&gt;
			text = 'This file is currently'&lt;br /&gt;
				.. ' [[Wikipedia:This page is protected|protected]] from'&lt;br /&gt;
				.. ' editing because it is currently or will soon be displayed'&lt;br /&gt;
				.. ' on the [[Main Page]].',&lt;br /&gt;
			explanation = 'Images on the Main Page are protected due to their high'&lt;br /&gt;
				.. ' visibility. Please discuss any necessary changes on the ${TALKPAGE}.'&lt;br /&gt;
				.. '&amp;lt;br /&amp;gt;&amp;lt;span style=&amp;quot;font-size:90%;&amp;quot;&amp;gt;'&lt;br /&gt;
				.. &amp;quot;'''Administrators:''' Once this image is definitely off the Main Page,&amp;quot;&lt;br /&gt;
				.. ' please unprotect this file, or reduce to semi-protection,'&lt;br /&gt;
				.. ' as appropriate.&amp;lt;/span&amp;gt;',&lt;br /&gt;
		},&lt;br /&gt;
		office = {&lt;br /&gt;
			description = 'For pages protected by the Wikimedia Foundation',&lt;br /&gt;
			text = function (protectionObj, args)&lt;br /&gt;
				local ret = 'This ${PAGETYPE} is currently under the'&lt;br /&gt;
					.. ' scrutiny of the'&lt;br /&gt;
					.. ' [[Wikipedia:Office actions|Wikimedia Foundation Office]]'&lt;br /&gt;
					.. ' and is protected.'&lt;br /&gt;
				if protectionObj.protectionDate then&lt;br /&gt;
					ret = ret .. ' It has been protected since ${PROTECTIONDATE}.'&lt;br /&gt;
				end&lt;br /&gt;
				return ret&lt;br /&gt;
			end,&lt;br /&gt;
			explanation = &amp;quot;If you can edit this page, please discuss all changes and&amp;quot;&lt;br /&gt;
				.. &amp;quot; additions on the ${TALKPAGE} first. '''Do not remove protection from this&amp;quot;&lt;br /&gt;
				.. &amp;quot; page unless you are authorized by the Wikimedia Foundation to do&amp;quot;&lt;br /&gt;
				.. &amp;quot; so.'''&amp;quot;,&lt;br /&gt;
			image = 'Padlock-black.svg',&lt;br /&gt;
		},&lt;br /&gt;
		reset = {&lt;br /&gt;
			description = 'For pages protected by the Wikimedia Foundation and'&lt;br /&gt;
				.. ' &amp;quot;reset&amp;quot; to a bare-bones version',&lt;br /&gt;
 			text = 'This ${PAGETYPE} is currently under the'&lt;br /&gt;
					.. ' scrutiny of the'&lt;br /&gt;
					.. ' [[Wikipedia:Office actions|Wikimedia Foundation Office]]'&lt;br /&gt;
					.. ' and is protected.',&lt;br /&gt;
			explanation = function (protectionObj, args)&lt;br /&gt;
				local ret = ''&lt;br /&gt;
				if protectionObj.protectionDate then&lt;br /&gt;
					ret = ret .. 'On ${PROTECTIONDATE} this ${PAGETYPE} was'&lt;br /&gt;
				else&lt;br /&gt;
					ret = ret .. 'This ${PAGETYPE} has been'&lt;br /&gt;
				end&lt;br /&gt;
				ret = ret .. ' reduced to a'&lt;br /&gt;
				.. ' simplified, &amp;quot;bare bones&amp;quot; version so that it may be completely'&lt;br /&gt;
				.. ' rewritten to ensure it meets the policies of'&lt;br /&gt;
				.. ' [[WP:NPOV|Neutral Point of View]] and [[WP:V|Verifiability]].'&lt;br /&gt;
				.. ' Standard Wikipedia policies will apply to its rewriting—which'&lt;br /&gt;
				.. ' will eventually be open to all editors—and will be strictly'&lt;br /&gt;
				.. ' enforced. The ${PAGETYPE} has been ${PROTECTIONLEVEL} while'&lt;br /&gt;
				.. ' it is being rebuilt.\n\n'&lt;br /&gt;
				.. 'Any insertion of material directly from'&lt;br /&gt;
				.. ' pre-protection revisions of the ${PAGETYPE} will be removed, as'&lt;br /&gt;
				.. ' will any material added to the ${PAGETYPE} that is not properly'&lt;br /&gt;
				.. ' sourced. The associated talk page(s) were also cleared on the'&lt;br /&gt;
				.. &amp;quot; same date.\n\n&amp;quot;&lt;br /&gt;
				.. &amp;quot;If you can edit this page, please discuss all changes and&amp;quot;&lt;br /&gt;
				.. &amp;quot; additions on the ${TALKPAGE} first. '''Do not override&amp;quot;&lt;br /&gt;
				.. &amp;quot; this action, and do not remove protection from this page,&amp;quot;&lt;br /&gt;
				.. &amp;quot; unless you are authorized by the Wikimedia Foundation&amp;quot;&lt;br /&gt;
				.. &amp;quot; to do so. No editor may remove this notice.'''&amp;quot;&lt;br /&gt;
&lt;br /&gt;
				return ret&lt;br /&gt;
			end,&lt;br /&gt;
			image = 'Padlock-black.svg',&lt;br /&gt;
		},&lt;br /&gt;
		sock = {&lt;br /&gt;
			description = 'For pages protected due to'&lt;br /&gt;
				.. ' [[Wikipedia:Sock puppetry|sock puppetry]]',&lt;br /&gt;
			text = '${INTROFRAGMENT} to prevent [[Wikipedia:Sock puppetry|sock puppets]] of'&lt;br /&gt;
				.. ' [[Wikipedia:Blocking policy|blocked]] or'&lt;br /&gt;
				.. ' [[Wikipedia:Banning policy|banned users]]'&lt;br /&gt;
				.. ' from editing it.',&lt;br /&gt;
			tooltip = '${TOOLTIPFRAGMENT} to prevent sock puppets of blocked or banned users from'&lt;br /&gt;
				.. ' editing it',&lt;br /&gt;
		},&lt;br /&gt;
		template = {&lt;br /&gt;
			description = 'For [[Wikipedia:High-risk templates|high-risk]]'&lt;br /&gt;
				.. ' templates and Lua modules',&lt;br /&gt;
			text = 'This is a permanently [[Help:Protection|protected]] ${PAGETYPE},'&lt;br /&gt;
				.. ' as it is [[Wikipedia:High-risk templates|high-risk]].',&lt;br /&gt;
			explanation = 'Please discuss any changes on the ${TALKPAGE}; you may'&lt;br /&gt;
				.. ' ${EDITREQUEST} to ask an'&lt;br /&gt;
				.. ' [[Wikipedia:Administrators|administrator]] or'&lt;br /&gt;
				.. ' [[Wikipedia:Template editor|template editor]] to make an edit if'&lt;br /&gt;
				.. ' it is [[Help:Minor edit#When to mark an edit as a minor edit'&lt;br /&gt;
				.. '|uncontroversial]] or supported by'&lt;br /&gt;
				.. ' [[Wikipedia:Consensus|consensus]]. You can also'&lt;br /&gt;
				.. ' [[Wikipedia:Requests for page protection|request]] that the page be'&lt;br /&gt;
				.. ' unprotected.',&lt;br /&gt;
			tooltip = 'This high-risk ${PAGETYPE} is permanently ${PROTECTIONLEVEL}'&lt;br /&gt;
				.. ' to prevent vandalism',&lt;br /&gt;
			alt = 'Permanently protected ${PAGETYPE}',&lt;br /&gt;
		},&lt;br /&gt;
		usertalk = {&lt;br /&gt;
			description = 'For pages protected against disruptive edits by a'&lt;br /&gt;
				.. ' particular user',&lt;br /&gt;
			text = '${INTROFRAGMENT} to prevent ${VANDAL} from using it to make disruptive edits,'&lt;br /&gt;
				.. ' such as abusing the'&lt;br /&gt;
				.. ' &amp;amp;#123;&amp;amp;#123;[[Template:unblock|unblock]]&amp;amp;#125;&amp;amp;#125; template.',&lt;br /&gt;
			explanation = 'If you cannot edit this user talk page and you need to'&lt;br /&gt;
				.. ' make a change or leave a message, you can'&lt;br /&gt;
				.. ' [[Wikipedia:Requests for page protection'&lt;br /&gt;
				.. '#Current requests for edits to a protected page'&lt;br /&gt;
				.. '|request an edit]],'&lt;br /&gt;
				.. ' [[Wikipedia:Requests for page protection'&lt;br /&gt;
				.. '#Current requests for reduction in protection level'&lt;br /&gt;
				.. '|request unprotection]],'&lt;br /&gt;
				.. ' [[Special:Userlogin|log in]],'&lt;br /&gt;
				.. ' or [[Special:UserLogin/signup|create an account]].',&lt;br /&gt;
		},&lt;br /&gt;
		vandalism = {&lt;br /&gt;
			description = 'For pages protected against'&lt;br /&gt;
				.. ' [[Wikipedia:Vandalism|vandalism]]',&lt;br /&gt;
			text = '${INTROFRAGMENT} due to [[Wikipedia:Vandalism|vandalism]].',&lt;br /&gt;
			explanation = function (protectionObj, args)&lt;br /&gt;
				local ret = ''&lt;br /&gt;
				if protectionObj.level == 'sysop' then&lt;br /&gt;
					ret = ret .. &amp;quot;This protection is '''not''' an endorsement of the&amp;quot;&lt;br /&gt;
						.. ' ${CURRENTVERSION}. '&lt;br /&gt;
				end&lt;br /&gt;
				return ret .. '${EXPLANATIONBLURB}'&lt;br /&gt;
			end,&lt;br /&gt;
			tooltip = '${TOOLTIPFRAGMENT} due to vandalism',&lt;br /&gt;
		}&lt;br /&gt;
	},&lt;br /&gt;
	move = {&lt;br /&gt;
		dispute = {&lt;br /&gt;
			description = 'For pages protected against page moves due to'&lt;br /&gt;
				.. ' disputes over the page title',&lt;br /&gt;
			explanation = &amp;quot;This protection is '''not''' an endorsement of the&amp;quot;&lt;br /&gt;
				.. ' ${CURRENTVERSION}. ${EXPLANATIONBLURB}',&lt;br /&gt;
			image = 'Padlock-olive.svg'&lt;br /&gt;
		},&lt;br /&gt;
		vandalism = {&lt;br /&gt;
			description = 'For pages protected against'&lt;br /&gt;
				.. ' [[Wikipedia:Vandalism#Page-move vandalism'&lt;br /&gt;
				.. ' |page-move vandalism]]'&lt;br /&gt;
		}&lt;br /&gt;
	},&lt;br /&gt;
	autoreview = {},&lt;br /&gt;
	upload = {}&lt;br /&gt;
},&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
--&lt;br /&gt;
--                            GENERAL DATA TABLES&lt;br /&gt;
--&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
-- Protection blurbs&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
-- This table produces the protection blurbs available with the&lt;br /&gt;
-- ${PROTECTIONBLURB} parameter. It is sorted by protection action and&lt;br /&gt;
-- protection level, and is checked by the module in the following order:&lt;br /&gt;
-- 1. page's protection action, page's protection level&lt;br /&gt;
-- 2. page's protection action, default protection level&lt;br /&gt;
-- 3. &amp;quot;edit&amp;quot; protection action, default protection level&lt;br /&gt;
--&lt;br /&gt;
-- It is possible to use banner parameters inside this table.&lt;br /&gt;
-- *required* - this table needs edit, move, autoreview and upload subtables.&lt;br /&gt;
protectionBlurbs = {&lt;br /&gt;
	edit = {&lt;br /&gt;
		default = 'This ${PAGETYPE} is currently [[Help:Protection|'&lt;br /&gt;
			.. 'protected]] from editing',&lt;br /&gt;
		autoconfirmed = 'Editing of this ${PAGETYPE} by [[Wikipedia:User access'&lt;br /&gt;
			.. ' levels#New users|new]] or [[Wikipedia:User access levels#Unregistered'&lt;br /&gt;
			.. ' users|unregistered]] users is currently [[Help:Protection|disabled]]',&lt;br /&gt;
		extendedconfirmed = 'This ${PAGETYPE} is ${PROTECTIONLEVEL} as a result of'&lt;br /&gt;
			.. ' [[Wikipedia:Arbitration Committee|ArbCom]] enforcement or meets the'&lt;br /&gt;
			.. ' [[Wikipedia:Protection policy#extended|criteria for community use]]',&lt;br /&gt;
	},&lt;br /&gt;
	move = {&lt;br /&gt;
		default = 'This ${PAGETYPE} is currently [[Help:Protection|protected]]'&lt;br /&gt;
			.. ' from [[Help:Moving a page|page moves]]'&lt;br /&gt;
	},&lt;br /&gt;
	autoreview = {&lt;br /&gt;
		autoconfirmed = 'All edits made to this ${PAGETYPE} by'&lt;br /&gt;
			.. ' [[Wikipedia:User access levels#New users|new]] or'&lt;br /&gt;
			.. ' [[Wikipedia:User access levels#Unregistered users|unregistered]]'&lt;br /&gt;
			.. ' users are currently'&lt;br /&gt;
			.. ' [[Wikipedia:Pending changes|subject to review]]',&lt;br /&gt;
		default = 'All edits made to this ${PAGETYPE} by users who are not'&lt;br /&gt;
			.. ' [[Wikipedia:Reviewing|reviewers]] or'&lt;br /&gt;
			.. ' [[Wikipedia:Administrators|administrators]] are currently'&lt;br /&gt;
			.. ' [[Wikipedia:Pending changes|subject to review]]'&lt;br /&gt;
	},&lt;br /&gt;
	upload = {&lt;br /&gt;
		default = 'Uploading new versions of this ${PAGETYPE} is currently disabled'&lt;br /&gt;
	}&lt;br /&gt;
},&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
-- Explanation blurbs&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
-- This table produces the explanation blurbs available with the&lt;br /&gt;
-- ${EXPLANATIONBLURB} parameter. It is sorted by protection action,&lt;br /&gt;
-- protection level, and whether the page is a talk page or not. If the page is&lt;br /&gt;
-- a talk page it will have a talk key of &amp;quot;talk&amp;quot;; otherwise it will have a talk&lt;br /&gt;
-- key of &amp;quot;subject&amp;quot;. The table is checked in the following order:&lt;br /&gt;
-- 1. page's protection action, page's protection level, page's talk key&lt;br /&gt;
-- 2. page's protection action, page's protection level, default talk key&lt;br /&gt;
-- 3. page's protection action, default protection level, page's talk key&lt;br /&gt;
-- 4. page's protection action, default protection level, default talk key&lt;br /&gt;
--&lt;br /&gt;
-- It is possible to use banner parameters inside this table.&lt;br /&gt;
-- *required* - this table needs edit, move, autoreview and upload subtables.&lt;br /&gt;
explanationBlurbs = {&lt;br /&gt;
	edit = {&lt;br /&gt;
		autoconfirmed = {&lt;br /&gt;
			subject = 'See the [[Wikipedia:Protection policy|'&lt;br /&gt;
				.. 'protection policy]] and ${PROTECTIONLOG} for more details. If you'&lt;br /&gt;
				.. ' cannot edit this ${PAGETYPE} and you wish to make a change, you can'&lt;br /&gt;
				.. ' ${EDITREQUEST}, discuss changes on the ${TALKPAGE},'&lt;br /&gt;
				.. ' [[Wikipedia:Requests for page protection'&lt;br /&gt;
				.. '#Current requests for reduction in protection level'&lt;br /&gt;
				.. '|request unprotection]], [[Special:Userlogin|log in]], or'&lt;br /&gt;
				.. ' [[Special:UserLogin/signup|create an account]].',&lt;br /&gt;
			default = 'See the [[Wikipedia:Protection policy|'&lt;br /&gt;
				.. 'protection policy]] and ${PROTECTIONLOG} for more details. If you'&lt;br /&gt;
				.. ' cannot edit this ${PAGETYPE} and you wish to make a change, you can'&lt;br /&gt;
				.. ' [[Wikipedia:Requests for page protection'&lt;br /&gt;
				.. '#Current requests for reduction in protection level'&lt;br /&gt;
				.. '|request unprotection]], [[Special:Userlogin|log in]], or'&lt;br /&gt;
				.. ' [[Special:UserLogin/signup|create an account]].',&lt;br /&gt;
		},&lt;br /&gt;
		extendedconfirmed = {&lt;br /&gt;
			default = 'Extended confirmed protection prevents edits from all IP editors'&lt;br /&gt;
				.. ' and registered users with fewer than 30 days tenure and 500 edits.'&lt;br /&gt;
				.. ' The [[Wikipedia:Protection policy#extended|policy on community use]]'&lt;br /&gt;
				.. ' specifies that extended confirmed protection can be applied to combat'&lt;br /&gt;
				.. ' disruption, given that semi-protection has proven to be ineffective.'&lt;br /&gt;
				.. ' Please discuss any changes on the ${TALKPAGE}; you may'&lt;br /&gt;
				.. ' ${EDITREQUEST} to ask for unconversial changes supported by'&lt;br /&gt;
				.. ' [[Wikipedia:Consensus|consensus]].'&lt;br /&gt;
		},&lt;br /&gt;
		default = {&lt;br /&gt;
			subject = 'See the [[Wikipedia:Protection policy|'&lt;br /&gt;
				.. 'protection policy]] and ${PROTECTIONLOG} for more details.'&lt;br /&gt;
				.. ' Please discuss any changes on the ${TALKPAGE}; you'&lt;br /&gt;
				.. ' may ${EDITREQUEST} to ask an'&lt;br /&gt;
				.. ' [[Wikipedia:Administrators|administrator]] to make an edit if it'&lt;br /&gt;
				.. ' is [[Help:Minor edit#When to mark an edit as a minor edit'&lt;br /&gt;
				.. '|uncontroversial]] or supported by [[Wikipedia:Consensus'&lt;br /&gt;
				.. '|consensus]]. You may also [[Wikipedia:Requests for'&lt;br /&gt;
				.. ' page protection#Current requests for reduction in protection level'&lt;br /&gt;
				.. '|request]] that this page be unprotected.',&lt;br /&gt;
			default = 'See the [[Wikipedia:Protection policy|'&lt;br /&gt;
				.. 'protection policy]] and ${PROTECTIONLOG} for more details.'&lt;br /&gt;
				.. ' You may [[Wikipedia:Requests for page'&lt;br /&gt;
				.. ' protection#Current requests for edits to a protected page|request an'&lt;br /&gt;
				.. ' edit]] to this page, or [[Wikipedia:Requests for'&lt;br /&gt;
				.. ' page protection#Current requests for reduction in protection level'&lt;br /&gt;
				.. '|ask]] for it to be unprotected.'&lt;br /&gt;
		}&lt;br /&gt;
	},&lt;br /&gt;
	move = {&lt;br /&gt;
		default = {&lt;br /&gt;
			subject = 'See the [[Wikipedia:Protection policy|'&lt;br /&gt;
				.. 'protection policy]] and ${PROTECTIONLOG} for more details.'&lt;br /&gt;
				.. ' The page may still be edited but cannot be moved'&lt;br /&gt;
				.. ' until unprotected. Please discuss any suggested moves on the'&lt;br /&gt;
				.. ' ${TALKPAGE} or at [[Wikipedia:Requested moves]]. You can also'&lt;br /&gt;
				.. ' [[Wikipedia:Requests for page protection|request]] that the page be'&lt;br /&gt;
				.. ' unprotected.',&lt;br /&gt;
			default = 'See the [[Wikipedia:Protection policy|'&lt;br /&gt;
				.. 'protection policy]] and ${PROTECTIONLOG} for more details.'&lt;br /&gt;
				.. ' The page may still be edited but cannot be moved'&lt;br /&gt;
				.. ' until unprotected. Please discuss any suggested moves at'&lt;br /&gt;
				.. ' [[Wikipedia:Requested moves]]. You can also'&lt;br /&gt;
				.. ' [[Wikipedia:Requests for page protection|request]] that the page be'&lt;br /&gt;
				.. ' unprotected.'&lt;br /&gt;
		}&lt;br /&gt;
	},&lt;br /&gt;
	autoreview = {&lt;br /&gt;
		default = {&lt;br /&gt;
			reviewer = 'See the [[Wikipedia:Protection policy|'&lt;br /&gt;
				.. 'protection policy]] and ${PROTECTIONLOG} for more details.'&lt;br /&gt;
				.. ' Edits to this ${PAGETYPE} will not be visible to readers'&lt;br /&gt;
				.. ' until they are accepted by a reviewer or an administrator.'&lt;br /&gt;
				.. ' To avoid the need for your edits to be reviewed, you may'&lt;br /&gt;
				.. ' [[Wikipedia:Requests for page protection'&lt;br /&gt;
				.. '#Current requests for reduction in protection level'&lt;br /&gt;
				.. '|request unprotection]]. Experienced editors may also'&lt;br /&gt;
				.. ' request the [[Wikipedia:Reviewing|reviewer user right]].',&lt;br /&gt;
			default = 'See the [[Wikipedia:Protection policy|'&lt;br /&gt;
				.. 'protection policy]] and ${PROTECTIONLOG} for more details.'&lt;br /&gt;
				.. ' Edits to this ${PAGETYPE} by new and unregistered users'&lt;br /&gt;
				.. ' will not be visible to readers until they are accepted by'&lt;br /&gt;
				.. ' a reviewer. To avoid the need for your edits to be'&lt;br /&gt;
				.. ' reviewed, you may'&lt;br /&gt;
				.. ' [[Wikipedia:Requests for page protection'&lt;br /&gt;
				.. '#Current requests for reduction in protection level'&lt;br /&gt;
				.. '|request unprotection]], [[Special:Userlogin|log in]], or'&lt;br /&gt;
				.. ' [[Special:UserLogin/signup|create an account]].'&lt;br /&gt;
		},&lt;br /&gt;
	},&lt;br /&gt;
	upload = {&lt;br /&gt;
		default = {&lt;br /&gt;
			default = 'See the [[Wikipedia:Protection policy|'&lt;br /&gt;
				.. 'protection policy]] and ${PROTECTIONLOG} for more details.'&lt;br /&gt;
				.. ' The page may still be edited but new versions of the file'&lt;br /&gt;
				.. ' cannot be uploaded until it is unprotected. You can'&lt;br /&gt;
				.. ' request that a new version be uploaded by using a'&lt;br /&gt;
				.. ' [[Wikipedia:Edit requests|protected edit request]], or you'&lt;br /&gt;
				.. ' can  [[Wikipedia:Requests for page protection|request]]'&lt;br /&gt;
				.. ' that the file be unprotected.'&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
},&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
-- Protection levels&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
-- This table provides the data for the ${PROTECTIONLEVEL} parameter, which&lt;br /&gt;
-- produces a short label for different protection levels. It is sorted by&lt;br /&gt;
-- protection action and protection level, and is checked in the following&lt;br /&gt;
-- order:&lt;br /&gt;
-- 1. page's protection action, page's protection level&lt;br /&gt;
-- 2. page's protection action, default protection level&lt;br /&gt;
-- 3. &amp;quot;edit&amp;quot; protection action, default protection level&lt;br /&gt;
--&lt;br /&gt;
-- It is possible to use banner parameters inside this table.&lt;br /&gt;
-- *required* - this table needs edit, move, autoreview and upload subtables.&lt;br /&gt;
protectionLevels = {&lt;br /&gt;
	edit = {&lt;br /&gt;
		default = 'protected',&lt;br /&gt;
		templateeditor = 'template-protected',&lt;br /&gt;
		extendedconfirmed = 'extended-protected',&lt;br /&gt;
		autoconfirmed = 'semi-protected',&lt;br /&gt;
	},&lt;br /&gt;
	move = {&lt;br /&gt;
		default = 'move-protected'&lt;br /&gt;
	},&lt;br /&gt;
	autoreview = {&lt;br /&gt;
	},&lt;br /&gt;
	upload = {&lt;br /&gt;
		default = 'upload-protected'&lt;br /&gt;
	}&lt;br /&gt;
},&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
-- Images&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
-- This table lists different padlock images for each protection action and&lt;br /&gt;
-- protection level. It is used if an image is not specified in any of the&lt;br /&gt;
-- banner data tables, and if the page does not satisfy the conditions for using&lt;br /&gt;
-- the ['image-filename-indef'] image. It is checked in the following order:&lt;br /&gt;
-- 1. page's protection action, page's protection level&lt;br /&gt;
-- 2. page's protection action, default protection level&lt;br /&gt;
images = {&lt;br /&gt;
	edit = {&lt;br /&gt;
		default = 'Padlock.svg',&lt;br /&gt;
		templateeditor = 'Padlock-pink.svg',&lt;br /&gt;
		extendedconfirmed = 'Padlock-blue.svg',&lt;br /&gt;
		autoconfirmed = 'Padlock-silver.svg'&lt;br /&gt;
	},&lt;br /&gt;
	move = {&lt;br /&gt;
		default = 'Padlock-olive.svg',&lt;br /&gt;
	},&lt;br /&gt;
	autoreview = {&lt;br /&gt;
		autoconfirmed = 'Padlock-silver-light.svg',&lt;br /&gt;
		default = 'Padlock-orange.svg'&lt;br /&gt;
	},&lt;br /&gt;
	upload = {&lt;br /&gt;
		default = 'Padlock-purple.svg'&lt;br /&gt;
	}&lt;br /&gt;
},&lt;br /&gt;
&lt;br /&gt;
-- Pages with a reason specified in this table will show the special &amp;quot;indef&amp;quot;&lt;br /&gt;
-- padlock, defined in the 'image-filename-indef' message, if no expiry is set.&lt;br /&gt;
indefImageReasons = {&lt;br /&gt;
	template = true&lt;br /&gt;
},&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
-- Image links&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
-- This table provides the data for the ${IMAGELINK} parameter, which gets&lt;br /&gt;
-- the image link for small padlock icons based on the page's protection action&lt;br /&gt;
-- and protection level. It is checked in the following order:&lt;br /&gt;
-- 1. page's protection action, page's protection level&lt;br /&gt;
-- 2. page's protection action, default protection level&lt;br /&gt;
-- 3. &amp;quot;edit&amp;quot; protection action, default protection level&lt;br /&gt;
--&lt;br /&gt;
-- It is possible to use banner parameters inside this table.&lt;br /&gt;
-- *required* - this table needs edit, move, autoreview and upload subtables.&lt;br /&gt;
imageLinks = {&lt;br /&gt;
	edit = {&lt;br /&gt;
		default = 'Wikipedia:Protection policy#full',&lt;br /&gt;
		templateeditor = 'Wikipedia:Protection policy#template',&lt;br /&gt;
		extendedconfirmed = 'Wikipedia:Protection policy#extended',&lt;br /&gt;
		autoconfirmed = 'Wikipedia:Protection policy#semi'&lt;br /&gt;
	},&lt;br /&gt;
	move = {&lt;br /&gt;
		default = 'Wikipedia:Protection policy#move'&lt;br /&gt;
	},&lt;br /&gt;
	autoreview = {&lt;br /&gt;
		autoconfirmed = 'Wikipedia:Protection policy#pc1',&lt;br /&gt;
		reviewer = 'Wikipedia:Protection policy#pc2'&lt;br /&gt;
	},&lt;br /&gt;
	upload = {&lt;br /&gt;
		default = 'Wikipedia:Protection policy#upload'&lt;br /&gt;
	}&lt;br /&gt;
},&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
-- Padlock indicator names&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
-- This table provides the &amp;quot;name&amp;quot; attribute for the &amp;lt;indicator&amp;gt; extension tag&lt;br /&gt;
-- with which small padlock icons are generated. All indicator tags on a page&lt;br /&gt;
-- are displayed in alphabetical order based on this attribute, and with&lt;br /&gt;
-- indicator tags with duplicate names, the last tag on the page wins.&lt;br /&gt;
-- The attribute is chosen based on the protection action; table keys must be a&lt;br /&gt;
-- protection action name or the string &amp;quot;default&amp;quot;.&lt;br /&gt;
padlockIndicatorNames = {&lt;br /&gt;
	autoreview = 'pp-autoreview',&lt;br /&gt;
	default = 'pp-default'&lt;br /&gt;
},&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
-- Protection categories&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
--[[&lt;br /&gt;
-- The protection categories are stored in the protectionCategories table.&lt;br /&gt;
-- Keys to this table are made up of the following strings:&lt;br /&gt;
--&lt;br /&gt;
-- 1. the expiry date&lt;br /&gt;
-- 2. the namespace&lt;br /&gt;
-- 3. the protection reason (e.g. &amp;quot;dispute&amp;quot; or &amp;quot;vandalism&amp;quot;)&lt;br /&gt;
-- 4. the protection level (e.g. &amp;quot;sysop&amp;quot; or &amp;quot;autoconfirmed&amp;quot;)&lt;br /&gt;
-- 5. the action (e.g. &amp;quot;edit&amp;quot; or &amp;quot;move&amp;quot;)&lt;br /&gt;
-- &lt;br /&gt;
-- When the module looks up a category in the table, first it will will check to&lt;br /&gt;
-- see a key exists that corresponds to all five parameters. For example, a&lt;br /&gt;
-- user page semi-protected from vandalism for two weeks would have the key&lt;br /&gt;
-- &amp;quot;temp-user-vandalism-autoconfirmed-edit&amp;quot;. If no match is found, the module&lt;br /&gt;
-- changes the first part of the key to &amp;quot;all&amp;quot; and checks the table again. It&lt;br /&gt;
-- keeps checking increasingly generic key combinations until it finds the&lt;br /&gt;
-- field, or until it reaches the key &amp;quot;all-all-all-all-all&amp;quot;.&lt;br /&gt;
--&lt;br /&gt;
-- The module uses a binary matrix to determine the order in which to search.&lt;br /&gt;
-- This is best demonstrated by a table. In this table, the &amp;quot;0&amp;quot; values&lt;br /&gt;
-- represent &amp;quot;all&amp;quot;, and the &amp;quot;1&amp;quot; values represent the original data (e.g.&lt;br /&gt;
-- &amp;quot;indef&amp;quot; or &amp;quot;file&amp;quot; or &amp;quot;vandalism&amp;quot;).&lt;br /&gt;
--&lt;br /&gt;
--        expiry    namespace reason   level     action&lt;br /&gt;
-- order&lt;br /&gt;
-- 1      1         1         1        1         1&lt;br /&gt;
-- 2      0         1         1        1         1&lt;br /&gt;
-- 3      1         0         1        1         1&lt;br /&gt;
-- 4      0         0         1        1         1&lt;br /&gt;
-- 5      1         1         0        1         1&lt;br /&gt;
-- 6      0         1         0        1         1&lt;br /&gt;
-- 7      1         0         0        1         1&lt;br /&gt;
-- 8      0         0         0        1         1&lt;br /&gt;
-- 9      1         1         1        0         1&lt;br /&gt;
-- 10     0         1         1        0         1&lt;br /&gt;
-- 11     1         0         1        0         1&lt;br /&gt;
-- 12     0         0         1        0         1&lt;br /&gt;
-- 13     1         1         0        0         1&lt;br /&gt;
-- 14     0         1         0        0         1&lt;br /&gt;
-- 15     1         0         0        0         1&lt;br /&gt;
-- 16     0         0         0        0         1&lt;br /&gt;
-- 17     1         1         1        1         0&lt;br /&gt;
-- 18     0         1         1        1         0&lt;br /&gt;
-- 19     1         0         1        1         0&lt;br /&gt;
-- 20     0         0         1        1         0&lt;br /&gt;
-- 21     1         1         0        1         0&lt;br /&gt;
-- 22     0         1         0        1         0&lt;br /&gt;
-- 23     1         0         0        1         0&lt;br /&gt;
-- 24     0         0         0        1         0&lt;br /&gt;
-- 25     1         1         1        0         0&lt;br /&gt;
-- 26     0         1         1        0         0&lt;br /&gt;
-- 27     1         0         1        0         0&lt;br /&gt;
-- 28     0         0         1        0         0&lt;br /&gt;
-- 29     1         1         0        0         0&lt;br /&gt;
-- 30     0         1         0        0         0&lt;br /&gt;
-- 31     1         0         0        0         0&lt;br /&gt;
-- 32     0         0         0        0         0&lt;br /&gt;
--&lt;br /&gt;
-- In this scheme the action has the highest priority, as it is the last&lt;br /&gt;
-- to change, and the expiry has the least priority, as it changes the most.&lt;br /&gt;
-- The priorities of the expiry, the protection level and the action are&lt;br /&gt;
-- fixed, but the priorities of the reason and the namespace can be swapped&lt;br /&gt;
-- through the use of the cfg.bannerDataNamespaceHasPriority table.&lt;br /&gt;
--]]&lt;br /&gt;
&lt;br /&gt;
-- If the reason specified to the template is listed in this table,&lt;br /&gt;
-- namespace data will take priority over reason data in the protectionCategories&lt;br /&gt;
-- table.&lt;br /&gt;
reasonsWithNamespacePriority = {&lt;br /&gt;
	vandalism = true,&lt;br /&gt;
},&lt;br /&gt;
&lt;br /&gt;
-- The string to use as a namespace key for the protectionCategories table for each&lt;br /&gt;
-- namespace number.&lt;br /&gt;
categoryNamespaceKeys = {&lt;br /&gt;
	[  2] = 'user',&lt;br /&gt;
	[  3] = 'user',&lt;br /&gt;
	[  4] = 'project',&lt;br /&gt;
	[  6] = 'file',&lt;br /&gt;
	[  8] = 'mediawiki',&lt;br /&gt;
	[ 10] = 'template',&lt;br /&gt;
	[ 12] = 'project',&lt;br /&gt;
	[ 14] = 'category',&lt;br /&gt;
	[100] = 'portal',&lt;br /&gt;
	[828] = 'module',&lt;br /&gt;
},&lt;br /&gt;
&lt;br /&gt;
protectionCategories = {&lt;br /&gt;
	['all|all|all|all|all']                  = 'Wikipedia protected pages',&lt;br /&gt;
	['all|all|office|all|all']               = 'Wikipedia Office-protected pages',&lt;br /&gt;
	['all|all|reset|all|all']                = 'Wikipedia Office-protected pages',&lt;br /&gt;
	['all|all|dmca|all|all']                 = 'Wikipedia Office-protected pages',&lt;br /&gt;
	['all|all|mainpage|all|all']             = 'Wikipedia fully-protected main page files',&lt;br /&gt;
	['all|all|all|extendedconfirmed|all']    = 'Wikipedia pages under 30-500 editing restriction',&lt;br /&gt;
	['all|all|ecp|extendedconfirmed|all']    = 'Wikipedia pages under 30-500 editing restriction',&lt;br /&gt;
	['all|template|all|all|edit']            = 'Wikipedia fully-protected templates',&lt;br /&gt;
	['all|all|all|autoconfirmed|edit']       = 'Wikipedia semi-protected pages',&lt;br /&gt;
	['indef|all|all|autoconfirmed|edit']     = 'Wikipedia indefinitely semi-protected pages',&lt;br /&gt;
	['all|all|blp|autoconfirmed|edit']       = 'Wikipedia indefinitely semi-protected biographies of living people',&lt;br /&gt;
	['temp|all|blp|autoconfirmed|edit']      = 'Wikipedia temporarily semi-protected biographies of living people',&lt;br /&gt;
	['all|all|dispute|autoconfirmed|edit']   = 'Wikipedia pages semi-protected due to dispute',&lt;br /&gt;
	['all|all|sock|autoconfirmed|edit']      = 'Wikipedia pages semi-protected from banned users',&lt;br /&gt;
	['all|all|vandalism|autoconfirmed|edit'] = 'Wikipedia pages semi-protected against vandalism',&lt;br /&gt;
	['all|category|all|autoconfirmed|edit']  = 'Wikipedia semi-protected categories',&lt;br /&gt;
	['all|file|all|autoconfirmed|edit']      = 'Wikipedia semi-protected files',&lt;br /&gt;
	['all|portal|all|autoconfirmed|edit']    = 'Wikipedia semi-protected portals',&lt;br /&gt;
	['all|project|all|autoconfirmed|edit']   = 'Wikipedia semi-protected project pages',&lt;br /&gt;
	['all|talk|all|autoconfirmed|edit']      = 'Wikipedia semi-protected talk pages',&lt;br /&gt;
	['all|template|all|autoconfirmed|edit']  = 'Wikipedia semi-protected templates',&lt;br /&gt;
	['all|user|all|autoconfirmed|edit']      = 'Wikipedia semi-protected user and user talk pages',&lt;br /&gt;
	['all|template|all|templateeditor|edit'] = 'Wikipedia template-protected templates',&lt;br /&gt;
	['all|all|blp|sysop|edit']               = 'Wikipedia indefinitely protected biographies of living people',&lt;br /&gt;
	['temp|all|blp|sysop|edit']              = 'Wikipedia temporarily protected biographies of living people',&lt;br /&gt;
	['all|all|dispute|sysop|edit']           = 'Wikipedia pages protected due to dispute',&lt;br /&gt;
	['all|all|sock|sysop|edit']              = 'Wikipedia pages protected from banned users',&lt;br /&gt;
	['all|all|vandalism|sysop|edit']         = 'Wikipedia pages protected against vandalism',&lt;br /&gt;
	['all|category|all|sysop|edit']          = 'Wikipedia protected categories',&lt;br /&gt;
	['all|file|all|sysop|edit']              = 'Wikipedia fully-protected files',&lt;br /&gt;
	['all|project|all|sysop|edit']           = 'Wikipedia fully-protected project pages',&lt;br /&gt;
	['all|talk|all|sysop|edit']              = 'Wikipedia fully-protected talk pages',&lt;br /&gt;
	['all|template|all|sysop|edit']          = 'Wikipedia fully-protected templates',&lt;br /&gt;
	['all|user|all|sysop|edit']              = 'Wikipedia protected user and user talk pages',&lt;br /&gt;
	['all|module|all|all|edit']              = 'Wikipedia fully-protected modules',&lt;br /&gt;
	['all|module|all|templateeditor|edit']   = 'Wikipedia template-protected modules',&lt;br /&gt;
	['all|module|all|autoconfirmed|edit']    = 'Wikipedia semi-protected modules',&lt;br /&gt;
	['all|all|all|sysop|move']               = 'Wikipedia move-protected pages',&lt;br /&gt;
	['indef|all|all|sysop|move']             = 'Wikipedia indefinitely move-protected pages',&lt;br /&gt;
	['all|all|dispute|sysop|move']           = 'Wikipedia pages move-protected due to dispute',&lt;br /&gt;
	['all|all|vandalism|sysop|move']         = 'Wikipedia pages move-protected due to vandalism',&lt;br /&gt;
	['all|portal|all|sysop|move']            = 'Wikipedia move-protected portals',&lt;br /&gt;
	['all|portal|all|sysop|move']            = 'Wikipedia move-protected portals',&lt;br /&gt;
	['all|project|all|sysop|move']           = 'Wikipedia move-protected project pages',&lt;br /&gt;
	['all|talk|all|sysop|move']              = 'Wikipedia move-protected talk pages',&lt;br /&gt;
	['all|template|all|sysop|move']          = 'Wikipedia move-protected templates',&lt;br /&gt;
	['all|user|all|sysop|move']              = 'Wikipedia move-protected user and user talk pages',&lt;br /&gt;
	['all|all|all|autoconfirmed|autoreview'] = 'Wikipedia pending changes protected pages (level 1)',&lt;br /&gt;
	['all|all|all|reviewer|autoreview']      = 'Wikipedia pending changes protected pages (level 2)',&lt;br /&gt;
	['all|file|all|all|upload']              = 'Wikipedia upload-protected files',&lt;br /&gt;
},&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
-- Expiry category config&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
-- This table configures the expiry category behaviour for each protection&lt;br /&gt;
-- action.&lt;br /&gt;
-- * If set to true, setting that action will always categorise the page if&lt;br /&gt;
--   an expiry parameter is not set.&lt;br /&gt;
-- * If set to false, setting that action will never categorise the page.&lt;br /&gt;
-- * If set to nil, the module will categorise the page if:&lt;br /&gt;
--   1) an expiry parameter is not set, and&lt;br /&gt;
--   2) a reason is provided, and&lt;br /&gt;
--   3) the specified reason is not blacklisted in the reasonsWithoutExpiryCheck&lt;br /&gt;
--      table.&lt;br /&gt;
&lt;br /&gt;
expiryCheckActions = {&lt;br /&gt;
	edit = nil,&lt;br /&gt;
	move = false,&lt;br /&gt;
	autoreview = true,&lt;br /&gt;
	upload = false&lt;br /&gt;
},&lt;br /&gt;
&lt;br /&gt;
reasonsWithoutExpiryCheck = {&lt;br /&gt;
	blp = true,&lt;br /&gt;
	template = true,&lt;br /&gt;
},&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
-- Pagetypes&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
-- This table produces the page types available with the ${PAGETYPE} parameter.&lt;br /&gt;
-- Keys are namespace numbers, or the string &amp;quot;default&amp;quot; for the default value.&lt;br /&gt;
pagetypes = {&lt;br /&gt;
	[0] = 'article',&lt;br /&gt;
	[6] = 'file',&lt;br /&gt;
	[10] = 'template',&lt;br /&gt;
	[14] = 'category',&lt;br /&gt;
	[828] = 'module',&lt;br /&gt;
	default = 'page'&lt;br /&gt;
},&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
-- Strings marking indefinite protection&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
-- This table contains values passed to the expiry parameter that mean the page&lt;br /&gt;
-- is protected indefinitely.&lt;br /&gt;
indefStrings = {&lt;br /&gt;
	['indef'] = true,&lt;br /&gt;
	['indefinite'] = true,&lt;br /&gt;
	['indefinitely'] = true,&lt;br /&gt;
	['infinite'] = true,&lt;br /&gt;
},&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
-- Group hierarchy&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
-- This table maps each group to all groups that have a superset of the original&lt;br /&gt;
-- group's page editing permissions.&lt;br /&gt;
hierarchy = {&lt;br /&gt;
	sysop = {},&lt;br /&gt;
	reviewer = {'sysop'},&lt;br /&gt;
	filemover = {'sysop'},&lt;br /&gt;
	templateeditor = {'sysop'},&lt;br /&gt;
	extendedconfirmed = {'sysop'},&lt;br /&gt;
	autoconfirmed = {'reviewer', 'filemover', 'templateeditor', 'extendedconfirmed'},&lt;br /&gt;
	user = {'autoconfirmed'},&lt;br /&gt;
	['*'] = {'user'}&lt;br /&gt;
},&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
-- Wrapper templates and their default arguments&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
-- This table contains wrapper templates used with the module, and their&lt;br /&gt;
-- default arguments. Templates specified in this table should contain the&lt;br /&gt;
-- following invocation, and no other template content:&lt;br /&gt;
--&lt;br /&gt;
-- {{#invoke:Protection banner|main}}&lt;br /&gt;
--&lt;br /&gt;
-- If other content is desired, it can be added between&lt;br /&gt;
-- &amp;lt;noinclude&amp;gt;...&amp;lt;/noinclude&amp;gt; tags.&lt;br /&gt;
--&lt;br /&gt;
-- When a user calls one of these wrapper templates, they will use the&lt;br /&gt;
-- default arguments automatically. However, users can override any of the&lt;br /&gt;
-- arguments.&lt;br /&gt;
wrappers = {&lt;br /&gt;
	['Template:Pp']                         = {},&lt;br /&gt;
	['Template:Pp-30-500']                  = {'ecp'},&lt;br /&gt;
	['Template:Pp-blp']                     = {'blp'},&lt;br /&gt;
	-- we don't need Template:Pp-create&lt;br /&gt;
	['Template:Pp-dispute']                 = {'dispute'},&lt;br /&gt;
	['Template:Pp-main-page']               = {'mainpage'},&lt;br /&gt;
	['Template:Pp-move']                    = {action = 'move'},&lt;br /&gt;
	['Template:Pp-move-dispute']            = {'dispute', action = 'move'},&lt;br /&gt;
	-- we don't need Template:Pp-move-indef&lt;br /&gt;
	['Template:Pp-move-vandalism']          = {'vandalism', action = 'move'},&lt;br /&gt;
	['Template:Pp-office']                  = {'office'},&lt;br /&gt;
	['Template:Pp-office-dmca']             = {'dmca'},&lt;br /&gt;
	['Template:Pp-pc1']                     = {action = 'autoreview', small = true},&lt;br /&gt;
	['Template:Pp-pc2']                     = {action = 'autoreview', small = true},&lt;br /&gt;
	['Template:Pp-reset']                   = {'reset'},&lt;br /&gt;
	['Template:Pp-semi-indef']              = {expiry = 'indef', small = true},&lt;br /&gt;
	['Template:Pp-sock']                    = {'sock'},&lt;br /&gt;
	['Template:Pp-template']                = {'template', small = true},&lt;br /&gt;
	['Template:Pp-upload']                  = {action = 'upload'},&lt;br /&gt;
	['Template:Pp-usertalk']                = {'usertalk'},&lt;br /&gt;
	['Template:Pp-vandalism']               = {'vandalism'},&lt;br /&gt;
},&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
-- &lt;br /&gt;
--                                 MESSAGES&lt;br /&gt;
-- &lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
msg = {&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
-- Intro blurb and intro fragment&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
-- These messages specify what is produced by the ${INTROBLURB} and&lt;br /&gt;
-- ${INTROFRAGMENT} parameters. If the protection is temporary they use the&lt;br /&gt;
-- intro-blurb-expiry or intro-fragment-expiry, and if not they use&lt;br /&gt;
-- intro-blurb-noexpiry or intro-fragment-noexpiry.&lt;br /&gt;
-- It is possible to use banner parameters in these messages.&lt;br /&gt;
['intro-blurb-expiry'] = '${PROTECTIONBLURB} until ${EXPIRY}.',&lt;br /&gt;
['intro-blurb-noexpiry'] = '${PROTECTIONBLURB}.',&lt;br /&gt;
['intro-fragment-expiry'] = '${PROTECTIONBLURB} until ${EXPIRY},',&lt;br /&gt;
['intro-fragment-noexpiry'] = '${PROTECTIONBLURB}',&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
-- Tooltip blurb&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
-- These messages specify what is produced by the ${TOOLTIPBLURB} parameter.&lt;br /&gt;
-- If the protection is temporary the tooltip-blurb-expiry message is used, and&lt;br /&gt;
-- if not the tooltip-blurb-noexpiry message is used.&lt;br /&gt;
-- It is possible to use banner parameters in these messages.&lt;br /&gt;
['tooltip-blurb-expiry'] = 'This ${PAGETYPE} is ${PROTECTIONLEVEL} until ${EXPIRY}.',&lt;br /&gt;
['tooltip-blurb-noexpiry'] = 'This ${PAGETYPE} is ${PROTECTIONLEVEL}.',&lt;br /&gt;
['tooltip-fragment-expiry'] = 'This ${PAGETYPE} is ${PROTECTIONLEVEL} until ${EXPIRY},',&lt;br /&gt;
['tooltip-fragment-noexpiry'] = 'This ${PAGETYPE} is ${PROTECTIONLEVEL}',&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
-- Special explanation blurb&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
-- An explanation blurb for pages that cannot be unprotected, e.g. for pages&lt;br /&gt;
-- in the MediaWiki namespace.&lt;br /&gt;
-- It is possible to use banner parameters in this message.&lt;br /&gt;
['explanation-blurb-nounprotect'] = 'See the [[Wikipedia:Protection policy|'&lt;br /&gt;
	.. 'protection policy]] and ${PROTECTIONLOG} for more details.'&lt;br /&gt;
	.. ' Please discuss any changes on the ${TALKPAGE}; you'&lt;br /&gt;
	.. ' may ${EDITREQUEST} to ask an'&lt;br /&gt;
	.. ' [[Wikipedia:Administrators|administrator]] to make an edit if it'&lt;br /&gt;
	.. ' is [[Help:Minor edit#When to mark an edit as a minor edit'&lt;br /&gt;
	.. '|uncontroversial]] or supported by [[Wikipedia:Consensus'&lt;br /&gt;
	.. '|consensus]].',&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
-- Protection log display values&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
-- These messages determine the display values for the protection log link&lt;br /&gt;
-- or the pending changes log link produced by the ${PROTECTIONLOG} parameter.&lt;br /&gt;
-- It is possible to use banner parameters in these messages.&lt;br /&gt;
['protection-log-display'] = 'protection log',&lt;br /&gt;
['pc-log-display'] = 'pending changes log',&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
-- Current version display values&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
-- These messages determine the display values for the page history link&lt;br /&gt;
-- or the move log link produced by the ${CURRENTVERSION} parameter.&lt;br /&gt;
-- It is possible to use banner parameters in these messages.&lt;br /&gt;
['current-version-move-display'] = 'current title',&lt;br /&gt;
['current-version-edit-display'] = 'current version',&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
-- Talk page&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
-- This message determines the display value of the talk page link produced&lt;br /&gt;
-- with the ${TALKPAGE} parameter.&lt;br /&gt;
-- It is possible to use banner parameters in this message.&lt;br /&gt;
['talk-page-link-display'] = 'talk page',&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
-- Edit requests&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
-- This message determines the display value of the edit request link produced&lt;br /&gt;
-- with the ${EDITREQUEST} parameter.&lt;br /&gt;
-- It is possible to use banner parameters in this message.&lt;br /&gt;
['edit-request-display'] = 'submit an edit request',&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
-- Expiry date format&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
-- This is the format for the blurb expiry date. It should be valid input for&lt;br /&gt;
-- the first parameter of the #time parser function.&lt;br /&gt;
['expiry-date-format'] = 'F j, Y',&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
-- Tracking categories&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
-- These messages determine which tracking categories the module outputs.&lt;br /&gt;
['tracking-category-incorrect'] = 'Wikipedia pages with incorrect protection templates',&lt;br /&gt;
['tracking-category-expiry'] = 'Wikipedia protected pages without expiry',&lt;br /&gt;
['tracking-category-template'] = 'Wikipedia template-protected pages other than templates and modules',&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
-- Images&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
-- These are images that are not defined by their protection action and protection level.&lt;br /&gt;
['image-filename-indef'] = 'Padlock.svg',&lt;br /&gt;
['image-filename-default'] = 'Transparent.gif',&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
-- End messages&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
-- End configuration&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
}&lt;/div&gt;</summary>
		<author><name>Kolk</name></author>	</entry>

	<entry>
		<id>http://wiki.isofts.kiev.ua/index.php?title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:Side_box&amp;diff=622</id>
		<title>Модуль:Side box</title>
		<link rel="alternate" type="text/html" href="http://wiki.isofts.kiev.ua/index.php?title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:Side_box&amp;diff=622"/>
				<updated>2016-10-13T10:50:35Z</updated>
		
		<summary type="html">&lt;p&gt;Kolk: Імпортовано 1 версія&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;-- This module implements {{side box}}.&lt;br /&gt;
&lt;br /&gt;
local yesno = require('Module:Yesno')&lt;br /&gt;
&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
function p.main(frame)&lt;br /&gt;
	local origArgs = frame:getParent().args&lt;br /&gt;
	local args = {}&lt;br /&gt;
	for k, v in pairs(origArgs) do&lt;br /&gt;
		v = v:match('%s*(.-)%s*$')&lt;br /&gt;
		if v ~= '' then&lt;br /&gt;
			args[k] = v&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return p._main(args)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p._main(args)&lt;br /&gt;
	local data = p.makeData(args)&lt;br /&gt;
	return p.renderSidebox(data)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.makeData(args)&lt;br /&gt;
	local data = {}&lt;br /&gt;
&lt;br /&gt;
	-- Main table classes&lt;br /&gt;
	data.classes = {}&lt;br /&gt;
	if yesno(args.metadata) ~= false then&lt;br /&gt;
		table.insert(data.classes, 'metadata')&lt;br /&gt;
	end&lt;br /&gt;
	if args.position and args.position:lower() == 'left' then&lt;br /&gt;
		table.insert(data.classes, 'mbox-small-left')&lt;br /&gt;
	else&lt;br /&gt;
		table.insert(data.classes, 'mbox-small')&lt;br /&gt;
	end&lt;br /&gt;
	table.insert(data.classes, args.class)&lt;br /&gt;
	&lt;br /&gt;
	-- Image&lt;br /&gt;
	if args.image and args.image ~= 'none' then&lt;br /&gt;
		data.image = args.image&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Copy over data that doesn't need adjusting&lt;br /&gt;
	local argsToCopy = {&lt;br /&gt;
		-- Styles&lt;br /&gt;
		'style',&lt;br /&gt;
		'textstyle',&lt;br /&gt;
&lt;br /&gt;
		-- Above row&lt;br /&gt;
		'above',&lt;br /&gt;
		'abovestyle',&lt;br /&gt;
&lt;br /&gt;
		-- Body row&lt;br /&gt;
		'text',&lt;br /&gt;
		'imageright',&lt;br /&gt;
&lt;br /&gt;
		-- Below row&lt;br /&gt;
		'below',&lt;br /&gt;
	}&lt;br /&gt;
	for i, key in ipairs(argsToCopy) do&lt;br /&gt;
		data[key] = args[key]&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	return data&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.renderSidebox(data)&lt;br /&gt;
	-- Renders the sidebox HTML.&lt;br /&gt;
&lt;br /&gt;
	-- Table root&lt;br /&gt;
	local root = mw.html.create('table')&lt;br /&gt;
	for i, class in ipairs(data.classes or {}) do&lt;br /&gt;
		root:addClass(class)&lt;br /&gt;
	end&lt;br /&gt;
	root:css{border = '1px solid #aaa', ['background-color'] = '#f9f9f9'}&lt;br /&gt;
	if data.style then&lt;br /&gt;
		root:cssText(data.style)&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- The &amp;quot;above&amp;quot; row&lt;br /&gt;
	if data.above then&lt;br /&gt;
		local aboveCell = root:newline():tag('tr'):tag('td')&lt;br /&gt;
		aboveCell&lt;br /&gt;
			:attr('colspan', data.imageright and 3 or 2)&lt;br /&gt;
			:addClass('mbox-text')&lt;br /&gt;
		if data.textstyle then&lt;br /&gt;
			aboveCell:cssText(data.textstyle)&lt;br /&gt;
		end&lt;br /&gt;
		if data.abovestyle then&lt;br /&gt;
			aboveCell:cssText(data.abovestyle)&lt;br /&gt;
		end&lt;br /&gt;
		aboveCell&lt;br /&gt;
			:newline()&lt;br /&gt;
			:wikitext(data.above)&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- The body row&lt;br /&gt;
	local bodyRow = root:newline():tag('tr'):newline()&lt;br /&gt;
	if data.image then&lt;br /&gt;
		bodyRow:tag('td')&lt;br /&gt;
			:addClass('mbox-image')&lt;br /&gt;
			:wikitext(data.image)&lt;br /&gt;
	else&lt;br /&gt;
		bodyRow:tag('td'):css('width', '1px')&lt;br /&gt;
	end&lt;br /&gt;
	local textCell = bodyRow:newline():tag('td')&lt;br /&gt;
	textCell:addClass('mbox-text plainlist')&lt;br /&gt;
	if data.textstyle then&lt;br /&gt;
		textCell:cssText(data.textstyle)&lt;br /&gt;
	end&lt;br /&gt;
	textCell:wikitext(data.text)&lt;br /&gt;
	if data.imageright then&lt;br /&gt;
		bodyRow:newline():tag('td')&lt;br /&gt;
			:addClass('mbox-imageright')&lt;br /&gt;
			:wikitext(data.imageright)&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- The below row&lt;br /&gt;
	if data.below then&lt;br /&gt;
		local belowCell = root:newline():tag('tr'):tag('td')&lt;br /&gt;
		belowCell&lt;br /&gt;
			:attr('colspan', data.imageright and 3 or 2)&lt;br /&gt;
			:addClass('mbox-text')&lt;br /&gt;
		if data.textstyle then&lt;br /&gt;
			belowCell:cssText(data.textstyle)&lt;br /&gt;
		end&lt;br /&gt;
		belowCell:wikitext(data.below)&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	return tostring(root)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>Kolk</name></author>	</entry>

	<entry>
		<id>http://wiki.isofts.kiev.ua/index.php?title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:No_globals&amp;diff=616</id>
		<title>Модуль:No globals</title>
		<link rel="alternate" type="text/html" href="http://wiki.isofts.kiev.ua/index.php?title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:No_globals&amp;diff=616"/>
				<updated>2016-10-13T10:50:34Z</updated>
		
		<summary type="html">&lt;p&gt;Kolk: Імпортовано 1 версія&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;local mt = getmetatable(_G) or {}&lt;br /&gt;
function mt.__index (t, k)&lt;br /&gt;
	if k ~= 'arg' then&lt;br /&gt;
		error('Tried to read nil global ' .. tostring(k), 2)&lt;br /&gt;
	end&lt;br /&gt;
	return nil&lt;br /&gt;
end&lt;br /&gt;
function mt.__newindex(t, k, v)&lt;br /&gt;
	if k ~= 'arg' then&lt;br /&gt;
		error('Tried to write global ' .. tostring(k), 2)&lt;br /&gt;
	end&lt;br /&gt;
	rawset(t, k, v)&lt;br /&gt;
end&lt;br /&gt;
setmetatable(_G, mt)&lt;/div&gt;</summary>
		<author><name>Kolk</name></author>	</entry>

	<entry>
		<id>http://wiki.isofts.kiev.ua/index.php?title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:Protection_banner&amp;diff=618</id>
		<title>Модуль:Protection banner</title>
		<link rel="alternate" type="text/html" href="http://wiki.isofts.kiev.ua/index.php?title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:Protection_banner&amp;diff=618"/>
				<updated>2016-10-13T10:50:34Z</updated>
		
		<summary type="html">&lt;p&gt;Kolk: Імпортовано 1 версія&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;-- This module implements {{pp-meta}} and its daughter templates such as&lt;br /&gt;
-- {{pp-dispute}}, {{pp-vandalism}} and {{pp-sock}}.&lt;br /&gt;
&lt;br /&gt;
-- Initialise necessary modules.&lt;br /&gt;
require('Module:No globals')&lt;br /&gt;
local makeFileLink = require('Module:File link')._main&lt;br /&gt;
local effectiveProtectionLevel = require('Module:Effective protection level')._main&lt;br /&gt;
local effectiveProtectionExpiry = require('Module:Effective protection expiry')._main&lt;br /&gt;
local yesno = require('Module:Yesno')&lt;br /&gt;
&lt;br /&gt;
-- Lazily initialise modules and objects we don't always need.&lt;br /&gt;
local getArgs, makeMessageBox, lang&lt;br /&gt;
&lt;br /&gt;
-- Set constants.&lt;br /&gt;
local CONFIG_MODULE = 'Module:Protection banner/config'&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
-- Helper functions&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
local function makeCategoryLink(cat, sort)&lt;br /&gt;
	if cat then&lt;br /&gt;
		return string.format(&lt;br /&gt;
			'[[%s:%s|%s]]',&lt;br /&gt;
			mw.site.namespaces[14].name,&lt;br /&gt;
			cat,&lt;br /&gt;
			sort&lt;br /&gt;
		)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Validation function for the expiry and the protection date&lt;br /&gt;
local function validateDate(dateString, dateType)&lt;br /&gt;
	if not lang then&lt;br /&gt;
		lang = mw.language.getContentLanguage()&lt;br /&gt;
	end&lt;br /&gt;
	local success, result = pcall(lang.formatDate, lang, 'U', dateString)&lt;br /&gt;
	if success then&lt;br /&gt;
		result = tonumber(result)&lt;br /&gt;
		if result then&lt;br /&gt;
			return result&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	error(string.format(&lt;br /&gt;
		'invalid %s: %s',&lt;br /&gt;
		dateType,&lt;br /&gt;
		tostring(dateString)&lt;br /&gt;
	), 4)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function makeFullUrl(page, query, display)&lt;br /&gt;
	return string.format(&lt;br /&gt;
		'[%s %s]',&lt;br /&gt;
		tostring(mw.uri.fullUrl(page, query)),&lt;br /&gt;
		display&lt;br /&gt;
	)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Given a directed graph formatted as node -&amp;gt; table of direct successors,&lt;br /&gt;
-- get a table of all nodes reachable from a given node (though always&lt;br /&gt;
-- including the given node).&lt;br /&gt;
local function getReachableNodes(graph, start)&lt;br /&gt;
	local toWalk, retval = {[start] = true}, {}&lt;br /&gt;
	while true do&lt;br /&gt;
		-- Can't use pairs() since we're adding and removing things as we're iterating&lt;br /&gt;
		local k = next(toWalk) -- This always gets the &amp;quot;first&amp;quot; key&lt;br /&gt;
		if k == nil then&lt;br /&gt;
			return retval&lt;br /&gt;
		end&lt;br /&gt;
		toWalk[k] = nil&lt;br /&gt;
		retval[k] = true&lt;br /&gt;
		for _,v in ipairs(graph[k]) do&lt;br /&gt;
			if not retval[v] then&lt;br /&gt;
				toWalk[v] = true&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
-- Protection class&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
local Protection = {}&lt;br /&gt;
Protection.__index = Protection&lt;br /&gt;
&lt;br /&gt;
Protection.supportedActions = {&lt;br /&gt;
	edit = true,&lt;br /&gt;
	move = true,&lt;br /&gt;
	autoreview = true,&lt;br /&gt;
	upload = true&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Protection.bannerConfigFields = {&lt;br /&gt;
	'text',&lt;br /&gt;
	'explanation',&lt;br /&gt;
	'tooltip',&lt;br /&gt;
	'alt',&lt;br /&gt;
	'link',&lt;br /&gt;
	'image'&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
function Protection.new(args, cfg, title)&lt;br /&gt;
	local obj = {}&lt;br /&gt;
	obj._cfg = cfg&lt;br /&gt;
	obj.title = title or mw.title.getCurrentTitle()&lt;br /&gt;
&lt;br /&gt;
	-- Set action&lt;br /&gt;
	if not args.action then&lt;br /&gt;
		obj.action = 'edit'&lt;br /&gt;
	elseif Protection.supportedActions[args.action] then&lt;br /&gt;
		obj.action = args.action&lt;br /&gt;
	else&lt;br /&gt;
		error(string.format(&lt;br /&gt;
			'invalid action: %s',&lt;br /&gt;
			tostring(args.action)&lt;br /&gt;
		), 3)&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Set level&lt;br /&gt;
	obj.level = args.demolevel or effectiveProtectionLevel(obj.action, obj.title)&lt;br /&gt;
	if not obj.level or (obj.action == 'move' and obj.level == 'autoconfirmed') then&lt;br /&gt;
		-- Users need to be autoconfirmed to move pages anyway, so treat&lt;br /&gt;
		-- semi-move-protected pages as unprotected.&lt;br /&gt;
		obj.level = '*'&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Set expiry&lt;br /&gt;
	local effectiveExpiry = effectiveProtectionExpiry(obj.action, obj.title)&lt;br /&gt;
	if effectiveExpiry == 'infinity' then&lt;br /&gt;
		obj.expiry = 'indef'&lt;br /&gt;
	elseif effectiveExpiry ~= 'unknown' then&lt;br /&gt;
		obj.expiry = validateDate(effectiveExpiry, 'expiry date')&lt;br /&gt;
	elseif args.expiry then&lt;br /&gt;
		if cfg.indefStrings[args.expiry] then&lt;br /&gt;
			obj.expiry = 'indef'&lt;br /&gt;
		elseif type(args.expiry) == 'number' then&lt;br /&gt;
			obj.expiry = args.expiry&lt;br /&gt;
		else&lt;br /&gt;
			obj.expiry = validateDate(args.expiry, 'expiry date')&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Set reason&lt;br /&gt;
	if args[1] then&lt;br /&gt;
		obj.reason = mw.ustring.lower(args[1])&lt;br /&gt;
		if obj.reason:find('|') then&lt;br /&gt;
			error('reasons cannot contain the pipe character (&amp;quot;|&amp;quot;)', 3)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Set protection date&lt;br /&gt;
	if args.date then&lt;br /&gt;
		obj.protectionDate = validateDate(args.date, 'protection date')&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	-- Set banner config&lt;br /&gt;
	do&lt;br /&gt;
		obj.bannerConfig = {}&lt;br /&gt;
		local configTables = {}&lt;br /&gt;
		if cfg.banners[obj.action] then&lt;br /&gt;
			configTables[#configTables + 1] = cfg.banners[obj.action][obj.reason]&lt;br /&gt;
		end&lt;br /&gt;
		if cfg.defaultBanners[obj.action] then&lt;br /&gt;
			configTables[#configTables + 1] = cfg.defaultBanners[obj.action][obj.level]&lt;br /&gt;
			configTables[#configTables + 1] = cfg.defaultBanners[obj.action].default&lt;br /&gt;
		end&lt;br /&gt;
		configTables[#configTables + 1] = cfg.masterBanner&lt;br /&gt;
		for i, field in ipairs(Protection.bannerConfigFields) do&lt;br /&gt;
			for j, t in ipairs(configTables) do&lt;br /&gt;
				if t[field] then&lt;br /&gt;
					obj.bannerConfig[field] = t[field]&lt;br /&gt;
					break&lt;br /&gt;
				end&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return setmetatable(obj, Protection)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function Protection:isProtected()&lt;br /&gt;
	return self.level ~= '*'&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function Protection:isTemporary()&lt;br /&gt;
	return type(self.expiry) == 'number'&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function Protection:makeProtectionCategory()&lt;br /&gt;
	local cfg = self._cfg&lt;br /&gt;
	local title = self.title&lt;br /&gt;
	&lt;br /&gt;
	-- Exit if the page is not protected.&lt;br /&gt;
	if not self:isProtected() then&lt;br /&gt;
		return ''&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	-- Get the expiry key fragment.&lt;br /&gt;
	local expiryFragment&lt;br /&gt;
	if self.expiry == 'indef' then&lt;br /&gt;
		expiryFragment = self.expiry&lt;br /&gt;
	elseif type(self.expiry) == 'number' then&lt;br /&gt;
		expiryFragment = 'temp'&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Get the namespace key fragment.&lt;br /&gt;
	local namespaceFragment = cfg.categoryNamespaceKeys[title.namespace]&lt;br /&gt;
	if not namespaceFragment and title.namespace % 2 == 1 then&lt;br /&gt;
			namespaceFragment = 'talk'&lt;br /&gt;
	end&lt;br /&gt;
 &lt;br /&gt;
	-- Define the order that key fragments are tested in. This is done with an&lt;br /&gt;
	-- array of tables containing the value to be tested, along with its&lt;br /&gt;
	-- position in the cfg.protectionCategories table.&lt;br /&gt;
	local order = {&lt;br /&gt;
		{val = expiryFragment,    keypos = 1},&lt;br /&gt;
		{val = namespaceFragment, keypos = 2},&lt;br /&gt;
		{val = self.reason,       keypos = 3},&lt;br /&gt;
		{val = self.level,        keypos = 4},&lt;br /&gt;
		{val = self.action,       keypos = 5}&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	--[[&lt;br /&gt;
	-- The old protection templates used an ad-hoc protection category system,&lt;br /&gt;
	-- with some templates prioritising namespaces in their categories, and&lt;br /&gt;
	-- others prioritising the protection reason. To emulate this in this module&lt;br /&gt;
	-- we use the config table cfg.reasonsWithNamespacePriority to set the&lt;br /&gt;
	-- reasons for which namespaces have priority over protection reason.&lt;br /&gt;
	-- If we are dealing with one of those reasons, move the namespace table to&lt;br /&gt;
	-- the end of the order table, i.e. give it highest priority. If not, the&lt;br /&gt;
	-- reason should have highest priority, so move that to the end of the table&lt;br /&gt;
	-- instead.&lt;br /&gt;
	--]]&lt;br /&gt;
	table.insert(order, table.remove(order, self.reason and cfg.reasonsWithNamespacePriority[self.reason] and 2 or 3))&lt;br /&gt;
 &lt;br /&gt;
	--[[&lt;br /&gt;
	-- Define the attempt order. Inactive subtables (subtables with nil &amp;quot;value&amp;quot;&lt;br /&gt;
	-- fields) are moved to the end, where they will later be given the key&lt;br /&gt;
	-- &amp;quot;all&amp;quot;. This is to cut down on the number of table lookups in&lt;br /&gt;
	-- cfg.protectionCategories, which grows exponentially with the number of&lt;br /&gt;
	-- non-nil keys. We keep track of the number of active subtables with the&lt;br /&gt;
	-- noActive parameter.&lt;br /&gt;
	--]]&lt;br /&gt;
	local noActive, attemptOrder&lt;br /&gt;
	do&lt;br /&gt;
		local active, inactive = {}, {}&lt;br /&gt;
		for i, t in ipairs(order) do&lt;br /&gt;
			if t.val then&lt;br /&gt;
				active[#active + 1] = t&lt;br /&gt;
			else&lt;br /&gt;
				inactive[#inactive + 1] = t&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
		noActive = #active&lt;br /&gt;
		attemptOrder = active&lt;br /&gt;
		for i, t in ipairs(inactive) do&lt;br /&gt;
			attemptOrder[#attemptOrder + 1] = t&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
 &lt;br /&gt;
	--[[&lt;br /&gt;
	-- Check increasingly generic key combinations until we find a match. If a&lt;br /&gt;
	-- specific category exists for the combination of key fragments we are&lt;br /&gt;
	-- given, that match will be found first. If not, we keep trying different&lt;br /&gt;
	-- key fragment combinations until we match using the key&lt;br /&gt;
	-- &amp;quot;all-all-all-all-all&amp;quot;.&lt;br /&gt;
	--&lt;br /&gt;
	-- To generate the keys, we index the key subtables using a binary matrix&lt;br /&gt;
	-- with indexes i and j. j is only calculated up to the number of active&lt;br /&gt;
	-- subtables. For example, if there were three active subtables, the matrix&lt;br /&gt;
	-- would look like this, with 0 corresponding to the key fragment &amp;quot;all&amp;quot;, and&lt;br /&gt;
	-- 1 corresponding to other key fragments.&lt;br /&gt;
	-- &lt;br /&gt;
	--   j 1  2  3&lt;br /&gt;
	-- i  &lt;br /&gt;
	-- 1   1  1  1&lt;br /&gt;
	-- 2   0  1  1&lt;br /&gt;
	-- 3   1  0  1&lt;br /&gt;
	-- 4   0  0  1&lt;br /&gt;
	-- 5   1  1  0&lt;br /&gt;
	-- 6   0  1  0&lt;br /&gt;
	-- 7   1  0  0&lt;br /&gt;
	-- 8   0  0  0&lt;br /&gt;
	-- &lt;br /&gt;
	-- Values of j higher than the number of active subtables are set&lt;br /&gt;
	-- to the string &amp;quot;all&amp;quot;.&lt;br /&gt;
	--&lt;br /&gt;
	-- A key for cfg.protectionCategories is constructed for each value of i.&lt;br /&gt;
	-- The position of the value in the key is determined by the keypos field in&lt;br /&gt;
	-- each subtable.&lt;br /&gt;
	--]]&lt;br /&gt;
	local cats = cfg.protectionCategories&lt;br /&gt;
	for i = 1, 2^noActive do&lt;br /&gt;
		local key = {}&lt;br /&gt;
		for j, t in ipairs(attemptOrder) do&lt;br /&gt;
			if j &amp;gt; noActive then&lt;br /&gt;
				key[t.keypos] = 'all'&lt;br /&gt;
			else&lt;br /&gt;
				local quotient = i / 2 ^ (j - 1)&lt;br /&gt;
				quotient = math.ceil(quotient)&lt;br /&gt;
				if quotient % 2 == 1 then&lt;br /&gt;
					key[t.keypos] = t.val&lt;br /&gt;
				else&lt;br /&gt;
					key[t.keypos] = 'all'&lt;br /&gt;
				end&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
		key = table.concat(key, '|')&lt;br /&gt;
		local attempt = cats[key]&lt;br /&gt;
		if attempt then&lt;br /&gt;
			return makeCategoryLink(attempt, title.text)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return ''&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function Protection:needsExpiry()&lt;br /&gt;
	local cfg = self._cfg&lt;br /&gt;
	local actionNeedsCheck = cfg.expiryCheckActions[self.action]&lt;br /&gt;
	return not self.expiry and (&lt;br /&gt;
		actionNeedsCheck or (&lt;br /&gt;
			actionNeedsCheck == nil&lt;br /&gt;
			and self.reason -- the old {{pp-protected}} didn't check for expiry&lt;br /&gt;
			and not cfg.reasonsWithoutExpiryCheck[self.reason]&lt;br /&gt;
		)&lt;br /&gt;
	)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function Protection:isIncorrect()&lt;br /&gt;
	local expiry = self.expiry&lt;br /&gt;
	return not self:isProtected()&lt;br /&gt;
		or type(expiry) == 'number' and expiry &amp;lt; os.time()&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function Protection:isTemplateProtectedNonTemplate()&lt;br /&gt;
	local action, namespace = self.action, self.title.namespace&lt;br /&gt;
	return self.level == 'templateeditor'&lt;br /&gt;
		and (&lt;br /&gt;
			(action ~= 'edit' and action ~= 'move')&lt;br /&gt;
			or (namespace ~= 10 and namespace ~= 828)&lt;br /&gt;
		)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function Protection:makeCategoryLinks()&lt;br /&gt;
	local msg = self._cfg.msg&lt;br /&gt;
	local ret = { self:makeProtectionCategory() }&lt;br /&gt;
	if self:needsExpiry() then&lt;br /&gt;
		ret[#ret + 1] = makeCategoryLink(&lt;br /&gt;
			msg['tracking-category-expiry'],&lt;br /&gt;
			self.title.text&lt;br /&gt;
		)&lt;br /&gt;
	end&lt;br /&gt;
	if self:isIncorrect() then&lt;br /&gt;
		ret[#ret + 1] = makeCategoryLink(&lt;br /&gt;
			msg['tracking-category-incorrect'],&lt;br /&gt;
			self.title.text&lt;br /&gt;
		)&lt;br /&gt;
	end&lt;br /&gt;
	if self:isTemplateProtectedNonTemplate() then&lt;br /&gt;
		ret[#ret + 1] = makeCategoryLink(&lt;br /&gt;
			msg['tracking-category-template'],&lt;br /&gt;
			self.title.text&lt;br /&gt;
		)&lt;br /&gt;
	end&lt;br /&gt;
	return table.concat(ret)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
-- Blurb class&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
local Blurb = {}&lt;br /&gt;
Blurb.__index = Blurb&lt;br /&gt;
&lt;br /&gt;
Blurb.bannerTextFields = {&lt;br /&gt;
	text = true,&lt;br /&gt;
	explanation = true,&lt;br /&gt;
	tooltip = true,&lt;br /&gt;
	alt = true,&lt;br /&gt;
	link = true&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
function Blurb.new(protectionObj, args, cfg)&lt;br /&gt;
	return setmetatable({&lt;br /&gt;
		_cfg = cfg,&lt;br /&gt;
		_protectionObj = protectionObj,&lt;br /&gt;
		_args = args&lt;br /&gt;
	}, Blurb)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Private methods --&lt;br /&gt;
&lt;br /&gt;
function Blurb:_formatDate(num)&lt;br /&gt;
	-- Formats a Unix timestamp into dd Month, YYYY format.&lt;br /&gt;
	lang = lang or mw.language.getContentLanguage()&lt;br /&gt;
	local success, date = pcall(&lt;br /&gt;
		lang.formatDate,&lt;br /&gt;
		lang,&lt;br /&gt;
		self._cfg.msg['expiry-date-format'] or 'j F Y',&lt;br /&gt;
		'@' .. tostring(num)&lt;br /&gt;
	)&lt;br /&gt;
	if success then&lt;br /&gt;
		return date&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function Blurb:_getExpandedMessage(msgKey)&lt;br /&gt;
	return self:_substituteParameters(self._cfg.msg[msgKey])&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function Blurb:_substituteParameters(msg)&lt;br /&gt;
	if not self._params then&lt;br /&gt;
		local parameterFuncs = {}&lt;br /&gt;
&lt;br /&gt;
		parameterFuncs.CURRENTVERSION     = self._makeCurrentVersionParameter&lt;br /&gt;
		parameterFuncs.EDITREQUEST        = self._makeEditRequestParameter&lt;br /&gt;
		parameterFuncs.EXPIRY             = self._makeExpiryParameter&lt;br /&gt;
		parameterFuncs.EXPLANATIONBLURB   = self._makeExplanationBlurbParameter&lt;br /&gt;
		parameterFuncs.IMAGELINK          = self._makeImageLinkParameter&lt;br /&gt;
		parameterFuncs.INTROBLURB         = self._makeIntroBlurbParameter&lt;br /&gt;
		parameterFuncs.INTROFRAGMENT      = self._makeIntroFragmentParameter&lt;br /&gt;
		parameterFuncs.PAGETYPE           = self._makePagetypeParameter&lt;br /&gt;
		parameterFuncs.PROTECTIONBLURB    = self._makeProtectionBlurbParameter&lt;br /&gt;
		parameterFuncs.PROTECTIONDATE     = self._makeProtectionDateParameter&lt;br /&gt;
		parameterFuncs.PROTECTIONLEVEL    = self._makeProtectionLevelParameter&lt;br /&gt;
		parameterFuncs.PROTECTIONLOG      = self._makeProtectionLogParameter&lt;br /&gt;
		parameterFuncs.TALKPAGE           = self._makeTalkPageParameter&lt;br /&gt;
		parameterFuncs.TOOLTIPBLURB       = self._makeTooltipBlurbParameter&lt;br /&gt;
		parameterFuncs.TOOLTIPFRAGMENT    = self._makeTooltipFragmentParameter&lt;br /&gt;
		parameterFuncs.VANDAL             = self._makeVandalTemplateParameter&lt;br /&gt;
		&lt;br /&gt;
		self._params = setmetatable({}, {&lt;br /&gt;
			__index = function (t, k)&lt;br /&gt;
				local param&lt;br /&gt;
				if parameterFuncs[k] then&lt;br /&gt;
					param = parameterFuncs[k](self)&lt;br /&gt;
				end&lt;br /&gt;
				param = param or ''&lt;br /&gt;
				t[k] = param&lt;br /&gt;
				return param&lt;br /&gt;
			end&lt;br /&gt;
		})&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	msg = msg:gsub('${(%u+)}', self._params)&lt;br /&gt;
	return msg&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function Blurb:_makeCurrentVersionParameter()&lt;br /&gt;
	-- A link to the page history or the move log, depending on the kind of&lt;br /&gt;
	-- protection.&lt;br /&gt;
	local pagename = self._protectionObj.title.prefixedText&lt;br /&gt;
	if self._protectionObj.action == 'move' then&lt;br /&gt;
		-- We need the move log link.&lt;br /&gt;
		return makeFullUrl(&lt;br /&gt;
			'Special:Log',&lt;br /&gt;
			{type = 'move', page = pagename},&lt;br /&gt;
			self:_getExpandedMessage('current-version-move-display')&lt;br /&gt;
		)&lt;br /&gt;
	else&lt;br /&gt;
		-- We need the history link.&lt;br /&gt;
		return makeFullUrl(&lt;br /&gt;
			pagename,&lt;br /&gt;
			{action = 'history'},&lt;br /&gt;
			self:_getExpandedMessage('current-version-edit-display')&lt;br /&gt;
		)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function Blurb:_makeEditRequestParameter()&lt;br /&gt;
	local mEditRequest = require('Module:Submit an edit request')&lt;br /&gt;
	local action = self._protectionObj.action&lt;br /&gt;
	local level = self._protectionObj.level&lt;br /&gt;
	&lt;br /&gt;
	-- Get the edit request type.&lt;br /&gt;
	local requestType&lt;br /&gt;
	if action == 'edit' then&lt;br /&gt;
		if level == 'autoconfirmed' then&lt;br /&gt;
			requestType = 'semi'&lt;br /&gt;
		elseif level == 'extendedconfirmed' then&lt;br /&gt;
			requestType = 'extended'&lt;br /&gt;
		elseif level == 'templateeditor' then&lt;br /&gt;
			requestType = 'template'&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	requestType = requestType or 'full'&lt;br /&gt;
	&lt;br /&gt;
	-- Get the display value.&lt;br /&gt;
	local display = self:_getExpandedMessage('edit-request-display')&lt;br /&gt;
&lt;br /&gt;
	return mEditRequest._link{type = requestType, display = display}&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function Blurb:_makeExpiryParameter()&lt;br /&gt;
	local expiry = self._protectionObj.expiry&lt;br /&gt;
	if type(expiry) == 'number' then&lt;br /&gt;
		return self:_formatDate(expiry)&lt;br /&gt;
	else&lt;br /&gt;
		return expiry&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function Blurb:_makeExplanationBlurbParameter()&lt;br /&gt;
	-- Cover special cases first.&lt;br /&gt;
	if self._protectionObj.title.namespace == 8 then&lt;br /&gt;
		-- MediaWiki namespace&lt;br /&gt;
		return self:_getExpandedMessage('explanation-blurb-nounprotect')&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Get explanation blurb table keys&lt;br /&gt;
	local action = self._protectionObj.action&lt;br /&gt;
	local level = self._protectionObj.level&lt;br /&gt;
	local talkKey = self._protectionObj.title.isTalkPage and 'talk' or 'subject'&lt;br /&gt;
&lt;br /&gt;
	-- Find the message in the explanation blurb table and substitute any&lt;br /&gt;
	-- parameters.&lt;br /&gt;
	local explanations = self._cfg.explanationBlurbs&lt;br /&gt;
	local msg&lt;br /&gt;
	if explanations[action][level] and explanations[action][level][talkKey] then&lt;br /&gt;
		msg = explanations[action][level][talkKey]&lt;br /&gt;
	elseif explanations[action][level] and explanations[action][level].default then&lt;br /&gt;
		msg = explanations[action][level].default&lt;br /&gt;
	elseif explanations[action].default and explanations[action].default[talkKey] then&lt;br /&gt;
		msg = explanations[action].default[talkKey]&lt;br /&gt;
	elseif explanations[action].default and explanations[action].default.default then&lt;br /&gt;
		msg = explanations[action].default.default&lt;br /&gt;
	else&lt;br /&gt;
		error(string.format(&lt;br /&gt;
			'could not find explanation blurb for action &amp;quot;%s&amp;quot;, level &amp;quot;%s&amp;quot; and talk key &amp;quot;%s&amp;quot;',&lt;br /&gt;
			action,&lt;br /&gt;
			level,&lt;br /&gt;
			talkKey&lt;br /&gt;
		), 8)&lt;br /&gt;
	end&lt;br /&gt;
	return self:_substituteParameters(msg)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function Blurb:_makeImageLinkParameter()&lt;br /&gt;
	local imageLinks = self._cfg.imageLinks&lt;br /&gt;
	local action = self._protectionObj.action&lt;br /&gt;
	local level = self._protectionObj.level&lt;br /&gt;
	local msg&lt;br /&gt;
	if imageLinks[action][level] then&lt;br /&gt;
		msg = imageLinks[action][level]&lt;br /&gt;
	elseif imageLinks[action].default then&lt;br /&gt;
		msg = imageLinks[action].default&lt;br /&gt;
	else&lt;br /&gt;
		msg = imageLinks.edit.default&lt;br /&gt;
	end&lt;br /&gt;
	return self:_substituteParameters(msg)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function Blurb:_makeIntroBlurbParameter()&lt;br /&gt;
	if self._protectionObj:isTemporary() then&lt;br /&gt;
		return self:_getExpandedMessage('intro-blurb-expiry')&lt;br /&gt;
	else&lt;br /&gt;
		return self:_getExpandedMessage('intro-blurb-noexpiry')&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function Blurb:_makeIntroFragmentParameter()&lt;br /&gt;
	if self._protectionObj:isTemporary() then&lt;br /&gt;
		return self:_getExpandedMessage('intro-fragment-expiry')&lt;br /&gt;
	else&lt;br /&gt;
		return self:_getExpandedMessage('intro-fragment-noexpiry')&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function Blurb:_makePagetypeParameter()&lt;br /&gt;
	local pagetypes = self._cfg.pagetypes&lt;br /&gt;
	return pagetypes[self._protectionObj.title.namespace]&lt;br /&gt;
		or pagetypes.default&lt;br /&gt;
		or error('no default pagetype defined', 8)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function Blurb:_makeProtectionBlurbParameter()&lt;br /&gt;
	local protectionBlurbs = self._cfg.protectionBlurbs&lt;br /&gt;
	local action = self._protectionObj.action&lt;br /&gt;
	local level = self._protectionObj.level&lt;br /&gt;
	local msg&lt;br /&gt;
	if protectionBlurbs[action][level] then&lt;br /&gt;
		msg = protectionBlurbs[action][level]&lt;br /&gt;
	elseif protectionBlurbs[action].default then&lt;br /&gt;
		msg = protectionBlurbs[action].default&lt;br /&gt;
	elseif protectionBlurbs.edit.default then&lt;br /&gt;
		msg = protectionBlurbs.edit.default&lt;br /&gt;
	else&lt;br /&gt;
		error('no protection blurb defined for protectionBlurbs.edit.default', 8)&lt;br /&gt;
	end&lt;br /&gt;
	return self:_substituteParameters(msg)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function Blurb:_makeProtectionDateParameter()&lt;br /&gt;
	local protectionDate = self._protectionObj.protectionDate&lt;br /&gt;
	if type(protectionDate) == 'number' then&lt;br /&gt;
		return self:_formatDate(protectionDate)&lt;br /&gt;
	else&lt;br /&gt;
		return protectionDate&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function Blurb:_makeProtectionLevelParameter()&lt;br /&gt;
	local protectionLevels = self._cfg.protectionLevels&lt;br /&gt;
	local action = self._protectionObj.action&lt;br /&gt;
	local level = self._protectionObj.level&lt;br /&gt;
	local msg&lt;br /&gt;
	if protectionLevels[action][level] then&lt;br /&gt;
		msg = protectionLevels[action][level]&lt;br /&gt;
	elseif protectionLevels[action].default then&lt;br /&gt;
		msg = protectionLevels[action].default&lt;br /&gt;
	elseif protectionLevels.edit.default then&lt;br /&gt;
		msg = protectionLevels.edit.default&lt;br /&gt;
	else&lt;br /&gt;
		error('no protection level defined for protectionLevels.edit.default', 8)&lt;br /&gt;
	end&lt;br /&gt;
	return self:_substituteParameters(msg)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function Blurb:_makeProtectionLogParameter()&lt;br /&gt;
	local pagename = self._protectionObj.title.prefixedText&lt;br /&gt;
	if self._protectionObj.action == 'autoreview' then&lt;br /&gt;
		-- We need the pending changes log.&lt;br /&gt;
		return makeFullUrl(&lt;br /&gt;
			'Special:Log',&lt;br /&gt;
			{type = 'stable', page = pagename},&lt;br /&gt;
			self:_getExpandedMessage('pc-log-display')&lt;br /&gt;
		)&lt;br /&gt;
	else&lt;br /&gt;
		-- We need the protection log.&lt;br /&gt;
		return makeFullUrl(&lt;br /&gt;
			'Special:Log',&lt;br /&gt;
			{type = 'protect', page = pagename},&lt;br /&gt;
			self:_getExpandedMessage('protection-log-display')&lt;br /&gt;
		)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function Blurb:_makeTalkPageParameter()&lt;br /&gt;
	return string.format(&lt;br /&gt;
		'[[%s:%s#%s|%s]]',&lt;br /&gt;
		mw.site.namespaces[self._protectionObj.title.namespace].talk.name,&lt;br /&gt;
		self._protectionObj.title.text,&lt;br /&gt;
		self._args.section or 'top',&lt;br /&gt;
		self:_getExpandedMessage('talk-page-link-display')&lt;br /&gt;
	)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function Blurb:_makeTooltipBlurbParameter()&lt;br /&gt;
	if self._protectionObj:isTemporary() then&lt;br /&gt;
		return self:_getExpandedMessage('tooltip-blurb-expiry')&lt;br /&gt;
	else&lt;br /&gt;
		return self:_getExpandedMessage('tooltip-blurb-noexpiry')&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function Blurb:_makeTooltipFragmentParameter()&lt;br /&gt;
	if self._protectionObj:isTemporary() then&lt;br /&gt;
		return self:_getExpandedMessage('tooltip-fragment-expiry')&lt;br /&gt;
	else&lt;br /&gt;
		return self:_getExpandedMessage('tooltip-fragment-noexpiry')&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function Blurb:_makeVandalTemplateParameter()&lt;br /&gt;
	return require('Module:Vandal-m')._main{&lt;br /&gt;
		self._args.user or self._protectionObj.title.baseText&lt;br /&gt;
	}&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Public methods --&lt;br /&gt;
&lt;br /&gt;
function Blurb:makeBannerText(key)&lt;br /&gt;
	-- Validate input.&lt;br /&gt;
	if not key or not Blurb.bannerTextFields[key] then&lt;br /&gt;
		error(string.format(&lt;br /&gt;
			'&amp;quot;%s&amp;quot; is not a valid banner config field',&lt;br /&gt;
			tostring(key)&lt;br /&gt;
		), 2)&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Generate the text.&lt;br /&gt;
	local msg = self._protectionObj.bannerConfig[key]&lt;br /&gt;
	if type(msg) == 'string' then&lt;br /&gt;
		return self:_substituteParameters(msg)&lt;br /&gt;
	elseif type(msg) == 'function' then&lt;br /&gt;
		msg = msg(self._protectionObj, self._args)&lt;br /&gt;
		if type(msg) ~= 'string' then&lt;br /&gt;
			error(string.format(&lt;br /&gt;
				'bad output from banner config function with key &amp;quot;%s&amp;quot;'&lt;br /&gt;
					.. ' (expected string, got %s)',&lt;br /&gt;
				tostring(key),&lt;br /&gt;
				type(msg)&lt;br /&gt;
			), 4)&lt;br /&gt;
		end&lt;br /&gt;
		return self:_substituteParameters(msg)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
-- BannerTemplate class&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
local BannerTemplate = {}&lt;br /&gt;
BannerTemplate.__index = BannerTemplate&lt;br /&gt;
&lt;br /&gt;
function BannerTemplate.new(protectionObj, cfg)&lt;br /&gt;
	local obj = {}&lt;br /&gt;
	obj._cfg = cfg&lt;br /&gt;
&lt;br /&gt;
	-- Set the image filename.&lt;br /&gt;
	local imageFilename = protectionObj.bannerConfig.image&lt;br /&gt;
	if imageFilename then&lt;br /&gt;
		obj._imageFilename = imageFilename&lt;br /&gt;
	else&lt;br /&gt;
		-- If an image filename isn't specified explicitly in the banner config,&lt;br /&gt;
		-- generate it from the protection status and the namespace.&lt;br /&gt;
		local action = protectionObj.action&lt;br /&gt;
		local level = protectionObj.level&lt;br /&gt;
		local namespace = protectionObj.title.namespace&lt;br /&gt;
		local reason = protectionObj.reason&lt;br /&gt;
		&lt;br /&gt;
		-- Deal with special cases first.&lt;br /&gt;
		if (&lt;br /&gt;
			namespace == 10&lt;br /&gt;
			or namespace == 828&lt;br /&gt;
			or reason and obj._cfg.indefImageReasons[reason]&lt;br /&gt;
			)&lt;br /&gt;
			and action == 'edit'&lt;br /&gt;
			and level == 'sysop'&lt;br /&gt;
			and not protectionObj:isTemporary()&lt;br /&gt;
		then&lt;br /&gt;
			-- Fully protected modules and templates get the special red &amp;quot;indef&amp;quot;&lt;br /&gt;
			-- padlock.&lt;br /&gt;
			obj._imageFilename = obj._cfg.msg['image-filename-indef']&lt;br /&gt;
		else&lt;br /&gt;
			-- Deal with regular protection types.&lt;br /&gt;
			local images = obj._cfg.images&lt;br /&gt;
			if images[action] then&lt;br /&gt;
				if images[action][level] then&lt;br /&gt;
					obj._imageFilename = images[action][level]&lt;br /&gt;
				elseif images[action].default then&lt;br /&gt;
					obj._imageFilename = images[action].default&lt;br /&gt;
				end&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return setmetatable(obj, BannerTemplate)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function BannerTemplate:renderImage()&lt;br /&gt;
	local filename = self._imageFilename&lt;br /&gt;
		or self._cfg.msg['image-filename-default']&lt;br /&gt;
		or 'Transparent.gif'&lt;br /&gt;
	return makeFileLink{&lt;br /&gt;
		file = filename,&lt;br /&gt;
		size = (self.imageWidth or 20) .. 'px',&lt;br /&gt;
		alt = self._imageAlt,&lt;br /&gt;
		link = self._imageLink,&lt;br /&gt;
		caption = self.imageCaption&lt;br /&gt;
	}&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
-- Banner class&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
local Banner = setmetatable({}, BannerTemplate)&lt;br /&gt;
Banner.__index = Banner&lt;br /&gt;
&lt;br /&gt;
function Banner.new(protectionObj, blurbObj, cfg)&lt;br /&gt;
	local obj = BannerTemplate.new(protectionObj, cfg) -- This doesn't need the blurb.&lt;br /&gt;
	obj.imageWidth = 40&lt;br /&gt;
	obj.imageCaption = blurbObj:makeBannerText('alt') -- Large banners use the alt text for the tooltip.&lt;br /&gt;
	obj._reasonText = blurbObj:makeBannerText('text')&lt;br /&gt;
	obj._explanationText = blurbObj:makeBannerText('explanation')&lt;br /&gt;
	obj._page = protectionObj.title.prefixedText -- Only makes a difference in testing.&lt;br /&gt;
	return setmetatable(obj, Banner)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function Banner:__tostring()&lt;br /&gt;
	-- Renders the banner.&lt;br /&gt;
	makeMessageBox = makeMessageBox or require('Module:Message box').main&lt;br /&gt;
	local reasonText = self._reasonText or error('no reason text set', 2)&lt;br /&gt;
	local explanationText = self._explanationText&lt;br /&gt;
	local mbargs = {&lt;br /&gt;
		page = self._page,&lt;br /&gt;
		type = 'protection',&lt;br /&gt;
		image = self:renderImage(),&lt;br /&gt;
		text = string.format(&lt;br /&gt;
			&amp;quot;'''%s'''%s&amp;quot;,&lt;br /&gt;
			reasonText,&lt;br /&gt;
			explanationText and '&amp;lt;br /&amp;gt;' .. explanationText or ''&lt;br /&gt;
		)&lt;br /&gt;
	}&lt;br /&gt;
	return makeMessageBox('mbox', mbargs)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
-- Padlock class&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
local Padlock = setmetatable({}, BannerTemplate)&lt;br /&gt;
Padlock.__index = Padlock&lt;br /&gt;
&lt;br /&gt;
function Padlock.new(protectionObj, blurbObj, cfg)&lt;br /&gt;
	local obj = BannerTemplate.new(protectionObj, cfg) -- This doesn't need the blurb.&lt;br /&gt;
	obj.imageWidth = 20&lt;br /&gt;
	obj.imageCaption = blurbObj:makeBannerText('tooltip')&lt;br /&gt;
	obj._imageAlt = blurbObj:makeBannerText('alt')&lt;br /&gt;
	obj._imageLink = blurbObj:makeBannerText('link')&lt;br /&gt;
	obj._indicatorName = cfg.padlockIndicatorNames[protectionObj.action]&lt;br /&gt;
		or cfg.padlockIndicatorNames.default&lt;br /&gt;
		or 'pp-default'&lt;br /&gt;
	return setmetatable(obj, Padlock)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function Padlock:__tostring()&lt;br /&gt;
	local frame = mw.getCurrentFrame()&lt;br /&gt;
	-- The nowiki tag helps prevent whitespace at the top of articles.&lt;br /&gt;
	return frame:extensionTag{name = 'nowiki'} .. frame:extensionTag{&lt;br /&gt;
		name = 'indicator',&lt;br /&gt;
		args = {name = self._indicatorName},&lt;br /&gt;
		content = self:renderImage()&lt;br /&gt;
	}&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
-- Exports&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
function p._exportClasses()&lt;br /&gt;
	-- This is used for testing purposes.&lt;br /&gt;
	return {&lt;br /&gt;
		Protection = Protection,&lt;br /&gt;
		Blurb = Blurb,&lt;br /&gt;
		BannerTemplate = BannerTemplate,&lt;br /&gt;
		Banner = Banner,&lt;br /&gt;
		Padlock = Padlock,&lt;br /&gt;
	}&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p._main(args, cfg, title)&lt;br /&gt;
	args = args or {}&lt;br /&gt;
	cfg = cfg or require(CONFIG_MODULE)&lt;br /&gt;
&lt;br /&gt;
	local protectionObj = Protection.new(args, cfg, title)&lt;br /&gt;
&lt;br /&gt;
	local ret = {}&lt;br /&gt;
&lt;br /&gt;
	-- If a page's edit protection is equally or more restrictive than its&lt;br /&gt;
	-- protection from some other action, then don't bother displaying anything&lt;br /&gt;
	-- for the other action (except categories).&lt;br /&gt;
	if protectionObj.action == 'edit' or&lt;br /&gt;
		args.demolevel or&lt;br /&gt;
		not getReachableNodes(&lt;br /&gt;
			cfg.hierarchy,&lt;br /&gt;
			protectionObj.level&lt;br /&gt;
		)[effectiveProtectionLevel('edit', protectionObj.title)]&lt;br /&gt;
	then&lt;br /&gt;
		-- Initialise the blurb object&lt;br /&gt;
		local blurbObj = Blurb.new(protectionObj, args, cfg)&lt;br /&gt;
	&lt;br /&gt;
		-- Render the banner&lt;br /&gt;
		if protectionObj:isProtected() then&lt;br /&gt;
			ret[#ret + 1] = tostring(&lt;br /&gt;
				(yesno(args.small) and Padlock or Banner)&lt;br /&gt;
				.new(protectionObj, blurbObj, cfg)&lt;br /&gt;
			)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Render the categories&lt;br /&gt;
	if yesno(args.category) ~= false then&lt;br /&gt;
		ret[#ret + 1] = protectionObj:makeCategoryLinks()&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	return table.concat(ret)	&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.main(frame, cfg)&lt;br /&gt;
	cfg = cfg or require(CONFIG_MODULE)&lt;br /&gt;
&lt;br /&gt;
	-- Find default args, if any.&lt;br /&gt;
	local parent = frame.getParent and frame:getParent()&lt;br /&gt;
	local defaultArgs = parent and cfg.wrappers[parent:getTitle():gsub('/sandbox$', '')]&lt;br /&gt;
&lt;br /&gt;
	-- Find user args, and use the parent frame if we are being called from a&lt;br /&gt;
	-- wrapper template.&lt;br /&gt;
	getArgs = getArgs or require('Module:Arguments').getArgs&lt;br /&gt;
	local userArgs = getArgs(frame, {&lt;br /&gt;
		parentOnly = defaultArgs,&lt;br /&gt;
		frameOnly = not defaultArgs&lt;br /&gt;
	})&lt;br /&gt;
&lt;br /&gt;
	-- Build the args table. User-specified args overwrite default args.&lt;br /&gt;
	local args = {}&lt;br /&gt;
	for k, v in pairs(defaultArgs or {}) do&lt;br /&gt;
		args[k] = v&lt;br /&gt;
	end&lt;br /&gt;
	for k, v in pairs(userArgs) do&lt;br /&gt;
		args[k] = v&lt;br /&gt;
	end&lt;br /&gt;
	return p._main(args, cfg)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>Kolk</name></author>	</entry>

	<entry>
		<id>http://wiki.isofts.kiev.ua/index.php?title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:Navbar&amp;diff=614</id>
		<title>Модуль:Navbar</title>
		<link rel="alternate" type="text/html" href="http://wiki.isofts.kiev.ua/index.php?title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:Navbar&amp;diff=614"/>
				<updated>2016-10-13T10:50:33Z</updated>
		
		<summary type="html">&lt;p&gt;Kolk: Імпортовано 1 версія&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;local p = {}&lt;br /&gt;
&lt;br /&gt;
local getArgs&lt;br /&gt;
&lt;br /&gt;
function p._navbar(args)&lt;br /&gt;
	local titleArg = 1&lt;br /&gt;
&lt;br /&gt;
	if args.collapsible then&lt;br /&gt;
		titleArg = 2&lt;br /&gt;
		if not args.plain then&lt;br /&gt;
			args.mini = 1&lt;br /&gt;
		end&lt;br /&gt;
		if args.fontcolor then&lt;br /&gt;
			args.fontstyle = 'color:' .. args.fontcolor .. ';'&lt;br /&gt;
		end&lt;br /&gt;
		args.style = 'float:left; text-align:left; width:6em;'&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local titleText = args[titleArg] or (':' .. mw.getCurrentFrame():getParent():getTitle())&lt;br /&gt;
	local title = mw.title.new(mw.text.trim(titleText), 'Template');&lt;br /&gt;
&lt;br /&gt;
	if not title then&lt;br /&gt;
		error('Invalid title ' .. titleText)&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local talkpage = title.talkPageTitle and title.talkPageTitle.fullText or '';&lt;br /&gt;
&lt;br /&gt;
	local div = mw.html.create():tag('div')&lt;br /&gt;
	div&lt;br /&gt;
		:addClass('plainlinks')&lt;br /&gt;
		:addClass('hlist')&lt;br /&gt;
		:addClass('navbar')&lt;br /&gt;
		:cssText(args.style)&lt;br /&gt;
&lt;br /&gt;
	if args.mini then div:addClass('mini') end&lt;br /&gt;
&lt;br /&gt;
	if not (args.mini or args.plain) then&lt;br /&gt;
		div&lt;br /&gt;
			:tag('span')&lt;br /&gt;
				:css('word-spacing', 0)&lt;br /&gt;
				:cssText(args.fontstyle)&lt;br /&gt;
				:wikitext(args.text or 'This box:')&lt;br /&gt;
				:wikitext(' ')&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if args.brackets then&lt;br /&gt;
		div&lt;br /&gt;
			:tag('span')&lt;br /&gt;
				:css('margin-right', '-0.125em')&lt;br /&gt;
				:cssText(args.fontstyle)&lt;br /&gt;
				:wikitext('&amp;amp;#91;')&lt;br /&gt;
				:newline();&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local ul = div:tag('ul');&lt;br /&gt;
&lt;br /&gt;
	ul&lt;br /&gt;
		:tag('li')&lt;br /&gt;
			:addClass('nv-view')&lt;br /&gt;
			:wikitext('[[' .. title.fullText .. '|')&lt;br /&gt;
			:tag(args.mini and 'abbr' or 'span')&lt;br /&gt;
				:attr('title', 'View this template')&lt;br /&gt;
				:cssText(args.fontstyle)&lt;br /&gt;
				:wikitext(args.mini and 'v' or 'view')&lt;br /&gt;
				:done()&lt;br /&gt;
			:wikitext(']]')&lt;br /&gt;
			:done()&lt;br /&gt;
		:tag('li')&lt;br /&gt;
			:addClass('nv-talk')&lt;br /&gt;
			:wikitext('[[' .. talkpage .. '|')&lt;br /&gt;
			:tag(args.mini and 'abbr' or 'span')&lt;br /&gt;
				:attr('title', 'Discuss this template')&lt;br /&gt;
				:cssText(args.fontstyle)&lt;br /&gt;
				:wikitext(args.mini and 't' or 'talk')&lt;br /&gt;
				:done()&lt;br /&gt;
			:wikitext(']]');&lt;br /&gt;
&lt;br /&gt;
	if not args.noedit then&lt;br /&gt;
		ul&lt;br /&gt;
			:tag('li')&lt;br /&gt;
				:addClass('nv-edit')&lt;br /&gt;
				:wikitext('[' .. title:fullUrl('action=edit') .. ' ')&lt;br /&gt;
				:tag(args.mini and 'abbr' or 'span')&lt;br /&gt;
					:attr('title', 'Edit this template')&lt;br /&gt;
					:cssText(args.fontstyle)&lt;br /&gt;
					:wikitext(args.mini and 'e' or 'edit')&lt;br /&gt;
					:done()&lt;br /&gt;
				:wikitext(']');&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if args.brackets then&lt;br /&gt;
		div&lt;br /&gt;
			:tag('span')&lt;br /&gt;
				:css('margin-left', '-0.125em')&lt;br /&gt;
				:cssText(args.fontstyle)&lt;br /&gt;
				:wikitext('&amp;amp;#93;')&lt;br /&gt;
				:newline();&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if args.collapsible then&lt;br /&gt;
		div&lt;br /&gt;
			:done()&lt;br /&gt;
		:tag('span')&lt;br /&gt;
			:css('font-size', '110%')&lt;br /&gt;
			:cssText(args.fontstyle)&lt;br /&gt;
			:wikitext(args[1])&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	return tostring(div:done())&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.navbar(frame)&lt;br /&gt;
	if not getArgs then&lt;br /&gt;
		getArgs = require('Module:Arguments').getArgs&lt;br /&gt;
	end&lt;br /&gt;
	return p._navbar(getArgs(frame))&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>Kolk</name></author>	</entry>

	<entry>
		<id>http://wiki.isofts.kiev.ua/index.php?title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:Namespace_detect/config&amp;diff=610</id>
		<title>Модуль:Namespace detect/config</title>
		<link rel="alternate" type="text/html" href="http://wiki.isofts.kiev.ua/index.php?title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:Namespace_detect/config&amp;diff=610"/>
				<updated>2016-10-13T10:50:32Z</updated>
		
		<summary type="html">&lt;p&gt;Kolk: Імпортовано 1 версія&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;--------------------------------------------------------------------------------&lt;br /&gt;
--                    Namespace detect configuration data                     --&lt;br /&gt;
--                                                                            --&lt;br /&gt;
-- This module stores configuration data for Module:Namespace detect. Here    --&lt;br /&gt;
-- you can localise the module to your wiki's language.                       --&lt;br /&gt;
--                                                                            --&lt;br /&gt;
-- To activate a configuration item, you need to uncomment it. This means     --&lt;br /&gt;
-- that you need to remove the text &amp;quot;-- &amp;quot; at the start of the line.           --&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
local cfg = {} -- Don't edit this line.&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
--                              Parameter names                               --&lt;br /&gt;
-- These configuration items specify custom parameter names. Values added     --&lt;br /&gt;
-- here will work in addition to the default English parameter names.         --&lt;br /&gt;
-- To add one extra name, you can use this format:                            --&lt;br /&gt;
--                                                                            --&lt;br /&gt;
-- cfg.foo = 'parameter name'                                                 --&lt;br /&gt;
--                                                                            --&lt;br /&gt;
-- To add multiple names, you can use this format:                            --&lt;br /&gt;
--                                                                            --&lt;br /&gt;
-- cfg.foo = {'parameter name 1', 'parameter name 2', 'parameter name 3'}     --&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
---- This parameter displays content for the main namespace:&lt;br /&gt;
-- cfg.main = 'main'&lt;br /&gt;
&lt;br /&gt;
---- This parameter displays in talk namespaces:&lt;br /&gt;
-- cfg.talk = 'talk'&lt;br /&gt;
&lt;br /&gt;
---- This parameter displays content for &amp;quot;other&amp;quot; namespaces (namespaces for which&lt;br /&gt;
---- parameters have not been specified):&lt;br /&gt;
-- cfg.other = 'other'&lt;br /&gt;
&lt;br /&gt;
---- This parameter makes talk pages behave as though they are the corresponding&lt;br /&gt;
---- subject namespace. Note that this parameter is used with [[Module:Yesno]].&lt;br /&gt;
---- Edit that module to change the default values of &amp;quot;yes&amp;quot;, &amp;quot;no&amp;quot;, etc.&lt;br /&gt;
-- cfg.subjectns = 'subjectns'&lt;br /&gt;
&lt;br /&gt;
---- This parameter sets a demonstration namespace:&lt;br /&gt;
-- cfg.demospace = 'demospace'&lt;br /&gt;
&lt;br /&gt;
---- This parameter sets a specific page to compare:&lt;br /&gt;
cfg.demopage = 'page'&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
--                           Table configuration                              --&lt;br /&gt;
-- These configuration items allow customisation of the &amp;quot;table&amp;quot; function,     --&lt;br /&gt;
-- used to generate a table of possible parameters in the module              --&lt;br /&gt;
-- documentation.                                                             --&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
---- The header for the namespace column in the wikitable containing the list of&lt;br /&gt;
---- possible subject-space parameters.&lt;br /&gt;
-- cfg.wikitableNamespaceHeader = 'Namespace'&lt;br /&gt;
&lt;br /&gt;
---- The header for the wikitable containing the list of possible subject-space&lt;br /&gt;
---- parameters.&lt;br /&gt;
-- cfg.wikitableAliasesHeader = 'Aliases'&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
--                        End of configuration data                           --&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
return cfg -- Don't edit this line.&lt;/div&gt;</summary>
		<author><name>Kolk</name></author>	</entry>

	<entry>
		<id>http://wiki.isofts.kiev.ua/index.php?title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:Namespace_detect/data&amp;diff=612</id>
		<title>Модуль:Namespace detect/data</title>
		<link rel="alternate" type="text/html" href="http://wiki.isofts.kiev.ua/index.php?title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:Namespace_detect/data&amp;diff=612"/>
				<updated>2016-10-13T10:50:32Z</updated>
		
		<summary type="html">&lt;p&gt;Kolk: Імпортовано 1 версія&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;--------------------------------------------------------------------------------&lt;br /&gt;
--                          Namespace detect data                             --&lt;br /&gt;
-- This module holds data for [[Module:Namespace detect]] to be loaded per    --&lt;br /&gt;
-- page, rather than per #invoke, for performance reasons.                    --&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
local cfg = require('Module:Namespace detect/config')&lt;br /&gt;
&lt;br /&gt;
local function addKey(t, key, defaultKey)&lt;br /&gt;
	if key ~= defaultKey then&lt;br /&gt;
		t[#t + 1] = key&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Get a table of parameters to query for each default parameter name.&lt;br /&gt;
-- This allows wikis to customise parameter names in the cfg table while&lt;br /&gt;
-- ensuring that default parameter names will always work. The cfg table&lt;br /&gt;
-- values can be added as a string, or as an array of strings.&lt;br /&gt;
&lt;br /&gt;
local defaultKeys = {&lt;br /&gt;
	'main',&lt;br /&gt;
	'talk',&lt;br /&gt;
	'other',&lt;br /&gt;
	'subjectns',&lt;br /&gt;
	'demospace',&lt;br /&gt;
	'demopage'&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
local argKeys = {}&lt;br /&gt;
for i, defaultKey in ipairs(defaultKeys) do&lt;br /&gt;
	argKeys[defaultKey] = {defaultKey}&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
for defaultKey, t in pairs(argKeys) do&lt;br /&gt;
	local cfgValue = cfg[defaultKey]&lt;br /&gt;
	local cfgValueType = type(cfgValue)&lt;br /&gt;
	if cfgValueType == 'string' then&lt;br /&gt;
		addKey(t, cfgValue, defaultKey)&lt;br /&gt;
	elseif cfgValueType == 'table' then&lt;br /&gt;
		for i, key in ipairs(cfgValue) do&lt;br /&gt;
			addKey(t, key, defaultKey)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	cfg[defaultKey] = nil -- Free the cfg value as we don't need it any more.&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function getParamMappings()&lt;br /&gt;
	--[[&lt;br /&gt;
	-- Returns a table of how parameter names map to namespace names. The keys&lt;br /&gt;
	-- are the actual namespace names, in lower case, and the values are the&lt;br /&gt;
	-- possible parameter names for that namespace, also in lower case. The&lt;br /&gt;
	-- table entries are structured like this:&lt;br /&gt;
	-- {&lt;br /&gt;
	--   [''] = {'main'},&lt;br /&gt;
	--   ['wikipedia'] = {'wikipedia', 'project', 'wp'},&lt;br /&gt;
	--   ...&lt;br /&gt;
	-- }&lt;br /&gt;
	--]]&lt;br /&gt;
	local mappings = {}&lt;br /&gt;
	local mainNsName = mw.site.subjectNamespaces[0].name&lt;br /&gt;
	mainNsName = mw.ustring.lower(mainNsName)&lt;br /&gt;
	mappings[mainNsName] = mw.clone(argKeys.main)&lt;br /&gt;
	mappings['talk'] = mw.clone(argKeys.talk)&lt;br /&gt;
	for nsid, ns in pairs(mw.site.subjectNamespaces) do&lt;br /&gt;
		if nsid ~= 0 then -- Exclude main namespace.&lt;br /&gt;
			local nsname = mw.ustring.lower(ns.name)&lt;br /&gt;
			local canonicalName = mw.ustring.lower(ns.canonicalName)&lt;br /&gt;
			mappings[nsname] = {nsname}&lt;br /&gt;
			if canonicalName ~= nsname then&lt;br /&gt;
				table.insert(mappings[nsname], canonicalName)&lt;br /&gt;
			end&lt;br /&gt;
			for _, alias in ipairs(ns.aliases) do&lt;br /&gt;
				table.insert(mappings[nsname], mw.ustring.lower(alias))&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return mappings&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return {&lt;br /&gt;
	argKeys = argKeys,&lt;br /&gt;
	cfg = cfg,&lt;br /&gt;
	mappings = getParamMappings()&lt;br /&gt;
}&lt;/div&gt;</summary>
		<author><name>Kolk</name></author>	</entry>

	<entry>
		<id>http://wiki.isofts.kiev.ua/index.php?title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:Message_box&amp;diff=606</id>
		<title>Модуль:Message box</title>
		<link rel="alternate" type="text/html" href="http://wiki.isofts.kiev.ua/index.php?title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:Message_box&amp;diff=606"/>
				<updated>2016-10-13T10:50:31Z</updated>
		
		<summary type="html">&lt;p&gt;Kolk: Імпортовано 1 версія&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;-- This is a meta-module for producing message box templates, including&lt;br /&gt;
-- {{mbox}}, {{ambox}}, {{imbox}}, {{tmbox}}, {{ombox}}, {{cmbox}} and {{fmbox}}.&lt;br /&gt;
&lt;br /&gt;
-- Load necessary modules.&lt;br /&gt;
require('Module:No globals')&lt;br /&gt;
local getArgs&lt;br /&gt;
local categoryHandler = require('Module:Category handler')._main&lt;br /&gt;
local yesno = require('Module:Yesno')&lt;br /&gt;
&lt;br /&gt;
-- Get a language object for formatDate and ucfirst.&lt;br /&gt;
local lang = mw.language.getContentLanguage()&lt;br /&gt;
&lt;br /&gt;
-- Define constants&lt;br /&gt;
local CONFIG_MODULE = 'Module:Message box/configuration'&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
-- Helper functions&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
local function getTitleObject(...)&lt;br /&gt;
	-- Get the title object, passing the function through pcall&lt;br /&gt;
	-- in case we are over the expensive function count limit.&lt;br /&gt;
	local success, title = pcall(mw.title.new, ...)&lt;br /&gt;
	if success then&lt;br /&gt;
		return title&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function union(t1, t2)&lt;br /&gt;
	-- Returns the union of two arrays.&lt;br /&gt;
	local vals = {}&lt;br /&gt;
	for i, v in ipairs(t1) do&lt;br /&gt;
		vals[v] = true&lt;br /&gt;
	end&lt;br /&gt;
	for i, v in ipairs(t2) do&lt;br /&gt;
		vals[v] = true&lt;br /&gt;
	end&lt;br /&gt;
	local ret = {}&lt;br /&gt;
	for k in pairs(vals) do&lt;br /&gt;
		table.insert(ret, k)&lt;br /&gt;
	end&lt;br /&gt;
	table.sort(ret)&lt;br /&gt;
	return ret&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function getArgNums(args, prefix)&lt;br /&gt;
	local nums = {}&lt;br /&gt;
	for k, v in pairs(args) do&lt;br /&gt;
		local num = mw.ustring.match(tostring(k), '^' .. prefix .. '([1-9]%d*)$')&lt;br /&gt;
		if num then&lt;br /&gt;
			table.insert(nums, tonumber(num))&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	table.sort(nums)&lt;br /&gt;
	return nums&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
-- Box class definition&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
local MessageBox = {}&lt;br /&gt;
MessageBox.__index = MessageBox&lt;br /&gt;
&lt;br /&gt;
function MessageBox.new(boxType, args, cfg)&lt;br /&gt;
	args = args or {}&lt;br /&gt;
	local obj = {}&lt;br /&gt;
&lt;br /&gt;
	-- Set the title object and the namespace.&lt;br /&gt;
	obj.title = getTitleObject(args.page) or mw.title.getCurrentTitle()&lt;br /&gt;
&lt;br /&gt;
	-- Set the config for our box type.&lt;br /&gt;
	obj.cfg = cfg[boxType]&lt;br /&gt;
	if not obj.cfg then&lt;br /&gt;
		local ns = obj.title.namespace&lt;br /&gt;
		-- boxType is &amp;quot;mbox&amp;quot; or invalid input&lt;br /&gt;
		if ns == 0 then&lt;br /&gt;
			obj.cfg = cfg.ambox -- main namespace&lt;br /&gt;
		elseif ns == 6 then&lt;br /&gt;
			obj.cfg = cfg.imbox -- file namespace&lt;br /&gt;
		elseif ns == 14 then&lt;br /&gt;
			obj.cfg = cfg.cmbox -- category namespace&lt;br /&gt;
		else&lt;br /&gt;
			local nsTable = mw.site.namespaces[ns]&lt;br /&gt;
			if nsTable and nsTable.isTalk then&lt;br /&gt;
				obj.cfg = cfg.tmbox -- any talk namespace&lt;br /&gt;
			else&lt;br /&gt;
				obj.cfg = cfg.ombox -- other namespaces or invalid input&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Set the arguments, and remove all blank arguments except for the ones&lt;br /&gt;
	-- listed in cfg.allowBlankParams.&lt;br /&gt;
	do&lt;br /&gt;
		local newArgs = {}&lt;br /&gt;
		for k, v in pairs(args) do&lt;br /&gt;
			if v ~= '' then&lt;br /&gt;
				newArgs[k] = v&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
		for i, param in ipairs(obj.cfg.allowBlankParams or {}) do&lt;br /&gt;
			newArgs[param] = args[param]&lt;br /&gt;
		end&lt;br /&gt;
		obj.args = newArgs&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Define internal data structure.&lt;br /&gt;
	obj.categories = {}&lt;br /&gt;
	obj.classes = {}&lt;br /&gt;
&lt;br /&gt;
	return setmetatable(obj, MessageBox)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function MessageBox:addCat(ns, cat, sort)&lt;br /&gt;
	if not cat then&lt;br /&gt;
		return nil&lt;br /&gt;
	end&lt;br /&gt;
	if sort then&lt;br /&gt;
		cat = string.format('[[Category:%s|%s]]', cat, sort)&lt;br /&gt;
	else&lt;br /&gt;
		cat = string.format('[[Category:%s]]', cat)&lt;br /&gt;
	end&lt;br /&gt;
	self.categories[ns] = self.categories[ns] or {}&lt;br /&gt;
	table.insert(self.categories[ns], cat)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function MessageBox:addClass(class)&lt;br /&gt;
	if not class then&lt;br /&gt;
		return nil&lt;br /&gt;
	end&lt;br /&gt;
	table.insert(self.classes, class)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function MessageBox:setParameters()&lt;br /&gt;
	local args = self.args&lt;br /&gt;
	local cfg = self.cfg&lt;br /&gt;
&lt;br /&gt;
	-- Get type data.&lt;br /&gt;
	self.type = args.type&lt;br /&gt;
	local typeData = cfg.types[self.type]&lt;br /&gt;
	self.invalidTypeError = cfg.showInvalidTypeError&lt;br /&gt;
		and self.type&lt;br /&gt;
		and not typeData&lt;br /&gt;
	typeData = typeData or cfg.types[cfg.default]&lt;br /&gt;
	self.typeClass = typeData.class&lt;br /&gt;
	self.typeImage = typeData.image&lt;br /&gt;
&lt;br /&gt;
	-- Find if the box has been wrongly substituted.&lt;br /&gt;
	self.isSubstituted = cfg.substCheck and args.subst == 'SUBST'&lt;br /&gt;
&lt;br /&gt;
	-- Find whether we are using a small message box.&lt;br /&gt;
	self.isSmall = cfg.allowSmall and (&lt;br /&gt;
		cfg.smallParam and args.small == cfg.smallParam&lt;br /&gt;
		or not cfg.smallParam and yesno(args.small)&lt;br /&gt;
	)&lt;br /&gt;
&lt;br /&gt;
	-- Add attributes, classes and styles.&lt;br /&gt;
	self.id = args.id&lt;br /&gt;
	self:addClass(&lt;br /&gt;
		cfg.usePlainlinksParam and yesno(args.plainlinks or true) and 'plainlinks'&lt;br /&gt;
	)&lt;br /&gt;
	for _, class in ipairs(cfg.classes or {}) do&lt;br /&gt;
		self:addClass(class)&lt;br /&gt;
	end&lt;br /&gt;
	if self.isSmall then&lt;br /&gt;
		self:addClass(cfg.smallClass or 'mbox-small')&lt;br /&gt;
	end&lt;br /&gt;
	self:addClass(self.typeClass)&lt;br /&gt;
	self:addClass(args.class)&lt;br /&gt;
	self.style = args.style&lt;br /&gt;
	self.attrs = args.attrs&lt;br /&gt;
&lt;br /&gt;
	-- Set text style.&lt;br /&gt;
	self.textstyle = args.textstyle&lt;br /&gt;
&lt;br /&gt;
	-- Find if we are on the template page or not. This functionality is only&lt;br /&gt;
	-- used if useCollapsibleTextFields is set, or if both cfg.templateCategory&lt;br /&gt;
	-- and cfg.templateCategoryRequireName are set.&lt;br /&gt;
	self.useCollapsibleTextFields = cfg.useCollapsibleTextFields&lt;br /&gt;
	if self.useCollapsibleTextFields&lt;br /&gt;
		or cfg.templateCategory&lt;br /&gt;
		and cfg.templateCategoryRequireName&lt;br /&gt;
	then&lt;br /&gt;
		self.name = args.name&lt;br /&gt;
		if self.name then&lt;br /&gt;
			local templateName = mw.ustring.match(&lt;br /&gt;
				self.name,&lt;br /&gt;
				'^[tT][eE][mM][pP][lL][aA][tT][eE][%s_]*:[%s_]*(.*)$'&lt;br /&gt;
			) or self.name&lt;br /&gt;
			templateName = 'Template:' .. templateName&lt;br /&gt;
			self.templateTitle = getTitleObject(templateName)&lt;br /&gt;
		end&lt;br /&gt;
		self.isTemplatePage = self.templateTitle&lt;br /&gt;
			and mw.title.equals(self.title, self.templateTitle)&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Process data for collapsible text fields. At the moment these are only&lt;br /&gt;
	-- used in {{ambox}}.&lt;br /&gt;
	if self.useCollapsibleTextFields then&lt;br /&gt;
		-- Get the self.issue value.&lt;br /&gt;
		if self.isSmall and args.smalltext then&lt;br /&gt;
			self.issue = args.smalltext&lt;br /&gt;
		else&lt;br /&gt;
			local sect&lt;br /&gt;
			if args.sect == '' then&lt;br /&gt;
				sect = 'This ' .. (cfg.sectionDefault or 'page')&lt;br /&gt;
			elseif type(args.sect) == 'string' then&lt;br /&gt;
				sect = 'This ' .. args.sect&lt;br /&gt;
			end&lt;br /&gt;
			local issue = args.issue&lt;br /&gt;
			issue = type(issue) == 'string' and issue ~= '' and issue or nil&lt;br /&gt;
			local text = args.text&lt;br /&gt;
			text = type(text) == 'string' and text or nil&lt;br /&gt;
			local issues = {}&lt;br /&gt;
			table.insert(issues, sect)&lt;br /&gt;
			table.insert(issues, issue)&lt;br /&gt;
			table.insert(issues, text)&lt;br /&gt;
			self.issue = table.concat(issues, ' ')&lt;br /&gt;
		end&lt;br /&gt;
&lt;br /&gt;
		-- Get the self.talk value.&lt;br /&gt;
		local talk = args.talk&lt;br /&gt;
		-- Show talk links on the template page or template subpages if the talk&lt;br /&gt;
		-- parameter is blank.&lt;br /&gt;
		if talk == ''&lt;br /&gt;
			and self.templateTitle&lt;br /&gt;
			and (&lt;br /&gt;
				mw.title.equals(self.templateTitle, self.title)&lt;br /&gt;
				or self.title:isSubpageOf(self.templateTitle)&lt;br /&gt;
			)&lt;br /&gt;
		then&lt;br /&gt;
			talk = '#'&lt;br /&gt;
		elseif talk == '' then&lt;br /&gt;
			talk = nil&lt;br /&gt;
		end&lt;br /&gt;
		if talk then&lt;br /&gt;
			-- If the talk value is a talk page, make a link to that page. Else&lt;br /&gt;
			-- assume that it's a section heading, and make a link to the talk&lt;br /&gt;
			-- page of the current page with that section heading.&lt;br /&gt;
			local talkTitle = getTitleObject(talk)&lt;br /&gt;
			local talkArgIsTalkPage = true&lt;br /&gt;
			if not talkTitle or not talkTitle.isTalkPage then&lt;br /&gt;
				talkArgIsTalkPage = false&lt;br /&gt;
				talkTitle = getTitleObject(&lt;br /&gt;
					self.title.text,&lt;br /&gt;
					mw.site.namespaces[self.title.namespace].talk.id&lt;br /&gt;
				)&lt;br /&gt;
			end&lt;br /&gt;
			if talkTitle and talkTitle.exists then&lt;br /&gt;
				local talkText = 'Relevant discussion may be found on'&lt;br /&gt;
				if talkArgIsTalkPage then&lt;br /&gt;
					talkText = string.format(&lt;br /&gt;
						'%s [[%s|%s]].',&lt;br /&gt;
						talkText,&lt;br /&gt;
						talk,&lt;br /&gt;
						talkTitle.prefixedText&lt;br /&gt;
					)&lt;br /&gt;
				else&lt;br /&gt;
					talkText = string.format(&lt;br /&gt;
						'%s the [[%s#%s|talk page]].',&lt;br /&gt;
						talkText,&lt;br /&gt;
						talkTitle.prefixedText,&lt;br /&gt;
						talk&lt;br /&gt;
					)&lt;br /&gt;
				end&lt;br /&gt;
				self.talk = talkText&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
&lt;br /&gt;
		-- Get other values.&lt;br /&gt;
		self.fix = args.fix ~= '' and args.fix or nil&lt;br /&gt;
		local date&lt;br /&gt;
		if args.date and args.date ~= '' then&lt;br /&gt;
			date = args.date&lt;br /&gt;
		elseif args.date == '' and self.isTemplatePage then&lt;br /&gt;
			date = lang:formatDate('F Y')&lt;br /&gt;
		end&lt;br /&gt;
		if date then&lt;br /&gt;
			self.date = string.format(&amp;quot; &amp;lt;small&amp;gt;''(%s)''&amp;lt;/small&amp;gt;&amp;quot;, date)&lt;br /&gt;
		end&lt;br /&gt;
		self.info = args.info&lt;br /&gt;
		if yesno(args.removalnotice) then&lt;br /&gt;
			self.removalNotice = cfg.removalNotice&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Set the non-collapsible text field. At the moment this is used by all box&lt;br /&gt;
	-- types other than ambox, and also by ambox when small=yes.&lt;br /&gt;
	if self.isSmall then&lt;br /&gt;
		self.text = args.smalltext or args.text&lt;br /&gt;
	else&lt;br /&gt;
		self.text = args.text&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Set the below row.&lt;br /&gt;
	self.below = cfg.below and args.below&lt;br /&gt;
&lt;br /&gt;
	-- General image settings.&lt;br /&gt;
	self.imageCellDiv = not self.isSmall and cfg.imageCellDiv&lt;br /&gt;
	self.imageEmptyCell = cfg.imageEmptyCell&lt;br /&gt;
	if cfg.imageEmptyCellStyle then&lt;br /&gt;
		self.imageEmptyCellStyle = 'border:none;padding:0px;width:1px'&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Left image settings.&lt;br /&gt;
	local imageLeft = self.isSmall and args.smallimage or args.image&lt;br /&gt;
	if cfg.imageCheckBlank and imageLeft ~= 'blank' and imageLeft ~= 'none'&lt;br /&gt;
		or not cfg.imageCheckBlank and imageLeft ~= 'none'&lt;br /&gt;
	then&lt;br /&gt;
		self.imageLeft = imageLeft&lt;br /&gt;
		if not imageLeft then&lt;br /&gt;
			local imageSize = self.isSmall&lt;br /&gt;
				and (cfg.imageSmallSize or '30x30px')&lt;br /&gt;
				or '40x40px'&lt;br /&gt;
			self.imageLeft = string.format('[[File:%s|%s|link=|alt=]]', self.typeImage&lt;br /&gt;
				or 'Imbox notice.png', imageSize)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Right image settings.&lt;br /&gt;
	local imageRight = self.isSmall and args.smallimageright or args.imageright&lt;br /&gt;
	if not (cfg.imageRightNone and imageRight == 'none') then&lt;br /&gt;
		self.imageRight = imageRight&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function MessageBox:setMainspaceCategories()&lt;br /&gt;
	local args = self.args&lt;br /&gt;
	local cfg = self.cfg&lt;br /&gt;
&lt;br /&gt;
	if not cfg.allowMainspaceCategories then&lt;br /&gt;
		return nil&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local nums = {}&lt;br /&gt;
	for _, prefix in ipairs{'cat', 'category', 'all'} do&lt;br /&gt;
		args[prefix .. '1'] = args[prefix]&lt;br /&gt;
		nums = union(nums, getArgNums(args, prefix))&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- The following is roughly equivalent to the old {{Ambox/category}}.&lt;br /&gt;
	local date = args.date&lt;br /&gt;
	date = type(date) == 'string' and date&lt;br /&gt;
	local preposition = 'from'&lt;br /&gt;
	for _, num in ipairs(nums) do&lt;br /&gt;
		local mainCat = args['cat' .. tostring(num)]&lt;br /&gt;
			or args['category' .. tostring(num)]&lt;br /&gt;
		local allCat = args['all' .. tostring(num)]&lt;br /&gt;
		mainCat = type(mainCat) == 'string' and mainCat&lt;br /&gt;
		allCat = type(allCat) == 'string' and allCat&lt;br /&gt;
		if mainCat and date and date ~= '' then&lt;br /&gt;
			local catTitle = string.format('%s %s %s', mainCat, preposition, date)&lt;br /&gt;
			self:addCat(0, catTitle)&lt;br /&gt;
			catTitle = getTitleObject('Category:' .. catTitle)&lt;br /&gt;
			if not catTitle or not catTitle.exists then&lt;br /&gt;
				self:addCat(0, 'Articles with invalid date parameter in template')&lt;br /&gt;
			end&lt;br /&gt;
		elseif mainCat and (not date or date == '') then&lt;br /&gt;
			self:addCat(0, mainCat)&lt;br /&gt;
		end&lt;br /&gt;
		if allCat then&lt;br /&gt;
			self:addCat(0, allCat)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function MessageBox:setTemplateCategories()&lt;br /&gt;
	local args = self.args&lt;br /&gt;
	local cfg = self.cfg&lt;br /&gt;
&lt;br /&gt;
	-- Add template categories.&lt;br /&gt;
	if cfg.templateCategory then&lt;br /&gt;
		if cfg.templateCategoryRequireName then&lt;br /&gt;
			if self.isTemplatePage then&lt;br /&gt;
				self:addCat(10, cfg.templateCategory)&lt;br /&gt;
			end&lt;br /&gt;
		elseif not self.title.isSubpage then&lt;br /&gt;
			self:addCat(10, cfg.templateCategory)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Add template error categories.&lt;br /&gt;
	if cfg.templateErrorCategory then&lt;br /&gt;
		local templateErrorCategory = cfg.templateErrorCategory&lt;br /&gt;
		local templateCat, templateSort&lt;br /&gt;
		if not self.name and not self.title.isSubpage then&lt;br /&gt;
			templateCat = templateErrorCategory&lt;br /&gt;
		elseif self.isTemplatePage then&lt;br /&gt;
			local paramsToCheck = cfg.templateErrorParamsToCheck or {}&lt;br /&gt;
			local count = 0&lt;br /&gt;
			for i, param in ipairs(paramsToCheck) do&lt;br /&gt;
				if not args[param] then&lt;br /&gt;
					count = count + 1&lt;br /&gt;
				end&lt;br /&gt;
			end&lt;br /&gt;
			if count &amp;gt; 0 then&lt;br /&gt;
				templateCat = templateErrorCategory&lt;br /&gt;
				templateSort = tostring(count)&lt;br /&gt;
			end&lt;br /&gt;
			if self.categoryNums and #self.categoryNums &amp;gt; 0 then&lt;br /&gt;
				templateCat = templateErrorCategory&lt;br /&gt;
				templateSort = 'C'&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
		self:addCat(10, templateCat, templateSort)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function MessageBox:setAllNamespaceCategories()&lt;br /&gt;
	-- Set categories for all namespaces.&lt;br /&gt;
	if self.invalidTypeError then&lt;br /&gt;
		local allSort = (self.title.namespace == 0 and 'Main:' or '') .. self.title.prefixedText&lt;br /&gt;
		self:addCat('all', 'Wikipedia message box parameter needs fixing', allSort)&lt;br /&gt;
	end&lt;br /&gt;
	if self.isSubstituted then&lt;br /&gt;
		self:addCat('all', 'Pages with incorrectly substituted templates')&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function MessageBox:setCategories()&lt;br /&gt;
	if self.title.namespace == 0 then&lt;br /&gt;
		self:setMainspaceCategories()&lt;br /&gt;
	elseif self.title.namespace == 10 then&lt;br /&gt;
		self:setTemplateCategories()&lt;br /&gt;
	end&lt;br /&gt;
	self:setAllNamespaceCategories()&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function MessageBox:renderCategories()&lt;br /&gt;
	-- Convert category tables to strings and pass them through&lt;br /&gt;
	-- [[Module:Category handler]].&lt;br /&gt;
	return categoryHandler{&lt;br /&gt;
		main = table.concat(self.categories[0] or {}),&lt;br /&gt;
		template = table.concat(self.categories[10] or {}),&lt;br /&gt;
		all = table.concat(self.categories.all or {}),&lt;br /&gt;
		nocat = self.args.nocat,&lt;br /&gt;
		page = self.args.page&lt;br /&gt;
	}&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function MessageBox:export()&lt;br /&gt;
	local root = mw.html.create()&lt;br /&gt;
&lt;br /&gt;
	-- Add the subst check error.&lt;br /&gt;
	if self.isSubstituted and self.name then&lt;br /&gt;
		root:tag('b')&lt;br /&gt;
			:addClass('error')&lt;br /&gt;
			:wikitext(string.format(&lt;br /&gt;
				'Template &amp;lt;code&amp;gt;%s[[Template:%s|%s]]%s&amp;lt;/code&amp;gt; has been incorrectly substituted.',&lt;br /&gt;
				mw.text.nowiki('{{'), self.name, self.name, mw.text.nowiki('}}')&lt;br /&gt;
			))&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Create the box table.&lt;br /&gt;
	local boxTable = root:tag('table')&lt;br /&gt;
	boxTable:attr('id', self.id or nil)&lt;br /&gt;
	for i, class in ipairs(self.classes or {}) do&lt;br /&gt;
		boxTable:addClass(class or nil)&lt;br /&gt;
	end&lt;br /&gt;
	boxTable&lt;br /&gt;
		:cssText(self.style or nil)&lt;br /&gt;
		:attr('role', 'presentation')&lt;br /&gt;
&lt;br /&gt;
	if self.attrs then&lt;br /&gt;
		boxTable:attr(self.attrs)&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Add the left-hand image.&lt;br /&gt;
	local row = boxTable:tag('tr')&lt;br /&gt;
	if self.imageLeft then&lt;br /&gt;
		local imageLeftCell = row:tag('td'):addClass('mbox-image')&lt;br /&gt;
		if self.imageCellDiv then&lt;br /&gt;
			-- If we are using a div, redefine imageLeftCell so that the image&lt;br /&gt;
			-- is inside it. Divs use style=&amp;quot;width: 52px;&amp;quot;, which limits the&lt;br /&gt;
			-- image width to 52px. If any images in a div are wider than that,&lt;br /&gt;
			-- they may overlap with the text or cause other display problems.&lt;br /&gt;
			imageLeftCell = imageLeftCell:tag('div'):css('width', '52px')&lt;br /&gt;
		end&lt;br /&gt;
		imageLeftCell:wikitext(self.imageLeft or nil)&lt;br /&gt;
	elseif self.imageEmptyCell then&lt;br /&gt;
		-- Some message boxes define an empty cell if no image is specified, and&lt;br /&gt;
		-- some don't. The old template code in templates where empty cells are&lt;br /&gt;
		-- specified gives the following hint: &amp;quot;No image. Cell with some width&lt;br /&gt;
		-- or padding necessary for text cell to have 100% width.&amp;quot;&lt;br /&gt;
		row:tag('td')&lt;br /&gt;
			:addClass('mbox-empty-cell')&lt;br /&gt;
			:cssText(self.imageEmptyCellStyle or nil)&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Add the text.&lt;br /&gt;
	local textCell = row:tag('td'):addClass('mbox-text')&lt;br /&gt;
	if self.useCollapsibleTextFields then&lt;br /&gt;
		-- The message box uses advanced text parameters that allow things to be&lt;br /&gt;
		-- collapsible. At the moment, only ambox uses this.&lt;br /&gt;
		textCell:cssText(self.textstyle or nil)&lt;br /&gt;
		local textCellSpan = textCell:tag('span')&lt;br /&gt;
		textCellSpan&lt;br /&gt;
			:addClass('mbox-text-span')&lt;br /&gt;
			:wikitext(self.issue or nil)&lt;br /&gt;
		if (self.talk or self.fix) and not self.isSmall then&lt;br /&gt;
			textCellSpan:tag('span')&lt;br /&gt;
				:addClass('hide-when-compact')&lt;br /&gt;
				:wikitext(self.talk and (' ' .. self.talk) or nil)&lt;br /&gt;
				:wikitext(self.fix and (' ' .. self.fix) or nil)&lt;br /&gt;
		end&lt;br /&gt;
		textCellSpan:wikitext(self.date and (' ' .. self.date) or nil)&lt;br /&gt;
		if self.info and not self.isSmall then&lt;br /&gt;
			textCellSpan&lt;br /&gt;
				:tag('span')&lt;br /&gt;
				:addClass('hide-when-compact')&lt;br /&gt;
				:wikitext(self.info and (' ' .. self.info) or nil)&lt;br /&gt;
		end&lt;br /&gt;
		if self.removalNotice then&lt;br /&gt;
			textCellSpan:tag('small')&lt;br /&gt;
				:addClass('hide-when-compact')&lt;br /&gt;
				:tag('i')&lt;br /&gt;
					:wikitext(string.format(&amp;quot; (%s)&amp;quot;, self.removalNotice))&lt;br /&gt;
		end&lt;br /&gt;
	else&lt;br /&gt;
		-- Default text formatting - anything goes.&lt;br /&gt;
		textCell&lt;br /&gt;
			:cssText(self.textstyle or nil)&lt;br /&gt;
			:wikitext(self.text or nil)&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Add the right-hand image.&lt;br /&gt;
	if self.imageRight then&lt;br /&gt;
		local imageRightCell = row:tag('td'):addClass('mbox-imageright')&lt;br /&gt;
		if self.imageCellDiv then&lt;br /&gt;
			-- If we are using a div, redefine imageRightCell so that the image&lt;br /&gt;
			-- is inside it.&lt;br /&gt;
			imageRightCell = imageRightCell:tag('div'):css('width', '52px')&lt;br /&gt;
		end&lt;br /&gt;
		imageRightCell&lt;br /&gt;
			:wikitext(self.imageRight or nil)&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Add the below row.&lt;br /&gt;
	if self.below then&lt;br /&gt;
		boxTable:tag('tr')&lt;br /&gt;
			:tag('td')&lt;br /&gt;
				:attr('colspan', self.imageRight and '3' or '2')&lt;br /&gt;
				:addClass('mbox-text')&lt;br /&gt;
				:cssText(self.textstyle or nil)&lt;br /&gt;
				:wikitext(self.below or nil)&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Add error message for invalid type parameters.&lt;br /&gt;
	if self.invalidTypeError then&lt;br /&gt;
		root:tag('div')&lt;br /&gt;
			:css('text-align', 'center')&lt;br /&gt;
			:wikitext(string.format(&lt;br /&gt;
				'This message box is using an invalid &amp;quot;type=%s&amp;quot; parameter and needs fixing.',&lt;br /&gt;
				self.type or ''&lt;br /&gt;
			))&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Add categories.&lt;br /&gt;
	root:wikitext(self:renderCategories() or nil)&lt;br /&gt;
&lt;br /&gt;
	return tostring(root)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
-- Exports&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
local p, mt = {}, {}&lt;br /&gt;
&lt;br /&gt;
function p._exportClasses()&lt;br /&gt;
	-- For testing.&lt;br /&gt;
	return {&lt;br /&gt;
		MessageBox = MessageBox&lt;br /&gt;
	}&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.main(boxType, args, cfgTables)&lt;br /&gt;
	local box = MessageBox.new(boxType, args, cfgTables or mw.loadData(CONFIG_MODULE))&lt;br /&gt;
	box:setParameters()&lt;br /&gt;
	box:setCategories()&lt;br /&gt;
	return box:export()&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function mt.__index(t, k)&lt;br /&gt;
	return function (frame)&lt;br /&gt;
		if not getArgs then&lt;br /&gt;
			getArgs = require('Module:Arguments').getArgs&lt;br /&gt;
		end&lt;br /&gt;
		return t.main(k, getArgs(frame, {trim = false, removeBlanks = false}))&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return setmetatable(p, mt)&lt;/div&gt;</summary>
		<author><name>Kolk</name></author>	</entry>

	</feed>