<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://shreloaded.net/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=User</id>
	<title>ShadowHaven Reloaded - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://shreloaded.net/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=User"/>
	<link rel="alternate" type="text/html" href="https://shreloaded.net/wiki/Special:Contributions/User"/>
	<updated>2026-06-02T07:24:53Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.45.1</generator>
	<entry>
		<id>https://shreloaded.net/index.php?title=Test_page&amp;diff=79980</id>
		<title>Test page</title>
		<link rel="alternate" type="text/html" href="https://shreloaded.net/index.php?title=Test_page&amp;diff=79980"/>
		<updated>2021-08-30T01:56:32Z</updated>

		<summary type="html">&lt;p&gt;User: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Testing 1234&lt;br /&gt;
1234&lt;/div&gt;</summary>
		<author><name>User</name></author>
	</entry>
	<entry>
		<id>https://shreloaded.net/index.php?title=File:Sahale.jpg&amp;diff=79978</id>
		<title>File:Sahale.jpg</title>
		<link rel="alternate" type="text/html" href="https://shreloaded.net/index.php?title=File:Sahale.jpg&amp;diff=79978"/>
		<updated>2021-08-30T01:45:09Z</updated>

		<summary type="html">&lt;p&gt;User: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>User</name></author>
	</entry>
	<entry>
		<id>https://shreloaded.net/index.php?title=Sahal%C3%A9&amp;diff=79977</id>
		<title>Sahalé</title>
		<link rel="alternate" type="text/html" href="https://shreloaded.net/index.php?title=Sahal%C3%A9&amp;diff=79977"/>
		<updated>2021-08-30T01:33:03Z</updated>

		<summary type="html">&lt;p&gt;User: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{ContactInfobox|&lt;br /&gt;
&amp;lt;!-- Below, you can upload your own image for your contact. Replace Placeholder2.jpg with the name of the image you&#039;d like to use. After you create the page, click on the red link to upload the image. --&amp;gt;&lt;br /&gt;
|Image=[[File:Sahale.jpg|300px]] &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Below is the &amp;quot;official job&amp;quot; of the contact. It is a good way to describe their skills and what sets them apart from all of the other contacts of the same Archetype. --&amp;gt;&lt;br /&gt;
|Profession=Travel Facilitator and Fixer&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- You can write a short description on the below lines if you want. --&amp;gt;&lt;br /&gt;
|Shortblurb1=&lt;br /&gt;
|Shortblurb2=&lt;br /&gt;
|Shortblurb3= (Custom Array Fixer - G,N,K,A)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- This is for your reddit name. Just the name only. --&amp;gt;&lt;br /&gt;
|OwnersRedditName=Dejapes&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Below is the connection rating for your contact. Remember that at chargen, your connection+loyalty can not exceed 7, raising contacts above connection 6 post-gen requires thematics approval. --&amp;gt;&lt;br /&gt;
|Connection=4&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Below is where you define the Archetype. Default Archetypes are:  Fixer, Service, Gear, Legwork, Networking, Generalist. Custom Archetypes may be defined as denoted on the contact rules page. --&amp;gt;&lt;br /&gt;
|Archetype=Fixer(G,N,K,A)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- You can fill out miscellaneous info about your contact below. If it does not apply, leave the field blank. --&amp;gt;&lt;br /&gt;
|Location=Bellingham, Salish-Shidhe Council&lt;br /&gt;
|Metatype=Human&lt;br /&gt;
|AwakenedEmergedOrMundane=Mundane&lt;br /&gt;
|Gender=She/Her&lt;br /&gt;
|PreferredPayment=Nuyen&lt;br /&gt;
|HobbiesOrVice=Baseball&lt;br /&gt;
|PersonalLife=Married&lt;br /&gt;
|Faction=Independent&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Use of the age template is optional. It can be replaced with vague terms such as &amp;quot;middle aged&amp;quot; if you prefer. Or you may enter a number for the month, day, and year and the wiki will calculate and update their age automatically as time passes. --&amp;gt;&lt;br /&gt;
|Age={{Age|&lt;br /&gt;
|Month=6&lt;br /&gt;
|Day=13&lt;br /&gt;
|Year=2052&lt;br /&gt;
|}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
&lt;br /&gt;
Sahalé Peterson maintains her surname - a Christian imposition on her ancestors - purely for the sake of making paperwork with the UCAS convenient.  For the most part, she simply goes by Sahalé or &#039;White Owl.&#039;&lt;br /&gt;
&lt;br /&gt;
Taciturn about her past, Sahalé sits in the grey area between legality and the shadows.  In polite society, she maintains a conventional business that networks local tour guide services with international travelers.  But to the shadows, she is a peddler in false credentials, fake SINs, and plausible alibis.  Rumor has it that she has government connections among the tribes comprising the Salish-Shidhe Council, who see merit in having a back channel of communication to Seattle&#039;s runner community.  Regardless of the truth of the matter, she offers the services of both a fixer and a purveyor of illegal documents.&lt;br /&gt;
&lt;br /&gt;
==Appearance==&lt;br /&gt;
&lt;br /&gt;
Rarely seen in person, Sahalé maintains the matrix persona of a white owl with golden eyes and iron talons.  In meatspace, she is a woman of middling height, brown eyes, a tawny complexion, and slightly wavy black hair.  She enjoys the bold strokes of white and black Salish facepaint, but in her case the traditional charcoal and chalk have been replaced with the convenience and clean lines of more modern cosmetics.  Her manner of dress frequently combines the formality of a business suit with the flourishes of bison bone jewelry, painted beads, and a hairpin decorated with a tuft of pale owl feathers.&lt;br /&gt;
&lt;br /&gt;
==Personality==&lt;br /&gt;
&lt;br /&gt;
Sahalé is brisk and well-spoken, employing the kind of confident diction one might expect of a keynote speaker at a business convention.  She accepts the pretenses and norms of the shadow community only begrudgingly, preferring proper names instead of common jargon such as &#039;Johnson&#039; and &#039;OpFor.&#039;  Regardless, she will use the appropriate terminology when operational security is an issue.&lt;br /&gt;
&lt;br /&gt;
Sahalé will pay lipservice to the general anti-corp sentiment common among runners, but is ill-inclined to raise the subject of politics herself.  Regardless of her true convictions, she will stand by her runners and advocate for them when the chips are down.&lt;br /&gt;
&lt;br /&gt;
The woman has a strange affection for baseball, and is an avid fan of the Seattle Mariners.&lt;br /&gt;
&lt;br /&gt;
==Aspects Description==&lt;br /&gt;
&amp;lt;!-- Do not remove the below text. It&#039;s super important for the Aspect table. --&amp;gt;&lt;br /&gt;
{{AspectTable|&lt;br /&gt;
&amp;lt;!-- Do not remove the above code. It&#039;s super important. You can add new aspects below using the PositiveAspect and NegativeAspect template you see below. To add additional aspects, simply copy/paste one of the blocks below and update it with the name of the aspect, and a short description.  --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Below is an example of a positive aspect. You may duplicate this as many times as necessary. --&amp;gt;&lt;br /&gt;
{{PositiveAspect|&lt;br /&gt;
|Aspect=Here is Your Passport&lt;br /&gt;
|Description=+2 to Gear Acquisition Checks involving fake SINs and associated licenses.&lt;br /&gt;
|}}&lt;br /&gt;
{{PositiveAspect|&lt;br /&gt;
|Aspect=Laws are Guidelines&lt;br /&gt;
|Description=+2 to Gear Acquisition Checks involving Forbidden availability gear.&lt;br /&gt;
|}}&lt;br /&gt;
{{PositiveAspect|&lt;br /&gt;
|Aspect=Professional Fence&lt;br /&gt;
|Description=+2 to Fencing Checks when selling gear.&lt;br /&gt;
|}}&lt;br /&gt;
{{PositiveAspect|&lt;br /&gt;
|Aspect=A Community of Movers&lt;br /&gt;
|Description=+2 to Networking Checks involving the smuggling business in and around Seattle and Bellingham.&lt;br /&gt;
|}}&lt;br /&gt;
{{PositiveAspect|&lt;br /&gt;
|Aspect=Home Stretch&lt;br /&gt;
|Description=+2 to Networking Checks involving North American Major League Baseball.&lt;br /&gt;
|}}&lt;br /&gt;
&amp;lt;!-- Above is an example of a positive aspect. You may duplicate this as many times as necessary. --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Do not remove the below text. It&#039;s super important for the Aspect table. All aspects should be listed above this line. --&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&amp;lt;!-- Do not remove the above text. --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Dicepools==&lt;br /&gt;
{{ContactDicepools}}&lt;br /&gt;
&amp;lt;!-- You do not need to mess with this. This template should automatically generate a table with dicepools based on the Archetype and the connection. If it comes up as a broken red link, don&#039;t panic and ask @wiki for help on the discord.--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Network==&lt;br /&gt;
===Player Characters with this Contact===&lt;br /&gt;
{{ContactPlayerConnections}}&lt;br /&gt;
&amp;lt;!-- You do not need to mess with this. This template should automatically generate a table with everyone who has the contact on their wiki page. --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===NPC who know this contact===&lt;br /&gt;
&lt;br /&gt;
==Narrative Significant Runs==&lt;br /&gt;
{{ContactRuns}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Contacts]]&lt;br /&gt;
[[Category:Public Contacts]]&lt;/div&gt;</summary>
		<author><name>User</name></author>
	</entry>
	<entry>
		<id>https://shreloaded.net/index.php?title=Test_page&amp;diff=79976</id>
		<title>Test page</title>
		<link rel="alternate" type="text/html" href="https://shreloaded.net/index.php?title=Test_page&amp;diff=79976"/>
		<updated>2021-08-30T01:27:20Z</updated>

		<summary type="html">&lt;p&gt;User: Created page with &amp;quot;Testing 1234&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Testing 1234&lt;/div&gt;</summary>
		<author><name>User</name></author>
	</entry>
	<entry>
		<id>https://shreloaded.net/index.php?title=Module:WPMILHIST_Infobox_style/doc&amp;diff=64412</id>
		<title>Module:WPMILHIST Infobox style/doc</title>
		<link rel="alternate" type="text/html" href="https://shreloaded.net/index.php?title=Module:WPMILHIST_Infobox_style/doc&amp;diff=64412"/>
		<updated>2021-08-10T02:01:12Z</updated>

		<summary type="html">&lt;p&gt;User: 1 revision imported&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Module rating|protected}}&lt;br /&gt;
&amp;lt;!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) --&amp;gt;&lt;br /&gt;
== Usage ==&lt;br /&gt;
This module is invoked by {{tl|WPMILHIST Infobox style}}; see template documentation for usage.&lt;br /&gt;
&lt;br /&gt;
Used also as a meta-module in [[Module:Military navigation]] in the following manner:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&#039;lua&#039;&amp;gt; local styles = require(&#039;Module:WPMILHIST Infobox style&#039;) &amp;lt;/syntaxhighlight&amp;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;
&lt;br /&gt;
}}&amp;lt;/includeonly&amp;gt;&lt;/div&gt;</summary>
		<author><name>User</name></author>
	</entry>
	<entry>
		<id>https://shreloaded.net/index.php?title=Module:Message_box/configuration&amp;diff=64410</id>
		<title>Module:Message box/configuration</title>
		<link rel="alternate" type="text/html" href="https://shreloaded.net/index.php?title=Module:Message_box/configuration&amp;diff=64410"/>
		<updated>2021-08-10T02:01:12Z</updated>

		<summary type="html">&lt;p&gt;User: 1 revision imported&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 = &#039;ambox-speedy&#039;,&lt;br /&gt;
				image = &#039;Ambox warning pn.svg&#039;&lt;br /&gt;
			},&lt;br /&gt;
			delete = {&lt;br /&gt;
				class = &#039;ambox-delete&#039;,&lt;br /&gt;
				image = &#039;Ambox warning pn.svg&#039;&lt;br /&gt;
			},&lt;br /&gt;
			content = {&lt;br /&gt;
				class = &#039;ambox-content&#039;,&lt;br /&gt;
				image = &#039;Ambox important.svg&#039;&lt;br /&gt;
			},&lt;br /&gt;
			style = {&lt;br /&gt;
				class = &#039;ambox-style&#039;,&lt;br /&gt;
				image = &#039;Edit-clear.svg&#039;&lt;br /&gt;
			},&lt;br /&gt;
			move = {&lt;br /&gt;
				class = &#039;ambox-move&#039;,&lt;br /&gt;
				image = &#039;Merge-split-transwiki default.svg&#039;&lt;br /&gt;
			},&lt;br /&gt;
			protection = {&lt;br /&gt;
				class = &#039;ambox-protection&#039;,&lt;br /&gt;
				image = &#039;Semi-protection-shackle-keyhole.svg&#039;&lt;br /&gt;
			},&lt;br /&gt;
			notice = {&lt;br /&gt;
				class = &#039;ambox-notice&#039;,&lt;br /&gt;
				image = &#039;Information icon4.svg&#039;&lt;br /&gt;
			}&lt;br /&gt;
		},&lt;br /&gt;
		default                     = &#039;notice&#039;,&lt;br /&gt;
		allowBlankParams            = {&#039;talk&#039;, &#039;sect&#039;, &#039;date&#039;, &#039;issue&#039;, &#039;fix&#039;, &#039;subst&#039;, &#039;hidden&#039;},&lt;br /&gt;
		allowSmall                  = true,&lt;br /&gt;
		smallParam                  = &#039;left&#039;,&lt;br /&gt;
		smallClass                  = &#039;mbox-small-left&#039;,&lt;br /&gt;
		substCheck                  = true,&lt;br /&gt;
		classes                     = {&#039;metadata&#039;, &#039;ambox&#039;},&lt;br /&gt;
		imageEmptyCell              = true,&lt;br /&gt;
		imageCheckBlank             = true,&lt;br /&gt;
		imageSmallSize              = &#039;20x20px&#039;,&lt;br /&gt;
		imageCellDiv                = true,&lt;br /&gt;
		useCollapsibleTextFields    = true,&lt;br /&gt;
		imageRightNone              = true,&lt;br /&gt;
		sectionDefault              = &#039;article&#039;,&lt;br /&gt;
		allowMainspaceCategories    = true,&lt;br /&gt;
		templateCategory            = &#039;Article message templates&#039;,&lt;br /&gt;
	        templateCategoryRequireName = true,&lt;br /&gt;
		templateErrorCategory       = &#039;Article message templates with missing parameters&#039;,&lt;br /&gt;
		templateErrorParamsToCheck  = {&#039;issue&#039;, &#039;fix&#039;, &#039;subst&#039;},&lt;br /&gt;
		removalNotice               = &#039;[[Help:Maintenance template removal|Learn how and when to remove this template message]]&#039;&lt;br /&gt;
	},&lt;br /&gt;
	&lt;br /&gt;
	cmbox = {&lt;br /&gt;
		types = {&lt;br /&gt;
			speedy = {&lt;br /&gt;
				class = &#039;cmbox-speedy&#039;,&lt;br /&gt;
				image = &#039;Ambox warning pn.svg&#039;&lt;br /&gt;
			},&lt;br /&gt;
			delete = {&lt;br /&gt;
				class = &#039;cmbox-delete&#039;,&lt;br /&gt;
				image = &#039;Ambox warning pn.svg&#039;&lt;br /&gt;
			},&lt;br /&gt;
			content = {&lt;br /&gt;
				class = &#039;cmbox-content&#039;,&lt;br /&gt;
				image = &#039;Ambox important.svg&#039;&lt;br /&gt;
			},&lt;br /&gt;
			style = {&lt;br /&gt;
				class = &#039;cmbox-style&#039;,&lt;br /&gt;
				image = &#039;Edit-clear.svg&#039;&lt;br /&gt;
			},&lt;br /&gt;
			move = {&lt;br /&gt;
				class = &#039;cmbox-move&#039;,&lt;br /&gt;
				image = &#039;Merge-split-transwiki default.svg&#039;&lt;br /&gt;
			},&lt;br /&gt;
			protection = {&lt;br /&gt;
				class = &#039;cmbox-protection&#039;,&lt;br /&gt;
				image = &#039;Semi-protection-shackle-keyhole.svg&#039;&lt;br /&gt;
			},&lt;br /&gt;
			notice = {&lt;br /&gt;
				class = &#039;cmbox-notice&#039;,&lt;br /&gt;
				image = &#039;Information icon4.svg&#039;&lt;br /&gt;
			}&lt;br /&gt;
		},&lt;br /&gt;
		default              = &#039;notice&#039;,&lt;br /&gt;
		showInvalidTypeError = true,&lt;br /&gt;
		classes              = {&#039;cmbox&#039;},&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 = &#039;fmbox-warning&#039;,&lt;br /&gt;
				image = &#039;Ambox warning pn.svg&#039;&lt;br /&gt;
			},&lt;br /&gt;
			editnotice = {&lt;br /&gt;
				class = &#039;fmbox-editnotice&#039;,&lt;br /&gt;
				image = &#039;Information icon4.svg&#039;&lt;br /&gt;
			},&lt;br /&gt;
			system = {&lt;br /&gt;
				class = &#039;fmbox-system&#039;,&lt;br /&gt;
				image = &#039;Information icon4.svg&#039;&lt;br /&gt;
			}&lt;br /&gt;
		},&lt;br /&gt;
		default              = &#039;system&#039;,&lt;br /&gt;
		showInvalidTypeError = true,&lt;br /&gt;
		classes              = {&#039;fmbox&#039;},&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 = &#039;imbox-speedy&#039;,&lt;br /&gt;
				image = &#039;Ambox warning pn.svg&#039;&lt;br /&gt;
			},&lt;br /&gt;
			delete = {&lt;br /&gt;
				class = &#039;imbox-delete&#039;,&lt;br /&gt;
				image = &#039;Ambox warning pn.svg&#039;&lt;br /&gt;
			},&lt;br /&gt;
			content = {&lt;br /&gt;
				class = &#039;imbox-content&#039;,&lt;br /&gt;
				image = &#039;Ambox important.svg&#039;&lt;br /&gt;
			},&lt;br /&gt;
			style = {&lt;br /&gt;
				class = &#039;imbox-style&#039;,&lt;br /&gt;
				image = &#039;Edit-clear.svg&#039;&lt;br /&gt;
			},&lt;br /&gt;
			move = {&lt;br /&gt;
				class = &#039;imbox-move&#039;,&lt;br /&gt;
				image = &#039;Merge-split-transwiki default.svg&#039;&lt;br /&gt;
			},&lt;br /&gt;
			protection = {&lt;br /&gt;
				class = &#039;imbox-protection&#039;,&lt;br /&gt;
				image = &#039;Semi-protection-shackle-keyhole.svg&#039;&lt;br /&gt;
			},&lt;br /&gt;
			license = {&lt;br /&gt;
				class = &#039;imbox-license licensetpl&#039;,&lt;br /&gt;
				image = &#039;Imbox license.png&#039; -- @todo We need an SVG version of this&lt;br /&gt;
			},&lt;br /&gt;
			featured = {&lt;br /&gt;
				class = &#039;imbox-featured&#039;,&lt;br /&gt;
				image = &#039;Cscr-featured.svg&#039;&lt;br /&gt;
			},&lt;br /&gt;
			notice = {&lt;br /&gt;
				class = &#039;imbox-notice&#039;,&lt;br /&gt;
				image = &#039;Information icon4.svg&#039;&lt;br /&gt;
			}&lt;br /&gt;
		},&lt;br /&gt;
		default              = &#039;notice&#039;,&lt;br /&gt;
		showInvalidTypeError = true,&lt;br /&gt;
		classes              = {&#039;imbox&#039;},&lt;br /&gt;
		imageEmptyCell       = true,&lt;br /&gt;
		below                = true,&lt;br /&gt;
		templateCategory     = &#039;File message boxes&#039;&lt;br /&gt;
	},&lt;br /&gt;
	&lt;br /&gt;
	ombox = {&lt;br /&gt;
		types = {&lt;br /&gt;
			speedy = {&lt;br /&gt;
				class = &#039;ombox-speedy&#039;,&lt;br /&gt;
				image = &#039;Ambox warning pn.svg&#039;&lt;br /&gt;
			},&lt;br /&gt;
			delete = {&lt;br /&gt;
				class = &#039;ombox-delete&#039;,&lt;br /&gt;
				image = &#039;Ambox warning pn.svg&#039;&lt;br /&gt;
			},&lt;br /&gt;
			content = {&lt;br /&gt;
				class = &#039;ombox-content&#039;,&lt;br /&gt;
				image = &#039;Ambox important.svg&#039;&lt;br /&gt;
			},&lt;br /&gt;
			style = {&lt;br /&gt;
				class = &#039;ombox-style&#039;,&lt;br /&gt;
				image = &#039;Edit-clear.svg&#039;&lt;br /&gt;
			},&lt;br /&gt;
			move = {&lt;br /&gt;
				class = &#039;ombox-move&#039;,&lt;br /&gt;
				image = &#039;Merge-split-transwiki default.svg&#039;&lt;br /&gt;
			},&lt;br /&gt;
			protection = {&lt;br /&gt;
				class = &#039;ombox-protection&#039;,&lt;br /&gt;
				image = &#039;Semi-protection-shackle-keyhole.svg&#039;&lt;br /&gt;
			},&lt;br /&gt;
			notice = {&lt;br /&gt;
				class = &#039;ombox-notice&#039;,&lt;br /&gt;
				image = &#039;Information icon4.svg&#039;&lt;br /&gt;
			}&lt;br /&gt;
		},&lt;br /&gt;
		default              = &#039;notice&#039;,&lt;br /&gt;
		showInvalidTypeError = true,&lt;br /&gt;
		classes              = {&#039;ombox&#039;},&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 = &#039;tmbox-speedy&#039;,&lt;br /&gt;
				image = &#039;Ambox warning pn.svg&#039;&lt;br /&gt;
			},&lt;br /&gt;
			delete = {&lt;br /&gt;
				class = &#039;tmbox-delete&#039;,&lt;br /&gt;
				image = &#039;Ambox warning pn.svg&#039;&lt;br /&gt;
			},&lt;br /&gt;
			content = {&lt;br /&gt;
				class = &#039;tmbox-content&#039;,&lt;br /&gt;
				image = &#039;Ambox important.svg&#039;&lt;br /&gt;
			},&lt;br /&gt;
			style = {&lt;br /&gt;
				class = &#039;tmbox-style&#039;,&lt;br /&gt;
				image = &#039;Edit-clear.svg&#039;&lt;br /&gt;
			},&lt;br /&gt;
			move = {&lt;br /&gt;
				class = &#039;tmbox-move&#039;,&lt;br /&gt;
				image = &#039;Merge-split-transwiki default.svg&#039;&lt;br /&gt;
			},&lt;br /&gt;
			protection = {&lt;br /&gt;
				class = &#039;tmbox-protection&#039;,&lt;br /&gt;
				image = &#039;Semi-protection-shackle-keyhole.svg&#039;&lt;br /&gt;
			},&lt;br /&gt;
			notice = {&lt;br /&gt;
				class = &#039;tmbox-notice&#039;,&lt;br /&gt;
				image = &#039;Information icon4.svg&#039;&lt;br /&gt;
			}&lt;br /&gt;
		},&lt;br /&gt;
		default              = &#039;notice&#039;,&lt;br /&gt;
		showInvalidTypeError = true,&lt;br /&gt;
		classes              = {&#039;tmbox&#039;},&lt;br /&gt;
		allowSmall           = true,&lt;br /&gt;
		imageRightNone       = true,&lt;br /&gt;
		imageEmptyCell       = true,&lt;br /&gt;
		imageEmptyCellStyle  = true,&lt;br /&gt;
		templateCategory     = &#039;Talk message boxes&#039;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;/div&gt;</summary>
		<author><name>User</name></author>
	</entry>
	<entry>
		<id>https://shreloaded.net/index.php?title=Module:Documentation/styles.css&amp;diff=64408</id>
		<title>Module:Documentation/styles.css</title>
		<link rel="alternate" type="text/html" href="https://shreloaded.net/index.php?title=Module:Documentation/styles.css&amp;diff=64408"/>
		<updated>2021-08-10T02:01:11Z</updated>

		<summary type="html">&lt;p&gt;User: 1 revision imported&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;/* {{pp|small=yes}} */&lt;br /&gt;
.documentation,&lt;br /&gt;
.documentation-metadata {&lt;br /&gt;
	border: 1px solid #a2a9b1;&lt;br /&gt;
	background-color: #ecfcf4;&lt;br /&gt;
	clear: both;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.documentation {&lt;br /&gt;
	margin: 1em 0 0 0;&lt;br /&gt;
	padding: 1em;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.documentation-metadata {&lt;br /&gt;
	margin: 0.2em 0; /* same margin left-right as .documentation */&lt;br /&gt;
    font-style: italic;&lt;br /&gt;
    padding: 0.4em 1em; /* same padding left-right as .documentation */&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.documentation-startbox {&lt;br /&gt;
	padding-bottom: 3px;&lt;br /&gt;
	border-bottom: 1px solid #aaa;&lt;br /&gt;
	margin-bottom: 1ex;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.documentation-heading {&lt;br /&gt;
	font-weight: bold;&lt;br /&gt;
	font-size: 125%;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.documentation-clear { /* Don&#039;t want things to stick out where they shouldn&#039;t. */&lt;br /&gt;
	clear: both;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.documentation-toolbar {&lt;br /&gt;
	font-style: normal;&lt;br /&gt;
	font-size: 85%;&lt;br /&gt;
}&lt;/div&gt;</summary>
		<author><name>User</name></author>
	</entry>
	<entry>
		<id>https://shreloaded.net/index.php?title=Module:Protection_banner/config&amp;diff=64406</id>
		<title>Module:Protection banner/config</title>
		<link rel="alternate" type="text/html" href="https://shreloaded.net/index.php?title=Module:Protection_banner/config&amp;diff=64406"/>
		<updated>2021-08-10T01:28:37Z</updated>

		<summary type="html">&lt;p&gt;User: 1 revision imported&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;
-- ${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 == &#039;autoconfirmed&#039; then&lt;br /&gt;
--         return &#039;foo&#039;&lt;br /&gt;
--     else&lt;br /&gt;
--         return &#039;bar&#039;&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 = &#039;${INTROBLURB}&#039;,&lt;br /&gt;
	explanation = &#039;${EXPLANATIONBLURB}&#039;,&lt;br /&gt;
	tooltip = &#039;${TOOLTIPBLURB}&#039;,&lt;br /&gt;
	link = &#039;${IMAGELINK}&#039;,&lt;br /&gt;
	alt = &#039;Page ${PROTECTIONLEVEL}&#039;&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;
		default = {&lt;br /&gt;
			alt = &#039;Page protected with pending changes&#039;,&lt;br /&gt;
			tooltip = &#039;All edits by unregistered and new users are subject to review prior to becoming visible to unregistered users&#039;,&lt;br /&gt;
			image = &#039;Pending-protection-shackle.svg&#039;&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 = &#039;For pages protected to promote compliance with the&#039;&lt;br /&gt;
				.. &#039; [[Wikipedia:Biographies of living persons&#039;&lt;br /&gt;
				.. &#039;|biographies of living persons]] policy&#039;,&lt;br /&gt;
			text = &#039;${INTROFRAGMENT} to promote compliance with&#039;&lt;br /&gt;
				.. &#039; [[Wikipedia:Biographies of living persons&#039;&lt;br /&gt;
				.. &amp;quot;|Wikipedia&#039;s&amp;amp;nbsp;policy on&amp;amp;nbsp;the&amp;amp;nbsp;biographies&amp;quot;&lt;br /&gt;
				.. &#039; of&amp;amp;nbsp;living&amp;amp;nbsp;people]].&#039;,&lt;br /&gt;
			tooltip = &#039;${TOOLTIPFRAGMENT} to promote compliance with the policy on&#039;&lt;br /&gt;
				.. &#039; biographies of living persons&#039;,&lt;br /&gt;
		},&lt;br /&gt;
		dmca = {&lt;br /&gt;
			description = &#039;For pages protected by the Wikimedia Foundation&#039;&lt;br /&gt;
				.. &#039; due to [[Digital Millennium Copyright Act]] takedown requests&#039;,&lt;br /&gt;
			explanation = function (protectionObj, args)&lt;br /&gt;
				local ret = &#039;Pursuant to a rights owner notice under the Digital&#039;&lt;br /&gt;
					.. &#039; Millennium Copyright Act (DMCA) regarding some content&#039;&lt;br /&gt;
					.. &#039; in this article, the Wikimedia Foundation acted under&#039;&lt;br /&gt;
					.. &#039; applicable law and took down and restricted the content&#039;&lt;br /&gt;
					.. &#039; in question.&#039;&lt;br /&gt;
				if args.notice then&lt;br /&gt;
					ret = ret .. &#039; A copy of the received notice can be found here: &#039;&lt;br /&gt;
						.. args.notice .. &#039;.&#039;&lt;br /&gt;
				end&lt;br /&gt;
				ret = ret .. &#039; For more information, including websites discussing&#039;&lt;br /&gt;
					.. &#039; how to file a counter-notice, please see&#039;&lt;br /&gt;
					.. &amp;quot; [[Wikipedia:Office actions]] and the article&#039;s ${TALKPAGE}.&amp;quot;&lt;br /&gt;
					.. &amp;quot;&#039;&#039;&#039;Do not remove this template from the article until the&amp;quot;&lt;br /&gt;
					.. &amp;quot; restrictions are withdrawn&#039;&#039;&#039;.&amp;quot;&lt;br /&gt;
				return ret&lt;br /&gt;
			end,&lt;br /&gt;
			image = &#039;Office-protection-shackle.svg&#039;,&lt;br /&gt;
		},&lt;br /&gt;
		dispute = {&lt;br /&gt;
			description = &#039;For pages protected due to editing disputes&#039;,&lt;br /&gt;
			text = function (protectionObj, args)&lt;br /&gt;
				-- Find the value of &amp;quot;disputes&amp;quot;.&lt;br /&gt;
				local display = &#039;disputes&#039;&lt;br /&gt;
				local disputes&lt;br /&gt;
				if args.section then&lt;br /&gt;
					disputes = string.format(&lt;br /&gt;
						&#039;[[%s:%s#%s|%s]]&#039;,&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) == &#039;number&#039; then&lt;br /&gt;
					msg = &#039;${INTROFRAGMENT} or until editing %s have been resolved.&#039;&lt;br /&gt;
				else&lt;br /&gt;
					msg = &#039;${INTROFRAGMENT} until editing %s have been resolved.&#039;&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 &#039;&#039;&#039;not&#039;&#039;&#039; an endorsement of the&amp;quot;&lt;br /&gt;
				.. &#039; ${CURRENTVERSION}. ${EXPLANATIONBLURB}&#039;,&lt;br /&gt;
			tooltip = &#039;${TOOLTIPFRAGMENT} due to editing disputes&#039;,&lt;br /&gt;
		},&lt;br /&gt;
		ecp = {&lt;br /&gt;
			description = &#039;For articles in topic areas authorized by&#039;&lt;br /&gt;
				.. &#039; [[Wikipedia:Arbitration Committee|ArbCom]] or&#039;&lt;br /&gt;
				.. &#039; meets the criteria for community use&#039;,&lt;br /&gt;
			tooltip = &#039;This ${PAGETYPE} is extended-confirmed protected&#039;,&lt;br /&gt;
			alt = &#039;Extended-protected ${PAGETYPE}&#039;,&lt;br /&gt;
		},&lt;br /&gt;
		mainpage = {&lt;br /&gt;
			description = &#039;For pages protected for being displayed on the [[Main Page]]&#039;,&lt;br /&gt;
			text = &#039;This file is currently&#039;&lt;br /&gt;
				.. &#039; [[Wikipedia:This page is protected|protected]] from&#039;&lt;br /&gt;
				.. &#039; editing because it is currently or will soon be displayed&#039;&lt;br /&gt;
				.. &#039; on the [[Main Page]].&#039;,&lt;br /&gt;
			explanation = &#039;Images on the Main Page are protected due to their high&#039;&lt;br /&gt;
				.. &#039; visibility. Please discuss any necessary changes on the ${TALKPAGE}.&#039;&lt;br /&gt;
				.. &#039;&amp;lt;br /&amp;gt;&amp;lt;span style=&amp;quot;font-size:90%;&amp;quot;&amp;gt;&#039;&lt;br /&gt;
				.. &amp;quot;&#039;&#039;&#039;Administrators:&#039;&#039;&#039; Once this image is definitely off the Main Page,&amp;quot;&lt;br /&gt;
				.. &#039; please unprotect this file, or reduce to semi-protection,&#039;&lt;br /&gt;
				.. &#039; as appropriate.&amp;lt;/span&amp;gt;&#039;,&lt;br /&gt;
		},&lt;br /&gt;
		office = {&lt;br /&gt;
			description = &#039;For pages protected by the Wikimedia Foundation&#039;,&lt;br /&gt;
			text = function (protectionObj, args)&lt;br /&gt;
				local ret = &#039;This ${PAGETYPE} is currently under the&#039;&lt;br /&gt;
					.. &#039; scrutiny of the&#039;&lt;br /&gt;
					.. &#039; [[Wikipedia:Office actions|Wikimedia Foundation Office]]&#039;&lt;br /&gt;
					.. &#039; and is protected.&#039;&lt;br /&gt;
				if protectionObj.protectionDate then&lt;br /&gt;
					ret = ret .. &#039; It has been protected since ${PROTECTIONDATE}.&#039;&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. &#039;&#039;&#039;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.&#039;&#039;&#039;&amp;quot;,&lt;br /&gt;
			image = &#039;Office-protection-shackle.svg&#039;,&lt;br /&gt;
		},&lt;br /&gt;
		reset = {&lt;br /&gt;
			description = &#039;For pages protected by the Wikimedia Foundation and&#039;&lt;br /&gt;
				.. &#039; &amp;quot;reset&amp;quot; to a bare-bones version&#039;,&lt;br /&gt;
 			text = &#039;This ${PAGETYPE} is currently under the&#039;&lt;br /&gt;
					.. &#039; scrutiny of the&#039;&lt;br /&gt;
					.. &#039; [[Wikipedia:Office actions|Wikimedia Foundation Office]]&#039;&lt;br /&gt;
					.. &#039; and is protected.&#039;,&lt;br /&gt;
			explanation = function (protectionObj, args)&lt;br /&gt;
				local ret = &#039;&#039;&lt;br /&gt;
				if protectionObj.protectionDate then&lt;br /&gt;
					ret = ret .. &#039;On ${PROTECTIONDATE} this ${PAGETYPE} was&#039;&lt;br /&gt;
				else&lt;br /&gt;
					ret = ret .. &#039;This ${PAGETYPE} has been&#039;&lt;br /&gt;
				end&lt;br /&gt;
				ret = ret .. &#039; reduced to a&#039;&lt;br /&gt;
				.. &#039; simplified, &amp;quot;bare bones&amp;quot; version so that it may be completely&#039;&lt;br /&gt;
				.. &#039; rewritten to ensure it meets the policies of&#039;&lt;br /&gt;
				.. &#039; [[WP:NPOV|Neutral Point of View]] and [[WP:V|Verifiability]].&#039;&lt;br /&gt;
				.. &#039; Standard Wikipedia policies will apply to its rewriting—which&#039;&lt;br /&gt;
				.. &#039; will eventually be open to all editors—and will be strictly&#039;&lt;br /&gt;
				.. &#039; enforced. The ${PAGETYPE} has been ${PROTECTIONLEVEL} while&#039;&lt;br /&gt;
				.. &#039; it is being rebuilt.\n\n&#039;&lt;br /&gt;
				.. &#039;Any insertion of material directly from&#039;&lt;br /&gt;
				.. &#039; pre-protection revisions of the ${PAGETYPE} will be removed, as&#039;&lt;br /&gt;
				.. &#039; will any material added to the ${PAGETYPE} that is not properly&#039;&lt;br /&gt;
				.. &#039; sourced. The associated talk page(s) were also cleared on the&#039;&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. &#039;&#039;&#039;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.&#039;&#039;&#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
				return ret&lt;br /&gt;
			end,&lt;br /&gt;
			image = &#039;Office-protection-shackle.svg&#039;,&lt;br /&gt;
		},&lt;br /&gt;
		sock = {&lt;br /&gt;
			description = &#039;For pages protected due to&#039;&lt;br /&gt;
				.. &#039; [[Wikipedia:Sock puppetry|sock puppetry]]&#039;,&lt;br /&gt;
			text = &#039;${INTROFRAGMENT} to prevent [[Wikipedia:Sock puppetry|sock puppets]] of&#039;&lt;br /&gt;
				.. &#039; [[Wikipedia:Blocking policy|blocked]] or&#039;&lt;br /&gt;
				.. &#039; [[Wikipedia:Banning policy|banned users]]&#039;&lt;br /&gt;
				.. &#039; from editing it.&#039;,&lt;br /&gt;
			tooltip = &#039;${TOOLTIPFRAGMENT} to prevent sock puppets of blocked or banned users from&#039;&lt;br /&gt;
				.. &#039; editing it&#039;,&lt;br /&gt;
		},&lt;br /&gt;
		template = {&lt;br /&gt;
			description = &#039;For [[Wikipedia:High-risk templates|high-risk]]&#039;&lt;br /&gt;
				.. &#039; templates and Lua modules&#039;,&lt;br /&gt;
			text = &#039;This is a permanently [[Help:Protection|protected]] ${PAGETYPE},&#039;&lt;br /&gt;
				.. &#039; as it is [[Wikipedia:High-risk templates|high-risk]].&#039;,&lt;br /&gt;
			explanation = &#039;Please discuss any changes on the ${TALKPAGE}; you may&#039;&lt;br /&gt;
				.. &#039; ${EDITREQUEST} to ask an&#039;&lt;br /&gt;
				.. &#039; [[Wikipedia:Administrators|administrator]] or&#039;&lt;br /&gt;
				.. &#039; [[Wikipedia:Template editor|template editor]] to make an edit if&#039;&lt;br /&gt;
				.. &#039; it is [[Help:Minor edit#When to mark an edit as a minor edit&#039;&lt;br /&gt;
				.. &#039;|uncontroversial]] or supported by&#039;&lt;br /&gt;
				.. &#039; [[Wikipedia:Consensus|consensus]]. You can also&#039;&lt;br /&gt;
				.. &#039; [[Wikipedia:Requests for page protection|request]] that the page be&#039;&lt;br /&gt;
				.. &#039; unprotected.&#039;,&lt;br /&gt;
			tooltip = &#039;This high-risk ${PAGETYPE} is permanently ${PROTECTIONLEVEL}&#039;&lt;br /&gt;
				.. &#039; to prevent vandalism&#039;,&lt;br /&gt;
			alt = &#039;Permanently protected ${PAGETYPE}&#039;,&lt;br /&gt;
		},&lt;br /&gt;
		usertalk = {&lt;br /&gt;
			description = &#039;For pages protected against disruptive edits by a&#039;&lt;br /&gt;
				.. &#039; particular user&#039;,&lt;br /&gt;
			text = &#039;${INTROFRAGMENT} to prevent ${VANDAL} from using it to make disruptive edits,&#039;&lt;br /&gt;
				.. &#039; such as abusing the&#039;&lt;br /&gt;
				.. &#039; &amp;amp;#123;&amp;amp;#123;[[Template:unblock|unblock]]&amp;amp;#125;&amp;amp;#125; template.&#039;,&lt;br /&gt;
			explanation = &#039;If you cannot edit this user talk page and you need to&#039;&lt;br /&gt;
				.. &#039; make a change or leave a message, you can&#039;&lt;br /&gt;
				.. &#039; [[Wikipedia:Requests for page protection&#039;&lt;br /&gt;
				.. &#039;#Current requests for edits to a protected page&#039;&lt;br /&gt;
				.. &#039;|request an edit]],&#039;&lt;br /&gt;
				.. &#039; [[Wikipedia:Requests for page protection&#039;&lt;br /&gt;
				.. &#039;#Current requests for reduction in protection level&#039;&lt;br /&gt;
				.. &#039;|request unprotection]],&#039;&lt;br /&gt;
				.. &#039; [[Special:Userlogin|log in]],&#039;&lt;br /&gt;
				.. &#039; or [[Special:UserLogin/signup|create an account]].&#039;,&lt;br /&gt;
		},&lt;br /&gt;
		vandalism = {&lt;br /&gt;
			description = &#039;For pages protected against&#039;&lt;br /&gt;
				.. &#039; [[Wikipedia:Vandalism|vandalism]]&#039;,&lt;br /&gt;
			text = &#039;${INTROFRAGMENT} due to [[Wikipedia:Vandalism|vandalism]].&#039;,&lt;br /&gt;
			explanation = function (protectionObj, args)&lt;br /&gt;
				local ret = &#039;&#039;&lt;br /&gt;
				if protectionObj.level == &#039;sysop&#039; then&lt;br /&gt;
					ret = ret .. &amp;quot;This protection is &#039;&#039;&#039;not&#039;&#039;&#039; an endorsement of the&amp;quot;&lt;br /&gt;
						.. &#039; ${CURRENTVERSION}. &#039;&lt;br /&gt;
				end&lt;br /&gt;
				return ret .. &#039;${EXPLANATIONBLURB}&#039;&lt;br /&gt;
			end,&lt;br /&gt;
			tooltip = &#039;${TOOLTIPFRAGMENT} due to vandalism&#039;,&lt;br /&gt;
		}&lt;br /&gt;
	},&lt;br /&gt;
	move = {&lt;br /&gt;
		dispute = {&lt;br /&gt;
			description = &#039;For pages protected against page moves due to&#039;&lt;br /&gt;
				.. &#039; disputes over the page title&#039;,&lt;br /&gt;
			explanation = &amp;quot;This protection is &#039;&#039;&#039;not&#039;&#039;&#039; an endorsement of the&amp;quot;&lt;br /&gt;
				.. &#039; ${CURRENTVERSION}. ${EXPLANATIONBLURB}&#039;,&lt;br /&gt;
			image = &#039;Move-protection-shackle.svg&#039;&lt;br /&gt;
		},&lt;br /&gt;
		vandalism = {&lt;br /&gt;
			description = &#039;For pages protected against&#039;&lt;br /&gt;
				.. &#039; [[Wikipedia:Vandalism#Page-move vandalism&#039;&lt;br /&gt;
				.. &#039; |page-move vandalism]]&#039;&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&#039;s protection action, page&#039;s protection level&lt;br /&gt;
-- 2. page&#039;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 = &#039;This ${PAGETYPE} is currently [[Help:Protection|&#039;&lt;br /&gt;
			.. &#039;protected]] from editing&#039;,&lt;br /&gt;
		autoconfirmed = &#039;Editing of this ${PAGETYPE} by [[Wikipedia:User access&#039;&lt;br /&gt;
			.. &#039; levels#New users|new]] or [[Wikipedia:User access levels#Unregistered&#039;&lt;br /&gt;
			.. &#039; users|unregistered]] users is currently [[Help:Protection|disabled]]&#039;,&lt;br /&gt;
		extendedconfirmed = &#039;This ${PAGETYPE} is currently under extended confirmed protection&#039;,&lt;br /&gt;
	},&lt;br /&gt;
	move = {&lt;br /&gt;
		default = &#039;This ${PAGETYPE} is currently [[Help:Protection|protected]]&#039;&lt;br /&gt;
			.. &#039; from [[Help:Moving a page|page moves]]&#039;&lt;br /&gt;
	},&lt;br /&gt;
	autoreview = {&lt;br /&gt;
		default = &#039;All edits made to this ${PAGETYPE} by&#039;&lt;br /&gt;
			.. &#039; [[Wikipedia:User access levels#New users|new]] or&#039;&lt;br /&gt;
			.. &#039; [[Wikipedia:User access levels#Unregistered users|unregistered]]&#039;&lt;br /&gt;
			.. &#039; users are currently&#039;&lt;br /&gt;
			.. &#039; [[Wikipedia:Pending changes|subject to review]]&#039;&lt;br /&gt;
	},&lt;br /&gt;
	upload = {&lt;br /&gt;
		default = &#039;Uploading new versions of this ${PAGETYPE} is currently disabled&#039;&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&#039;s protection action, page&#039;s protection level, page&#039;s talk key&lt;br /&gt;
-- 2. page&#039;s protection action, page&#039;s protection level, default talk key&lt;br /&gt;
-- 3. page&#039;s protection action, default protection level, page&#039;s talk key&lt;br /&gt;
-- 4. page&#039;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 = &#039;See the [[Wikipedia:Protection policy|&#039;&lt;br /&gt;
				.. &#039;protection policy]] and ${PROTECTIONLOG} for more details. If you&#039;&lt;br /&gt;
				.. &#039; cannot edit this ${PAGETYPE} and you wish to make a change, you can&#039;&lt;br /&gt;
				.. &#039; ${EDITREQUEST}, discuss changes on the ${TALKPAGE},&#039;&lt;br /&gt;
				.. &#039; [[Wikipedia:Requests for page protection&#039;&lt;br /&gt;
				.. &#039;#Current requests for reduction in protection level&#039;&lt;br /&gt;
				.. &#039;|request unprotection]], [[Special:Userlogin|log in]], or&#039;&lt;br /&gt;
				.. &#039; [[Special:UserLogin/signup|create an account]].&#039;,&lt;br /&gt;
			default = &#039;See the [[Wikipedia:Protection policy|&#039;&lt;br /&gt;
				.. &#039;protection policy]] and ${PROTECTIONLOG} for more details. If you&#039;&lt;br /&gt;
				.. &#039; cannot edit this ${PAGETYPE} and you wish to make a change, you can&#039;&lt;br /&gt;
				.. &#039; [[Wikipedia:Requests for page protection&#039;&lt;br /&gt;
				.. &#039;#Current requests for reduction in protection level&#039;&lt;br /&gt;
				.. &#039;|request unprotection]], [[Special:Userlogin|log in]], or&#039;&lt;br /&gt;
				.. &#039; [[Special:UserLogin/signup|create an account]].&#039;,&lt;br /&gt;
		},&lt;br /&gt;
		extendedconfirmed = {&lt;br /&gt;
			default = &#039;Extended confirmed protection prevents edits from all unregistered editors&#039;&lt;br /&gt;
				.. &#039; and registered users with fewer than 30 days tenure and 500 edits.&#039;&lt;br /&gt;
				.. &#039; The [[Wikipedia:Protection policy#extended|policy on community use]]&#039;&lt;br /&gt;
				.. &#039; specifies that extended confirmed protection can be applied to combat&#039;&lt;br /&gt;
				.. &#039; disruption, if semi-protection has proven to be ineffective.&#039;&lt;br /&gt;
				.. &#039; Extended confirmed protection may also be applied to enforce&#039;&lt;br /&gt;
				.. &#039; [[Wikipedia:Arbitration Committee|arbitration sanctions]].&#039;&lt;br /&gt;
				.. &#039; Please discuss any changes on the ${TALKPAGE}; you may&#039;&lt;br /&gt;
				.. &#039; ${EDITREQUEST} to ask for uncontroversial changes supported by&#039;&lt;br /&gt;
				.. &#039; [[Wikipedia:Consensus|consensus]].&#039;&lt;br /&gt;
		},&lt;br /&gt;
		default = {&lt;br /&gt;
			subject = &#039;See the [[Wikipedia:Protection policy|&#039;&lt;br /&gt;
				.. &#039;protection policy]] and ${PROTECTIONLOG} for more details.&#039;&lt;br /&gt;
				.. &#039; Please discuss any changes on the ${TALKPAGE}; you&#039;&lt;br /&gt;
				.. &#039; may ${EDITREQUEST} to ask an&#039;&lt;br /&gt;
				.. &#039; [[Wikipedia:Administrators|administrator]] to make an edit if it&#039;&lt;br /&gt;
				.. &#039; is [[Help:Minor edit#When to mark an edit as a minor edit&#039;&lt;br /&gt;
				.. &#039;|uncontroversial]] or supported by [[Wikipedia:Consensus&#039;&lt;br /&gt;
				.. &#039;|consensus]]. You may also [[Wikipedia:Requests for&#039;&lt;br /&gt;
				.. &#039; page protection#Current requests for reduction in protection level&#039;&lt;br /&gt;
				.. &#039;|request]] that this page be unprotected.&#039;,&lt;br /&gt;
			default = &#039;See the [[Wikipedia:Protection policy|&#039;&lt;br /&gt;
				.. &#039;protection policy]] and ${PROTECTIONLOG} for more details.&#039;&lt;br /&gt;
				.. &#039; You may [[Wikipedia:Requests for page&#039;&lt;br /&gt;
				.. &#039; protection#Current requests for edits to a protected page|request an&#039;&lt;br /&gt;
				.. &#039; edit]] to this page, or [[Wikipedia:Requests for&#039;&lt;br /&gt;
				.. &#039; page protection#Current requests for reduction in protection level&#039;&lt;br /&gt;
				.. &#039;|ask]] for it to be unprotected.&#039;&lt;br /&gt;
		}&lt;br /&gt;
	},&lt;br /&gt;
	move = {&lt;br /&gt;
		default = {&lt;br /&gt;
			subject = &#039;See the [[Wikipedia:Protection policy|&#039;&lt;br /&gt;
				.. &#039;protection policy]] and ${PROTECTIONLOG} for more details.&#039;&lt;br /&gt;
				.. &#039; The page may still be edited but cannot be moved&#039;&lt;br /&gt;
				.. &#039; until unprotected. Please discuss any suggested moves on the&#039;&lt;br /&gt;
				.. &#039; ${TALKPAGE} or at [[Wikipedia:Requested moves]]. You can also&#039;&lt;br /&gt;
				.. &#039; [[Wikipedia:Requests for page protection|request]] that the page be&#039;&lt;br /&gt;
				.. &#039; unprotected.&#039;,&lt;br /&gt;
			default = &#039;See the [[Wikipedia:Protection policy|&#039;&lt;br /&gt;
				.. &#039;protection policy]] and ${PROTECTIONLOG} for more details.&#039;&lt;br /&gt;
				.. &#039; The page may still be edited but cannot be moved&#039;&lt;br /&gt;
				.. &#039; until unprotected. Please discuss any suggested moves at&#039;&lt;br /&gt;
				.. &#039; [[Wikipedia:Requested moves]]. You can also&#039;&lt;br /&gt;
				.. &#039; [[Wikipedia:Requests for page protection|request]] that the page be&#039;&lt;br /&gt;
				.. &#039; unprotected.&#039;&lt;br /&gt;
		}&lt;br /&gt;
	},&lt;br /&gt;
	autoreview = {&lt;br /&gt;
		default = {&lt;br /&gt;
			default = &#039;See the [[Wikipedia:Protection policy|&#039;&lt;br /&gt;
				.. &#039;protection policy]] and ${PROTECTIONLOG} for more details.&#039;&lt;br /&gt;
				.. &#039; Edits to this ${PAGETYPE} by new and unregistered users&#039;&lt;br /&gt;
				.. &#039; will not be visible to readers until they are accepted by&#039;&lt;br /&gt;
				.. &#039; a reviewer. To avoid the need for your edits to be&#039;&lt;br /&gt;
				.. &#039; reviewed, you may&#039;&lt;br /&gt;
				.. &#039; [[Wikipedia:Requests for page protection&#039;&lt;br /&gt;
				.. &#039;#Current requests for reduction in protection level&#039;&lt;br /&gt;
				.. &#039;|request unprotection]], [[Special:Userlogin|log in]], or&#039;&lt;br /&gt;
				.. &#039; [[Special:UserLogin/signup|create an account]].&#039;&lt;br /&gt;
		},&lt;br /&gt;
	},&lt;br /&gt;
	upload = {&lt;br /&gt;
		default = {&lt;br /&gt;
			default = &#039;See the [[Wikipedia:Protection policy|&#039;&lt;br /&gt;
				.. &#039;protection policy]] and ${PROTECTIONLOG} for more details.&#039;&lt;br /&gt;
				.. &#039; The page may still be edited but new versions of the file&#039;&lt;br /&gt;
				.. &#039; cannot be uploaded until it is unprotected. You can&#039;&lt;br /&gt;
				.. &#039; request that a new version be uploaded by using a&#039;&lt;br /&gt;
				.. &#039; [[Wikipedia:Edit requests|protected edit request]], or you&#039;&lt;br /&gt;
				.. &#039; can  [[Wikipedia:Requests for page protection|request]]&#039;&lt;br /&gt;
				.. &#039; that the file be unprotected.&#039;&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&#039;s protection action, page&#039;s protection level&lt;br /&gt;
-- 2. page&#039;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 = &#039;protected&#039;,&lt;br /&gt;
		templateeditor = &#039;template-protected&#039;,&lt;br /&gt;
		extendedconfirmed = &#039;extended-protected&#039;,&lt;br /&gt;
		autoconfirmed = &#039;semi-protected&#039;,&lt;br /&gt;
	},&lt;br /&gt;
	move = {&lt;br /&gt;
		default = &#039;move-protected&#039;&lt;br /&gt;
	},&lt;br /&gt;
	autoreview = {&lt;br /&gt;
	},&lt;br /&gt;
	upload = {&lt;br /&gt;
		default = &#039;upload-protected&#039;&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 [&#039;image-filename-indef&#039;] image. It is checked in the following order:&lt;br /&gt;
-- 1. page&#039;s protection action, page&#039;s protection level&lt;br /&gt;
-- 2. page&#039;s protection action, default protection level&lt;br /&gt;
images = {&lt;br /&gt;
	edit = {&lt;br /&gt;
		default = &#039;Full-protection-shackle.svg&#039;,&lt;br /&gt;
		templateeditor = &#039;Template-protection-shackle.svg&#039;,&lt;br /&gt;
		extendedconfirmed = &#039;Extended-protection-shackle.svg&#039;,&lt;br /&gt;
		autoconfirmed = &#039;Semi-protection-shackle.svg&#039;&lt;br /&gt;
	},&lt;br /&gt;
	move = {&lt;br /&gt;
		default = &#039;Move-protection-shackle.svg&#039;,&lt;br /&gt;
	},&lt;br /&gt;
	autoreview = {&lt;br /&gt;
		default = &#039;Pending-protection-shackle.svg&#039;&lt;br /&gt;
	},&lt;br /&gt;
	upload = {&lt;br /&gt;
		default = &#039;Upload-protection-shackle.svg&#039;&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 &#039;image-filename-indef&#039; 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&#039;s protection action&lt;br /&gt;
-- and protection level. It is checked in the following order:&lt;br /&gt;
-- 1. page&#039;s protection action, page&#039;s protection level&lt;br /&gt;
-- 2. page&#039;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 = &#039;Wikipedia:Protection policy#full&#039;,&lt;br /&gt;
		templateeditor = &#039;Wikipedia:Protection policy#template&#039;,&lt;br /&gt;
		extendedconfirmed = &#039;Wikipedia:Protection policy#extended&#039;,&lt;br /&gt;
		autoconfirmed = &#039;Wikipedia:Protection policy#semi&#039;&lt;br /&gt;
	},&lt;br /&gt;
	move = {&lt;br /&gt;
		default = &#039;Wikipedia:Protection policy#move&#039;&lt;br /&gt;
	},&lt;br /&gt;
	autoreview = {&lt;br /&gt;
		default = &#039;Wikipedia:Protection policy#pending&#039;&lt;br /&gt;
	},&lt;br /&gt;
	upload = {&lt;br /&gt;
		default = &#039;Wikipedia:Protection policy#upload&#039;&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 = &#039;pp-autoreview&#039;,&lt;br /&gt;
	default = &#039;pp-default&#039;&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] = &#039;user&#039;,&lt;br /&gt;
	[  3] = &#039;user&#039;,&lt;br /&gt;
	[  4] = &#039;project&#039;,&lt;br /&gt;
	[  6] = &#039;file&#039;,&lt;br /&gt;
	[  8] = &#039;mediawiki&#039;,&lt;br /&gt;
	[ 10] = &#039;template&#039;,&lt;br /&gt;
	[ 12] = &#039;project&#039;,&lt;br /&gt;
	[ 14] = &#039;category&#039;,&lt;br /&gt;
	[100] = &#039;portal&#039;,&lt;br /&gt;
	[828] = &#039;module&#039;,&lt;br /&gt;
},&lt;br /&gt;
&lt;br /&gt;
protectionCategories = {&lt;br /&gt;
	[&#039;all|all|all|all|all&#039;]                     = &#039;Wikipedia fully protected pages&#039;,&lt;br /&gt;
	[&#039;all|all|office|all|all&#039;]                  = &#039;Wikipedia Office-protected pages&#039;,&lt;br /&gt;
	[&#039;all|all|reset|all|all&#039;]                   = &#039;Wikipedia Office-protected pages&#039;,&lt;br /&gt;
	[&#039;all|all|dmca|all|all&#039;]                    = &#039;Wikipedia Office-protected pages&#039;,&lt;br /&gt;
	[&#039;all|all|mainpage|all|all&#039;]                = &#039;Wikipedia fully-protected main page files&#039;,&lt;br /&gt;
	[&#039;all|all|all|extendedconfirmed|all&#039;]       = &#039;Wikipedia extended-confirmed-protected pages&#039;,&lt;br /&gt;
	[&#039;all|all|ecp|extendedconfirmed|all&#039;]       = &#039;Wikipedia extended-confirmed-protected pages&#039;,&lt;br /&gt;
	[&#039;all|template|all|all|edit&#039;]               = &#039;Wikipedia fully protected templates&#039;,&lt;br /&gt;
	[&#039;all|all|all|autoconfirmed|edit&#039;]          = &#039;Wikipedia semi-protected pages&#039;,&lt;br /&gt;
	[&#039;indef|all|all|autoconfirmed|edit&#039;]        = &#039;Wikipedia indefinitely semi-protected pages&#039;,&lt;br /&gt;
	[&#039;all|all|blp|autoconfirmed|edit&#039;]          = &#039;Wikipedia indefinitely semi-protected biographies of living people&#039;,&lt;br /&gt;
	[&#039;temp|all|blp|autoconfirmed|edit&#039;]         = &#039;Wikipedia temporarily semi-protected biographies of living people&#039;,&lt;br /&gt;
	[&#039;all|all|dispute|autoconfirmed|edit&#039;]      = &#039;Wikipedia pages semi-protected due to dispute&#039;,&lt;br /&gt;
	[&#039;all|all|sock|autoconfirmed|edit&#039;]         = &#039;Wikipedia pages semi-protected from banned users&#039;,&lt;br /&gt;
	[&#039;all|all|vandalism|autoconfirmed|edit&#039;]    = &#039;Wikipedia pages semi-protected against vandalism&#039;,&lt;br /&gt;
	[&#039;all|category|all|autoconfirmed|edit&#039;]     = &#039;Wikipedia semi-protected categories&#039;,&lt;br /&gt;
	[&#039;all|file|all|autoconfirmed|edit&#039;]         = &#039;Wikipedia semi-protected files&#039;,&lt;br /&gt;
	[&#039;all|portal|all|autoconfirmed|edit&#039;]       = &#039;Wikipedia semi-protected portals&#039;,&lt;br /&gt;
	[&#039;all|project|all|autoconfirmed|edit&#039;]      = &#039;Wikipedia semi-protected project pages&#039;,&lt;br /&gt;
	[&#039;all|talk|all|autoconfirmed|edit&#039;]         = &#039;Wikipedia semi-protected talk pages&#039;,&lt;br /&gt;
	[&#039;all|template|all|autoconfirmed|edit&#039;]     = &#039;Wikipedia semi-protected templates&#039;,&lt;br /&gt;
	[&#039;all|user|all|autoconfirmed|edit&#039;]         = &#039;Wikipedia semi-protected user and user talk pages&#039;,&lt;br /&gt;
	[&#039;all|template|all|templateeditor|edit&#039;]    = &#039;Wikipedia template-protected templates&#039;,&lt;br /&gt;
	[&#039;all|template|all|templateeditor|move&#039;]    = &#039;Wikipedia template-protected templates&#039;, -- move-protected templates&lt;br /&gt;
	[&#039;all|all|blp|sysop|edit&#039;]                  = &#039;Wikipedia indefinitely protected biographies of living people&#039;,&lt;br /&gt;
	[&#039;temp|all|blp|sysop|edit&#039;]                 = &#039;Wikipedia temporarily protected biographies of living people&#039;,&lt;br /&gt;
	[&#039;all|all|dispute|sysop|edit&#039;]              = &#039;Wikipedia pages protected due to dispute&#039;,&lt;br /&gt;
	[&#039;all|all|sock|sysop|edit&#039;]                 = &#039;Wikipedia pages protected from banned users&#039;,&lt;br /&gt;
	[&#039;all|all|vandalism|sysop|edit&#039;]            = &#039;Wikipedia pages protected against vandalism&#039;,&lt;br /&gt;
	[&#039;all|category|all|sysop|edit&#039;]             = &#039;Wikipedia fully protected categories&#039;,&lt;br /&gt;
	[&#039;all|file|all|sysop|edit&#039;]                 = &#039;Wikipedia fully-protected files&#039;,&lt;br /&gt;
	[&#039;all|project|all|sysop|edit&#039;]              = &#039;Wikipedia fully-protected project pages&#039;,&lt;br /&gt;
	[&#039;all|talk|all|sysop|edit&#039;]                 = &#039;Wikipedia fully-protected talk pages&#039;,&lt;br /&gt;
	[&#039;all|template|all|extendedconfirmed|edit&#039;] = &#039;Wikipedia extended-confirmed-protected templates&#039;,&lt;br /&gt;
	[&#039;all|template|all|sysop|edit&#039;]             = &#039;Wikipedia fully protected templates&#039;,&lt;br /&gt;
	[&#039;all|user|all|sysop|edit&#039;]                 = &#039;Wikipedia fully protected user and user talk pages&#039;,&lt;br /&gt;
	[&#039;all|module|all|all|edit&#039;]                 = &#039;Wikipedia fully-protected modules&#039;,&lt;br /&gt;
	[&#039;all|module|all|templateeditor|edit&#039;]      = &#039;Wikipedia template-protected modules&#039;,&lt;br /&gt;
	[&#039;all|module|all|autoconfirmed|edit&#039;]       = &#039;Wikipedia semi-protected modules&#039;,&lt;br /&gt;
	[&#039;all|all|all|sysop|move&#039;]                  = &#039;Wikipedia move-protected pages&#039;,&lt;br /&gt;
	[&#039;indef|all|all|sysop|move&#039;]                = &#039;Wikipedia indefinitely move-protected pages&#039;,&lt;br /&gt;
	[&#039;all|all|dispute|sysop|move&#039;]              = &#039;Wikipedia pages move-protected due to dispute&#039;,&lt;br /&gt;
	[&#039;all|all|vandalism|sysop|move&#039;]            = &#039;Wikipedia pages move-protected due to vandalism&#039;,&lt;br /&gt;
	[&#039;all|portal|all|sysop|move&#039;]               = &#039;Wikipedia move-protected portals&#039;,&lt;br /&gt;
	[&#039;all|project|all|sysop|move&#039;]              = &#039;Wikipedia move-protected project pages&#039;,&lt;br /&gt;
	[&#039;all|talk|all|sysop|move&#039;]                 = &#039;Wikipedia move-protected talk pages&#039;,&lt;br /&gt;
	[&#039;all|template|all|sysop|move&#039;]             = &#039;Wikipedia move-protected templates&#039;,&lt;br /&gt;
	[&#039;all|user|all|sysop|move&#039;]                 = &#039;Wikipedia move-protected user and user talk pages&#039;,&lt;br /&gt;
	[&#039;all|all|all|autoconfirmed|autoreview&#039;]    = &#039;Wikipedia pending changes protected pages&#039;,&lt;br /&gt;
	[&#039;all|file|all|all|upload&#039;]                 = &#039;Wikipedia upload-protected files&#039;,&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] = &#039;article&#039;,&lt;br /&gt;
	[6] = &#039;file&#039;,&lt;br /&gt;
	[10] = &#039;template&#039;,&lt;br /&gt;
	[14] = &#039;category&#039;,&lt;br /&gt;
	[828] = &#039;module&#039;,&lt;br /&gt;
	default = &#039;page&#039;&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;
	[&#039;indef&#039;] = true,&lt;br /&gt;
	[&#039;indefinite&#039;] = true,&lt;br /&gt;
	[&#039;indefinitely&#039;] = true,&lt;br /&gt;
	[&#039;infinite&#039;] = 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&#039;s page editing permissions.&lt;br /&gt;
hierarchy = {&lt;br /&gt;
	sysop = {},&lt;br /&gt;
	reviewer = {&#039;sysop&#039;},&lt;br /&gt;
	filemover = {&#039;sysop&#039;},&lt;br /&gt;
	templateeditor = {&#039;sysop&#039;},&lt;br /&gt;
	extendedconfirmed = {&#039;sysop&#039;},&lt;br /&gt;
	autoconfirmed = {&#039;reviewer&#039;, &#039;filemover&#039;, &#039;templateeditor&#039;, &#039;extendedconfirmed&#039;},&lt;br /&gt;
	user = {&#039;autoconfirmed&#039;},&lt;br /&gt;
	[&#039;*&#039;] = {&#039;user&#039;}&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;
	[&#039;Template:Pp&#039;]                         = {},&lt;br /&gt;
	[&#039;Template:Pp-extended&#039;]                = {&#039;ecp&#039;},&lt;br /&gt;
	[&#039;Template:Pp-blp&#039;]                     = {&#039;blp&#039;},&lt;br /&gt;
	-- we don&#039;t need Template:Pp-create&lt;br /&gt;
	[&#039;Template:Pp-dispute&#039;]                 = {&#039;dispute&#039;},&lt;br /&gt;
	[&#039;Template:Pp-main-page&#039;]               = {&#039;mainpage&#039;},&lt;br /&gt;
	[&#039;Template:Pp-move&#039;]                    = {action = &#039;move&#039;, catonly = &#039;yes&#039;},&lt;br /&gt;
	[&#039;Template:Pp-move-dispute&#039;]            = {&#039;dispute&#039;, action = &#039;move&#039;, catonly = &#039;yes&#039;},&lt;br /&gt;
	-- we don&#039;t need Template:Pp-move-indef&lt;br /&gt;
	[&#039;Template:Pp-move-vandalism&#039;]          = {&#039;vandalism&#039;, action = &#039;move&#039;, catonly = &#039;yes&#039;},&lt;br /&gt;
	[&#039;Template:Pp-office&#039;]                  = {&#039;office&#039;},&lt;br /&gt;
	[&#039;Template:Pp-office-dmca&#039;]             = {&#039;dmca&#039;},&lt;br /&gt;
	[&#039;Template:Pp-pc&#039;]                      = {action = &#039;autoreview&#039;, small = true},&lt;br /&gt;
	[&#039;Template:Pp-pc1&#039;]                     = {action = &#039;autoreview&#039;, small = true},&lt;br /&gt;
	[&#039;Template:Pp-reset&#039;]                   = {&#039;reset&#039;},&lt;br /&gt;
	[&#039;Template:Pp-semi-indef&#039;]              = {small = true},&lt;br /&gt;
	[&#039;Template:Pp-sock&#039;]                    = {&#039;sock&#039;},&lt;br /&gt;
	[&#039;Template:Pp-template&#039;]                = {&#039;template&#039;, small = true},&lt;br /&gt;
	[&#039;Template:Pp-upload&#039;]                  = {action = &#039;upload&#039;},&lt;br /&gt;
	[&#039;Template:Pp-usertalk&#039;]                = {&#039;usertalk&#039;},&lt;br /&gt;
	[&#039;Template:Pp-vandalism&#039;]               = {&#039;vandalism&#039;},&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;
[&#039;intro-blurb-expiry&#039;] = &#039;${PROTECTIONBLURB} until ${EXPIRY}.&#039;,&lt;br /&gt;
[&#039;intro-blurb-noexpiry&#039;] = &#039;${PROTECTIONBLURB}.&#039;,&lt;br /&gt;
[&#039;intro-fragment-expiry&#039;] = &#039;${PROTECTIONBLURB} until ${EXPIRY},&#039;,&lt;br /&gt;
[&#039;intro-fragment-noexpiry&#039;] = &#039;${PROTECTIONBLURB}&#039;,&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;
[&#039;tooltip-blurb-expiry&#039;] = &#039;This ${PAGETYPE} is ${PROTECTIONLEVEL} until ${EXPIRY}.&#039;,&lt;br /&gt;
[&#039;tooltip-blurb-noexpiry&#039;] = &#039;This ${PAGETYPE} is ${PROTECTIONLEVEL}.&#039;,&lt;br /&gt;
[&#039;tooltip-fragment-expiry&#039;] = &#039;This ${PAGETYPE} is ${PROTECTIONLEVEL} until ${EXPIRY},&#039;,&lt;br /&gt;
[&#039;tooltip-fragment-noexpiry&#039;] = &#039;This ${PAGETYPE} is ${PROTECTIONLEVEL}&#039;,&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;
[&#039;explanation-blurb-nounprotect&#039;] = &#039;See the [[Wikipedia:Protection policy|&#039;&lt;br /&gt;
	.. &#039;protection policy]] and ${PROTECTIONLOG} for more details.&#039;&lt;br /&gt;
	.. &#039; Please discuss any changes on the ${TALKPAGE}; you&#039;&lt;br /&gt;
	.. &#039; may ${EDITREQUEST} to ask an&#039;&lt;br /&gt;
	.. &#039; [[Wikipedia:Administrators|administrator]] to make an edit if it&#039;&lt;br /&gt;
	.. &#039; is [[Help:Minor edit#When to mark an edit as a minor edit&#039;&lt;br /&gt;
	.. &#039;|uncontroversial]] or supported by [[Wikipedia:Consensus&#039;&lt;br /&gt;
	.. &#039;|consensus]].&#039;,&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;
[&#039;protection-log-display&#039;] = &#039;protection log&#039;,&lt;br /&gt;
[&#039;pc-log-display&#039;] = &#039;pending changes log&#039;,&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;
[&#039;current-version-move-display&#039;] = &#039;current title&#039;,&lt;br /&gt;
[&#039;current-version-edit-display&#039;] = &#039;current version&#039;,&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;
[&#039;talk-page-link-display&#039;] = &#039;talk page&#039;,&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;
[&#039;edit-request-display&#039;] = &#039;submit an edit request&#039;,&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;
[&#039;expiry-date-format&#039;] = &#039;F j, Y &amp;quot;at&amp;quot; H:i e&#039;,&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;
[&#039;tracking-category-incorrect&#039;] = &#039;Wikipedia pages with incorrect protection templates&#039;,&lt;br /&gt;
[&#039;tracking-category-template&#039;] = &#039;Wikipedia template-protected pages other than templates and modules&#039;,&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;
[&#039;image-filename-indef&#039;] = &#039;Full-protection-shackle.svg&#039;,&lt;br /&gt;
[&#039;image-filename-default&#039;] = &#039;Transparent.gif&#039;,&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>User</name></author>
	</entry>
	<entry>
		<id>https://shreloaded.net/index.php?title=Module:Protection_banner&amp;diff=64404</id>
		<title>Module:Protection banner</title>
		<link rel="alternate" type="text/html" href="https://shreloaded.net/index.php?title=Module:Protection_banner&amp;diff=64404"/>
		<updated>2021-08-10T01:28:37Z</updated>

		<summary type="html">&lt;p&gt;User: 1 revision imported&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(&#039;Module:No globals&#039;)&lt;br /&gt;
local makeFileLink = require(&#039;Module:File link&#039;)._main&lt;br /&gt;
local effectiveProtectionLevel = require(&#039;Module:Effective protection level&#039;)._main&lt;br /&gt;
local effectiveProtectionExpiry = require(&#039;Module:Effective protection expiry&#039;)._main&lt;br /&gt;
local yesno = require(&#039;Module:Yesno&#039;)&lt;br /&gt;
&lt;br /&gt;
-- Lazily initialise modules and objects we don&#039;t always need.&lt;br /&gt;
local getArgs, makeMessageBox, lang&lt;br /&gt;
&lt;br /&gt;
-- Set constants.&lt;br /&gt;
local CONFIG_MODULE = &#039;Module:Protection banner/config&#039;&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;
			&#039;[[%s:%s|%s]]&#039;,&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, &#039;U&#039;, 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;
		&#039;invalid %s: %s&#039;,&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;
		&#039;[%s %s]&#039;,&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&#039;t use pairs() since we&#039;re adding and removing things as we&#039;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;
	&#039;text&#039;,&lt;br /&gt;
	&#039;explanation&#039;,&lt;br /&gt;
	&#039;tooltip&#039;,&lt;br /&gt;
	&#039;alt&#039;,&lt;br /&gt;
	&#039;link&#039;,&lt;br /&gt;
	&#039;image&#039;&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 = &#039;edit&#039;&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;
			&#039;invalid action: %s&#039;,&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 == &#039;move&#039; and obj.level == &#039;autoconfirmed&#039;) 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 = &#039;*&#039;&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 == &#039;infinity&#039; then&lt;br /&gt;
		obj.expiry = &#039;indef&#039;&lt;br /&gt;
	elseif effectiveExpiry ~= &#039;unknown&#039; then&lt;br /&gt;
		obj.expiry = validateDate(effectiveExpiry, &#039;expiry date&#039;)&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(&#039;|&#039;) then&lt;br /&gt;
			error(&#039;reasons cannot contain the pipe character (&amp;quot;|&amp;quot;)&#039;, 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, &#039;protection date&#039;)&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:isUserScript()&lt;br /&gt;
	-- Whether the page is a user JavaScript or CSS page.&lt;br /&gt;
	local title = self.title&lt;br /&gt;
	return title.namespace == 2 and (&lt;br /&gt;
		title.contentModel == &#039;javascript&#039; or title.contentModel == &#039;css&#039;&lt;br /&gt;
	)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function Protection:isProtected()&lt;br /&gt;
	return self.level ~= &#039;*&#039;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function Protection:shouldShowLock()&lt;br /&gt;
	-- Whether we should output a banner/padlock&lt;br /&gt;
	return self:isProtected() and not self:isUserScript()&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Whether this page needs a protection category.&lt;br /&gt;
Protection.shouldHaveProtectionCategory = Protection.shouldShowLock&lt;br /&gt;
&lt;br /&gt;
function Protection:isTemporary()&lt;br /&gt;
	return type(self.expiry) == &#039;number&#039;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function Protection:makeProtectionCategory()&lt;br /&gt;
	if not self:shouldHaveProtectionCategory() then&lt;br /&gt;
		return &#039;&#039;&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local cfg = self._cfg&lt;br /&gt;
	local title = self.title&lt;br /&gt;
	&lt;br /&gt;
	-- Get the expiry key fragment.&lt;br /&gt;
	local expiryFragment&lt;br /&gt;
	if self.expiry == &#039;indef&#039; then&lt;br /&gt;
		expiryFragment = self.expiry&lt;br /&gt;
	elseif type(self.expiry) == &#039;number&#039; then&lt;br /&gt;
		expiryFragment = &#039;temp&#039;&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 = &#039;talk&#039;&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] = &#039;all&#039;&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] = &#039;all&#039;&lt;br /&gt;
				end&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
		key = table.concat(key, &#039;|&#039;)&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 &#039;&#039;&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:shouldHaveProtectionCategory()&lt;br /&gt;
		or type(expiry) == &#039;number&#039; 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 == &#039;templateeditor&#039;&lt;br /&gt;
		and (&lt;br /&gt;
			(action ~= &#039;edit&#039; and action ~= &#039;move&#039;)&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:isIncorrect() then&lt;br /&gt;
		ret[#ret + 1] = makeCategoryLink(&lt;br /&gt;
			msg[&#039;tracking-category-incorrect&#039;],&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[&#039;tracking-category-template&#039;],&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[&#039;expiry-date-format&#039;] or &#039;j F Y&#039;,&lt;br /&gt;
		&#039;@&#039; .. 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 &#039;&#039;&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(&#039;${(%u+)}&#039;, 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 == &#039;move&#039; then&lt;br /&gt;
		-- We need the move log link.&lt;br /&gt;
		return makeFullUrl(&lt;br /&gt;
			&#039;Special:Log&#039;,&lt;br /&gt;
			{type = &#039;move&#039;, page = pagename},&lt;br /&gt;
			self:_getExpandedMessage(&#039;current-version-move-display&#039;)&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 = &#039;history&#039;},&lt;br /&gt;
			self:_getExpandedMessage(&#039;current-version-edit-display&#039;)&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(&#039;Module:Submit an edit request&#039;)&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 == &#039;edit&#039; then&lt;br /&gt;
		if level == &#039;autoconfirmed&#039; then&lt;br /&gt;
			requestType = &#039;semi&#039;&lt;br /&gt;
		elseif level == &#039;extendedconfirmed&#039; then&lt;br /&gt;
			requestType = &#039;extended&#039;&lt;br /&gt;
		elseif level == &#039;templateeditor&#039; then&lt;br /&gt;
			requestType = &#039;template&#039;&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	requestType = requestType or &#039;full&#039;&lt;br /&gt;
	&lt;br /&gt;
	-- Get the display value.&lt;br /&gt;
	local display = self:_getExpandedMessage(&#039;edit-request-display&#039;)&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) == &#039;number&#039; 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(&#039;explanation-blurb-nounprotect&#039;)&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 &#039;talk&#039; or &#039;subject&#039;&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;
			&#039;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;&#039;,&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(&#039;intro-blurb-expiry&#039;)&lt;br /&gt;
	else&lt;br /&gt;
		return self:_getExpandedMessage(&#039;intro-blurb-noexpiry&#039;)&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(&#039;intro-fragment-expiry&#039;)&lt;br /&gt;
	else&lt;br /&gt;
		return self:_getExpandedMessage(&#039;intro-fragment-noexpiry&#039;)&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(&#039;no default pagetype defined&#039;, 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(&#039;no protection blurb defined for protectionBlurbs.edit.default&#039;, 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) == &#039;number&#039; 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(&#039;no protection level defined for protectionLevels.edit.default&#039;, 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 == &#039;autoreview&#039; then&lt;br /&gt;
		-- We need the pending changes log.&lt;br /&gt;
		return makeFullUrl(&lt;br /&gt;
			&#039;Special:Log&#039;,&lt;br /&gt;
			{type = &#039;stable&#039;, page = pagename},&lt;br /&gt;
			self:_getExpandedMessage(&#039;pc-log-display&#039;)&lt;br /&gt;
		)&lt;br /&gt;
	else&lt;br /&gt;
		-- We need the protection log.&lt;br /&gt;
		return makeFullUrl(&lt;br /&gt;
			&#039;Special:Log&#039;,&lt;br /&gt;
			{type = &#039;protect&#039;, page = pagename},&lt;br /&gt;
			self:_getExpandedMessage(&#039;protection-log-display&#039;)&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;
		&#039;[[%s:%s#%s|%s]]&#039;,&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 &#039;top&#039;,&lt;br /&gt;
		self:_getExpandedMessage(&#039;talk-page-link-display&#039;)&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(&#039;tooltip-blurb-expiry&#039;)&lt;br /&gt;
	else&lt;br /&gt;
		return self:_getExpandedMessage(&#039;tooltip-blurb-noexpiry&#039;)&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(&#039;tooltip-fragment-expiry&#039;)&lt;br /&gt;
	else&lt;br /&gt;
		return self:_getExpandedMessage(&#039;tooltip-fragment-noexpiry&#039;)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function Blurb:_makeVandalTemplateParameter()&lt;br /&gt;
	return mw.getCurrentFrame():expandTemplate{&lt;br /&gt;
		title=&amp;quot;vandal-m&amp;quot;,&lt;br /&gt;
		args={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;
			&#039;&amp;quot;%s&amp;quot; is not a valid banner config field&#039;,&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) == &#039;string&#039; then&lt;br /&gt;
		return self:_substituteParameters(msg)&lt;br /&gt;
	elseif type(msg) == &#039;function&#039; then&lt;br /&gt;
		msg = msg(self._protectionObj, self._args)&lt;br /&gt;
		if type(msg) ~= &#039;string&#039; then&lt;br /&gt;
			error(string.format(&lt;br /&gt;
				&#039;bad output from banner config function with key &amp;quot;%s&amp;quot;&#039;&lt;br /&gt;
					.. &#039; (expected string, got %s)&#039;,&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&#039;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 == &#039;edit&#039;&lt;br /&gt;
			and level == &#039;sysop&#039;&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[&#039;image-filename-indef&#039;]&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[&#039;image-filename-default&#039;]&lt;br /&gt;
		or &#039;Transparent.gif&#039;&lt;br /&gt;
	return makeFileLink{&lt;br /&gt;
		file = filename,&lt;br /&gt;
		size = (self.imageWidth or 20) .. &#039;px&#039;,&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&#039;t need the blurb.&lt;br /&gt;
	obj.imageWidth = 40&lt;br /&gt;
	obj.imageCaption = blurbObj:makeBannerText(&#039;alt&#039;) -- Large banners use the alt text for the tooltip.&lt;br /&gt;
	obj._reasonText = blurbObj:makeBannerText(&#039;text&#039;)&lt;br /&gt;
	obj._explanationText = blurbObj:makeBannerText(&#039;explanation&#039;)&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(&#039;Module:Message box&#039;).main&lt;br /&gt;
	local reasonText = self._reasonText or error(&#039;no reason text set&#039;, 2)&lt;br /&gt;
	local explanationText = self._explanationText&lt;br /&gt;
	local mbargs = {&lt;br /&gt;
		page = self._page,&lt;br /&gt;
		type = &#039;protection&#039;,&lt;br /&gt;
		image = self:renderImage(),&lt;br /&gt;
		text = string.format(&lt;br /&gt;
			&amp;quot;&#039;&#039;&#039;%s&#039;&#039;&#039;%s&amp;quot;,&lt;br /&gt;
			reasonText,&lt;br /&gt;
			explanationText and &#039;&amp;lt;br /&amp;gt;&#039; .. explanationText or &#039;&#039;&lt;br /&gt;
		)&lt;br /&gt;
	}&lt;br /&gt;
	return makeMessageBox(&#039;mbox&#039;, 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&#039;t need the blurb.&lt;br /&gt;
	obj.imageWidth = 20&lt;br /&gt;
	obj.imageCaption = blurbObj:makeBannerText(&#039;tooltip&#039;)&lt;br /&gt;
	obj._imageAlt = blurbObj:makeBannerText(&#039;alt&#039;)&lt;br /&gt;
	obj._imageLink = blurbObj:makeBannerText(&#039;link&#039;)&lt;br /&gt;
	obj._indicatorName = cfg.padlockIndicatorNames[protectionObj.action]&lt;br /&gt;
		or cfg.padlockIndicatorNames.default&lt;br /&gt;
		or &#039;pp-default&#039;&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 = &#039;nowiki&#039;} .. frame:extensionTag{&lt;br /&gt;
		name = &#039;indicator&#039;,&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&#039;s edit protection is equally or more restrictive than its&lt;br /&gt;
	-- protection from some other action, then don&#039;t bother displaying anything&lt;br /&gt;
	-- for the other action (except categories).&lt;br /&gt;
	if not yesno(args.catonly) and (protectionObj.action == &#039;edit&#039; 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(&#039;edit&#039;, 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:shouldShowLock() 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(&#039;/sandbox$&#039;, &#039;&#039;)]&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(&#039;Module:Arguments&#039;).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>User</name></author>
	</entry>
	<entry>
		<id>https://shreloaded.net/index.php?title=Module:No_globals&amp;diff=64402</id>
		<title>Module:No globals</title>
		<link rel="alternate" type="text/html" href="https://shreloaded.net/index.php?title=Module:No_globals&amp;diff=64402"/>
		<updated>2021-08-10T01:28:37Z</updated>

		<summary type="html">&lt;p&gt;User: 1 revision imported&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 ~= &#039;arg&#039; then&lt;br /&gt;
		error(&#039;Tried to read nil global &#039; .. 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 ~= &#039;arg&#039; then&lt;br /&gt;
		error(&#039;Tried to write global &#039; .. 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>User</name></author>
	</entry>
	<entry>
		<id>https://shreloaded.net/index.php?title=Module:File_link&amp;diff=64400</id>
		<title>Module:File link</title>
		<link rel="alternate" type="text/html" href="https://shreloaded.net/index.php?title=Module:File_link&amp;diff=64400"/>
		<updated>2021-08-10T01:28:37Z</updated>

		<summary type="html">&lt;p&gt;User: 1 revision imported&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;-- This module provides a library for formatting file wikilinks.&lt;br /&gt;
&lt;br /&gt;
local yesno = require(&#039;Module:Yesno&#039;)&lt;br /&gt;
local checkType = require(&#039;libraryUtil&#039;).checkType&lt;br /&gt;
&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
function p._main(args)&lt;br /&gt;
	checkType(&#039;_main&#039;, 1, args, &#039;table&#039;)&lt;br /&gt;
&lt;br /&gt;
	-- This is basically libraryUtil.checkTypeForNamedArg, but we are rolling our&lt;br /&gt;
	-- own function to get the right error level.&lt;br /&gt;
	local function checkArg(key, val, level)&lt;br /&gt;
		if type(val) ~= &#039;string&#039; then&lt;br /&gt;
			error(string.format(&lt;br /&gt;
				&amp;quot;type error in &#039;%s&#039; parameter of &#039;_main&#039; (expected string, got %s)&amp;quot;,&lt;br /&gt;
				key, type(val)&lt;br /&gt;
			), level)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local ret = {}&lt;br /&gt;
&lt;br /&gt;
	-- Adds a positional parameter to the buffer.&lt;br /&gt;
	local function addPositional(key)&lt;br /&gt;
		local val = args[key]&lt;br /&gt;
		if not val then&lt;br /&gt;
			return nil&lt;br /&gt;
		end&lt;br /&gt;
		checkArg(key, val, 4)&lt;br /&gt;
		ret[#ret + 1] = val&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Adds a named parameter to the buffer. We assume that the parameter name&lt;br /&gt;
	-- is the same as the argument key.&lt;br /&gt;
	local function addNamed(key)&lt;br /&gt;
		local val = args[key]&lt;br /&gt;
		if not val then&lt;br /&gt;
			return nil&lt;br /&gt;
		end&lt;br /&gt;
		checkArg(key, val, 4)&lt;br /&gt;
		ret[#ret + 1] = key .. &#039;=&#039; .. val&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Filename&lt;br /&gt;
	checkArg(&#039;file&#039;, args.file, 3)&lt;br /&gt;
	ret[#ret + 1] = &#039;File:&#039; .. args.file&lt;br /&gt;
&lt;br /&gt;
	-- Format&lt;br /&gt;
	if args.format then&lt;br /&gt;
		checkArg(&#039;format&#039;, args.format)&lt;br /&gt;
		if args.formatfile then&lt;br /&gt;
			checkArg(&#039;formatfile&#039;, args.formatfile)&lt;br /&gt;
			ret[#ret + 1] = args.format .. &#039;=&#039; .. args.formatfile&lt;br /&gt;
		else&lt;br /&gt;
			ret[#ret + 1] = args.format&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Border&lt;br /&gt;
	if yesno(args.border) then&lt;br /&gt;
		ret[#ret + 1] = &#039;border&#039;&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	addPositional(&#039;location&#039;)&lt;br /&gt;
	addPositional(&#039;alignment&#039;)&lt;br /&gt;
	addPositional(&#039;size&#039;)&lt;br /&gt;
	addNamed(&#039;upright&#039;)&lt;br /&gt;
	addNamed(&#039;link&#039;)&lt;br /&gt;
	addNamed(&#039;alt&#039;)&lt;br /&gt;
	addNamed(&#039;page&#039;)&lt;br /&gt;
	addNamed(&#039;class&#039;)&lt;br /&gt;
	addNamed(&#039;lang&#039;)&lt;br /&gt;
	addNamed(&#039;start&#039;)&lt;br /&gt;
	addNamed(&#039;end&#039;)&lt;br /&gt;
	addNamed(&#039;thumbtime&#039;)&lt;br /&gt;
	addPositional(&#039;caption&#039;)&lt;br /&gt;
&lt;br /&gt;
	return string.format(&#039;[[%s]]&#039;, table.concat(ret, &#039;|&#039;))&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.main(frame)&lt;br /&gt;
	local origArgs = require(&#039;Module:Arguments&#039;).getArgs(frame, {&lt;br /&gt;
		wrappers = &#039;Template:File link&#039;&lt;br /&gt;
	})&lt;br /&gt;
	if not origArgs.file then&lt;br /&gt;
		error(&amp;quot;&#039;file&#039; parameter missing from [[Template:File link]]&amp;quot;, 0)&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Copy the arguments that were passed to a new table to avoid looking up&lt;br /&gt;
	-- every possible parameter in the frame object.&lt;br /&gt;
	local args = {}&lt;br /&gt;
	for k, v in pairs(origArgs) do&lt;br /&gt;
		-- Make _BLANK a special argument to add a blank parameter. For use in&lt;br /&gt;
		-- conditional templates etc. it is useful for blank arguments to be&lt;br /&gt;
		-- ignored, but we still need a way to specify them so that we can do&lt;br /&gt;
		-- things like [[File:Example.png|link=]].&lt;br /&gt;
		if v == &#039;_BLANK&#039; then&lt;br /&gt;
			v = &#039;&#039;&lt;br /&gt;
		end&lt;br /&gt;
		args[k] = v&lt;br /&gt;
	end&lt;br /&gt;
	return p._main(args)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>User</name></author>
	</entry>
	<entry>
		<id>https://shreloaded.net/index.php?title=Module:Effective_protection_level&amp;diff=64398</id>
		<title>Module:Effective protection level</title>
		<link rel="alternate" type="text/html" href="https://shreloaded.net/index.php?title=Module:Effective_protection_level&amp;diff=64398"/>
		<updated>2021-08-10T01:28:36Z</updated>

		<summary type="html">&lt;p&gt;User: 1 revision imported&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;local p = {}&lt;br /&gt;
&lt;br /&gt;
-- Returns the permission required to perform a given action on a given title.&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) == &#039;table&#039; 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 == &#039;autoreview&#039; then&lt;br /&gt;
		local level = mw.ext.FlaggedRevs.getStabilitySettings(title)&lt;br /&gt;
		level = level and level.autoreview&lt;br /&gt;
		if level == &#039;review&#039; then&lt;br /&gt;
			return &#039;reviewer&#039;&lt;br /&gt;
		elseif level ~= &#039;&#039; then&lt;br /&gt;
			return level&lt;br /&gt;
		else&lt;br /&gt;
			return nil -- not &#039;*&#039;. a page not being PC-protected is distinct from it being PC-protected with anyone able to review. also not &#039;&#039;, as that would mean PC-protected but nobody can review&lt;br /&gt;
		end&lt;br /&gt;
	elseif action ~= &#039;edit&#039; and action ~= &#039;move&#039; and action ~= &#039;create&#039; and action ~= &#039;upload&#039; and action ~= &#039;undelete&#039; then&lt;br /&gt;
		error( &#039;First parameter must be one of edit, move, create, upload, undelete, autoreview&#039;, 2 )&lt;br /&gt;
	end&lt;br /&gt;
	if title.namespace == 8 then -- MediaWiki namespace&lt;br /&gt;
		if title.text:sub(-3) == &#039;.js&#039; or title.text:sub(-4) == &#039;.css&#039; or title.contentModel == &#039;javascript&#039; or title.contentModel == &#039;css&#039; then -- site JS or CSS page&lt;br /&gt;
			return &#039;interfaceadmin&#039;&lt;br /&gt;
		else -- any non-JS/CSS MediaWiki page&lt;br /&gt;
			return &#039;sysop&#039;&lt;br /&gt;
		end&lt;br /&gt;
	elseif title.namespace == 2 and title.isSubpage then&lt;br /&gt;
		if title.contentModel == &#039;javascript&#039; or title.contentModel == &#039;css&#039; then -- user JS or CSS page&lt;br /&gt;
			return &#039;interfaceadmin&#039;&lt;br /&gt;
		elseif title.contentModel == &#039;json&#039; then -- user JSON page&lt;br /&gt;
			return &#039;sysop&#039;&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	if action == &#039;undelete&#039; then&lt;br /&gt;
		return &#039;sysop&#039;&lt;br /&gt;
	end&lt;br /&gt;
	local level = title.protectionLevels[action] and title.protectionLevels[action][1]&lt;br /&gt;
	if level == &#039;sysop&#039; or level == &#039;editprotected&#039; then&lt;br /&gt;
		return &#039;sysop&#039;&lt;br /&gt;
	elseif title.cascadingProtection.restrictions[action] and title.cascadingProtection.restrictions[action][1] then -- used by a cascading-protected page&lt;br /&gt;
		return &#039;sysop&#039;&lt;br /&gt;
	elseif level == &#039;templateeditor&#039; then&lt;br /&gt;
		return &#039;templateeditor&#039;&lt;br /&gt;
	elseif action == &#039;move&#039; then&lt;br /&gt;
		local blacklistentry = mw.ext.TitleBlacklist.test(&#039;edit&#039;, pagename) -- Testing action edit is correct, since this is for the source page. The target page name gets tested with action move.&lt;br /&gt;
		if blacklistentry and not blacklistentry.params.autoconfirmed then&lt;br /&gt;
			return &#039;templateeditor&#039;&lt;br /&gt;
		elseif title.namespace == 6 then&lt;br /&gt;
			return &#039;filemover&#039;&lt;br /&gt;
		elseif level == &#039;extendedconfirmed&#039; then&lt;br /&gt;
			return &#039;extendedconfirmed&#039;&lt;br /&gt;
		else&lt;br /&gt;
			return &#039;autoconfirmed&#039;&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	local blacklistentry = mw.ext.TitleBlacklist.test(action, pagename)&lt;br /&gt;
	if blacklistentry then&lt;br /&gt;
		if not blacklistentry.params.autoconfirmed then&lt;br /&gt;
			return &#039;templateeditor&#039;&lt;br /&gt;
		elseif level == &#039;extendedconfirmed&#039; then&lt;br /&gt;
			return &#039;extendedconfirmed&#039;&lt;br /&gt;
		else&lt;br /&gt;
			return &#039;autoconfirmed&#039;&lt;br /&gt;
		end&lt;br /&gt;
	elseif level == &#039;editsemiprotected&#039; then -- create-semiprotected pages return this for some reason&lt;br /&gt;
		return &#039;autoconfirmed&#039;&lt;br /&gt;
	elseif level then&lt;br /&gt;
		return level&lt;br /&gt;
	elseif action == &#039;upload&#039; then&lt;br /&gt;
		return &#039;autoconfirmed&#039;&lt;br /&gt;
	elseif action == &#039;create&#039; and title.namespace % 2 == 0 and title.namespace ~= 118 then -- You need to be registered, but not autoconfirmed, to create non-talk pages other than drafts&lt;br /&gt;
		return &#039;user&#039;&lt;br /&gt;
	else&lt;br /&gt;
		return &#039;*&#039;&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>User</name></author>
	</entry>
	<entry>
		<id>https://shreloaded.net/index.php?title=Module:Effective_protection_expiry&amp;diff=64396</id>
		<title>Module:Effective protection expiry</title>
		<link rel="alternate" type="text/html" href="https://shreloaded.net/index.php?title=Module:Effective_protection_expiry&amp;diff=64396"/>
		<updated>2021-08-10T01:28:36Z</updated>

		<summary type="html">&lt;p&gt;User: 1 revision imported&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) == &#039;table&#039; 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 == &#039;autoreview&#039; then&lt;br /&gt;
		local stabilitySettings = mw.ext.FlaggedRevs.getStabilitySettings(title)&lt;br /&gt;
		return stabilitySettings and stabilitySettings.expiry or &#039;unknown&#039;&lt;br /&gt;
	elseif action ~= &#039;edit&#039; and action ~= &#039;move&#039; and action ~= &#039;create&#039; and action ~= &#039;upload&#039; then&lt;br /&gt;
		error( &#039;First parameter must be one of edit, move, create, upload, autoreview&#039;, 2 )&lt;br /&gt;
	end&lt;br /&gt;
	local rawExpiry = mw.getCurrentFrame():callParserFunction(&#039;PROTECTIONEXPIRY&#039;, action, pagename)&lt;br /&gt;
	if rawExpiry == &#039;infinity&#039; then&lt;br /&gt;
		return &#039;infinity&#039;&lt;br /&gt;
	elseif rawExpiry == &#039;&#039; then&lt;br /&gt;
		return &#039;unknown&#039;&lt;br /&gt;
	else&lt;br /&gt;
		local year, month, day, hour, minute, second = rawExpiry:match(&lt;br /&gt;
			&#039;^(%d%d%d%d)(%d%d)(%d%d)(%d%d)(%d%d)(%d%d)$&#039;&lt;br /&gt;
		)&lt;br /&gt;
		if year then&lt;br /&gt;
			return string.format(&lt;br /&gt;
				&#039;%s-%s-%sT%s:%s:%s&#039;,&lt;br /&gt;
				year, month, day, hour, minute, second&lt;br /&gt;
			)&lt;br /&gt;
		else&lt;br /&gt;
			error(&#039;internal error in Module:Effective protection expiry; malformed expiry timestamp&#039;)&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>User</name></author>
	</entry>
	<entry>
		<id>https://shreloaded.net/index.php?title=Template:Pp-template&amp;diff=64394</id>
		<title>Template:Pp-template</title>
		<link rel="alternate" type="text/html" href="https://shreloaded.net/index.php?title=Template:Pp-template&amp;diff=64394"/>
		<updated>2021-08-10T01:28:36Z</updated>

		<summary type="html">&lt;p&gt;User: 1 revision imported&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;includeonly&amp;gt;{{#invoke:Protection banner|main}}&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>User</name></author>
	</entry>
	<entry>
		<id>https://shreloaded.net/index.php?title=Module:Infobox_military_conflict/styles.css&amp;diff=64392</id>
		<title>Module:Infobox military conflict/styles.css</title>
		<link rel="alternate" type="text/html" href="https://shreloaded.net/index.php?title=Module:Infobox_military_conflict/styles.css&amp;diff=64392"/>
		<updated>2021-08-10T01:28:36Z</updated>

		<summary type="html">&lt;p&gt;User: 1 revision imported&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;/* {{pp-template}} */&lt;br /&gt;
@media all and (min-width:720px) {&lt;br /&gt;
	.desktop-float-right {&lt;br /&gt;
		box-sizing: border-box;&lt;br /&gt;
		float: right;&lt;br /&gt;
		clear: right;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.infobox.vevent .status &amp;gt; p:first-child {&lt;br /&gt;
	margin: 0;&lt;br /&gt;
}&lt;/div&gt;</summary>
		<author><name>User</name></author>
	</entry>
	<entry>
		<id>https://shreloaded.net/index.php?title=Template:Ombox&amp;diff=64375</id>
		<title>Template:Ombox</title>
		<link rel="alternate" type="text/html" href="https://shreloaded.net/index.php?title=Template:Ombox&amp;diff=64375"/>
		<updated>2021-08-09T10:32:09Z</updated>

		<summary type="html">&lt;p&gt;User: 1 revision imported&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{#invoke:Message box|ombox}}&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>User</name></author>
	</entry>
	<entry>
		<id>https://shreloaded.net/index.php?title=Template:Module_rating&amp;diff=64373</id>
		<title>Template:Module rating</title>
		<link rel="alternate" type="text/html" href="https://shreloaded.net/index.php?title=Template:Module_rating&amp;diff=64373"/>
		<updated>2021-08-09T10:32:09Z</updated>

		<summary type="html">&lt;p&gt;User: 1 revision imported&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;includeonly&amp;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=|alt=Pre-alpha]]&lt;br /&gt;
   | alpha | a                 = [[File:Alpha lowercase.svg|26x26px|link=|alt=Alpha]]&lt;br /&gt;
   | beta | b                  = [[File:Greek lc beta.svg|40x40px|link=|alt=Beta]]&lt;br /&gt;
   | release | r | general | g = [[File:Green check.svg|40x40px|link=|alt=Ready for use]]&lt;br /&gt;
   | protected | protect | p   = [[File:{{#switch:{{#invoke:Effective protection level|edit|{{#switch:{{SUBPAGENAME}}|doc|sandbox={{FULLBASEPAGENAME}}|{{FULLPAGENAME}}}}}}|autoconfirmed=Semi|extendedconfirmed=Extended|accountcreator|templateeditor=Template|#default=Full}}-protection-shackle.svg|40x40px|link=|alt=Protected]]&lt;br /&gt;
   | semiprotected | semiprotect | semi =[[File:Semi-protection-shackle.svg|40x40px|link=|alt=Semi-protected]]&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 relatively 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 [[Wikipedia:Template sandbox and test cases|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 [[Wikipedia:Substitution|substituted]] very frequently. Because vandalism or mistakes would affect many pages, and even trivial editing might cause substantial load on the servers, it is [[Wikipedia:Protection policy|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;
   | semiprotected | semiprotect | semi   = 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 [[Wikipedia:Substitution|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:SEMI|semi-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.}} [[Category:Pages with templates in the wrong namespace]]|demospace={{{demospace|&amp;lt;noinclude&amp;gt;module&amp;lt;/noinclude&amp;gt;}}}}}&amp;lt;/includeonly&amp;gt;&amp;lt;noinclude&amp;gt;&lt;br /&gt;
{{module rating|release|nocat=true|demospace=module}}&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>User</name></author>
	</entry>
	<entry>
		<id>https://shreloaded.net/index.php?title=Template:Module_other&amp;diff=64371</id>
		<title>Template:Module other</title>
		<link rel="alternate" type="text/html" href="https://shreloaded.net/index.php?title=Template:Module_other&amp;diff=64371"/>
		<updated>2021-08-09T10:32:09Z</updated>

		<summary type="html">&lt;p&gt;User: 1 revision imported&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>User</name></author>
	</entry>
	<entry>
		<id>https://shreloaded.net/index.php?title=Module:WPMILHIST_Infobox_style&amp;diff=64369</id>
		<title>Module:WPMILHIST Infobox style</title>
		<link rel="alternate" type="text/html" href="https://shreloaded.net/index.php?title=Module:WPMILHIST_Infobox_style&amp;diff=64369"/>
		<updated>2021-08-09T10:32:08Z</updated>

		<summary type="html">&lt;p&gt;User: 1 revision imported&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;local retval = {&lt;br /&gt;
	main_box_raw_auto_width = &#039;border-spacing:2px;&#039;,&lt;br /&gt;
	header_raw = &#039;background-color:#C3D6EF;text-align:center;vertical-align:middle;font-size:110%;&#039;,&lt;br /&gt;
	sub_header_raw = &#039;background-color:#DCDCDC;text-align:center;vertical-align:middle;&#039;,&lt;br /&gt;
	header_color = &#039;background-color:#C3D6EF;&#039;,&lt;br /&gt;
	nav_box = &#039;margin:0;float:right;clear:right;width:25.5em;margin-bottom:0.5em;margin-left:1em;&#039;,&lt;br /&gt;
	nav_box_child = &#039;margin:0;float:right;clear:right;width:25em;margin-bottom:0.5em;&#039;,&lt;br /&gt;
	nav_box_wide =  &#039;&#039;,&lt;br /&gt;
	nav_box_header = &#039;background-color:#C3D6EF;&#039;,&lt;br /&gt;
	nav_box_wide_header = &#039;background-color:#C3D6EF;&#039;,&lt;br /&gt;
	nav_box_label = &#039;background-color:#DCDCDC;&#039;,&lt;br /&gt;
	image_box_raw = &#039;text-align:center;border-bottom:1px solid #aaa;line-height:1.5em;&#039;,&lt;br /&gt;
	image_box_plain_raw = &#039;text-align:center;line-height:1.5em;&#039;,&lt;br /&gt;
	internal_border = &#039;1px dotted #aaa;&#039;,&lt;br /&gt;
	section_border = &#039;1px solid #aaa;&#039;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
retval.main_box_raw = &#039;width:25.5em;&#039; .. retval.main_box_raw_auto_width&lt;br /&gt;
retval.header_bar = &#039;style=&amp;quot;&#039; .. retval.header_raw .. &#039;&amp;quot;&#039;&lt;br /&gt;
retval.sub_header_bar = &#039;style=&amp;quot;&#039; .. retval.sub_header_raw .. &#039;&amp;quot;&#039;&lt;br /&gt;
retval.image_box = &#039;style=&amp;quot;&#039; .. retval.image_box_raw .. &#039;&amp;quot;&#039;&lt;br /&gt;
retval.image_box_plain = &#039;style=&amp;quot;&#039; .. retval.image_box_plain_raw .. &#039;&amp;quot;&#039;&lt;br /&gt;
&lt;br /&gt;
return retval&lt;/div&gt;</summary>
		<author><name>User</name></author>
	</entry>
	<entry>
		<id>https://shreloaded.net/index.php?title=Template:Uses_TemplateStyles&amp;diff=64367</id>
		<title>Template:Uses TemplateStyles</title>
		<link rel="alternate" type="text/html" href="https://shreloaded.net/index.php?title=Template:Uses_TemplateStyles&amp;diff=64367"/>
		<updated>2021-08-09T10:24:57Z</updated>

		<summary type="html">&lt;p&gt;User: 1 revision imported&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;includeonly&amp;gt;{{#invoke:Uses TemplateStyles|main}}&amp;lt;/includeonly&amp;gt;&amp;lt;noinclude&amp;gt;&lt;br /&gt;
{{Uses TemplateStyles|Template:Uses TemplateStyles/example.css|nocat=true}}&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>User</name></author>
	</entry>
	<entry>
		<id>https://shreloaded.net/index.php?title=Template:Tl&amp;diff=64365</id>
		<title>Template:Tl</title>
		<link rel="alternate" type="text/html" href="https://shreloaded.net/index.php?title=Template:Tl&amp;diff=64365"/>
		<updated>2021-08-09T10:24:56Z</updated>

		<summary type="html">&lt;p&gt;User: 1 revision imported&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Template:Template link]]&lt;br /&gt;
&lt;br /&gt;
{{Redirect category shell|&lt;br /&gt;
{{R from move}}&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>User</name></author>
	</entry>
	<entry>
		<id>https://shreloaded.net/index.php?title=Template:Template_link&amp;diff=64363</id>
		<title>Template:Template link</title>
		<link rel="alternate" type="text/html" href="https://shreloaded.net/index.php?title=Template:Template_link&amp;diff=64363"/>
		<updated>2021-08-09T10:24:56Z</updated>

		<summary type="html">&lt;p&gt;User: 1 revision imported&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;amp;#123;&amp;amp;#123;[[Template:{{{1}}}|{{{1}}}]]&amp;amp;#125;&amp;amp;#125;&amp;lt;noinclude&amp;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>User</name></author>
	</entry>
	<entry>
		<id>https://shreloaded.net/index.php?title=Module:Infobox_military_conflict&amp;diff=64361</id>
		<title>Module:Infobox military conflict</title>
		<link rel="alternate" type="text/html" href="https://shreloaded.net/index.php?title=Module:Infobox_military_conflict&amp;diff=64361"/>
		<updated>2021-08-09T10:24:56Z</updated>

		<summary type="html">&lt;p&gt;User: 1 revision imported&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;require(&#039;Module:No globals&#039;)&lt;br /&gt;
&lt;br /&gt;
local infoboxStyle = mw.loadData(&#039;Module:WPMILHIST Infobox style&#039;)&lt;br /&gt;
local templatestyles = &#039;Module:Infobox military conflict/styles.css&#039;&lt;br /&gt;
&lt;br /&gt;
local IMC = {}&lt;br /&gt;
IMC.__index = IMC&lt;br /&gt;
&lt;br /&gt;
function IMC:renderPerCombatant(builder, headerText, prefix, suffix)&lt;br /&gt;
	prefix = prefix or &#039;&#039;&lt;br /&gt;
	suffix = suffix or &#039;&#039;&lt;br /&gt;
	local colspans = {}&lt;br /&gt;
	&lt;br /&gt;
	-- This may result in colspans[1] getting set twice, but&lt;br /&gt;
	-- this is no big deal. The second set will be correct.&lt;br /&gt;
	local lastCombatant = 1&lt;br /&gt;
	&lt;br /&gt;
	for i = 1,self.combatants do&lt;br /&gt;
		if self.args[prefix .. i .. suffix] then&lt;br /&gt;
			colspans[lastCombatant] = i - lastCombatant&lt;br /&gt;
			lastCombatant = i&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local jointText = self.args[prefix .. (self.combatants + 1) .. suffix]&lt;br /&gt;
	&lt;br /&gt;
	if headerText and (colspans[1] or jointText) then&lt;br /&gt;
		builder:tag(&#039;tr&#039;)&lt;br /&gt;
			:tag(&#039;th&#039;)&lt;br /&gt;
				:attr(&#039;colspan&#039;, self.combatants)&lt;br /&gt;
				:cssText(infoboxStyle.header_raw)&lt;br /&gt;
				:wikitext(headerText)&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- The only time colspans[1] wouldn&#039;t be set is if no&lt;br /&gt;
	-- combatant has a field with the given prefix and suffix.&lt;br /&gt;
	if colspans[1] then&lt;br /&gt;
		-- Since each found argument set the colspan for the previous&lt;br /&gt;
		-- one, the final one wasn&#039;t set above, so set it now.&lt;br /&gt;
		colspans[lastCombatant] = self.combatants - lastCombatant + 1&lt;br /&gt;
		builder = builder:tag(&#039;tr&#039;)&lt;br /&gt;
		for i = 1,self.combatants do&lt;br /&gt;
			-- At this point, colspans[i] will be set for i=1 unconditionally, and for&lt;br /&gt;
			-- any other value of i where self.args[prefix .. i .. suffix] is set.&lt;br /&gt;
			if colspans[i] then&lt;br /&gt;
				builder:tag(&#039;td&#039;)&lt;br /&gt;
					-- don&#039;t bother emitting colspan=&amp;quot;1&amp;quot;&lt;br /&gt;
					:attr(&#039;colspan&#039;, colspans[i] ~= 1 and colspans[i] or nil)&lt;br /&gt;
					:css(&#039;width&#039;, math.floor(100 / self.combatants * colspans[i] + 0.5) .. &#039;%&#039;)&lt;br /&gt;
					-- no border on the right of the rightmost column&lt;br /&gt;
					:css(&#039;border-right&#039;, i ~= lastCombatant and infoboxStyle.internal_border or nil)&lt;br /&gt;
					-- no padding on the left of the leftmost column&lt;br /&gt;
					:css(&#039;padding-left&#039;, i ~= 1 and &#039;0.25em&#039; or nil)&lt;br /&gt;
					-- don&#039;t show the border if we&#039;re directly under a header&lt;br /&gt;
					:css(&#039;border-top&#039;, not headerText and infoboxStyle.internal_border or nil)&lt;br /&gt;
					:newline()&lt;br /&gt;
					:wikitext(self.args[prefix .. i .. suffix])&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if jointText then&lt;br /&gt;
		builder:tag(&#039;tr&#039;)&lt;br /&gt;
			:tag(&#039;td&#039;)&lt;br /&gt;
				:attr(&#039;colspan&#039;, self.combatants)&lt;br /&gt;
				:css(&#039;text-align&#039;, &#039;center&#039;)&lt;br /&gt;
				-- don&#039;t show the border if we&#039;re directly under a header&lt;br /&gt;
				:css(&#039;border-top&#039;, (not headerText or colspans[1]) and infoboxStyle.internal_border or nil)&lt;br /&gt;
				:newline()&lt;br /&gt;
				:wikitext(jointText)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function IMC:renderHeaderTable(builder)&lt;br /&gt;
	builder = builder:tag(&#039;table&#039;)&lt;br /&gt;
		:css(&#039;width&#039;, &#039;100%&#039;)&lt;br /&gt;
		:css(&#039;margin&#039;, 0)&lt;br /&gt;
		:css(&#039;padding&#039;, 0)&lt;br /&gt;
		:css(&#039;border&#039;, 0)&lt;br /&gt;
&lt;br /&gt;
	if self.args.date then&lt;br /&gt;
		builder:tag(&#039;tr&#039;)&lt;br /&gt;
			:tag(&#039;th&#039;)&lt;br /&gt;
				:css(&#039;padding-right&#039;, &#039;1em&#039;)&lt;br /&gt;
				:wikitext(&#039;Date&#039;)&lt;br /&gt;
			:done()&lt;br /&gt;
			:tag(&#039;td&#039;)&lt;br /&gt;
				:wikitext(self.args.date)&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	builder = builder:tag(&#039;tr&#039;)&lt;br /&gt;
		:tag(&#039;th&#039;)&lt;br /&gt;
			:css(&#039;padding-right&#039;, &#039;1em&#039;)&lt;br /&gt;
			:wikitext(&#039;Location&#039;)&lt;br /&gt;
		:done()&lt;br /&gt;
		:tag(&#039;td&#039;)&lt;br /&gt;
			:tag(&#039;div&#039;)&lt;br /&gt;
				:addClass(&#039;location&#039;)&lt;br /&gt;
				:wikitext(self.args.place or &#039;{&amp;amp;#123;{place}&amp;amp;#125;}&#039;) -- hack so that people who don&#039;t know Lua know that this parameter is required&lt;br /&gt;
			:done()&lt;br /&gt;
	if self.args.coordinates then&lt;br /&gt;
		builder:wikitext(self.args.coordinates)&lt;br /&gt;
	end&lt;br /&gt;
	builder = builder:done():done()&lt;br /&gt;
&lt;br /&gt;
	-- only for &amp;quot;Putsch&amp;quot;&lt;br /&gt;
    if self.args.action then&lt;br /&gt;
		builder:tag(&#039;tr&#039;)&lt;br /&gt;
			:tag(&#039;th&#039;)&lt;br /&gt;
				:css(&#039;padding-right&#039;, &#039;1em&#039;)&lt;br /&gt;
				:wikitext(self.args.action and &#039;Action&#039;)&lt;br /&gt;
			:done()&lt;br /&gt;
			:tag(&#039;td&#039;)&lt;br /&gt;
				:wikitext(self.args.action)&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if self.args.status or self.args.result then&lt;br /&gt;
		builder:tag(&#039;tr&#039;)&lt;br /&gt;
			:tag(&#039;th&#039;)&lt;br /&gt;
				:css(&#039;padding-right&#039;, &#039;1em&#039;)&lt;br /&gt;
				:wikitext(self.args.status and &#039;Status&#039; or &#039;Result&#039;)&lt;br /&gt;
			:done()&lt;br /&gt;
			:tag(&#039;td&#039;)&lt;br /&gt;
				:addClass(&#039;status&#039;)&lt;br /&gt;
				:newline()&lt;br /&gt;
				:wikitext(self.args.status or self.args.result)&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if self.args.territory then&lt;br /&gt;
		builder:tag(&#039;tr&#039;)&lt;br /&gt;
			:tag(&#039;th&#039;)&lt;br /&gt;
				:css(&#039;padding-right&#039;, &#039;1em&#039;)&lt;br /&gt;
				:wikitext(&#039;Territorial&amp;lt;br /&amp;gt;changes&#039;)&lt;br /&gt;
			:done()&lt;br /&gt;
			:tag(&#039;td&#039;)&lt;br /&gt;
				:newline()&lt;br /&gt;
				:wikitext(self.args.territory)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function IMC:render()&lt;br /&gt;
	local builder = mw.html.create()&lt;br /&gt;
	if self.args.campaignbox then&lt;br /&gt;
		-- this should be the same as using {{stack|clear=right|...}}&lt;br /&gt;
		builder:wikitext(self.frame:expandTemplate{ title = &#039;stack begin&#039;, args = { clear=&#039;true&#039;} })&lt;br /&gt;
	end&lt;br /&gt;
	builder = builder:tag(&#039;table&#039;)&lt;br /&gt;
		:addClass(&#039;infobox vevent&#039;)&lt;br /&gt;
		:cssText(infoboxStyle.main_box_raw)&lt;br /&gt;
		:css(&#039;width&#039;, self.args.width or nil)&lt;br /&gt;
&lt;br /&gt;
	builder:tag(&#039;tr&#039;)&lt;br /&gt;
		:tag(&#039;th&#039;)&lt;br /&gt;
			:addClass(&#039;summary&#039;)&lt;br /&gt;
			:attr(&#039;colspan&#039;, self.combatants)&lt;br /&gt;
			:cssText(infoboxStyle.header_raw)&lt;br /&gt;
			:wikitext(self.args.conflict or mw.title.getCurrentTitle().text)&lt;br /&gt;
	if self.args.partof then&lt;br /&gt;
		builder:tag(&#039;tr&#039;)&lt;br /&gt;
			:tag(&#039;td&#039;)&lt;br /&gt;
				:attr(&#039;colspan&#039;, self.combatants)&lt;br /&gt;
				:cssText(infoboxStyle.sub_header_raw)&lt;br /&gt;
				:wikitext(&#039;Part of &#039; .. self.args.partof)&lt;br /&gt;
	end&lt;br /&gt;
	if self.args.image then&lt;br /&gt;
		builder:tag(&#039;tr&#039;)&lt;br /&gt;
			:tag(&#039;td&#039;)&lt;br /&gt;
				:attr(&#039;colspan&#039;, self.combatants)&lt;br /&gt;
				:cssText(infoboxStyle.image_box_raw)&lt;br /&gt;
				:wikitext(string.format(&#039;%s%s%s&#039;,&lt;br /&gt;
					require(&#039;Module:InfoboxImage&#039;).InfoboxImage{args = {&lt;br /&gt;
						image = self.args.image,&lt;br /&gt;
						size = self.args.image_size,&lt;br /&gt;
						sizedefault = &#039;frameless&#039;,&lt;br /&gt;
						upright = 1,&lt;br /&gt;
						alt = self.args.alt&lt;br /&gt;
					}},&lt;br /&gt;
					self.args.caption and &#039;&amp;lt;br /&amp;gt;&#039; or &#039;&#039;,&lt;br /&gt;
					self.args.caption or &#039;&#039;&lt;br /&gt;
				))&lt;br /&gt;
	end&lt;br /&gt;
	self:renderHeaderTable(builder:tag(&#039;tr&#039;):tag(&#039;td&#039;):attr(&#039;colspan&#039;, self.combatants))&lt;br /&gt;
	self:renderPerCombatant(builder, self.args.combatants_header or &#039;Belligerents&#039;, &#039;combatant&#039;)&lt;br /&gt;
	-- can be un-hardcoded once gerrit:165108 is merged&lt;br /&gt;
	for _,v in ipairs{&#039;a&#039;,&#039;b&#039;,&#039;c&#039;,&#039;d&#039;} do&lt;br /&gt;
		self:renderPerCombatant(builder, nil, &#039;combatant&#039;, v)&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	self:renderPerCombatant(builder, self.args.commanders_header or &#039;Commanders and leaders&#039;, &#039;commander&#039;)&lt;br /&gt;
	for _,v in ipairs{&#039;a&#039;,&#039;b&#039;,&#039;c&#039;,&#039;d&#039;} do&lt;br /&gt;
		self:renderPerCombatant(builder, nil, &#039;commander&#039;, v)&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	self:renderPerCombatant(builder, self.args.units_header or &#039;Units involved&#039;, &#039;units&#039;)&lt;br /&gt;
	self:renderPerCombatant(builder, self.args.strengths_header or &#039;Strength&#039;, &#039;strength&#039;)&lt;br /&gt;
	self:renderPerCombatant(builder, self.args.polstrengths_header or &#039;Political support&#039;, &#039;polstrength&#039;)&lt;br /&gt;
	self:renderPerCombatant(builder, self.args.milstrengths_header or &#039;Military support&#039;, &#039;milstrength&#039;)&lt;br /&gt;
	self:renderPerCombatant(builder, self.args.casualties_header or &#039;Casualties and losses&#039;, &#039;casualties&#039;)&lt;br /&gt;
&lt;br /&gt;
	if self.args.notes then&lt;br /&gt;
		builder:tag(&#039;tr&#039;)&lt;br /&gt;
			:tag(&#039;td&#039;)&lt;br /&gt;
				:attr(&#039;colspan&#039;, self.combatants)&lt;br /&gt;
				:css(&#039;border-top&#039;, infoboxStyle.section_border)&lt;br /&gt;
				:newline()&lt;br /&gt;
				:wikitext(self.args.notes)&lt;br /&gt;
	end&lt;br /&gt;
	if self.args.map_type then&lt;br /&gt;
		builder:tag(&#039;tr&#039;)&lt;br /&gt;
			:tag(&#039;td&#039;)&lt;br /&gt;
				:attr(&#039;colspan&#039;, self.combatants)&lt;br /&gt;
				:css(&#039;border-top&#039;, infoboxStyle.internal_border)&lt;br /&gt;
				:node(require(&#039;Module:Location map&#039;).main(self.frame, {&lt;br /&gt;
					self.args.map_type,&lt;br /&gt;
					relief = self.args.map_relief,&lt;br /&gt;
					coordinates = self.args.coordinates,&lt;br /&gt;
					width = self.args.map_size or 220,&lt;br /&gt;
					float = &#039;center&#039;,&lt;br /&gt;
					border = &#039;none&#039;,&lt;br /&gt;
					mark = self.args.map_mark,&lt;br /&gt;
					marksize = self.args.map_marksize or 8,&lt;br /&gt;
					label = self.args.map_label,&lt;br /&gt;
					alt = self.args.map_alt,&lt;br /&gt;
					caption = self.args.map_caption or (&#039;Location within &#039; &lt;br /&gt;
						.. (require(&#039;Module:Location map&#039;).data(self.frame, {self.args.map_type, &#039;name&#039;})))&lt;br /&gt;
				}))&lt;br /&gt;
	end&lt;br /&gt;
	builder = builder:done()&lt;br /&gt;
	if self.args.campaignbox then&lt;br /&gt;
		builder = builder:done()&lt;br /&gt;
		builder:wikitext(self.args.campaignbox .. self.frame:expandTemplate{ title = &#039;stack end&#039;})&lt;br /&gt;
	end&lt;br /&gt;
	return builder&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function IMC.new(frame, args)&lt;br /&gt;
	if not args then&lt;br /&gt;
		args = require(&#039;Module:Arguments&#039;).getArgs(frame, {wrappers = &#039;Template:Infobox military conflict&#039;})&lt;br /&gt;
	end&lt;br /&gt;
	local obj = {&lt;br /&gt;
		frame = frame,&lt;br /&gt;
		args = args&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	-- until gerrit:165108 is merged, there&#039;s still a cap on combatants, but as soon as it merges, we can update this little bit of code to uncap it&lt;br /&gt;
	-- also, don&#039;t try to make this more efficient, or references could be in the wrong order&lt;br /&gt;
	obj.combatants = 2&lt;br /&gt;
	for _,v in ipairs{&#039;&#039;, &#039;a&#039;, &#039;b&#039;, &#039;c&#039;, &#039;d&#039;} do&lt;br /&gt;
		for i = 1,5 do&lt;br /&gt;
			if args[&#039;combatant&#039; .. i .. v] then&lt;br /&gt;
				obj.combatants = math.max(obj.combatants, i)&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	return setmetatable(obj, IMC)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
function p.main(frame)&lt;br /&gt;
	return frame:extensionTag{ name = &#039;templatestyles&#039;, args = { src = templatestyles} } .. tostring(IMC.new(frame):render())&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>User</name></author>
	</entry>
	<entry>
		<id>https://shreloaded.net/index.php?title=Module:Documentation/config&amp;diff=64359</id>
		<title>Module:Documentation/config</title>
		<link rel="alternate" type="text/html" href="https://shreloaded.net/index.php?title=Module:Documentation/config&amp;diff=64359"/>
		<updated>2021-08-09T10:23:33Z</updated>

		<summary type="html">&lt;p&gt;User: 1 revision imported&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;----------------------------------------------------------------------------------------------------&lt;br /&gt;
--&lt;br /&gt;
--                               Configuration for Module:Documentation&lt;br /&gt;
--&lt;br /&gt;
-- Here you can set the values of the parameters and messages used in Module:Documentation to&lt;br /&gt;
-- localise it to your wiki and your language. Unless specified otherwise, values given here&lt;br /&gt;
-- should be string values.&lt;br /&gt;
----------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
local cfg = {} -- Do not edit this line.&lt;br /&gt;
&lt;br /&gt;
----------------------------------------------------------------------------------------------------&lt;br /&gt;
-- Protection template configuration&lt;br /&gt;
----------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
-- cfg[&#039;protection-reason-edit&#039;]&lt;br /&gt;
-- The protection reason for edit-protected templates to pass to&lt;br /&gt;
-- [[Module:Protection banner]].&lt;br /&gt;
cfg[&#039;protection-reason-edit&#039;] = &#039;template&#039;&lt;br /&gt;
&lt;br /&gt;
--[[&lt;br /&gt;
----------------------------------------------------------------------------------------------------&lt;br /&gt;
-- Sandbox notice configuration&lt;br /&gt;
--&lt;br /&gt;
-- On sandbox pages the module can display a template notifying users that the current page is a&lt;br /&gt;
-- sandbox, and the location of test cases pages, etc. The module decides whether the page is a&lt;br /&gt;
-- sandbox or not based on the value of cfg[&#039;sandbox-subpage&#039;]. The following settings configure the&lt;br /&gt;
-- messages that the notices contains.&lt;br /&gt;
----------------------------------------------------------------------------------------------------&lt;br /&gt;
--]]&lt;br /&gt;
&lt;br /&gt;
-- cfg[&#039;sandbox-notice-image&#039;]&lt;br /&gt;
-- The image displayed in the sandbox notice.&lt;br /&gt;
cfg[&#039;sandbox-notice-image&#039;] = &#039;[[File:Sandbox.svg|50px|alt=|link=]]&#039;&lt;br /&gt;
&lt;br /&gt;
--[[&lt;br /&gt;
-- cfg[&#039;sandbox-notice-pagetype-template&#039;]&lt;br /&gt;
-- cfg[&#039;sandbox-notice-pagetype-module&#039;]&lt;br /&gt;
-- cfg[&#039;sandbox-notice-pagetype-other&#039;]&lt;br /&gt;
-- The page type of the sandbox page. The message that is displayed depends on the current subject&lt;br /&gt;
-- namespace. This message is used in either cfg[&#039;sandbox-notice-blurb&#039;] or&lt;br /&gt;
-- cfg[&#039;sandbox-notice-diff-blurb&#039;].&lt;br /&gt;
--]]&lt;br /&gt;
cfg[&#039;sandbox-notice-pagetype-template&#039;] = &#039;[[Wikipedia:Template test cases|template sandbox]] page&#039;&lt;br /&gt;
cfg[&#039;sandbox-notice-pagetype-module&#039;] = &#039;[[Wikipedia:Template test cases|module sandbox]] page&#039;&lt;br /&gt;
cfg[&#039;sandbox-notice-pagetype-other&#039;] = &#039;sandbox page&#039;&lt;br /&gt;
&lt;br /&gt;
--[[&lt;br /&gt;
-- cfg[&#039;sandbox-notice-blurb&#039;]&lt;br /&gt;
-- cfg[&#039;sandbox-notice-diff-blurb&#039;]&lt;br /&gt;
-- cfg[&#039;sandbox-notice-diff-display&#039;]&lt;br /&gt;
-- Either cfg[&#039;sandbox-notice-blurb&#039;] or cfg[&#039;sandbox-notice-diff-blurb&#039;] is the opening sentence&lt;br /&gt;
-- of the sandbox notice. The latter has a diff link, but the former does not. $1 is the page&lt;br /&gt;
-- type, which is either cfg[&#039;sandbox-notice-pagetype-template&#039;],&lt;br /&gt;
-- cfg[&#039;sandbox-notice-pagetype-module&#039;] or cfg[&#039;sandbox-notice-pagetype-other&#039;] depending what&lt;br /&gt;
-- namespace we are in. $2 is a link to the main template page, and $3 is a diff link between&lt;br /&gt;
-- the sandbox and the main template. The display value of the diff link is set by &lt;br /&gt;
-- cfg[&#039;sandbox-notice-compare-link-display&#039;].&lt;br /&gt;
--]]&lt;br /&gt;
cfg[&#039;sandbox-notice-blurb&#039;] = &#039;This is the $1 for $2.&#039;&lt;br /&gt;
cfg[&#039;sandbox-notice-diff-blurb&#039;] = &#039;This is the $1 for $2 ($3).&#039;&lt;br /&gt;
cfg[&#039;sandbox-notice-compare-link-display&#039;] = &#039;diff&#039;&lt;br /&gt;
&lt;br /&gt;
--[[&lt;br /&gt;
-- cfg[&#039;sandbox-notice-testcases-blurb&#039;]&lt;br /&gt;
-- cfg[&#039;sandbox-notice-testcases-link-display&#039;]&lt;br /&gt;
-- cfg[&#039;sandbox-notice-testcases-run-blurb&#039;]&lt;br /&gt;
-- cfg[&#039;sandbox-notice-testcases-run-link-display&#039;]&lt;br /&gt;
-- cfg[&#039;sandbox-notice-testcases-blurb&#039;] is a sentence notifying the user that there is a test cases page&lt;br /&gt;
-- corresponding to this sandbox that they can edit. $1 is a link to the test cases page.&lt;br /&gt;
-- cfg[&#039;sandbox-notice-testcases-link-display&#039;] is the display value for that link.&lt;br /&gt;
-- cfg[&#039;sandbox-notice-testcases-run-blurb&#039;] is a sentence notifying the user that there is a test cases page&lt;br /&gt;
-- corresponding to this sandbox that they can edit, along with a link to run it. $1 is a link to the test&lt;br /&gt;
-- cases page, and $2 is a link to the page to run it.&lt;br /&gt;
-- cfg[&#039;sandbox-notice-testcases-run-link-display&#039;] is the display value for the link to run the test&lt;br /&gt;
-- cases.&lt;br /&gt;
--]]&lt;br /&gt;
cfg[&#039;sandbox-notice-testcases-blurb&#039;] = &#039;See also the companion subpage for $1.&#039;&lt;br /&gt;
cfg[&#039;sandbox-notice-testcases-link-display&#039;] = &#039;test cases&#039;&lt;br /&gt;
cfg[&#039;sandbox-notice-testcases-run-blurb&#039;] = &#039;See also the companion subpage for $1 ($2).&#039;&lt;br /&gt;
cfg[&#039;sandbox-notice-testcases-run-link-display&#039;] = &#039;run&#039;&lt;br /&gt;
&lt;br /&gt;
-- cfg[&#039;sandbox-category&#039;]&lt;br /&gt;
-- A category to add to all template sandboxes.&lt;br /&gt;
cfg[&#039;sandbox-category&#039;] = &#039;Template sandboxes&#039;&lt;br /&gt;
&lt;br /&gt;
----------------------------------------------------------------------------------------------------&lt;br /&gt;
-- Start box configuration&lt;br /&gt;
----------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
-- cfg[&#039;documentation-icon-wikitext&#039;]&lt;br /&gt;
-- The wikitext for the icon shown at the top of the template.&lt;br /&gt;
cfg[&#039;documentation-icon-wikitext&#039;] = &#039;[[File:Test Template Info-Icon - Version (2).svg|50px|link=|alt=]]&#039;&lt;br /&gt;
&lt;br /&gt;
-- cfg[&#039;template-namespace-heading&#039;]&lt;br /&gt;
-- The heading shown in the template namespace.&lt;br /&gt;
cfg[&#039;template-namespace-heading&#039;] = &#039;Template documentation&#039;&lt;br /&gt;
&lt;br /&gt;
-- cfg[&#039;module-namespace-heading&#039;]&lt;br /&gt;
-- The heading shown in the module namespace.&lt;br /&gt;
cfg[&#039;module-namespace-heading&#039;] = &#039;Module documentation&#039;&lt;br /&gt;
&lt;br /&gt;
-- cfg[&#039;file-namespace-heading&#039;]&lt;br /&gt;
-- The heading shown in the file namespace.&lt;br /&gt;
cfg[&#039;file-namespace-heading&#039;] = &#039;Summary&#039;&lt;br /&gt;
&lt;br /&gt;
-- cfg[&#039;other-namespaces-heading&#039;]&lt;br /&gt;
-- The heading shown in other namespaces.&lt;br /&gt;
cfg[&#039;other-namespaces-heading&#039;] = &#039;Documentation&#039;&lt;br /&gt;
&lt;br /&gt;
-- cfg[&#039;view-link-display&#039;]&lt;br /&gt;
-- The text to display for &amp;quot;view&amp;quot; links.&lt;br /&gt;
cfg[&#039;view-link-display&#039;] = &#039;view&#039;&lt;br /&gt;
&lt;br /&gt;
-- cfg[&#039;edit-link-display&#039;]&lt;br /&gt;
-- The text to display for &amp;quot;edit&amp;quot; links.&lt;br /&gt;
cfg[&#039;edit-link-display&#039;] = &#039;edit&#039;&lt;br /&gt;
&lt;br /&gt;
-- cfg[&#039;history-link-display&#039;]&lt;br /&gt;
-- The text to display for &amp;quot;history&amp;quot; links.&lt;br /&gt;
cfg[&#039;history-link-display&#039;] = &#039;history&#039;&lt;br /&gt;
&lt;br /&gt;
-- cfg[&#039;purge-link-display&#039;]&lt;br /&gt;
-- The text to display for &amp;quot;purge&amp;quot; links.&lt;br /&gt;
cfg[&#039;purge-link-display&#039;] = &#039;purge&#039;&lt;br /&gt;
&lt;br /&gt;
-- cfg[&#039;create-link-display&#039;]&lt;br /&gt;
-- The text to display for &amp;quot;create&amp;quot; links.&lt;br /&gt;
cfg[&#039;create-link-display&#039;] = &#039;create&#039;&lt;br /&gt;
&lt;br /&gt;
----------------------------------------------------------------------------------------------------&lt;br /&gt;
-- Link box (end box) configuration&lt;br /&gt;
----------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
-- cfg[&#039;transcluded-from-blurb&#039;]&lt;br /&gt;
-- Notice displayed when the docs are transcluded from another page. $1 is a wikilink to that page.&lt;br /&gt;
cfg[&#039;transcluded-from-blurb&#039;] = &#039;The above [[Wikipedia:Template documentation|documentation]] is [[Wikipedia:Transclusion|transcluded]] from $1.&#039;&lt;br /&gt;
&lt;br /&gt;
--[[&lt;br /&gt;
-- cfg[&#039;create-module-doc-blurb&#039;]&lt;br /&gt;
-- Notice displayed in the module namespace when the documentation subpage does not exist.&lt;br /&gt;
-- $1 is a link to create the documentation page with the preload cfg[&#039;module-preload&#039;] and the&lt;br /&gt;
-- display cfg[&#039;create-link-display&#039;].&lt;br /&gt;
--]]&lt;br /&gt;
cfg[&#039;create-module-doc-blurb&#039;] = &#039;You might want to $1 a documentation page for this [[Wikipedia:Lua|Scribunto module]].&#039;&lt;br /&gt;
&lt;br /&gt;
----------------------------------------------------------------------------------------------------&lt;br /&gt;
-- Experiment blurb configuration&lt;br /&gt;
----------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
--[[&lt;br /&gt;
-- cfg[&#039;experiment-blurb-template&#039;]&lt;br /&gt;
-- cfg[&#039;experiment-blurb-module&#039;]&lt;br /&gt;
-- The experiment blurb is the text inviting editors to experiment in sandbox and test cases pages.&lt;br /&gt;
-- It is only shown in the template and module namespaces. With the default English settings, it&lt;br /&gt;
-- might look like this:&lt;br /&gt;
--&lt;br /&gt;
-- Editors can experiment in this template&#039;s sandbox (edit | diff) and testcases (edit) pages.&lt;br /&gt;
--&lt;br /&gt;
-- In this example, &amp;quot;sandbox&amp;quot;, &amp;quot;edit&amp;quot;, &amp;quot;diff&amp;quot;, &amp;quot;testcases&amp;quot;, and &amp;quot;edit&amp;quot; would all be links.&lt;br /&gt;
--&lt;br /&gt;
-- There are two versions, cfg[&#039;experiment-blurb-template&#039;] and cfg[&#039;experiment-blurb-module&#039;], depending&lt;br /&gt;
-- on what namespace we are in.&lt;br /&gt;
-- &lt;br /&gt;
-- Parameters:&lt;br /&gt;
--&lt;br /&gt;
-- $1 is a link to the sandbox page. If the sandbox exists, it is in the following format:&lt;br /&gt;
--&lt;br /&gt;
--     cfg[&#039;sandbox-link-display&#039;] (cfg[&#039;sandbox-edit-link-display&#039;] | cfg[&#039;compare-link-display&#039;])&lt;br /&gt;
-- &lt;br /&gt;
-- If the sandbox doesn&#039;t exist, it is in the format:&lt;br /&gt;
--&lt;br /&gt;
--     cfg[&#039;sandbox-link-display&#039;] (cfg[&#039;sandbox-create-link-display&#039;] | cfg[&#039;mirror-link-display&#039;])&lt;br /&gt;
-- &lt;br /&gt;
-- The link for cfg[&#039;sandbox-create-link-display&#039;] link preloads the page with cfg[&#039;template-sandbox-preload&#039;]&lt;br /&gt;
-- or cfg[&#039;module-sandbox-preload&#039;], depending on the current namespace. The link for cfg[&#039;mirror-link-display&#039;]&lt;br /&gt;
-- loads a default edit summary of cfg[&#039;mirror-edit-summary&#039;].&lt;br /&gt;
--&lt;br /&gt;
-- $2 is a link to the test cases page. If the test cases page exists, it is in the following format:&lt;br /&gt;
--&lt;br /&gt;
--     cfg[&#039;testcases-link-display&#039;] (cfg[&#039;testcases-edit-link-display&#039;] | cfg[&#039;testcases-run-link-display&#039;])&lt;br /&gt;
--&lt;br /&gt;
-- If the test cases page doesn&#039;t exist, it is in the format:&lt;br /&gt;
-- &lt;br /&gt;
--     cfg[&#039;testcases-link-display&#039;] (cfg[&#039;testcases-create-link-display&#039;])&lt;br /&gt;
--&lt;br /&gt;
-- If the test cases page doesn&#039;t exist, the link for cfg[&#039;testcases-create-link-display&#039;] preloads the&lt;br /&gt;
-- page with cfg[&#039;template-testcases-preload&#039;] or cfg[&#039;module-testcases-preload&#039;], depending on the current&lt;br /&gt;
-- namespace.&lt;br /&gt;
--]]&lt;br /&gt;
cfg[&#039;experiment-blurb-template&#039;] = &amp;quot;Editors can experiment in this template&#039;s $1 and $2 pages.&amp;quot;&lt;br /&gt;
cfg[&#039;experiment-blurb-module&#039;] = &amp;quot;Editors can experiment in this module&#039;s $1 and $2 pages.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
----------------------------------------------------------------------------------------------------&lt;br /&gt;
-- Sandbox link configuration&lt;br /&gt;
----------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
-- cfg[&#039;sandbox-subpage&#039;]&lt;br /&gt;
-- The name of the template subpage typically used for sandboxes.&lt;br /&gt;
cfg[&#039;sandbox-subpage&#039;] = &#039;sandbox&#039;&lt;br /&gt;
&lt;br /&gt;
-- cfg[&#039;template-sandbox-preload&#039;]&lt;br /&gt;
-- Preload file for template sandbox pages.&lt;br /&gt;
cfg[&#039;template-sandbox-preload&#039;] = &#039;Template:Documentation/preload-sandbox&#039;&lt;br /&gt;
&lt;br /&gt;
-- cfg[&#039;module-sandbox-preload&#039;]&lt;br /&gt;
-- Preload file for Lua module sandbox pages.&lt;br /&gt;
cfg[&#039;module-sandbox-preload&#039;] = &#039;Template:Documentation/preload-module-sandbox&#039;&lt;br /&gt;
&lt;br /&gt;
-- cfg[&#039;sandbox-link-display&#039;]&lt;br /&gt;
-- The text to display for &amp;quot;sandbox&amp;quot; links.&lt;br /&gt;
cfg[&#039;sandbox-link-display&#039;] = &#039;sandbox&#039;&lt;br /&gt;
&lt;br /&gt;
-- cfg[&#039;sandbox-edit-link-display&#039;]&lt;br /&gt;
-- The text to display for sandbox &amp;quot;edit&amp;quot; links.&lt;br /&gt;
cfg[&#039;sandbox-edit-link-display&#039;] = &#039;edit&#039;&lt;br /&gt;
&lt;br /&gt;
-- cfg[&#039;sandbox-create-link-display&#039;]&lt;br /&gt;
-- The text to display for sandbox &amp;quot;create&amp;quot; links.&lt;br /&gt;
cfg[&#039;sandbox-create-link-display&#039;] = &#039;create&#039;&lt;br /&gt;
&lt;br /&gt;
-- cfg[&#039;compare-link-display&#039;]&lt;br /&gt;
-- The text to display for &amp;quot;compare&amp;quot; links.&lt;br /&gt;
cfg[&#039;compare-link-display&#039;] = &#039;diff&#039;&lt;br /&gt;
&lt;br /&gt;
-- cfg[&#039;mirror-edit-summary&#039;]&lt;br /&gt;
-- The default edit summary to use when a user clicks the &amp;quot;mirror&amp;quot; link. $1 is a wikilink to the&lt;br /&gt;
-- template page.&lt;br /&gt;
cfg[&#039;mirror-edit-summary&#039;] = &#039;Create sandbox version of $1&#039;&lt;br /&gt;
&lt;br /&gt;
-- cfg[&#039;mirror-link-display&#039;]&lt;br /&gt;
-- The text to display for &amp;quot;mirror&amp;quot; links.&lt;br /&gt;
cfg[&#039;mirror-link-display&#039;] = &#039;mirror&#039;&lt;br /&gt;
&lt;br /&gt;
-- cfg[&#039;mirror-link-preload&#039;]&lt;br /&gt;
-- The page to preload when a user clicks the &amp;quot;mirror&amp;quot; link.&lt;br /&gt;
cfg[&#039;mirror-link-preload&#039;] = &#039;Template:Documentation/mirror&#039;&lt;br /&gt;
&lt;br /&gt;
----------------------------------------------------------------------------------------------------&lt;br /&gt;
-- Test cases link configuration&lt;br /&gt;
----------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
-- cfg[&#039;testcases-subpage&#039;]&lt;br /&gt;
-- The name of the template subpage typically used for test cases.&lt;br /&gt;
cfg[&#039;testcases-subpage&#039;] = &#039;testcases&#039;&lt;br /&gt;
&lt;br /&gt;
-- cfg[&#039;template-testcases-preload&#039;]&lt;br /&gt;
-- Preload file for template test cases pages.&lt;br /&gt;
cfg[&#039;template-testcases-preload&#039;] = &#039;Template:Documentation/preload-testcases&#039;&lt;br /&gt;
&lt;br /&gt;
-- cfg[&#039;module-testcases-preload&#039;]&lt;br /&gt;
-- Preload file for Lua module test cases pages.&lt;br /&gt;
cfg[&#039;module-testcases-preload&#039;] = &#039;Template:Documentation/preload-module-testcases&#039;&lt;br /&gt;
&lt;br /&gt;
-- cfg[&#039;testcases-link-display&#039;]&lt;br /&gt;
-- The text to display for &amp;quot;testcases&amp;quot; links.&lt;br /&gt;
cfg[&#039;testcases-link-display&#039;] = &#039;testcases&#039;&lt;br /&gt;
&lt;br /&gt;
-- cfg[&#039;testcases-edit-link-display&#039;]&lt;br /&gt;
-- The text to display for test cases &amp;quot;edit&amp;quot; links.&lt;br /&gt;
cfg[&#039;testcases-edit-link-display&#039;] = &#039;edit&#039;&lt;br /&gt;
&lt;br /&gt;
-- cfg[&#039;testcases-run-link-display&#039;]&lt;br /&gt;
-- The text to display for test cases &amp;quot;run&amp;quot; links.&lt;br /&gt;
cfg[&#039;testcases-run-link-display&#039;] = &#039;run&#039;&lt;br /&gt;
&lt;br /&gt;
-- cfg[&#039;testcases-create-link-display&#039;]&lt;br /&gt;
-- The text to display for test cases &amp;quot;create&amp;quot; links.&lt;br /&gt;
cfg[&#039;testcases-create-link-display&#039;] = &#039;create&#039;&lt;br /&gt;
&lt;br /&gt;
----------------------------------------------------------------------------------------------------&lt;br /&gt;
-- Add categories blurb configuration&lt;br /&gt;
----------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
--[[&lt;br /&gt;
-- cfg[&#039;add-categories-blurb&#039;]&lt;br /&gt;
-- Text to direct users to add categories to the /doc subpage. Not used if the &amp;quot;content&amp;quot; or&lt;br /&gt;
-- &amp;quot;docname fed&amp;quot; arguments are set, as then it is not clear where to add the categories. $1 is a&lt;br /&gt;
-- link to the /doc subpage with a display value of cfg[&#039;doc-link-display&#039;].&lt;br /&gt;
--]]&lt;br /&gt;
cfg[&#039;add-categories-blurb&#039;] = &#039;Add categories to the $1 subpage.&#039;&lt;br /&gt;
&lt;br /&gt;
-- cfg[&#039;doc-link-display&#039;]&lt;br /&gt;
-- The text to display when linking to the /doc subpage.&lt;br /&gt;
cfg[&#039;doc-link-display&#039;] = &#039;/doc&#039;&lt;br /&gt;
&lt;br /&gt;
----------------------------------------------------------------------------------------------------&lt;br /&gt;
-- Subpages link configuration&lt;br /&gt;
----------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
--[[&lt;br /&gt;
-- cfg[&#039;subpages-blurb&#039;]&lt;br /&gt;
-- The &amp;quot;Subpages of this template&amp;quot; blurb. $1 is a link to the main template&#039;s subpages with a&lt;br /&gt;
-- display value of cfg[&#039;subpages-link-display&#039;]. In the English version this blurb is simply&lt;br /&gt;
-- the link followed by a period, and the link display provides the actual text.&lt;br /&gt;
--]]&lt;br /&gt;
cfg[&#039;subpages-blurb&#039;] = &#039;$1.&#039;&lt;br /&gt;
&lt;br /&gt;
--[[&lt;br /&gt;
-- cfg[&#039;subpages-link-display&#039;]&lt;br /&gt;
-- The text to display for the &amp;quot;subpages of this page&amp;quot; link. $1 is cfg[&#039;template-pagetype&#039;],&lt;br /&gt;
-- cfg[&#039;module-pagetype&#039;] or cfg[&#039;default-pagetype&#039;], depending on whether the current page is in&lt;br /&gt;
-- the template namespace, the module namespace, or another namespace.&lt;br /&gt;
--]]&lt;br /&gt;
cfg[&#039;subpages-link-display&#039;] = &#039;Subpages of this $1&#039;&lt;br /&gt;
&lt;br /&gt;
-- cfg[&#039;template-pagetype&#039;]&lt;br /&gt;
-- The pagetype to display for template pages.&lt;br /&gt;
cfg[&#039;template-pagetype&#039;] = &#039;template&#039;&lt;br /&gt;
&lt;br /&gt;
-- cfg[&#039;module-pagetype&#039;]&lt;br /&gt;
-- The pagetype to display for Lua module pages.&lt;br /&gt;
cfg[&#039;module-pagetype&#039;] = &#039;module&#039;&lt;br /&gt;
&lt;br /&gt;
-- cfg[&#039;default-pagetype&#039;]&lt;br /&gt;
-- The pagetype to display for pages other than templates or Lua modules.&lt;br /&gt;
cfg[&#039;default-pagetype&#039;] = &#039;page&#039;&lt;br /&gt;
&lt;br /&gt;
----------------------------------------------------------------------------------------------------&lt;br /&gt;
-- Doc link configuration&lt;br /&gt;
----------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
-- cfg[&#039;doc-subpage&#039;]&lt;br /&gt;
-- The name of the subpage typically used for documentation pages.&lt;br /&gt;
cfg[&#039;doc-subpage&#039;] = &#039;doc&#039;&lt;br /&gt;
&lt;br /&gt;
-- cfg[&#039;file-docpage-preload&#039;]&lt;br /&gt;
-- Preload file for documentation page in the file namespace.&lt;br /&gt;
cfg[&#039;file-docpage-preload&#039;] = &#039;Template:Documentation/preload-filespace&#039;&lt;br /&gt;
&lt;br /&gt;
-- cfg[&#039;docpage-preload&#039;]&lt;br /&gt;
-- Preload file for template documentation pages in all namespaces.&lt;br /&gt;
cfg[&#039;docpage-preload&#039;] = &#039;Template:Documentation/preload&#039;&lt;br /&gt;
&lt;br /&gt;
-- cfg[&#039;module-preload&#039;]&lt;br /&gt;
-- Preload file for Lua module documentation pages.&lt;br /&gt;
cfg[&#039;module-preload&#039;] = &#039;Template:Documentation/preload-module-doc&#039;&lt;br /&gt;
&lt;br /&gt;
----------------------------------------------------------------------------------------------------&lt;br /&gt;
-- HTML and CSS configuration&lt;br /&gt;
----------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
-- cfg[&#039;templatestyles&#039;]&lt;br /&gt;
-- The name of the TemplateStyles page where CSS is kept.&lt;br /&gt;
-- Sandbox CSS will be at Module:Documentation/sandbox/styles.css when needed.&lt;br /&gt;
cfg[&#039;templatestyles&#039;] = &#039;Module:Documentation/styles.css&#039;&lt;br /&gt;
&lt;br /&gt;
-- cfg[&#039;container&#039;]&lt;br /&gt;
-- Class which can be used to set flex or grid CSS on the&lt;br /&gt;
-- two child divs documentation and documentation-metadata&lt;br /&gt;
cfg[&#039;container&#039;] = &#039;documentation-container&#039;&lt;br /&gt;
&lt;br /&gt;
-- cfg[&#039;main-div-classes&#039;]&lt;br /&gt;
-- Classes added to the main HTML &amp;quot;div&amp;quot; tag.&lt;br /&gt;
cfg[&#039;main-div-classes&#039;] = &#039;documentation&#039;&lt;br /&gt;
&lt;br /&gt;
-- cfg[&#039;main-div-heading-class&#039;]&lt;br /&gt;
-- Class for the main heading for templates and modules and assoc. talk spaces&lt;br /&gt;
cfg[&#039;main-div-heading-class&#039;] = &#039;documentation-heading&#039;&lt;br /&gt;
&lt;br /&gt;
-- cfg[&#039;start-box-class&#039;]&lt;br /&gt;
-- Class for the start box&lt;br /&gt;
cfg[&#039;start-box-class&#039;] = &#039;documentation-startbox&#039;&lt;br /&gt;
&lt;br /&gt;
-- cfg[&#039;start-box-link-classes&#039;]&lt;br /&gt;
-- Classes used for the [view][edit][history] or [create] links in the start box.&lt;br /&gt;
-- mw-editsection-like is per [[Wikipedia:Village pump (technical)/Archive 117]]&lt;br /&gt;
cfg[&#039;start-box-link-classes&#039;] = &#039;mw-editsection-like plainlinks&#039;&lt;br /&gt;
&lt;br /&gt;
-- cfg[&#039;end-box-class&#039;]&lt;br /&gt;
-- Class for the end box.&lt;br /&gt;
cfg[&#039;end-box-class&#039;] = &#039;documentation-metadata&#039;&lt;br /&gt;
&lt;br /&gt;
-- cfg[&#039;end-box-plainlinks&#039;]&lt;br /&gt;
-- Plainlinks&lt;br /&gt;
cfg[&#039;end-box-plainlinks&#039;] = &#039;plainlinks&#039;&lt;br /&gt;
&lt;br /&gt;
-- cfg[&#039;toolbar-class&#039;]&lt;br /&gt;
-- Class added for toolbar links.&lt;br /&gt;
cfg[&#039;toolbar-class&#039;] = &#039;documentation-toolbar&#039;&lt;br /&gt;
&lt;br /&gt;
-- cfg[&#039;clear&#039;]&lt;br /&gt;
-- Just used to clear things.&lt;br /&gt;
cfg[&#039;clear&#039;] = &#039;documentation-clear&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----------------------------------------------------------------------------------------------------&lt;br /&gt;
-- Tracking category configuration&lt;br /&gt;
----------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
-- cfg[&#039;display-strange-usage-category&#039;]&lt;br /&gt;
-- Set to true to enable output of cfg[&#039;strange-usage-category&#039;] if the module is used on a /doc subpage&lt;br /&gt;
-- or a /testcases subpage. This should be a boolean value (either true or false).&lt;br /&gt;
cfg[&#039;display-strange-usage-category&#039;] = true&lt;br /&gt;
&lt;br /&gt;
-- cfg[&#039;strange-usage-category&#039;]&lt;br /&gt;
-- Category to output if cfg[&#039;display-strange-usage-category&#039;] is set to true and the module is used on a&lt;br /&gt;
-- /doc subpage or a /testcases subpage.&lt;br /&gt;
cfg[&#039;strange-usage-category&#039;] = &#039;Wikipedia pages with strange ((documentation)) usage&#039;&lt;br /&gt;
&lt;br /&gt;
--[[&lt;br /&gt;
----------------------------------------------------------------------------------------------------&lt;br /&gt;
-- End configuration&lt;br /&gt;
--&lt;br /&gt;
-- Don&#039;t edit anything below this line.&lt;br /&gt;
----------------------------------------------------------------------------------------------------&lt;br /&gt;
--]]&lt;br /&gt;
&lt;br /&gt;
return cfg&lt;/div&gt;</summary>
		<author><name>User</name></author>
	</entry>
	<entry>
		<id>https://shreloaded.net/index.php?title=Module:Documentation&amp;diff=64357</id>
		<title>Module:Documentation</title>
		<link rel="alternate" type="text/html" href="https://shreloaded.net/index.php?title=Module:Documentation&amp;diff=64357"/>
		<updated>2021-08-09T10:23:33Z</updated>

		<summary type="html">&lt;p&gt;User: 1 revision imported&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;-- This module implements {{documentation}}.&lt;br /&gt;
&lt;br /&gt;
-- Get required modules.&lt;br /&gt;
local getArgs = require(&#039;Module:Arguments&#039;).getArgs&lt;br /&gt;
&lt;br /&gt;
-- Get the config table.&lt;br /&gt;
local cfg = mw.loadData(&#039;Module:Documentation/config&#039;)&lt;br /&gt;
&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
-- Often-used functions.&lt;br /&gt;
local ugsub = mw.ustring.gsub&lt;br /&gt;
&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
-- Helper functions&lt;br /&gt;
--&lt;br /&gt;
-- These are defined as local functions, but are made available in the p&lt;br /&gt;
-- table for testing purposes.&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
local function message(cfgKey, valArray, expectType)&lt;br /&gt;
	--[[&lt;br /&gt;
	-- Gets a message from the cfg table and formats it if appropriate.&lt;br /&gt;
	-- The function raises an error if the value from the cfg table is not&lt;br /&gt;
	-- of the type expectType. The default type for expectType is &#039;string&#039;.&lt;br /&gt;
	-- If the table valArray is present, strings such as $1, $2 etc. in the&lt;br /&gt;
	-- message are substituted with values from the table keys [1], [2] etc.&lt;br /&gt;
	-- For example, if the message &amp;quot;foo-message&amp;quot; had the value &#039;Foo $2 bar $1.&#039;,&lt;br /&gt;
	-- message(&#039;foo-message&#039;, {&#039;baz&#039;, &#039;qux&#039;}) would return &amp;quot;Foo qux bar baz.&amp;quot;&lt;br /&gt;
	--]]&lt;br /&gt;
	local msg = cfg[cfgKey]&lt;br /&gt;
	expectType = expectType or &#039;string&#039;&lt;br /&gt;
	if type(msg) ~= expectType then&lt;br /&gt;
		error(&#039;message: type error in message cfg.&#039; .. cfgKey .. &#039; (&#039; .. expectType .. &#039; expected, got &#039; .. type(msg) .. &#039;)&#039;, 2)&lt;br /&gt;
	end&lt;br /&gt;
	if not valArray then&lt;br /&gt;
		return msg&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local function getMessageVal(match)&lt;br /&gt;
		match = tonumber(match)&lt;br /&gt;
		return valArray[match] or error(&#039;message: no value found for key $&#039; .. match .. &#039; in message cfg.&#039; .. cfgKey, 4)&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	return ugsub(msg, &#039;$([1-9][0-9]*)&#039;, getMessageVal)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
p.message = message&lt;br /&gt;
&lt;br /&gt;
local function makeWikilink(page, display)&lt;br /&gt;
	if display then&lt;br /&gt;
		return mw.ustring.format(&#039;[[%s|%s]]&#039;, page, display)&lt;br /&gt;
	else&lt;br /&gt;
		return mw.ustring.format(&#039;[[%s]]&#039;, page)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
p.makeWikilink = makeWikilink&lt;br /&gt;
&lt;br /&gt;
local function makeCategoryLink(cat, sort)&lt;br /&gt;
	local catns = mw.site.namespaces[14].name&lt;br /&gt;
	return makeWikilink(catns .. &#039;:&#039; .. cat, sort)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
p.makeCategoryLink = makeCategoryLink&lt;br /&gt;
&lt;br /&gt;
local function makeUrlLink(url, display)&lt;br /&gt;
	return mw.ustring.format(&#039;[%s %s]&#039;, url, display)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
p.makeUrlLink = makeUrlLink&lt;br /&gt;
&lt;br /&gt;
local function makeToolbar(...)&lt;br /&gt;
	local ret = {}&lt;br /&gt;
	local lim = select(&#039;#&#039;, ...)&lt;br /&gt;
	if lim &amp;lt; 1 then&lt;br /&gt;
		return nil&lt;br /&gt;
	end&lt;br /&gt;
	for i = 1, lim do&lt;br /&gt;
		ret[#ret + 1] = select(i, ...)&lt;br /&gt;
	end&lt;br /&gt;
	-- &#039;documentation-toolbar&#039;&lt;br /&gt;
	return &#039;&amp;lt;span class=&amp;quot;&#039; .. message(&#039;toolbar-class&#039;) .. &#039;&amp;quot;&amp;gt;(&#039;&lt;br /&gt;
		.. table.concat(ret, &#039; &amp;amp;#124; &#039;) .. &#039;)&amp;lt;/span&amp;gt;&#039;&lt;br /&gt;
end	&lt;br /&gt;
&lt;br /&gt;
p.makeToolbar = makeToolbar&lt;br /&gt;
&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
-- Argument processing&lt;br /&gt;
----------------------------------------------------------------------------&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;
			valueFunc = function (key, value)&lt;br /&gt;
				if type(value) == &#039;string&#039; then&lt;br /&gt;
					value = value:match(&#039;^%s*(.-)%s*$&#039;) -- Remove whitespace.&lt;br /&gt;
					if key == &#039;heading&#039; or value ~= &#039;&#039; 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;
		return p[funcName](args)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
-- Entry points&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
function p.nonexistent(frame)&lt;br /&gt;
	if mw.title.getCurrentTitle().subpageText == &#039;testcases&#039; then&lt;br /&gt;
		return frame:expandTemplate{title = &#039;module test cases notice&#039;}&lt;br /&gt;
	else&lt;br /&gt;
		return p.main(frame)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
p.main = makeInvokeFunc(&#039;_main&#039;)&lt;br /&gt;
&lt;br /&gt;
function p._main(args)&lt;br /&gt;
	--[[&lt;br /&gt;
	-- This function defines logic flow for the module.&lt;br /&gt;
	-- @args - table of arguments passed by the user&lt;br /&gt;
	--]]&lt;br /&gt;
	local env = p.getEnvironment(args)&lt;br /&gt;
	local root = mw.html.create()&lt;br /&gt;
	root&lt;br /&gt;
		:wikitext(p._getModuleWikitext(args, env))&lt;br /&gt;
		:wikitext(p.protectionTemplate(env))&lt;br /&gt;
		:wikitext(p.sandboxNotice(args, env))&lt;br /&gt;
		:tag(&#039;div&#039;)&lt;br /&gt;
			-- &#039;documentation-container&#039;&lt;br /&gt;
			:addClass(message(&#039;container&#039;))&lt;br /&gt;
			:newline()&lt;br /&gt;
			:tag(&#039;div&#039;)&lt;br /&gt;
				-- &#039;documentation&#039;&lt;br /&gt;
				:addClass(message(&#039;main-div-classes&#039;))&lt;br /&gt;
				:newline()&lt;br /&gt;
				:wikitext(p._startBox(args, env))&lt;br /&gt;
				:wikitext(p._content(args, env))&lt;br /&gt;
				:tag(&#039;div&#039;)&lt;br /&gt;
					-- &#039;documentation-clear&#039;&lt;br /&gt;
					:addClass(message(&#039;clear&#039;))&lt;br /&gt;
					:done()&lt;br /&gt;
				:newline()&lt;br /&gt;
				:done()&lt;br /&gt;
			:wikitext(p._endBox(args, env))&lt;br /&gt;
			:done()&lt;br /&gt;
		:wikitext(p.addTrackingCategories(env))&lt;br /&gt;
	-- &#039;Module:Documentation/styles.css&#039;&lt;br /&gt;
	return mw.getCurrentFrame():extensionTag (&lt;br /&gt;
		&#039;templatestyles&#039;, &#039;&#039;, {src=cfg[&#039;templatestyles&#039;]&lt;br /&gt;
	}) .. tostring(root)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
-- Environment settings&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
function p.getEnvironment(args)&lt;br /&gt;
	--[[&lt;br /&gt;
	-- Returns a table with information about the environment, including title&lt;br /&gt;
	-- objects and other namespace- or path-related data.&lt;br /&gt;
	-- @args - table of arguments passed by the user&lt;br /&gt;
	--&lt;br /&gt;
	-- Title objects include:&lt;br /&gt;
	-- env.title - the page we are making documentation for (usually the current title)&lt;br /&gt;
	-- env.templateTitle - the template (or module, file, etc.)&lt;br /&gt;
	-- env.docTitle - the /doc subpage.&lt;br /&gt;
	-- env.sandboxTitle - the /sandbox subpage.&lt;br /&gt;
	-- env.testcasesTitle - the /testcases subpage.&lt;br /&gt;
	--&lt;br /&gt;
	-- Data includes:&lt;br /&gt;
	-- env.protectionLevels - the protection levels table of the title object.&lt;br /&gt;
	-- env.subjectSpace - the number of the title&#039;s subject namespace.&lt;br /&gt;
	-- env.docSpace - the number of the namespace the title puts its documentation in.&lt;br /&gt;
	-- env.docpageBase - the text of the base page of the /doc, /sandbox and /testcases pages, with namespace.&lt;br /&gt;
	-- env.compareUrl - URL of the Special:ComparePages page comparing the sandbox with the template.&lt;br /&gt;
	-- &lt;br /&gt;
	-- All table lookups are passed through pcall so that errors are caught. If an error occurs, the value&lt;br /&gt;
	-- returned will be nil.&lt;br /&gt;
	--]]&lt;br /&gt;
	&lt;br /&gt;
	local env, envFuncs = {}, {}&lt;br /&gt;
&lt;br /&gt;
	-- Set up the metatable. If triggered we call the corresponding function in the envFuncs table. The value&lt;br /&gt;
	-- returned by that function is memoized in the env table so that we don&#039;t call any of the functions&lt;br /&gt;
	-- more than once. (Nils won&#039;t be memoized.)&lt;br /&gt;
	setmetatable(env, {&lt;br /&gt;
		__index = function (t, key)&lt;br /&gt;
			local envFunc = envFuncs[key]&lt;br /&gt;
			if envFunc then&lt;br /&gt;
				local success, val = pcall(envFunc)&lt;br /&gt;
				if success then&lt;br /&gt;
					env[key] = val -- Memoise the value.&lt;br /&gt;
					return val&lt;br /&gt;
				end&lt;br /&gt;
			end&lt;br /&gt;
			return nil&lt;br /&gt;
		end&lt;br /&gt;
	})	&lt;br /&gt;
&lt;br /&gt;
	function envFuncs.title()&lt;br /&gt;
		-- The title object for the current page, or a test page passed with args.page.&lt;br /&gt;
		local title&lt;br /&gt;
		local titleArg = args.page&lt;br /&gt;
		if titleArg then&lt;br /&gt;
			title = mw.title.new(titleArg)&lt;br /&gt;
		else&lt;br /&gt;
			title = mw.title.getCurrentTitle()&lt;br /&gt;
		end&lt;br /&gt;
		return title&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	function envFuncs.templateTitle()&lt;br /&gt;
		--[[&lt;br /&gt;
		-- The template (or module, etc.) title object.&lt;br /&gt;
		-- Messages:&lt;br /&gt;
		-- &#039;sandbox-subpage&#039; --&amp;gt; &#039;sandbox&#039;&lt;br /&gt;
		-- &#039;testcases-subpage&#039; --&amp;gt; &#039;testcases&#039;&lt;br /&gt;
		--]]&lt;br /&gt;
		local subjectSpace = env.subjectSpace&lt;br /&gt;
		local title = env.title&lt;br /&gt;
		local subpage = title.subpageText&lt;br /&gt;
		if subpage == message(&#039;sandbox-subpage&#039;) or subpage == message(&#039;testcases-subpage&#039;) then&lt;br /&gt;
			return mw.title.makeTitle(subjectSpace, title.baseText)&lt;br /&gt;
		else&lt;br /&gt;
			return mw.title.makeTitle(subjectSpace, title.text)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	function envFuncs.docTitle()&lt;br /&gt;
		--[[&lt;br /&gt;
		-- Title object of the /doc subpage.&lt;br /&gt;
		-- Messages:&lt;br /&gt;
		-- &#039;doc-subpage&#039; --&amp;gt; &#039;doc&#039;&lt;br /&gt;
		--]]&lt;br /&gt;
		local title = env.title&lt;br /&gt;
		local docname = args[1] -- User-specified doc page.&lt;br /&gt;
		local docpage&lt;br /&gt;
		if docname then&lt;br /&gt;
			docpage = docname&lt;br /&gt;
		else&lt;br /&gt;
			docpage = env.docpageBase .. &#039;/&#039; .. message(&#039;doc-subpage&#039;)&lt;br /&gt;
		end&lt;br /&gt;
		return mw.title.new(docpage)&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	function envFuncs.sandboxTitle()&lt;br /&gt;
		--[[&lt;br /&gt;
		-- Title object for the /sandbox subpage.&lt;br /&gt;
		-- Messages:&lt;br /&gt;
		-- &#039;sandbox-subpage&#039; --&amp;gt; &#039;sandbox&#039;&lt;br /&gt;
		--]]&lt;br /&gt;
		return mw.title.new(env.docpageBase .. &#039;/&#039; .. message(&#039;sandbox-subpage&#039;))&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	function envFuncs.testcasesTitle()&lt;br /&gt;
		--[[&lt;br /&gt;
		-- Title object for the /testcases subpage.&lt;br /&gt;
		-- Messages:&lt;br /&gt;
		-- &#039;testcases-subpage&#039; --&amp;gt; &#039;testcases&#039;&lt;br /&gt;
		--]]&lt;br /&gt;
		return mw.title.new(env.docpageBase .. &#039;/&#039; .. message(&#039;testcases-subpage&#039;))&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	function envFuncs.protectionLevels()&lt;br /&gt;
		-- The protection levels table of the title object.&lt;br /&gt;
		return env.title.protectionLevels&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	function envFuncs.subjectSpace()&lt;br /&gt;
		-- The subject namespace number.&lt;br /&gt;
		return mw.site.namespaces[env.title.namespace].subject.id&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	function envFuncs.docSpace()&lt;br /&gt;
		-- The documentation namespace number. For most namespaces this is the&lt;br /&gt;
		-- same as the subject namespace. However, pages in the Article, File,&lt;br /&gt;
		-- MediaWiki or Category namespaces must have their /doc, /sandbox and&lt;br /&gt;
		-- /testcases pages in talk space.&lt;br /&gt;
		local subjectSpace = env.subjectSpace&lt;br /&gt;
		if subjectSpace == 0 or subjectSpace == 6 or subjectSpace == 8 or subjectSpace == 14 then&lt;br /&gt;
			return subjectSpace + 1&lt;br /&gt;
		else&lt;br /&gt;
			return subjectSpace&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	function envFuncs.docpageBase()&lt;br /&gt;
		-- The base page of the /doc, /sandbox, and /testcases subpages.&lt;br /&gt;
		-- For some namespaces this is the talk page, rather than the template page.&lt;br /&gt;
		local templateTitle = env.templateTitle&lt;br /&gt;
		local docSpace = env.docSpace&lt;br /&gt;
		local docSpaceText = mw.site.namespaces[docSpace].name&lt;br /&gt;
		-- Assemble the link. docSpace is never the main namespace, so we can hardcode the colon.&lt;br /&gt;
		return docSpaceText .. &#039;:&#039; .. templateTitle.text&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	function envFuncs.compareUrl()&lt;br /&gt;
		-- Diff link between the sandbox and the main template using [[Special:ComparePages]].&lt;br /&gt;
		local templateTitle = env.templateTitle&lt;br /&gt;
		local sandboxTitle = env.sandboxTitle&lt;br /&gt;
		if templateTitle.exists and sandboxTitle.exists then&lt;br /&gt;
			local compareUrl = mw.uri.fullUrl(&lt;br /&gt;
				&#039;Special:ComparePages&#039;,&lt;br /&gt;
				{ page1 = templateTitle.prefixedText, page2 = sandboxTitle.prefixedText}&lt;br /&gt;
			)&lt;br /&gt;
			return tostring(compareUrl)&lt;br /&gt;
		else&lt;br /&gt;
			return nil&lt;br /&gt;
		end&lt;br /&gt;
	end		&lt;br /&gt;
&lt;br /&gt;
	return env&lt;br /&gt;
end	&lt;br /&gt;
&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
-- Auxiliary templates&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
p.getModuleWikitext = makeInvokeFunc(&#039;_getModuleWikitext&#039;)&lt;br /&gt;
&lt;br /&gt;
function p._getModuleWikitext(args, env)&lt;br /&gt;
	local currentTitle = mw.title.getCurrentTitle()&lt;br /&gt;
	if currentTitle.contentModel ~= &#039;Scribunto&#039; then return end&lt;br /&gt;
	pcall(require, currentTitle.prefixedText) -- if it fails, we don&#039;t care&lt;br /&gt;
	local moduleWikitext =  package.loaded[&amp;quot;Module:Module wikitext&amp;quot;]&lt;br /&gt;
	if moduleWikitext then&lt;br /&gt;
		return moduleWikitext.main()&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.sandboxNotice(args, env)&lt;br /&gt;
	--[=[&lt;br /&gt;
	-- Generates a sandbox notice for display above sandbox pages.&lt;br /&gt;
	-- @args - a table of arguments passed by the user&lt;br /&gt;
	-- @env - environment table containing title objects, etc., generated with p.getEnvironment&lt;br /&gt;
	-- &lt;br /&gt;
	-- Messages:&lt;br /&gt;
	-- &#039;sandbox-notice-image&#039; --&amp;gt; &#039;[[Image:Sandbox.svg|50px|alt=|link=]]&#039;&lt;br /&gt;
	-- &#039;sandbox-notice-blurb&#039; --&amp;gt; &#039;This is the $1 for $2.&#039;&lt;br /&gt;
	-- &#039;sandbox-notice-diff-blurb&#039; --&amp;gt; &#039;This is the $1 for $2 ($3).&#039;&lt;br /&gt;
	-- &#039;sandbox-notice-pagetype-template&#039; --&amp;gt; &#039;[[Wikipedia:Template test cases|template sandbox]] page&#039;&lt;br /&gt;
	-- &#039;sandbox-notice-pagetype-module&#039; --&amp;gt; &#039;[[Wikipedia:Template test cases|module sandbox]] page&#039;&lt;br /&gt;
	-- &#039;sandbox-notice-pagetype-other&#039; --&amp;gt; &#039;sandbox page&#039;&lt;br /&gt;
	-- &#039;sandbox-notice-compare-link-display&#039; --&amp;gt; &#039;diff&#039;&lt;br /&gt;
	-- &#039;sandbox-notice-testcases-blurb&#039; --&amp;gt; &#039;See also the companion subpage for $1.&#039;&lt;br /&gt;
	-- &#039;sandbox-notice-testcases-link-display&#039; --&amp;gt; &#039;test cases&#039;&lt;br /&gt;
	-- &#039;sandbox-category&#039; --&amp;gt; &#039;Template sandboxes&#039;&lt;br /&gt;
	--]=]&lt;br /&gt;
	local title = env.title&lt;br /&gt;
	local sandboxTitle = env.sandboxTitle&lt;br /&gt;
	local templateTitle = env.templateTitle&lt;br /&gt;
	local subjectSpace = env.subjectSpace&lt;br /&gt;
	if not (subjectSpace and title and sandboxTitle and templateTitle&lt;br /&gt;
		and mw.title.equals(title, sandboxTitle)) then&lt;br /&gt;
		return nil&lt;br /&gt;
	end&lt;br /&gt;
	-- Build the table of arguments to pass to {{ombox}}. We need just two fields, &amp;quot;image&amp;quot; and &amp;quot;text&amp;quot;.&lt;br /&gt;
	local omargs = {}&lt;br /&gt;
	omargs.image = message(&#039;sandbox-notice-image&#039;)&lt;br /&gt;
	-- Get the text. We start with the opening blurb, which is something like&lt;br /&gt;
	-- &amp;quot;This is the template sandbox for [[Template:Foo]] (diff).&amp;quot;&lt;br /&gt;
	local text = &#039;&#039;&lt;br /&gt;
	local pagetype&lt;br /&gt;
	if subjectSpace == 10 then&lt;br /&gt;
		pagetype = message(&#039;sandbox-notice-pagetype-template&#039;)&lt;br /&gt;
	elseif subjectSpace == 828 then&lt;br /&gt;
		pagetype = message(&#039;sandbox-notice-pagetype-module&#039;)&lt;br /&gt;
	else&lt;br /&gt;
		pagetype = message(&#039;sandbox-notice-pagetype-other&#039;)&lt;br /&gt;
	end&lt;br /&gt;
	local templateLink = makeWikilink(templateTitle.prefixedText)&lt;br /&gt;
	local compareUrl = env.compareUrl&lt;br /&gt;
	if compareUrl then&lt;br /&gt;
		local compareDisplay = message(&#039;sandbox-notice-compare-link-display&#039;)&lt;br /&gt;
		local compareLink = makeUrlLink(compareUrl, compareDisplay)&lt;br /&gt;
		text = text .. message(&#039;sandbox-notice-diff-blurb&#039;, {pagetype, templateLink, compareLink})&lt;br /&gt;
	else&lt;br /&gt;
		text = text .. message(&#039;sandbox-notice-blurb&#039;, {pagetype, templateLink})&lt;br /&gt;
	end&lt;br /&gt;
	-- Get the test cases page blurb if the page exists. This is something like&lt;br /&gt;
	-- &amp;quot;See also the companion subpage for [[Template:Foo/testcases|test cases]].&amp;quot;&lt;br /&gt;
	local testcasesTitle = env.testcasesTitle&lt;br /&gt;
	if testcasesTitle and testcasesTitle.exists then&lt;br /&gt;
		if testcasesTitle.contentModel == &amp;quot;Scribunto&amp;quot; then&lt;br /&gt;
			local testcasesLinkDisplay = message(&#039;sandbox-notice-testcases-link-display&#039;)&lt;br /&gt;
			local testcasesRunLinkDisplay = message(&#039;sandbox-notice-testcases-run-link-display&#039;)&lt;br /&gt;
			local testcasesLink = makeWikilink(testcasesTitle.prefixedText, testcasesLinkDisplay)&lt;br /&gt;
			local testcasesRunLink = makeWikilink(testcasesTitle.talkPageTitle.prefixedText, testcasesRunLinkDisplay)&lt;br /&gt;
			text = text .. &#039;&amp;lt;br /&amp;gt;&#039; .. message(&#039;sandbox-notice-testcases-run-blurb&#039;, {testcasesLink, testcasesRunLink})&lt;br /&gt;
		else&lt;br /&gt;
			local testcasesLinkDisplay = message(&#039;sandbox-notice-testcases-link-display&#039;)&lt;br /&gt;
			local testcasesLink = makeWikilink(testcasesTitle.prefixedText, testcasesLinkDisplay)&lt;br /&gt;
			text = text .. &#039;&amp;lt;br /&amp;gt;&#039; .. message(&#039;sandbox-notice-testcases-blurb&#039;, {testcasesLink})&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	-- Add the sandbox to the sandbox category.&lt;br /&gt;
	omargs.text = text .. makeCategoryLink(message(&#039;sandbox-category&#039;))&lt;br /&gt;
&lt;br /&gt;
	-- &#039;documentation-clear&#039;&lt;br /&gt;
	return &#039;&amp;lt;div class=&amp;quot;&#039; .. message(&#039;clear&#039;) .. &#039;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&#039;&lt;br /&gt;
		.. require(&#039;Module:Message box&#039;).main(&#039;ombox&#039;, omargs)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.protectionTemplate(env)&lt;br /&gt;
	-- Generates the padlock icon in the top right.&lt;br /&gt;
	-- @env - environment table containing title objects, etc., generated with p.getEnvironment&lt;br /&gt;
	-- Messages:&lt;br /&gt;
	-- &#039;protection-template&#039; --&amp;gt; &#039;pp-template&#039;&lt;br /&gt;
	-- &#039;protection-template-args&#039; --&amp;gt; {docusage = &#039;yes&#039;}&lt;br /&gt;
	local protectionLevels = env.protectionLevels&lt;br /&gt;
	if not protectionLevels then&lt;br /&gt;
		return nil&lt;br /&gt;
	end&lt;br /&gt;
	local editProt = protectionLevels.edit and protectionLevels.edit[1]&lt;br /&gt;
	local moveProt = protectionLevels.move and protectionLevels.move[1]&lt;br /&gt;
	if editProt then&lt;br /&gt;
		-- The page is edit-protected.&lt;br /&gt;
		return require(&#039;Module:Protection banner&#039;)._main{&lt;br /&gt;
			message(&#039;protection-reason-edit&#039;), small = true&lt;br /&gt;
		}&lt;br /&gt;
	elseif moveProt and moveProt ~= &#039;autoconfirmed&#039; then&lt;br /&gt;
		-- The page is move-protected but not edit-protected. Exclude move&lt;br /&gt;
		-- protection with the level &amp;quot;autoconfirmed&amp;quot;, as this is equivalent to&lt;br /&gt;
		-- no move protection at all.&lt;br /&gt;
		return require(&#039;Module:Protection banner&#039;)._main{&lt;br /&gt;
			action = &#039;move&#039;, small = true&lt;br /&gt;
		}&lt;br /&gt;
	else&lt;br /&gt;
		return nil&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
-- Start box&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
p.startBox = makeInvokeFunc(&#039;_startBox&#039;)&lt;br /&gt;
&lt;br /&gt;
function p._startBox(args, env)&lt;br /&gt;
	--[[&lt;br /&gt;
	-- This function generates the start box.&lt;br /&gt;
	-- @args - a table of arguments passed by the user&lt;br /&gt;
	-- @env - environment table containing title objects, etc., generated with p.getEnvironment&lt;br /&gt;
	-- &lt;br /&gt;
	-- The actual work is done by p.makeStartBoxLinksData and p.renderStartBoxLinks which make&lt;br /&gt;
	-- the [view] [edit] [history] [purge] links, and by p.makeStartBoxData and p.renderStartBox&lt;br /&gt;
	-- which generate the box HTML.&lt;br /&gt;
	--]]&lt;br /&gt;
	env = env or p.getEnvironment(args)&lt;br /&gt;
	local links&lt;br /&gt;
	local content = args.content&lt;br /&gt;
	if not content or args[1] then&lt;br /&gt;
		-- No need to include the links if the documentation is on the template page itself.&lt;br /&gt;
		local linksData = p.makeStartBoxLinksData(args, env)&lt;br /&gt;
		if linksData then&lt;br /&gt;
			links = p.renderStartBoxLinks(linksData)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	-- Generate the start box html.&lt;br /&gt;
	local data = p.makeStartBoxData(args, env, links)&lt;br /&gt;
	if data then&lt;br /&gt;
		return p.renderStartBox(data)&lt;br /&gt;
	else&lt;br /&gt;
		-- User specified no heading.&lt;br /&gt;
		return nil&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.makeStartBoxLinksData(args, env)&lt;br /&gt;
	--[[&lt;br /&gt;
	-- Does initial processing of data to make the [view] [edit] [history] [purge] links.&lt;br /&gt;
	-- @args - a table of arguments passed by the user&lt;br /&gt;
	-- @env - environment table containing title objects, etc., generated with p.getEnvironment&lt;br /&gt;
	-- &lt;br /&gt;
	-- Messages:&lt;br /&gt;
	-- &#039;view-link-display&#039; --&amp;gt; &#039;view&#039;&lt;br /&gt;
	-- &#039;edit-link-display&#039; --&amp;gt; &#039;edit&#039;&lt;br /&gt;
	-- &#039;history-link-display&#039; --&amp;gt; &#039;history&#039;&lt;br /&gt;
	-- &#039;purge-link-display&#039; --&amp;gt; &#039;purge&#039;&lt;br /&gt;
	-- &#039;file-docpage-preload&#039; --&amp;gt; &#039;Template:Documentation/preload-filespace&#039;&lt;br /&gt;
	-- &#039;module-preload&#039; --&amp;gt; &#039;Template:Documentation/preload-module-doc&#039;&lt;br /&gt;
	-- &#039;docpage-preload&#039; --&amp;gt; &#039;Template:Documentation/preload&#039;&lt;br /&gt;
	-- &#039;create-link-display&#039; --&amp;gt; &#039;create&#039;&lt;br /&gt;
	--]]&lt;br /&gt;
	local subjectSpace = env.subjectSpace&lt;br /&gt;
	local title = env.title&lt;br /&gt;
	local docTitle = env.docTitle&lt;br /&gt;
	if not title or not docTitle then&lt;br /&gt;
		return nil&lt;br /&gt;
	end&lt;br /&gt;
	if docTitle.isRedirect then &lt;br /&gt;
		docTitle = docTitle.redirectTarget&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local data = {}&lt;br /&gt;
	data.title = title&lt;br /&gt;
	data.docTitle = docTitle&lt;br /&gt;
	-- View, display, edit, and purge links if /doc exists.&lt;br /&gt;
	data.viewLinkDisplay = message(&#039;view-link-display&#039;)&lt;br /&gt;
	data.editLinkDisplay = message(&#039;edit-link-display&#039;)&lt;br /&gt;
	data.historyLinkDisplay = message(&#039;history-link-display&#039;)&lt;br /&gt;
	data.purgeLinkDisplay = message(&#039;purge-link-display&#039;)&lt;br /&gt;
	-- Create link if /doc doesn&#039;t exist.&lt;br /&gt;
	local preload = args.preload&lt;br /&gt;
	if not preload then&lt;br /&gt;
		if subjectSpace == 6 then -- File namespace&lt;br /&gt;
			preload = message(&#039;file-docpage-preload&#039;)&lt;br /&gt;
		elseif subjectSpace == 828 then -- Module namespace&lt;br /&gt;
			preload = message(&#039;module-preload&#039;)&lt;br /&gt;
		else&lt;br /&gt;
			preload = message(&#039;docpage-preload&#039;)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	data.preload = preload&lt;br /&gt;
	data.createLinkDisplay = message(&#039;create-link-display&#039;)&lt;br /&gt;
	return data&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.renderStartBoxLinks(data)&lt;br /&gt;
	--[[&lt;br /&gt;
	-- Generates the [view][edit][history][purge] or [create] links from the data table.&lt;br /&gt;
	-- @data - a table of data generated by p.makeStartBoxLinksData&lt;br /&gt;
	--]]&lt;br /&gt;
	&lt;br /&gt;
	local function escapeBrackets(s)&lt;br /&gt;
		-- Escapes square brackets with HTML entities.&lt;br /&gt;
		s = s:gsub(&#039;%[&#039;, &#039;&amp;amp;#91;&#039;) -- Replace square brackets with HTML entities.&lt;br /&gt;
		s = s:gsub(&#039;%]&#039;, &#039;&amp;amp;#93;&#039;)&lt;br /&gt;
		return s&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local ret&lt;br /&gt;
	local docTitle = data.docTitle&lt;br /&gt;
	local title = data.title&lt;br /&gt;
	if docTitle.exists then&lt;br /&gt;
		local viewLink = makeWikilink(docTitle.prefixedText, data.viewLinkDisplay)&lt;br /&gt;
		local editLink = makeUrlLink(docTitle:fullUrl{action = &#039;edit&#039;}, data.editLinkDisplay)&lt;br /&gt;
		local historyLink = makeUrlLink(docTitle:fullUrl{action = &#039;history&#039;}, data.historyLinkDisplay)&lt;br /&gt;
		local purgeLink = makeUrlLink(title:fullUrl{action = &#039;purge&#039;}, data.purgeLinkDisplay)&lt;br /&gt;
		ret = &#039;[%s] [%s] [%s] [%s]&#039;&lt;br /&gt;
		ret = escapeBrackets(ret)&lt;br /&gt;
		ret = mw.ustring.format(ret, viewLink, editLink, historyLink, purgeLink)&lt;br /&gt;
	else&lt;br /&gt;
		local createLink = makeUrlLink(docTitle:fullUrl{action = &#039;edit&#039;, preload = data.preload}, data.createLinkDisplay)&lt;br /&gt;
		ret = &#039;[%s]&#039;&lt;br /&gt;
		ret = escapeBrackets(ret)&lt;br /&gt;
		ret = mw.ustring.format(ret, createLink)&lt;br /&gt;
	end&lt;br /&gt;
	return ret&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.makeStartBoxData(args, env, links)&lt;br /&gt;
	--[=[&lt;br /&gt;
	-- Does initial processing of data to pass to the start-box render function, p.renderStartBox.&lt;br /&gt;
	-- @args - a table of arguments passed by the user&lt;br /&gt;
	-- @env - environment table containing title objects, etc., generated with p.getEnvironment&lt;br /&gt;
	-- @links - a string containing the [view][edit][history][purge] links - could be nil if there&#039;s an error.&lt;br /&gt;
	--&lt;br /&gt;
	-- Messages:&lt;br /&gt;
	-- &#039;documentation-icon-wikitext&#039; --&amp;gt; &#039;[[File:Test Template Info-Icon - Version (2).svg|50px|link=|alt=]]&#039;&lt;br /&gt;
	-- &#039;template-namespace-heading&#039; --&amp;gt; &#039;Template documentation&#039;&lt;br /&gt;
	-- &#039;module-namespace-heading&#039; --&amp;gt; &#039;Module documentation&#039;&lt;br /&gt;
	-- &#039;file-namespace-heading&#039; --&amp;gt; &#039;Summary&#039;&lt;br /&gt;
	-- &#039;other-namespaces-heading&#039; --&amp;gt; &#039;Documentation&#039;&lt;br /&gt;
	-- &#039;testcases-create-link-display&#039; --&amp;gt; &#039;create&#039;&lt;br /&gt;
	--]=]&lt;br /&gt;
	local subjectSpace = env.subjectSpace&lt;br /&gt;
	if not subjectSpace then&lt;br /&gt;
		-- Default to an &amp;quot;other namespaces&amp;quot; namespace, so that we get at least some output&lt;br /&gt;
		-- if an error occurs.&lt;br /&gt;
		subjectSpace = 2&lt;br /&gt;
	end&lt;br /&gt;
	local data = {}&lt;br /&gt;
	&lt;br /&gt;
	-- Heading&lt;br /&gt;
	local heading = args.heading -- Blank values are not removed.&lt;br /&gt;
	if heading == &#039;&#039; then&lt;br /&gt;
		-- Don&#039;t display the start box if the heading arg is defined but blank.&lt;br /&gt;
		return nil&lt;br /&gt;
	end&lt;br /&gt;
	if heading then&lt;br /&gt;
		data.heading = heading&lt;br /&gt;
	elseif subjectSpace == 10 then -- Template namespace&lt;br /&gt;
		data.heading = message(&#039;documentation-icon-wikitext&#039;) .. &#039; &#039; .. message(&#039;template-namespace-heading&#039;)&lt;br /&gt;
	elseif subjectSpace == 828 then -- Module namespace&lt;br /&gt;
		data.heading = message(&#039;documentation-icon-wikitext&#039;) .. &#039; &#039; .. message(&#039;module-namespace-heading&#039;)&lt;br /&gt;
	elseif subjectSpace == 6 then -- File namespace&lt;br /&gt;
		data.heading = message(&#039;file-namespace-heading&#039;)&lt;br /&gt;
	else&lt;br /&gt;
		data.heading = message(&#039;other-namespaces-heading&#039;)&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	-- Heading CSS&lt;br /&gt;
	local headingStyle = args[&#039;heading-style&#039;]&lt;br /&gt;
	if headingStyle then&lt;br /&gt;
		data.headingStyleText = headingStyle&lt;br /&gt;
	else&lt;br /&gt;
		-- &#039;documentation-heading&#039;&lt;br /&gt;
		data.headingClass = message(&#039;main-div-heading-class&#039;)&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	-- Data for the [view][edit][history][purge] or [create] links.&lt;br /&gt;
	if links then&lt;br /&gt;
		-- &#039;mw-editsection-like plainlinks&#039;&lt;br /&gt;
		data.linksClass = message(&#039;start-box-link-classes&#039;)&lt;br /&gt;
		data.links = links&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	return data&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.renderStartBox(data)&lt;br /&gt;
	-- Renders the start box html.&lt;br /&gt;
	-- @data - a table of data generated by p.makeStartBoxData.&lt;br /&gt;
	local sbox = mw.html.create(&#039;div&#039;)&lt;br /&gt;
	sbox&lt;br /&gt;
		-- &#039;documentation-startbox&#039;&lt;br /&gt;
		:addClass(message(&#039;start-box-class&#039;))&lt;br /&gt;
		:newline()&lt;br /&gt;
		:tag(&#039;span&#039;)&lt;br /&gt;
			:addClass(data.headingClass)&lt;br /&gt;
			:cssText(data.headingStyleText)&lt;br /&gt;
			:wikitext(data.heading)&lt;br /&gt;
	local links = data.links&lt;br /&gt;
	if links then&lt;br /&gt;
		sbox:tag(&#039;span&#039;)&lt;br /&gt;
			:addClass(data.linksClass)&lt;br /&gt;
			:attr(&#039;id&#039;, data.linksId)&lt;br /&gt;
			:wikitext(links)&lt;br /&gt;
	end&lt;br /&gt;
	return tostring(sbox)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
-- Documentation content&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
p.content = makeInvokeFunc(&#039;_content&#039;)&lt;br /&gt;
&lt;br /&gt;
function p._content(args, env)&lt;br /&gt;
	-- Displays the documentation contents&lt;br /&gt;
	-- @args - a table of arguments passed by the user&lt;br /&gt;
	-- @env - environment table containing title objects, etc., generated with p.getEnvironment&lt;br /&gt;
	env = env or p.getEnvironment(args)&lt;br /&gt;
	local docTitle = env.docTitle&lt;br /&gt;
	local content = args.content&lt;br /&gt;
	if not content and docTitle and docTitle.exists then&lt;br /&gt;
		content = args._content or mw.getCurrentFrame():expandTemplate{title = docTitle.prefixedText}&lt;br /&gt;
	end&lt;br /&gt;
	-- The line breaks below are necessary so that &amp;quot;=== Headings ===&amp;quot; at the start and end&lt;br /&gt;
	-- of docs are interpreted correctly.&lt;br /&gt;
	return &#039;\n&#039; .. (content or &#039;&#039;) .. &#039;\n&#039; &lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
p.contentTitle = makeInvokeFunc(&#039;_contentTitle&#039;)&lt;br /&gt;
&lt;br /&gt;
function p._contentTitle(args, env)&lt;br /&gt;
	env = env or p.getEnvironment(args)&lt;br /&gt;
	local docTitle = env.docTitle&lt;br /&gt;
	if not args.content and docTitle and docTitle.exists then&lt;br /&gt;
		return docTitle.prefixedText&lt;br /&gt;
	else&lt;br /&gt;
		return &#039;&#039;&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
-- End box&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
p.endBox = makeInvokeFunc(&#039;_endBox&#039;)&lt;br /&gt;
&lt;br /&gt;
function p._endBox(args, env)&lt;br /&gt;
	--[=[&lt;br /&gt;
	-- This function generates the end box (also known as the link box).&lt;br /&gt;
	-- @args - a table of arguments passed by the user&lt;br /&gt;
	-- @env - environment table containing title objects, etc., generated with p.getEnvironment&lt;br /&gt;
	-- &lt;br /&gt;
	--]=]&lt;br /&gt;
	&lt;br /&gt;
	-- Get environment data.&lt;br /&gt;
	env = env or p.getEnvironment(args)&lt;br /&gt;
	local subjectSpace = env.subjectSpace&lt;br /&gt;
	local docTitle = env.docTitle&lt;br /&gt;
	if not subjectSpace or not docTitle then&lt;br /&gt;
		return nil&lt;br /&gt;
	end&lt;br /&gt;
		&lt;br /&gt;
	-- Check whether we should output the end box at all. Add the end&lt;br /&gt;
	-- box by default if the documentation exists or if we are in the&lt;br /&gt;
	-- user, module or template namespaces.&lt;br /&gt;
	local linkBox = args[&#039;link box&#039;]&lt;br /&gt;
	if linkBox == &#039;off&#039;&lt;br /&gt;
		or not (&lt;br /&gt;
			docTitle.exists&lt;br /&gt;
			or subjectSpace == 2&lt;br /&gt;
			or subjectSpace == 828&lt;br /&gt;
			or subjectSpace == 10&lt;br /&gt;
		)&lt;br /&gt;
	then&lt;br /&gt;
		return nil&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Assemble the link box.&lt;br /&gt;
	local text = &#039;&#039;&lt;br /&gt;
	if linkBox then&lt;br /&gt;
		text = text .. linkBox&lt;br /&gt;
	else&lt;br /&gt;
		text = text .. (p.makeDocPageBlurb(args, env) or &#039;&#039;) -- &amp;quot;This documentation is transcluded from [[Foo]].&amp;quot; &lt;br /&gt;
		if subjectSpace == 2 or subjectSpace == 10 or subjectSpace == 828 then&lt;br /&gt;
			-- We are in the user, template or module namespaces.&lt;br /&gt;
			-- Add sandbox and testcases links.&lt;br /&gt;
			-- &amp;quot;Editors can experiment in this template&#039;s sandbox and testcases pages.&amp;quot;&lt;br /&gt;
			text = text .. (p.makeExperimentBlurb(args, env) or &#039;&#039;) .. &#039;&amp;lt;br /&amp;gt;&#039;&lt;br /&gt;
			if not args.content and not args[1] then&lt;br /&gt;
				-- &amp;quot;Please add categories to the /doc subpage.&amp;quot;&lt;br /&gt;
				-- Don&#039;t show this message with inline docs or with an explicitly specified doc page,&lt;br /&gt;
				-- as then it is unclear where to add the categories.&lt;br /&gt;
				text = text .. (p.makeCategoriesBlurb(args, env) or &#039;&#039;)&lt;br /&gt;
			end&lt;br /&gt;
			text = text .. &#039; &#039; .. (p.makeSubpagesBlurb(args, env) or &#039;&#039;) --&amp;quot;Subpages of this template&amp;quot;&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	local box = mw.html.create(&#039;div&#039;)&lt;br /&gt;
	-- &#039;documentation-metadata&#039;&lt;br /&gt;
	box:attr(&#039;role&#039;, &#039;note&#039;)&lt;br /&gt;
		:addClass(message(&#039;end-box-class&#039;))&lt;br /&gt;
		-- &#039;plainlinks&#039;&lt;br /&gt;
		:addClass(message(&#039;end-box-plainlinks&#039;))&lt;br /&gt;
		:wikitext(text)&lt;br /&gt;
		:done()&lt;br /&gt;
&lt;br /&gt;
	return &#039;\n&#039; .. tostring(box)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.makeDocPageBlurb(args, env)&lt;br /&gt;
	--[=[&lt;br /&gt;
	-- Makes the blurb &amp;quot;This documentation is transcluded from [[Template:Foo]] (edit, history)&amp;quot;.&lt;br /&gt;
	-- @args - a table of arguments passed by the user&lt;br /&gt;
	-- @env - environment table containing title objects, etc., generated with p.getEnvironment&lt;br /&gt;
	-- &lt;br /&gt;
	-- Messages:&lt;br /&gt;
	-- &#039;edit-link-display&#039; --&amp;gt; &#039;edit&#039;&lt;br /&gt;
	-- &#039;history-link-display&#039; --&amp;gt; &#039;history&#039;&lt;br /&gt;
	-- &#039;transcluded-from-blurb&#039; --&amp;gt; &lt;br /&gt;
	-- &#039;The above [[Wikipedia:Template documentation|documentation]] &lt;br /&gt;
	-- is [[Help:Transclusion|transcluded]] from $1.&#039;&lt;br /&gt;
	-- &#039;module-preload&#039; --&amp;gt; &#039;Template:Documentation/preload-module-doc&#039;&lt;br /&gt;
	-- &#039;create-link-display&#039; --&amp;gt; &#039;create&#039;&lt;br /&gt;
	-- &#039;create-module-doc-blurb&#039; --&amp;gt;&lt;br /&gt;
	-- &#039;You might want to $1 a documentation page for this [[Wikipedia:Lua|Scribunto module]].&#039;&lt;br /&gt;
	--]=]&lt;br /&gt;
	local docTitle = env.docTitle&lt;br /&gt;
	if not docTitle then&lt;br /&gt;
		return nil&lt;br /&gt;
	end&lt;br /&gt;
	local ret&lt;br /&gt;
	if docTitle.exists then&lt;br /&gt;
		-- /doc exists; link to it.&lt;br /&gt;
		local docLink = makeWikilink(docTitle.prefixedText)&lt;br /&gt;
		local editUrl = docTitle:fullUrl{action = &#039;edit&#039;}&lt;br /&gt;
		local editDisplay = message(&#039;edit-link-display&#039;)&lt;br /&gt;
		local editLink = makeUrlLink(editUrl, editDisplay)&lt;br /&gt;
		local historyUrl = docTitle:fullUrl{action = &#039;history&#039;}&lt;br /&gt;
		local historyDisplay = message(&#039;history-link-display&#039;)&lt;br /&gt;
		local historyLink = makeUrlLink(historyUrl, historyDisplay)&lt;br /&gt;
		ret = message(&#039;transcluded-from-blurb&#039;, {docLink})&lt;br /&gt;
			.. &#039; &#039;&lt;br /&gt;
			.. makeToolbar(editLink, historyLink)&lt;br /&gt;
			.. &#039;&amp;lt;br /&amp;gt;&#039;&lt;br /&gt;
	elseif env.subjectSpace == 828 then&lt;br /&gt;
		-- /doc does not exist; ask to create it.&lt;br /&gt;
		local createUrl = docTitle:fullUrl{action = &#039;edit&#039;, preload = message(&#039;module-preload&#039;)}&lt;br /&gt;
		local createDisplay = message(&#039;create-link-display&#039;)&lt;br /&gt;
		local createLink = makeUrlLink(createUrl, createDisplay)&lt;br /&gt;
		ret = message(&#039;create-module-doc-blurb&#039;, {createLink})&lt;br /&gt;
			.. &#039;&amp;lt;br /&amp;gt;&#039;&lt;br /&gt;
	end&lt;br /&gt;
	return ret&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.makeExperimentBlurb(args, env)&lt;br /&gt;
	--[[&lt;br /&gt;
	-- Renders the text &amp;quot;Editors can experiment in this template&#039;s sandbox (edit | diff) and testcases (edit) pages.&amp;quot;&lt;br /&gt;
	-- @args - a table of arguments passed by the user&lt;br /&gt;
	-- @env - environment table containing title objects, etc., generated with p.getEnvironment&lt;br /&gt;
	-- &lt;br /&gt;
	-- Messages:&lt;br /&gt;
	-- &#039;sandbox-link-display&#039; --&amp;gt; &#039;sandbox&#039;&lt;br /&gt;
	-- &#039;sandbox-edit-link-display&#039; --&amp;gt; &#039;edit&#039;&lt;br /&gt;
	-- &#039;compare-link-display&#039; --&amp;gt; &#039;diff&#039;&lt;br /&gt;
	-- &#039;module-sandbox-preload&#039; --&amp;gt; &#039;Template:Documentation/preload-module-sandbox&#039;&lt;br /&gt;
	-- &#039;template-sandbox-preload&#039; --&amp;gt; &#039;Template:Documentation/preload-sandbox&#039;&lt;br /&gt;
	-- &#039;sandbox-create-link-display&#039; --&amp;gt; &#039;create&#039;&lt;br /&gt;
	-- &#039;mirror-edit-summary&#039; --&amp;gt; &#039;Create sandbox version of $1&#039;&lt;br /&gt;
	-- &#039;mirror-link-display&#039; --&amp;gt; &#039;mirror&#039;&lt;br /&gt;
	-- &#039;mirror-link-preload&#039; --&amp;gt; &#039;Template:Documentation/mirror&#039;&lt;br /&gt;
	-- &#039;sandbox-link-display&#039; --&amp;gt; &#039;sandbox&#039;&lt;br /&gt;
	-- &#039;testcases-link-display&#039; --&amp;gt; &#039;testcases&#039;&lt;br /&gt;
	-- &#039;testcases-edit-link-display&#039;--&amp;gt; &#039;edit&#039;&lt;br /&gt;
	-- &#039;template-sandbox-preload&#039; --&amp;gt; &#039;Template:Documentation/preload-sandbox&#039;&lt;br /&gt;
	-- &#039;testcases-create-link-display&#039; --&amp;gt; &#039;create&#039;&lt;br /&gt;
	-- &#039;testcases-link-display&#039; --&amp;gt; &#039;testcases&#039;&lt;br /&gt;
	-- &#039;testcases-edit-link-display&#039; --&amp;gt; &#039;edit&#039;&lt;br /&gt;
	-- &#039;module-testcases-preload&#039; --&amp;gt; &#039;Template:Documentation/preload-module-testcases&#039;&lt;br /&gt;
	-- &#039;template-testcases-preload&#039; --&amp;gt; &#039;Template:Documentation/preload-testcases&#039;&lt;br /&gt;
	-- &#039;experiment-blurb-module&#039; --&amp;gt; &#039;Editors can experiment in this module&#039;s $1 and $2 pages.&#039;&lt;br /&gt;
	-- &#039;experiment-blurb-template&#039; --&amp;gt; &#039;Editors can experiment in this template&#039;s $1 and $2 pages.&#039;&lt;br /&gt;
	--]]&lt;br /&gt;
	local subjectSpace = env.subjectSpace&lt;br /&gt;
	local templateTitle = env.templateTitle&lt;br /&gt;
	local sandboxTitle = env.sandboxTitle&lt;br /&gt;
	local testcasesTitle = env.testcasesTitle&lt;br /&gt;
	local templatePage = templateTitle.prefixedText&lt;br /&gt;
	if not subjectSpace or not templateTitle or not sandboxTitle or not testcasesTitle then&lt;br /&gt;
		return nil&lt;br /&gt;
	end&lt;br /&gt;
	-- Make links.&lt;br /&gt;
	local sandboxLinks, testcasesLinks&lt;br /&gt;
	if sandboxTitle.exists then&lt;br /&gt;
		local sandboxPage = sandboxTitle.prefixedText&lt;br /&gt;
		local sandboxDisplay = message(&#039;sandbox-link-display&#039;)&lt;br /&gt;
		local sandboxLink = makeWikilink(sandboxPage, sandboxDisplay)&lt;br /&gt;
		local sandboxEditUrl = sandboxTitle:fullUrl{action = &#039;edit&#039;}&lt;br /&gt;
		local sandboxEditDisplay = message(&#039;sandbox-edit-link-display&#039;)&lt;br /&gt;
		local sandboxEditLink = makeUrlLink(sandboxEditUrl, sandboxEditDisplay)&lt;br /&gt;
		local compareUrl = env.compareUrl&lt;br /&gt;
		local compareLink&lt;br /&gt;
		if compareUrl then&lt;br /&gt;
			local compareDisplay = message(&#039;compare-link-display&#039;)&lt;br /&gt;
			compareLink = makeUrlLink(compareUrl, compareDisplay)&lt;br /&gt;
		end&lt;br /&gt;
		sandboxLinks = sandboxLink .. &#039; &#039; .. makeToolbar(sandboxEditLink, compareLink)&lt;br /&gt;
	else&lt;br /&gt;
		local sandboxPreload&lt;br /&gt;
		if subjectSpace == 828 then&lt;br /&gt;
			sandboxPreload = message(&#039;module-sandbox-preload&#039;)&lt;br /&gt;
		else&lt;br /&gt;
			sandboxPreload = message(&#039;template-sandbox-preload&#039;)&lt;br /&gt;
		end&lt;br /&gt;
		local sandboxCreateUrl = sandboxTitle:fullUrl{action = &#039;edit&#039;, preload = sandboxPreload}&lt;br /&gt;
		local sandboxCreateDisplay = message(&#039;sandbox-create-link-display&#039;)&lt;br /&gt;
		local sandboxCreateLink = makeUrlLink(sandboxCreateUrl, sandboxCreateDisplay)&lt;br /&gt;
		local mirrorSummary = message(&#039;mirror-edit-summary&#039;, {makeWikilink(templatePage)})&lt;br /&gt;
		local mirrorPreload = message(&#039;mirror-link-preload&#039;)&lt;br /&gt;
		local mirrorUrl = sandboxTitle:fullUrl{action = &#039;edit&#039;, preload = mirrorPreload, summary = mirrorSummary}&lt;br /&gt;
		if subjectSpace == 828 then&lt;br /&gt;
			mirrorUrl = sandboxTitle:fullUrl{action = &#039;edit&#039;, preload = templateTitle.prefixedText, summary = mirrorSummary}&lt;br /&gt;
		end&lt;br /&gt;
		local mirrorDisplay = message(&#039;mirror-link-display&#039;)&lt;br /&gt;
		local mirrorLink = makeUrlLink(mirrorUrl, mirrorDisplay)&lt;br /&gt;
		sandboxLinks = message(&#039;sandbox-link-display&#039;) .. &#039; &#039; .. makeToolbar(sandboxCreateLink, mirrorLink)&lt;br /&gt;
	end&lt;br /&gt;
	if testcasesTitle.exists then&lt;br /&gt;
		local testcasesPage = testcasesTitle.prefixedText&lt;br /&gt;
		local testcasesDisplay = message(&#039;testcases-link-display&#039;)&lt;br /&gt;
		local testcasesLink = makeWikilink(testcasesPage, testcasesDisplay)&lt;br /&gt;
		local testcasesEditUrl = testcasesTitle:fullUrl{action = &#039;edit&#039;}&lt;br /&gt;
		local testcasesEditDisplay = message(&#039;testcases-edit-link-display&#039;)&lt;br /&gt;
		local testcasesEditLink = makeUrlLink(testcasesEditUrl, testcasesEditDisplay)&lt;br /&gt;
		-- for Modules, add testcases run link if exists&lt;br /&gt;
		if testcasesTitle.contentModel == &amp;quot;Scribunto&amp;quot;  and testcasesTitle.talkPageTitle and testcasesTitle.talkPageTitle.exists then&lt;br /&gt;
			local testcasesRunLinkDisplay = message(&#039;testcases-run-link-display&#039;)&lt;br /&gt;
			local testcasesRunLink = makeWikilink(testcasesTitle.talkPageTitle.prefixedText, testcasesRunLinkDisplay)&lt;br /&gt;
			testcasesLinks = testcasesLink .. &#039; &#039; .. makeToolbar(testcasesEditLink, testcasesRunLink)&lt;br /&gt;
		else&lt;br /&gt;
			testcasesLinks = testcasesLink .. &#039; &#039; .. makeToolbar(testcasesEditLink)&lt;br /&gt;
		end&lt;br /&gt;
	else&lt;br /&gt;
		local testcasesPreload&lt;br /&gt;
		if subjectSpace == 828 then&lt;br /&gt;
			testcasesPreload = message(&#039;module-testcases-preload&#039;)&lt;br /&gt;
		else&lt;br /&gt;
			testcasesPreload = message(&#039;template-testcases-preload&#039;)&lt;br /&gt;
		end&lt;br /&gt;
		local testcasesCreateUrl = testcasesTitle:fullUrl{action = &#039;edit&#039;, preload = testcasesPreload}&lt;br /&gt;
		local testcasesCreateDisplay = message(&#039;testcases-create-link-display&#039;)&lt;br /&gt;
		local testcasesCreateLink = makeUrlLink(testcasesCreateUrl, testcasesCreateDisplay)&lt;br /&gt;
		testcasesLinks = message(&#039;testcases-link-display&#039;) .. &#039; &#039; .. makeToolbar(testcasesCreateLink)&lt;br /&gt;
	end&lt;br /&gt;
	local messageName&lt;br /&gt;
	if subjectSpace == 828 then&lt;br /&gt;
		messageName = &#039;experiment-blurb-module&#039;&lt;br /&gt;
	else&lt;br /&gt;
		messageName = &#039;experiment-blurb-template&#039;&lt;br /&gt;
	end&lt;br /&gt;
	return message(messageName, {sandboxLinks, testcasesLinks})&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.makeCategoriesBlurb(args, env)&lt;br /&gt;
	--[[&lt;br /&gt;
	-- Generates the text &amp;quot;Please add categories to the /doc subpage.&amp;quot;&lt;br /&gt;
	-- @args - a table of arguments passed by the user&lt;br /&gt;
	-- @env - environment table containing title objects, etc., generated with p.getEnvironment&lt;br /&gt;
	-- Messages:&lt;br /&gt;
	-- &#039;doc-link-display&#039; --&amp;gt; &#039;/doc&#039;&lt;br /&gt;
	-- &#039;add-categories-blurb&#039; --&amp;gt; &#039;Please add categories to the $1 subpage.&#039;&lt;br /&gt;
	--]]&lt;br /&gt;
	local docTitle = env.docTitle&lt;br /&gt;
	if not docTitle then&lt;br /&gt;
		return nil&lt;br /&gt;
	end&lt;br /&gt;
	local docPathLink = makeWikilink(docTitle.prefixedText, message(&#039;doc-link-display&#039;))&lt;br /&gt;
	return message(&#039;add-categories-blurb&#039;, {docPathLink})&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.makeSubpagesBlurb(args, env)&lt;br /&gt;
	--[[&lt;br /&gt;
	-- Generates the &amp;quot;Subpages of this template&amp;quot; link.&lt;br /&gt;
	-- @args - a table of arguments passed by the user&lt;br /&gt;
	-- @env - environment table containing title objects, etc., generated with p.getEnvironment&lt;br /&gt;
	&lt;br /&gt;
	-- Messages:&lt;br /&gt;
	-- &#039;template-pagetype&#039; --&amp;gt; &#039;template&#039;&lt;br /&gt;
	-- &#039;module-pagetype&#039; --&amp;gt; &#039;module&#039;&lt;br /&gt;
	-- &#039;default-pagetype&#039; --&amp;gt; &#039;page&#039;&lt;br /&gt;
	-- &#039;subpages-link-display&#039; --&amp;gt; &#039;Subpages of this $1&#039;&lt;br /&gt;
	--]]&lt;br /&gt;
	local subjectSpace = env.subjectSpace&lt;br /&gt;
	local templateTitle = env.templateTitle&lt;br /&gt;
	if not subjectSpace or not templateTitle then&lt;br /&gt;
		return nil&lt;br /&gt;
	end&lt;br /&gt;
	local pagetype&lt;br /&gt;
	if subjectSpace == 10 then&lt;br /&gt;
		pagetype = message(&#039;template-pagetype&#039;)&lt;br /&gt;
	elseif subjectSpace == 828 then&lt;br /&gt;
		pagetype = message(&#039;module-pagetype&#039;)&lt;br /&gt;
	else&lt;br /&gt;
		pagetype = message(&#039;default-pagetype&#039;)&lt;br /&gt;
	end&lt;br /&gt;
	local subpagesLink = makeWikilink(&lt;br /&gt;
		&#039;Special:PrefixIndex/&#039; .. templateTitle.prefixedText .. &#039;/&#039;,&lt;br /&gt;
		message(&#039;subpages-link-display&#039;, {pagetype})&lt;br /&gt;
	)&lt;br /&gt;
	return message(&#039;subpages-blurb&#039;, {subpagesLink})&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
-- Tracking categories&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
function p.addTrackingCategories(env)&lt;br /&gt;
	--[[&lt;br /&gt;
	-- Check if {{documentation}} is transcluded on a /doc or /testcases page.&lt;br /&gt;
	-- @env - environment table containing title objects, etc., generated with p.getEnvironment&lt;br /&gt;
	&lt;br /&gt;
	-- Messages:&lt;br /&gt;
	-- &#039;display-strange-usage-category&#039; --&amp;gt; true&lt;br /&gt;
	-- &#039;doc-subpage&#039; --&amp;gt; &#039;doc&#039;&lt;br /&gt;
	-- &#039;testcases-subpage&#039; --&amp;gt; &#039;testcases&#039;&lt;br /&gt;
	-- &#039;strange-usage-category&#039; --&amp;gt; &#039;Wikipedia pages with strange ((documentation)) usage&#039;&lt;br /&gt;
	-- &lt;br /&gt;
	-- /testcases pages in the module namespace are not categorised, as they may have&lt;br /&gt;
	-- {{documentation}} transcluded automatically.&lt;br /&gt;
	--]]&lt;br /&gt;
	local title = env.title&lt;br /&gt;
	local subjectSpace = env.subjectSpace&lt;br /&gt;
	if not title or not subjectSpace then&lt;br /&gt;
		return nil&lt;br /&gt;
	end&lt;br /&gt;
	local subpage = title.subpageText&lt;br /&gt;
	local ret = &#039;&#039;&lt;br /&gt;
	if message(&#039;display-strange-usage-category&#039;, nil, &#039;boolean&#039;)&lt;br /&gt;
		and (&lt;br /&gt;
			subpage == message(&#039;doc-subpage&#039;)&lt;br /&gt;
			or subjectSpace ~= 828 and subpage == message(&#039;testcases-subpage&#039;)&lt;br /&gt;
		)&lt;br /&gt;
	then&lt;br /&gt;
		ret = ret .. makeCategoryLink(message(&#039;strange-usage-category&#039;))&lt;br /&gt;
	end&lt;br /&gt;
	return ret&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>User</name></author>
	</entry>
	<entry>
		<id>https://shreloaded.net/index.php?title=Module:Citation/doc&amp;diff=64355</id>
		<title>Module:Citation/doc</title>
		<link rel="alternate" type="text/html" href="https://shreloaded.net/index.php?title=Module:Citation/doc&amp;diff=64355"/>
		<updated>2021-08-09T10:23:33Z</updated>

		<summary type="html">&lt;p&gt;User: 1 revision imported&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Mbox&lt;br /&gt;
| type = style&lt;br /&gt;
| image = [[File:Imbox content.png|40px|alt=|link=]]&lt;br /&gt;
| text = &#039;&#039;&#039;{{FULLPAGENAME}}&#039;&#039;&#039; is retained for historical and structural reasons; consider using [[Module:Citation/CS1]].&lt;br /&gt;
}}&lt;br /&gt;
{{oldtfdfull|date= 2018 May 13 |result=Blank |disc=Module:Citation}}&lt;br /&gt;
Development of [[WP:LUA|Lua]] support for both {{cs1}} and {{cs2}} began at &#039;&#039;&#039;Module:Citation&#039;&#039;&#039;.  That development was abandoned in 2013 as development of [[Module:Citation/CS1]] began.&lt;br /&gt;
&lt;br /&gt;
Though this module remained unused, it is and has been the root page of the [https://en.wikipedia.org/wiki/Special:PrefixIndex?prefix=Citation&amp;amp;namespace=828 several module subpages that implement cs1 and cs2].  The content of this module was replaced with an error message return as the result of a [[Wikipedia:Templates for discussion/Log/2018_May_13#Module:Citation|2018 TfD]].&lt;/div&gt;</summary>
		<author><name>User</name></author>
	</entry>
	<entry>
		<id>https://shreloaded.net/index.php?title=Template:Tmbox&amp;diff=64353</id>
		<title>Template:Tmbox</title>
		<link rel="alternate" type="text/html" href="https://shreloaded.net/index.php?title=Template:Tmbox&amp;diff=64353"/>
		<updated>2021-08-09T10:23:33Z</updated>

		<summary type="html">&lt;p&gt;User: 1 revision imported&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{#invoke:Message box|tmbox}}&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>User</name></author>
	</entry>
	<entry>
		<id>https://shreloaded.net/index.php?title=Template:Oldtfdfull&amp;diff=64351</id>
		<title>Template:Oldtfdfull</title>
		<link rel="alternate" type="text/html" href="https://shreloaded.net/index.php?title=Template:Oldtfdfull&amp;diff=64351"/>
		<updated>2021-08-09T10:23:32Z</updated>

		<summary type="html">&lt;p&gt;User: 1 revision imported&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Template:Old TfD]]&lt;/div&gt;</summary>
		<author><name>User</name></author>
	</entry>
	<entry>
		<id>https://shreloaded.net/index.php?title=Template:Old_TfD&amp;diff=64349</id>
		<title>Template:Old TfD</title>
		<link rel="alternate" type="text/html" href="https://shreloaded.net/index.php?title=Template:Old_TfD&amp;diff=64349"/>
		<updated>2021-08-09T10:23:32Z</updated>

		<summary type="html">&lt;p&gt;User: 1 revision imported&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{ {{{|safesubst:}}}#invoke:Unsubst||$B={{Tmbox&lt;br /&gt;
| small = {{{small|}}}&lt;br /&gt;
| image = [[File:Clipboard.svg|{{#ifeq:{{{small|}}}|yes|30x20|50x40}}px]]&lt;br /&gt;
| style = text-align:center&lt;br /&gt;
| text  = This {{#switch:{{{demospace|{{NAMESPACE}}}}}&lt;br /&gt;
 | {{ns:Category_talk}} = category&lt;br /&gt;
 | {{ns:Module_talk}} = module&lt;br /&gt;
 | template&lt;br /&gt;
}} {{#if:{{{1|}}}|([[{{{1}}}]])}} was considered for {{#if:{{{merge|}}}|[[Wikipedia:Merging|merging]]|[[Wikipedia:Deletion policy|deletion]]}}{{#if:{{{merge|}}}|{{#ifeq:{{{merge}}}|self||&amp;amp;#32;with [[{{{merge}}}]]}} {{#if:{{{more_merge|}}}|&amp;amp;#32;{{{more_merge}}}}}}} on {{#formatdate:{{{date}}}}}. The result of the &amp;lt;!-- IF OLD LOG --&amp;gt;{{#ifexist:Wikipedia:Templates for deletion/Log/{{#if:{{{link|}}}|{{{link}}}|{{Date|{{{date}}}|ymd}}}}&lt;br /&gt;
|&amp;lt;!-- Listed in Templates for deletion   --&amp;gt;&#039;&#039;&#039;[[Wikipedia:Templates for deletion/Log/{{#if:{{{link|}}}|{{{link}}}|{{Date|{{{date|}}}|ymd}}}}#{{{talk|{{{disc|{{{discuss|{{{1|Template:{{PAGENAME}}}}}}}}}}}}}}|discussion]]&#039;&#039;&#039;&lt;br /&gt;
|&amp;lt;!-- Listed in Templates for discussion --&amp;gt;&#039;&#039;&#039;[[Wikipedia:Templates for discussion/Log/{{#if:{{{link|}}}|{{{link}}}|{{Date|{{{date|}}}|ymd}}}}#{{{talk|{{{disc|{{{discuss|{{{1|Template:{{PAGENAME}}}}}}}}}}}}}}|discussion]]&#039;&#039;&#039;}}&amp;lt;!-- END IF --&amp;gt; was &amp;quot;&#039;&#039;&#039;{{{result|keep}}}&#039;&#039;&#039;&amp;quot;.&lt;br /&gt;
}}}}&amp;lt;noinclude&amp;gt;{{Documentation}}&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>User</name></author>
	</entry>
	<entry>
		<id>https://shreloaded.net/index.php?title=Template:Mbox&amp;diff=64347</id>
		<title>Template:Mbox</title>
		<link rel="alternate" type="text/html" href="https://shreloaded.net/index.php?title=Template:Mbox&amp;diff=64347"/>
		<updated>2021-08-09T10:23:32Z</updated>

		<summary type="html">&lt;p&gt;User: 1 revision imported&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{#invoke:Message box|mbox}}&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>User</name></author>
	</entry>
	<entry>
		<id>https://shreloaded.net/index.php?title=Template:Date&amp;diff=64345</id>
		<title>Template:Date</title>
		<link rel="alternate" type="text/html" href="https://shreloaded.net/index.php?title=Template:Date&amp;diff=64345"/>
		<updated>2021-08-09T10:23:32Z</updated>

		<summary type="html">&lt;p&gt;User: 1 revision imported&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{{{{|safesubst:}}}#switch:none&lt;br /&gt;
 |{{{{{|safesubst:}}}#iferror: {{{{{|safesubst:}}}#time:Y_M_d|{{{1|}}} }} | none }} &amp;lt;noinclude&amp;gt;&amp;lt;!-- #time: can&#039;t handle --&amp;gt;&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
 |{{{{{|safesubst:}}}#iferror: {{{{{|safesubst:}}}#expr: {{{1|}}}+0 }}&lt;br /&gt;
    |&amp;lt;noinclude&amp;gt;&amp;lt;!--not a pure number--&amp;gt;&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
    |{{{{{|safesubst:}}}#ifexpr: {{{1|}}}+0 &amp;gt; 10000000000000&lt;br /&gt;
       |&amp;lt;noinclude&amp;gt;&amp;lt;!-- a yyyymmddhhmmss timestamp --&amp;gt;&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
       |{{{{{|safesubst:}}}#ifeq: {{{{{|safesubst:}}}#expr:{{{1|}}}+0}} | {{{1|}}}&lt;br /&gt;
          | none &amp;lt;noinclude&amp;gt;&amp;lt;!-- pure number eg 123.456 --&amp;gt;&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
          | &amp;lt;noinclude&amp;gt;&amp;lt;!-- assume yy-mm-dd --&amp;gt;&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
        }}&lt;br /&gt;
     }}&lt;br /&gt;
  }}&lt;br /&gt;
 |{{{{{|safesubst:}}}#switch:  {{{{{|safesubst:}}}lc:{{{2|}}}}} | none | asis | link | lnone =none }}&lt;br /&gt;
 |{{{{{|safesubst:}}}#ifexpr:  {{{{{|safesubst:}}}#time:Y|{{{1|}}} }} &amp;lt; 1000 | none }}&lt;br /&gt;
 |{{{{{|safesubst:}}}#switch:  {{{{{|safesubst:}}}#time:Ynj|{{{1|}}} }}|100031|110031|130031|140031|150031=none}}&lt;br /&gt;
 |= {{{{{|safesubst:}}}#if:{{{1|}}}&lt;br /&gt;
      |{{{{{|safesubst:}}}#switch:{{{2}}}&lt;br /&gt;
         |link|lnone|l=[[{{{1}}}]]&lt;br /&gt;
         |{{{1}}}&lt;br /&gt;
       }}&lt;br /&gt;
    }}&amp;lt;noinclude&amp;gt;&amp;lt;!-- error or &amp;quot;none&amp;quot;, so no formatting --&amp;gt;&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
 |&amp;lt;noinclude&amp;gt;&amp;lt;!-- continue with formatting --&amp;gt;&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
  {{{{{|safesubst:}}}#ifeq:&amp;lt;noinclude&amp;gt;&amp;lt;!--&lt;br /&gt;
    --&amp;gt;&amp;lt;/noinclude&amp;gt;{{{{{|safesubst:}}}#time:Y|{{{1}}} 2008}}&amp;lt;noinclude&amp;gt;&amp;lt;!--&lt;br /&gt;
    --&amp;gt;&amp;lt;/noinclude&amp;gt;{{{{{|safesubst:}}}#iferror: {{{{{|safesubst:}}}#ifexpr: {{{1}}}&amp;gt;10000000000000 | no }} | }}&amp;lt;noinclude&amp;gt;&amp;lt;!--&lt;br /&gt;
    --&amp;gt;&amp;lt;/noinclude&amp;gt;{{{{{|safesubst:}}}#time:Y|{{{1}}} 2004}}&lt;br /&gt;
  |20082004&lt;br /&gt;
  |&amp;lt;noinclude&amp;gt;&amp;lt;!-- no year --&amp;gt;&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
    {{{{{|safesubst:}}}#ifeq:{{{{{|safesubst:}}}#time:d|{{{1}}} 2036}}|{{{{{|safesubst:}}}#time:d|{{{1}}} }}&lt;br /&gt;
    |&amp;lt;noinclude&amp;gt;&amp;lt;!-- month+day --&amp;gt;&amp;lt;/noinclude&amp;gt;{{{{{|safesubst:}}}#time:&lt;br /&gt;
      {{{{{|safesubst:}}}#switch: {{{{{|safesubst:}}}lc: {{{{{|safesubst:}}}#ifeq:{{{3|}}}|y|L}}{{{2|}}} }}&lt;br /&gt;
      | lmdy | liso | lymd      = [[:F j]]&lt;br /&gt;
      | mdy  | iso  | ymd       = F j&lt;br /&gt;
      | ldmy | l                = [[:j F]]&lt;br /&gt;
      | #default                = j F&lt;br /&gt;
      }}|{{{1}}} 2000 }}&amp;lt;noinclude&amp;gt;&amp;lt;!-- default=&#039;dmy&#039; or null or &amp;quot;&amp;quot; or unsupported option --&amp;gt;&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
    |&amp;lt;noinclude&amp;gt;&amp;lt;!-- month only --&amp;gt;&amp;lt;/noinclude&amp;gt;{{{{{|safesubst:}}}#time:&lt;br /&gt;
      {{{{{|safesubst:}}}#switch: {{{{{|safesubst:}}}lc: {{{{{|safesubst:}}}#ifeq:{{{3|}}}|y|L}}{{{2|}}} }}&lt;br /&gt;
      | lmdy | liso | lymd &lt;br /&gt;
      | ldmy | l                = [[F]]&lt;br /&gt;
      | #default                = F&lt;br /&gt;
      }}|{{{1}}} 2000 }}&amp;lt;noinclude&amp;gt;&amp;lt;!-- default=&#039;dmy&#039;/&#039;mdy&#039;/&#039;ymd&#039;/&#039;iso&#039;/null/&amp;quot;&amp;quot;/unsupported opt --&amp;gt;&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
    }}&lt;br /&gt;
  |&amp;lt;noinclude&amp;gt;&amp;lt;!-- with year--&amp;gt;&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
    {{{{{|safesubst:}}}#if: {{{{{|safesubst:}}}#iferror:{{{{{|safesubst:}}}#time:j|2 {{{1|}}}}}|*D*|{{{{{|safesubst:}}}#iferror:{{{{{|safesubst:}}}#time:j|2000 {{{1|}}}}}|*D*| }}}}&lt;br /&gt;
    |&amp;lt;noinclude&amp;gt;&amp;lt;!-- day+month+year --&amp;gt;&amp;lt;/noinclude&amp;gt;{{{{{|safesubst:}}}#time:&lt;br /&gt;
      {{{{{|safesubst:}}}#switch: {{{{{|safesubst:}}}lc: {{{{{|safesubst:}}}#ifeq:{{{3|}}}|y|L}}{{{2|}}} }}&lt;br /&gt;
      | lmdy                    = [[:F j]], [[Y]]&lt;br /&gt;
      | mdy                     = F j, Y&lt;br /&gt;
      | liso                    = [[Y|Y-]][[F j|m-d]]&amp;lt;noinclude&amp;gt;&amp;lt;!-- i.e. [[Y-m-d]] --&amp;gt;&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
      | iso                     = Y-m-d&lt;br /&gt;
      | lymd                    = [[Y]] [[:F j]]&lt;br /&gt;
      | ymd                     = Y F j&lt;br /&gt;
      | ldmy | l                = [[:j F]] [[Y]]&lt;br /&gt;
      | #default                = j F Y&lt;br /&gt;
      }}|{{{1|}}} }}&amp;lt;noinclude&amp;gt;&amp;lt;!-- #default=&#039;dmy&#039; or null or &amp;quot;&amp;quot; or unsupported option --&amp;gt;&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
    |&amp;lt;noinclude&amp;gt;&amp;lt;!-- month+year --&amp;gt;&amp;lt;/noinclude&amp;gt;{{{{{|safesubst:}}}#time:&lt;br /&gt;
      {{{{{|safesubst:}}}#switch: {{{{{|safesubst:}}}lc: {{{{{|safesubst:}}}#ifeq:{{{3|}}}|y|L}}{{{2|}}} }}&lt;br /&gt;
      | lmdy | liso | lymd | ldmy | l  = [[:F Y]]&lt;br /&gt;
      | #default                = F Y&lt;br /&gt;
      }}|{{{1|}}} }}&amp;lt;noinclude&amp;gt;&amp;lt;!-- default=&#039;dmy&#039;/&#039;iso&#039;/&#039;mdy&#039;/null/&amp;quot;&amp;quot;/unsupported option --&amp;gt;&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
    }}&lt;br /&gt;
  }}    &lt;br /&gt;
}}&amp;lt;noinclude&amp;gt;&lt;br /&gt;
{{documentation}}&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>User</name></author>
	</entry>
	<entry>
		<id>https://shreloaded.net/index.php?title=Template:Cs2&amp;diff=64343</id>
		<title>Template:Cs2</title>
		<link rel="alternate" type="text/html" href="https://shreloaded.net/index.php?title=Template:Cs2&amp;diff=64343"/>
		<updated>2021-08-09T10:23:32Z</updated>

		<summary type="html">&lt;p&gt;User: 1 revision imported&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Help:Citation Style 2|Citation Style 2]]&amp;lt;noinclude&amp;gt;&lt;br /&gt;
[[Category:Documentation assistance templates]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>User</name></author>
	</entry>
	<entry>
		<id>https://shreloaded.net/index.php?title=Template:Cs1&amp;diff=64341</id>
		<title>Template:Cs1</title>
		<link rel="alternate" type="text/html" href="https://shreloaded.net/index.php?title=Template:Cs1&amp;diff=64341"/>
		<updated>2021-08-09T10:23:32Z</updated>

		<summary type="html">&lt;p&gt;User: 1 revision imported&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Help:Citation Style 1|Citation Style 1]]&amp;lt;noinclude&amp;gt;&lt;br /&gt;
[[Category:Documentation assistance templates]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>User</name></author>
	</entry>
	<entry>
		<id>https://shreloaded.net/index.php?title=Module:Check_for_unknown_parameters&amp;diff=64339</id>
		<title>Module:Check for unknown parameters</title>
		<link rel="alternate" type="text/html" href="https://shreloaded.net/index.php?title=Module:Check_for_unknown_parameters&amp;diff=64339"/>
		<updated>2021-08-09T10:23:31Z</updated>

		<summary type="html">&lt;p&gt;User: 1 revision imported&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;-- This module may be used to compare the arguments passed to the parent&lt;br /&gt;
-- with a list of arguments, returning a specified result if an argument is&lt;br /&gt;
-- not on the list&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
local function trim(s)&lt;br /&gt;
	return s:match(&#039;^%s*(.-)%s*$&#039;)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function isnotempty(s)&lt;br /&gt;
	return s and s:match(&#039;%S&#039;)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function clean(text)&lt;br /&gt;
	-- Return text cleaned for display and truncated if too long.&lt;br /&gt;
	-- Strip markers are replaced with dummy text representing the original wikitext.&lt;br /&gt;
	local pos, truncated&lt;br /&gt;
	local function truncate(text)&lt;br /&gt;
		if truncated then&lt;br /&gt;
			return &#039;&#039;&lt;br /&gt;
		end&lt;br /&gt;
		if mw.ustring.len(text) &amp;gt; 25 then&lt;br /&gt;
			truncated = true&lt;br /&gt;
			text = mw.ustring.sub(text, 1, 25) .. &#039;...&#039;&lt;br /&gt;
		end&lt;br /&gt;
		return mw.text.nowiki(text)&lt;br /&gt;
	end&lt;br /&gt;
	local parts = {}&lt;br /&gt;
	for before, tag, remainder in text:gmatch(&#039;([^\127]*)\127[^\127]*%-(%l+)%-[^\127]*\127()&#039;) do&lt;br /&gt;
		pos = remainder&lt;br /&gt;
		table.insert(parts, truncate(before) .. &#039;&amp;amp;lt;&#039; .. tag .. &#039;&amp;amp;gt;...&amp;amp;lt;/&#039; .. tag .. &#039;&amp;amp;gt;&#039;)&lt;br /&gt;
	end&lt;br /&gt;
	table.insert(parts, truncate(text:sub(pos or 1)))&lt;br /&gt;
	return table.concat(parts)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p._check(args, pargs)&lt;br /&gt;
	if type(args) ~= &amp;quot;table&amp;quot; or type(pargs) ~= &amp;quot;table&amp;quot; then&lt;br /&gt;
		-- TODO: error handling&lt;br /&gt;
		return&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- create the list of known args, regular expressions, and the return string&lt;br /&gt;
	local knownargs = {}&lt;br /&gt;
	local regexps = {}&lt;br /&gt;
	for k, v in pairs(args) do&lt;br /&gt;
		if type(k) == &#039;number&#039; then&lt;br /&gt;
			v = trim(v)&lt;br /&gt;
			knownargs[v] = 1&lt;br /&gt;
		elseif k:find(&#039;^regexp[1-9][0-9]*$&#039;) then&lt;br /&gt;
			table.insert(regexps, &#039;^&#039; .. v .. &#039;$&#039;)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- loop over the parent args, and make sure they are on the list&lt;br /&gt;
	local ignoreblank = isnotempty(args[&#039;ignoreblank&#039;])&lt;br /&gt;
	local showblankpos = isnotempty(args[&#039;showblankpositional&#039;])&lt;br /&gt;
	local values = {}&lt;br /&gt;
	for k, v in pairs(pargs) do&lt;br /&gt;
		if type(k) == &#039;string&#039; and knownargs[k] == nil then&lt;br /&gt;
			local knownflag = false&lt;br /&gt;
			for _, regexp in ipairs(regexps) do&lt;br /&gt;
				if mw.ustring.match(k, regexp) then&lt;br /&gt;
					knownflag = true&lt;br /&gt;
					break&lt;br /&gt;
				end&lt;br /&gt;
			end&lt;br /&gt;
			if not knownflag and ( not ignoreblank or isnotempty(v) )  then&lt;br /&gt;
				table.insert(values, clean(k))&lt;br /&gt;
			end&lt;br /&gt;
		elseif type(k) == &#039;number&#039; and&lt;br /&gt;
			knownargs[tostring(k)] == nil and&lt;br /&gt;
			( showblankpos or isnotempty(v) )&lt;br /&gt;
		then&lt;br /&gt;
			table.insert(values, k .. &#039; = &#039; .. clean(v))&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- add results to the output tables&lt;br /&gt;
	local res = {}&lt;br /&gt;
	if #values &amp;gt; 0 then&lt;br /&gt;
		local unknown_text = args[&#039;unknown&#039;] or &#039;Found _VALUE_, &#039;&lt;br /&gt;
&lt;br /&gt;
		if mw.getCurrentFrame():preprocess( &amp;quot;{{REVISIONID}}&amp;quot; ) == &amp;quot;&amp;quot; then&lt;br /&gt;
			local preview_text = args[&#039;preview&#039;]&lt;br /&gt;
			if isnotempty(preview_text) then&lt;br /&gt;
				preview_text = require(&#039;Module:If preview&#039;)._warning({preview_text})&lt;br /&gt;
			elseif preview == nil then&lt;br /&gt;
				preview_text = unknown_text&lt;br /&gt;
			end&lt;br /&gt;
			unknown_text = preview_text&lt;br /&gt;
		end&lt;br /&gt;
		for _, v in pairs(values) do&lt;br /&gt;
			-- Fix odd bug for | = which gets stripped to the empty string and&lt;br /&gt;
			-- breaks category links&lt;br /&gt;
			if v == &#039;&#039; then v = &#039; &#039; end&lt;br /&gt;
&lt;br /&gt;
			-- avoid error with v = &#039;example%2&#039; (&amp;quot;invalid capture index&amp;quot;)&lt;br /&gt;
			local r = unknown_text:gsub(&#039;_VALUE_&#039;, {_VALUE_ = v})&lt;br /&gt;
			table.insert(res, r)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	return table.concat(res)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.check(frame)&lt;br /&gt;
	local args = frame.args&lt;br /&gt;
	local pargs = frame:getParent().args&lt;br /&gt;
	return p._check(args, pargs)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>User</name></author>
	</entry>
	<entry>
		<id>https://shreloaded.net/index.php?title=Module:InfoboxImage&amp;diff=64337</id>
		<title>Module:InfoboxImage</title>
		<link rel="alternate" type="text/html" href="https://shreloaded.net/index.php?title=Module:InfoboxImage&amp;diff=64337"/>
		<updated>2021-08-09T10:23:31Z</updated>

		<summary type="html">&lt;p&gt;User: 1 revision imported&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;
	&amp;quot;Noimage.gif&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, &#039;mw.ustring.gsub(image, &amp;quot;_&amp;quot;, &amp;quot; &amp;quot;) must not return nil&#039;)&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, &#039;mw.ustring.gsub(image, &amp;quot;([^|]*)|.*&amp;quot;, &amp;quot;%1&amp;quot;) must not return nil&#039;)&lt;br /&gt;
    end&lt;br /&gt;
    -- Trim spaces&lt;br /&gt;
    image = mw.ustring.gsub(image, &#039;^[ ]*(.-)[ ]*$&#039;, &#039;%1&#039;);&lt;br /&gt;
    assert(image ~= nil, &amp;quot;mw.ustring.gsub(image, &#039;^[ ]*(.-)[ ]*$&#039;, &#039;%1&#039;) 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, &#039;^[ ]*(.-)[ ]*$&#039;, &#039;%1&#039;);&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;
        local cat = &amp;quot;&amp;quot;;&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;
            cat = &amp;quot;[[Category:Pages using infoboxes with thumbnail images]]&amp;quot;;&lt;br /&gt;
        end&lt;br /&gt;
        return image .. cat;&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&#039;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&#039;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;
        -- add px to sizedefault if just a number&lt;br /&gt;
        if (tonumber(sizedefault) or 0) &amp;gt; 0 then&lt;br /&gt;
            sizedefault = sizedefault .. &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 alt value is a keyword then do not use as a description&lt;br /&gt;
        if alt == &amp;quot;thumbnail&amp;quot; or alt == &amp;quot;thumb&amp;quot; or alt == &amp;quot;frameless&amp;quot; or alt == &amp;quot;left&amp;quot; or alt == &amp;quot;center&amp;quot; or alt == &amp;quot;right&amp;quot; or alt == &amp;quot;upright&amp;quot; or alt == &amp;quot;border&amp;quot; or mw.ustring.match(alt or &amp;quot;&amp;quot;, &#039;^[0-9]*px$&#039;, 1) ~= nil then&lt;br /&gt;
            alt = nil;&lt;br /&gt;
        end&lt;br /&gt;
        if title ~= &amp;quot;&amp;quot; and title ~= nil then&lt;br /&gt;
            -- does title param contain any templatestyles? If yes then set to blank.&lt;br /&gt;
            if mw.ustring.match(frame:preprocess(title), &#039;UNIQ%-%-templatestyles&#039;, 1) ~= nil then&lt;br /&gt;
                title = nil;&lt;br /&gt;
            end&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>User</name></author>
	</entry>
	<entry>
		<id>https://shreloaded.net/index.php?title=Module:Navbar&amp;diff=64335</id>
		<title>Module:Navbar</title>
		<link rel="alternate" type="text/html" href="https://shreloaded.net/index.php?title=Module:Navbar&amp;diff=64335"/>
		<updated>2021-08-09T10:23:31Z</updated>

		<summary type="html">&lt;p&gt;User: 1 revision imported&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;local p = {}&lt;br /&gt;
local cfg = mw.loadData(&#039;Module:Navbar/configuration&#039;)&lt;br /&gt;
&lt;br /&gt;
local function get_title_arg(is_collapsible, template)&lt;br /&gt;
	local title_arg = 1&lt;br /&gt;
	if is_collapsible then title_arg = 2 end&lt;br /&gt;
	if template then title_arg = &#039;template&#039; end&lt;br /&gt;
	return title_arg&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function choose_links(template, args)&lt;br /&gt;
	-- The show table indicates the default displayed items.&lt;br /&gt;
	-- view, talk, edit, hist, move, watch&lt;br /&gt;
	-- TODO: Move to configuration.&lt;br /&gt;
	local show = {true, true, true, false, false, false}&lt;br /&gt;
	if template then&lt;br /&gt;
		show[2] = false&lt;br /&gt;
		show[3] = false&lt;br /&gt;
		local index = {t = 2, d = 2, e = 3, h = 4, m = 5, w = 6,&lt;br /&gt;
			talk = 2, edit = 3, hist = 4, move = 5, watch = 6}&lt;br /&gt;
		-- TODO: Consider removing TableTools dependency.&lt;br /&gt;
		for _, v in ipairs(require (&#039;Module:TableTools&#039;).compressSparseArray(args)) do&lt;br /&gt;
			local num = index[v]&lt;br /&gt;
			if num then show[num] = true end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local remove_edit_link = args.noedit&lt;br /&gt;
	if remove_edit_link then show[3] = false end&lt;br /&gt;
	&lt;br /&gt;
	return show&lt;br /&gt;
	&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function add_link(link_description, ul, is_mini, font_style)&lt;br /&gt;
	local l&lt;br /&gt;
	if link_description.url then&lt;br /&gt;
		l = {&#039;[&#039;, &#039;&#039;, &#039;]&#039;}&lt;br /&gt;
	else&lt;br /&gt;
		l = {&#039;[[&#039;, &#039;|&#039;, &#039;]]&#039;}&lt;br /&gt;
	end&lt;br /&gt;
	ul:tag(&#039;li&#039;)&lt;br /&gt;
		:addClass(&#039;nv-&#039; .. link_description.full)&lt;br /&gt;
		:wikitext(l[1] .. link_description.link .. l[2])&lt;br /&gt;
		:tag(is_mini and &#039;abbr&#039; or &#039;span&#039;)&lt;br /&gt;
			:attr(&#039;title&#039;, link_description.html_title)&lt;br /&gt;
			:cssText(font_style)&lt;br /&gt;
			:wikitext(is_mini and link_description.mini or link_description.full)&lt;br /&gt;
			:done()&lt;br /&gt;
		:wikitext(l[3])&lt;br /&gt;
		:done()&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function make_list(title_text, has_brackets, displayed_links, is_mini, font_style)&lt;br /&gt;
	&lt;br /&gt;
	local title = mw.title.new(mw.text.trim(title_text), cfg.title_namespace)&lt;br /&gt;
	if not title then&lt;br /&gt;
		error(cfg.invalid_title .. title_text)&lt;br /&gt;
	end&lt;br /&gt;
	local talkpage = title.talkPageTitle and title.talkPageTitle.fullText or &#039;&#039;&lt;br /&gt;
	&lt;br /&gt;
	-- TODO: Get link_descriptions and show into the configuration module.&lt;br /&gt;
	-- link_descriptions should be easier...&lt;br /&gt;
	local link_descriptions = {&lt;br /&gt;
		{ [&#039;mini&#039;] = &#039;v&#039;, [&#039;full&#039;] = &#039;view&#039;, [&#039;html_title&#039;] = &#039;View this template&#039;,&lt;br /&gt;
			[&#039;link&#039;] = title.fullText, [&#039;url&#039;] = false },&lt;br /&gt;
		{ [&#039;mini&#039;] = &#039;t&#039;, [&#039;full&#039;] = &#039;talk&#039;, [&#039;html_title&#039;] = &#039;Discuss this template&#039;,&lt;br /&gt;
			[&#039;link&#039;] = talkpage, [&#039;url&#039;] = false },&lt;br /&gt;
		{ [&#039;mini&#039;] = &#039;e&#039;, [&#039;full&#039;] = &#039;edit&#039;, [&#039;html_title&#039;] = &#039;Edit this template&#039;,&lt;br /&gt;
			[&#039;link&#039;] = title:fullUrl(&#039;action=edit&#039;), [&#039;url&#039;] = true },&lt;br /&gt;
		{ [&#039;mini&#039;] = &#039;h&#039;, [&#039;full&#039;] = &#039;hist&#039;, [&#039;html_title&#039;] = &#039;History of this template&#039;,&lt;br /&gt;
			[&#039;link&#039;] = title:fullUrl(&#039;action=history&#039;), [&#039;url&#039;] = true },&lt;br /&gt;
		{ [&#039;mini&#039;] = &#039;m&#039;, [&#039;full&#039;] = &#039;move&#039;, [&#039;html_title&#039;] = &#039;Move this template&#039;,&lt;br /&gt;
			[&#039;link&#039;] = mw.title.new(&#039;Special:Movepage&#039;):fullUrl(&#039;target=&#039;..title.fullText), [&#039;url&#039;] = true },&lt;br /&gt;
		{ [&#039;mini&#039;] = &#039;w&#039;, [&#039;full&#039;] = &#039;watch&#039;, [&#039;html_title&#039;] = &#039;Watch this template&#039;, &lt;br /&gt;
			[&#039;link&#039;] = title:fullUrl(&#039;action=watch&#039;), [&#039;url&#039;] = true }&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	local ul = mw.html.create(&#039;ul&#039;)&lt;br /&gt;
	if has_brackets then&lt;br /&gt;
		ul:addClass(cfg.classes.brackets)&lt;br /&gt;
			:cssText(font_style)&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	for i, _ in ipairs(displayed_links) do&lt;br /&gt;
		if displayed_links[i] then add_link(link_descriptions[i], ul, is_mini, font_style) end&lt;br /&gt;
	end&lt;br /&gt;
	return ul:done()&lt;br /&gt;
	&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p._navbar(args)&lt;br /&gt;
	&lt;br /&gt;
	-- TODO: We probably don&#039;t need both fontstyle and fontcolor...&lt;br /&gt;
	local font_style = args.fontstyle&lt;br /&gt;
	local font_color = args.fontcolor&lt;br /&gt;
	local is_collapsible = args.collapsible&lt;br /&gt;
	local is_mini = args.mini&lt;br /&gt;
	local is_plain = args.plain&lt;br /&gt;
	&lt;br /&gt;
	local collapsible_class = nil&lt;br /&gt;
	if is_collapsible then&lt;br /&gt;
		collapsible_class = cfg.classes.collapsible&lt;br /&gt;
		if not is_plain then is_mini = 1 end&lt;br /&gt;
		if font_color then&lt;br /&gt;
			font_style = (font_style or &#039;&#039;) .. &#039;; color: &#039; .. font_color .. &#039;;&#039;&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	local navbar_style = args.style&lt;br /&gt;
	local div = mw.html.create():tag(&#039;div&#039;)&lt;br /&gt;
	div&lt;br /&gt;
		:addClass(cfg.classes.navbar)&lt;br /&gt;
		:addClass(cfg.classes.plainlinks)&lt;br /&gt;
		:addClass(cfg.classes.horizontal_list)&lt;br /&gt;
		:addClass(collapsible_class) -- we made the determination earlier&lt;br /&gt;
		:cssText(navbar_style)&lt;br /&gt;
&lt;br /&gt;
	if is_mini then div:addClass(cfg.classes.mini) end&lt;br /&gt;
&lt;br /&gt;
	local box_text = (args.text or cfg.box_text) .. &#039; &#039;&lt;br /&gt;
	 -- the concatenated space guarantees the box text is separated&lt;br /&gt;
	if not (is_mini or is_plain) then&lt;br /&gt;
		div&lt;br /&gt;
			:tag(&#039;span&#039;)&lt;br /&gt;
				:addClass(cfg.classes.box_text)&lt;br /&gt;
				:cssText(font_style)&lt;br /&gt;
				:wikitext(box_text)&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	local template = args.template&lt;br /&gt;
	local displayed_links = choose_links(template, args)&lt;br /&gt;
	local has_brackets = args.brackets&lt;br /&gt;
	local title_arg = get_title_arg(is_collapsible, template)&lt;br /&gt;
	local title_text = args[title_arg] or (&#039;:&#039; .. mw.getCurrentFrame():getParent():getTitle())&lt;br /&gt;
	local list = make_list(title_text, has_brackets, displayed_links, is_mini, font_style)&lt;br /&gt;
	div:node(list)&lt;br /&gt;
&lt;br /&gt;
	if is_collapsible then&lt;br /&gt;
		local title_text_class&lt;br /&gt;
		if is_mini then&lt;br /&gt;
			title_text_class = cfg.classes.collapsible_title_mini&lt;br /&gt;
		else&lt;br /&gt;
			title_text_class = cfg.classes.collapsible_title_full&lt;br /&gt;
		end&lt;br /&gt;
		div:done()&lt;br /&gt;
			:tag(&#039;div&#039;)&lt;br /&gt;
			:addClass(title_text_class)&lt;br /&gt;
			:cssText(font_style)&lt;br /&gt;
			:wikitext(args[1])&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	return mw.getCurrentFrame():extensionTag{&lt;br /&gt;
		name = &#039;templatestyles&#039;, args = { src = cfg.templatestyles }&lt;br /&gt;
	} .. tostring(div:done())&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.navbar(frame)&lt;br /&gt;
	return p._navbar(require(&#039;Module:Arguments&#039;).getArgs(frame))&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>User</name></author>
	</entry>
	<entry>
		<id>https://shreloaded.net/index.php?title=Module:Infobox&amp;diff=64333</id>
		<title>Module:Infobox</title>
		<link rel="alternate" type="text/html" href="https://shreloaded.net/index.php?title=Module:Infobox&amp;diff=64333"/>
		<updated>2021-08-09T10:23:31Z</updated>

		<summary type="html">&lt;p&gt;User: 1 revision imported&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;local p = {}&lt;br /&gt;
local args = {}&lt;br /&gt;
local origArgs = {}&lt;br /&gt;
local root&lt;br /&gt;
local empty_row_categories = {}&lt;br /&gt;
local category_in_empty_row_pattern = &#039;%[%[%s*[Cc][Aa][Tt][Ee][Gg][Oo][Rr][Yy]%s*:[^]]*]]&#039;&lt;br /&gt;
local has_rows = false&lt;br /&gt;
&lt;br /&gt;
local function fixChildBoxes(sval, tt)&lt;br /&gt;
	local function notempty( s ) return s and s:match( &#039;%S&#039; ) end&lt;br /&gt;
	&lt;br /&gt;
	if notempty(sval) then&lt;br /&gt;
		local marker = &#039;&amp;lt;span class=special_infobox_marker&amp;gt;&#039;&lt;br /&gt;
		local s = sval&lt;br /&gt;
		s = mw.ustring.gsub(s, &#039;(&amp;lt;%s*[Tt][Rr])&#039;, marker .. &#039;%1&#039;)&lt;br /&gt;
		s = mw.ustring.gsub(s, &#039;(&amp;lt;/[Tt][Rr]%s*&amp;gt;)&#039;, &#039;%1&#039; .. marker)&lt;br /&gt;
		if s:match(marker) then&lt;br /&gt;
			s = mw.ustring.gsub(s, marker .. &#039;%s*&#039; .. marker, &#039;&#039;)&lt;br /&gt;
			s = mw.ustring.gsub(s, &#039;([\r\n]|-[^\r\n]*[\r\n])%s*&#039; .. marker, &#039;%1&#039;)&lt;br /&gt;
			s = mw.ustring.gsub(s, marker .. &#039;%s*([\r\n]|-)&#039;, &#039;%1&#039;)&lt;br /&gt;
			s = mw.ustring.gsub(s, &#039;(&amp;lt;/[Cc][Aa][Pp][Tt][Ii][Oo][Nn]%s*&amp;gt;%s*)&#039; .. marker, &#039;%1&#039;)&lt;br /&gt;
			s = mw.ustring.gsub(s, &#039;(&amp;lt;%s*[Tt][Aa][Bb][Ll][Ee][^&amp;lt;&amp;gt;]*&amp;gt;%s*)&#039; .. marker, &#039;%1&#039;)&lt;br /&gt;
			s = mw.ustring.gsub(s, &#039;^(%{|[^\r\n]*[\r\n]%s*)&#039; .. marker, &#039;%1&#039;)&lt;br /&gt;
			s = mw.ustring.gsub(s, &#039;([\r\n]%{|[^\r\n]*[\r\n]%s*)&#039; .. marker, &#039;%1&#039;)&lt;br /&gt;
			s = mw.ustring.gsub(s, marker .. &#039;(%s*&amp;lt;/[Tt][Aa][Bb][Ll][Ee]%s*&amp;gt;)&#039;, &#039;%1&#039;)&lt;br /&gt;
			s = mw.ustring.gsub(s, marker .. &#039;(%s*\n|%})&#039;, &#039;%1&#039;)&lt;br /&gt;
		end&lt;br /&gt;
		if s:match(marker) then&lt;br /&gt;
			local subcells = mw.text.split(s, marker)&lt;br /&gt;
			s = &#039;&#039;&lt;br /&gt;
			for k = 1, #subcells do&lt;br /&gt;
				if k == 1 then&lt;br /&gt;
					s = s .. subcells[k] .. &#039;&amp;lt;/&#039; .. tt .. &#039;&amp;gt;&amp;lt;/tr&amp;gt;&#039;&lt;br /&gt;
				elseif k == #subcells then&lt;br /&gt;
					local rowstyle = &#039; style=&amp;quot;display:none&amp;quot;&#039;&lt;br /&gt;
					if notempty(subcells[k]) then rowstyle = &#039;&#039;	end&lt;br /&gt;
					s = s .. &#039;&amp;lt;tr&#039; .. rowstyle ..&#039;&amp;gt;&amp;lt;&#039; .. tt .. &#039; colspan=2&amp;gt;\n&#039; ..&lt;br /&gt;
						subcells[k]&lt;br /&gt;
				elseif notempty(subcells[k]) then&lt;br /&gt;
					if (k % 2) == 0 then&lt;br /&gt;
						s = s .. subcells[k]&lt;br /&gt;
					else&lt;br /&gt;
						s = s .. &#039;&amp;lt;tr&amp;gt;&amp;lt;&#039; .. tt .. &#039; colspan=2&amp;gt;\n&#039; ..&lt;br /&gt;
							subcells[k] .. &#039;&amp;lt;/&#039; .. tt .. &#039;&amp;gt;&amp;lt;/tr&amp;gt;&#039;&lt;br /&gt;
					end&lt;br /&gt;
				end&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
		-- the next two lines add a newline at the end of lists for the PHP parser&lt;br /&gt;
		-- [[Special:Diff/849054481]]&lt;br /&gt;
		-- remove when [[:phab:T191516]] is fixed or OBE&lt;br /&gt;
		s = mw.ustring.gsub(s, &#039;([\r\n][%*#;:][^\r\n]*)$&#039;, &#039;%1\n&#039;)&lt;br /&gt;
		s = mw.ustring.gsub(s, &#039;^([%*#;:][^\r\n]*)$&#039;, &#039;%1\n&#039;)&lt;br /&gt;
		s = mw.ustring.gsub(s, &#039;^([%*#;:])&#039;, &#039;\n%1&#039;)&lt;br /&gt;
		s = mw.ustring.gsub(s, &#039;^(%{%|)&#039;, &#039;\n%1&#039;)&lt;br /&gt;
		return s&lt;br /&gt;
	else&lt;br /&gt;
		return sval&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Cleans empty tables&lt;br /&gt;
local function cleanInfobox()&lt;br /&gt;
	root = tostring(root)&lt;br /&gt;
	if has_rows == false then&lt;br /&gt;
		root = mw.ustring.gsub(root, &#039;&amp;lt;table[^&amp;lt;&amp;gt;]*&amp;gt;%s*&amp;lt;/table&amp;gt;&#039;, &#039;&#039;)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Returns the union of the values of two tables, as a sequence.&lt;br /&gt;
local function union(t1, t2)&lt;br /&gt;
&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;
-- Returns a table containing the numbers of the arguments that exist&lt;br /&gt;
-- for the specified prefix. For example, if the prefix was &#039;data&#039;, and&lt;br /&gt;
-- &#039;data1&#039;, &#039;data2&#039;, and &#039;data5&#039; exist, it would return {1, 2, 5}.&lt;br /&gt;
local function getArgNums(prefix)&lt;br /&gt;
	local nums = {}&lt;br /&gt;
	for k, v in pairs(args) do&lt;br /&gt;
		local num = tostring(k):match(&#039;^&#039; .. prefix .. &#039;([1-9]%d*)$&#039;)&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;
-- Adds a row to the infobox, with either a header cell&lt;br /&gt;
-- or a label/data cell combination.&lt;br /&gt;
local function addRow(rowArgs)&lt;br /&gt;
	&lt;br /&gt;
	if rowArgs.header and rowArgs.header ~= &#039;_BLANK_&#039; then&lt;br /&gt;
		has_rows = true&lt;br /&gt;
		root&lt;br /&gt;
			:tag(&#039;tr&#039;)&lt;br /&gt;
				:addClass(rowArgs.rowclass)&lt;br /&gt;
				:cssText(rowArgs.rowstyle)&lt;br /&gt;
				:tag(&#039;th&#039;)&lt;br /&gt;
					:attr(&#039;colspan&#039;, &#039;2&#039;)&lt;br /&gt;
					:addClass(&#039;infobox-header&#039;)&lt;br /&gt;
					:addClass(rowArgs.class)&lt;br /&gt;
					:addClass(args.headerclass)&lt;br /&gt;
					-- @deprecated next; target .infobox-&amp;lt;name&amp;gt; .infobox-header&lt;br /&gt;
					:cssText(args.headerstyle)&lt;br /&gt;
					:cssText(rowArgs.rowcellstyle)&lt;br /&gt;
					:wikitext(fixChildBoxes(rowArgs.header, &#039;th&#039;))&lt;br /&gt;
		if rowArgs.data then&lt;br /&gt;
			root:wikitext(&lt;br /&gt;
				&#039;[[Category:Pages which use infobox templates with ignored data cells]]&#039;&lt;br /&gt;
			)&lt;br /&gt;
		end&lt;br /&gt;
	elseif rowArgs.data and rowArgs.data:gsub(&lt;br /&gt;
		category_in_empty_row_pattern, &#039;&#039;&lt;br /&gt;
		):match(&#039;^%S&#039;) then&lt;br /&gt;
		has_rows = true&lt;br /&gt;
		local row = root:tag(&#039;tr&#039;)&lt;br /&gt;
		row:addClass(rowArgs.rowclass)&lt;br /&gt;
		row:cssText(rowArgs.rowstyle)&lt;br /&gt;
		if rowArgs.label then&lt;br /&gt;
			row&lt;br /&gt;
				:tag(&#039;th&#039;)&lt;br /&gt;
					:attr(&#039;scope&#039;, &#039;row&#039;)&lt;br /&gt;
					:addClass(&#039;infobox-label&#039;)&lt;br /&gt;
					-- @deprecated next; target .infobox-&amp;lt;name&amp;gt; .infobox-label&lt;br /&gt;
					:cssText(args.labelstyle)&lt;br /&gt;
					:cssText(rowArgs.rowcellstyle)&lt;br /&gt;
					:wikitext(rowArgs.label)&lt;br /&gt;
					:done()&lt;br /&gt;
		end&lt;br /&gt;
&lt;br /&gt;
		local dataCell = row:tag(&#039;td&#039;)&lt;br /&gt;
		dataCell&lt;br /&gt;
			:attr(&#039;colspan&#039;, not rowArgs.label and &#039;2&#039; or nil)&lt;br /&gt;
			:addClass(not rowArgs.label and &#039;infobox-full-data&#039; or &#039;infobox-data&#039;)&lt;br /&gt;
			:addClass(rowArgs.class)&lt;br /&gt;
			-- @deprecated next; target .infobox-&amp;lt;name&amp;gt; .infobox(-full)-data&lt;br /&gt;
			:cssText(rowArgs.datastyle)&lt;br /&gt;
			:cssText(rowArgs.rowcellstyle)&lt;br /&gt;
			:wikitext(fixChildBoxes(rowArgs.data, &#039;td&#039;))&lt;br /&gt;
	else&lt;br /&gt;
		table.insert(empty_row_categories, rowArgs.data or &#039;&#039;)&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;
	has_rows = true&lt;br /&gt;
	root&lt;br /&gt;
		:tag(&#039;caption&#039;)&lt;br /&gt;
			:addClass(&#039;infobox-title&#039;)&lt;br /&gt;
			:addClass(args.titleclass)&lt;br /&gt;
			-- @deprecated next; target .infobox-&amp;lt;name&amp;gt; .infobox-title&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;
	has_rows = true&lt;br /&gt;
	root&lt;br /&gt;
		:tag(&#039;tr&#039;)&lt;br /&gt;
			:tag(&#039;th&#039;)&lt;br /&gt;
				:attr(&#039;colspan&#039;, &#039;2&#039;)&lt;br /&gt;
				:addClass(&#039;infobox-above&#039;)&lt;br /&gt;
				:addClass(args.aboveclass)&lt;br /&gt;
				-- @deprecated next; target .infobox-&amp;lt;name&amp;gt; .infobox-above&lt;br /&gt;
				:cssText(args.abovestyle)&lt;br /&gt;
				:wikitext(fixChildBoxes(args.above,&#039;th&#039;))&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;
	has_rows = true&lt;br /&gt;
	root&lt;br /&gt;
		:tag(&#039;tr&#039;)&lt;br /&gt;
			:tag(&#039;td&#039;)&lt;br /&gt;
				:attr(&#039;colspan&#039;, &#039;2&#039;)&lt;br /&gt;
				:addClass(&#039;infobox-below&#039;)&lt;br /&gt;
				:addClass(args.belowclass)&lt;br /&gt;
				-- @deprecated next; target .infobox-&amp;lt;name&amp;gt; .infobox-below&lt;br /&gt;
				:cssText(args.belowstyle)&lt;br /&gt;
				:wikitext(fixChildBoxes(args.below,&#039;td&#039;))&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function addSubheaderRow(subheaderArgs)&lt;br /&gt;
	if subheaderArgs.data and&lt;br /&gt;
		subheaderArgs.data:gsub(category_in_empty_row_pattern, &#039;&#039;):match(&#039;^%S&#039;) then&lt;br /&gt;
		has_rows = true&lt;br /&gt;
		local row = root:tag(&#039;tr&#039;)&lt;br /&gt;
		row:addClass(subheaderArgs.rowclass)&lt;br /&gt;
&lt;br /&gt;
		local dataCell = row:tag(&#039;td&#039;)&lt;br /&gt;
		dataCell&lt;br /&gt;
			:attr(&#039;colspan&#039;, &#039;2&#039;)&lt;br /&gt;
			:addClass(&#039;infobox-subheader&#039;)&lt;br /&gt;
			:addClass(subheaderArgs.class)&lt;br /&gt;
			:cssText(subheaderArgs.datastyle)&lt;br /&gt;
			:cssText(subheaderArgs.rowcellstyle)&lt;br /&gt;
			:wikitext(fixChildBoxes(subheaderArgs.data, &#039;td&#039;))&lt;br /&gt;
	else&lt;br /&gt;
		table.insert(empty_row_categories, subheaderArgs.data or &#039;&#039;)&lt;br /&gt;
	end&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(&#039;subheader&#039;)&lt;br /&gt;
	for k, num in ipairs(subheadernums) do&lt;br /&gt;
		addSubheaderRow({&lt;br /&gt;
			data = args[&#039;subheader&#039; .. tostring(num)],&lt;br /&gt;
			-- @deprecated next; target .infobox-&amp;lt;name&amp;gt; .infobox-subheader&lt;br /&gt;
			datastyle = args.subheaderstyle,&lt;br /&gt;
			rowcellstyle = args[&#039;subheaderstyle&#039; .. tostring(num)],&lt;br /&gt;
			class = args.subheaderclass,&lt;br /&gt;
			rowclass = args[&#039;subheaderrowclass&#039; .. tostring(num)]&lt;br /&gt;
		})&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function addImageRow(imageArgs)&lt;br /&gt;
&lt;br /&gt;
	if imageArgs.data and&lt;br /&gt;
		imageArgs.data:gsub(category_in_empty_row_pattern, &#039;&#039;):match(&#039;^%S&#039;) then&lt;br /&gt;
&lt;br /&gt;
		has_rows = true&lt;br /&gt;
		local row = root:tag(&#039;tr&#039;)&lt;br /&gt;
		row:addClass(imageArgs.rowclass)&lt;br /&gt;
&lt;br /&gt;
		local dataCell = row:tag(&#039;td&#039;)&lt;br /&gt;
		dataCell&lt;br /&gt;
			:attr(&#039;colspan&#039;, &#039;2&#039;)&lt;br /&gt;
			:addClass(&#039;infobox-image&#039;)&lt;br /&gt;
			:addClass(imageArgs.class)&lt;br /&gt;
			:cssText(imageArgs.datastyle)&lt;br /&gt;
			:wikitext(fixChildBoxes(imageArgs.data, &#039;td&#039;))&lt;br /&gt;
	else&lt;br /&gt;
		table.insert(empty_row_categories, imageArgs.data or &#039;&#039;)&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(&#039;image&#039;)&lt;br /&gt;
	for k, num in ipairs(imagenums) do&lt;br /&gt;
		local caption = args[&#039;caption&#039; .. tostring(num)]&lt;br /&gt;
		local data = mw.html.create():wikitext(args[&#039;image&#039; .. tostring(num)])&lt;br /&gt;
		if caption then&lt;br /&gt;
			data&lt;br /&gt;
				:tag(&#039;div&#039;)&lt;br /&gt;
					:addClass(&#039;infobox-caption&#039;)&lt;br /&gt;
					-- @deprecated next; target .infobox-&amp;lt;name&amp;gt; .infobox-caption&lt;br /&gt;
					:cssText(args.captionstyle)&lt;br /&gt;
					:wikitext(caption)&lt;br /&gt;
		end&lt;br /&gt;
		addImageRow({&lt;br /&gt;
			data = tostring(data),&lt;br /&gt;
			-- @deprecated next; target .infobox-&amp;lt;name&amp;gt; .infobox-image&lt;br /&gt;
			datastyle = args.imagestyle,&lt;br /&gt;
			class = args.imageclass,&lt;br /&gt;
			rowclass = args[&#039;imagerowclass&#039; .. tostring(num)]&lt;br /&gt;
		})&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- When autoheaders are turned on, preprocesses the rows&lt;br /&gt;
local function preprocessRows()&lt;br /&gt;
	if not args.autoheaders then return end&lt;br /&gt;
	&lt;br /&gt;
	local rownums = union(getArgNums(&#039;header&#039;), getArgNums(&#039;data&#039;))&lt;br /&gt;
	table.sort(rownums)&lt;br /&gt;
	local lastheader&lt;br /&gt;
	for k, num in ipairs(rownums) do&lt;br /&gt;
		if args[&#039;header&#039; .. tostring(num)] then&lt;br /&gt;
			if lastheader then&lt;br /&gt;
				args[&#039;header&#039; .. tostring(lastheader)] = nil&lt;br /&gt;
			end&lt;br /&gt;
			lastheader = num&lt;br /&gt;
		elseif args[&#039;data&#039; .. tostring(num)] and&lt;br /&gt;
			args[&#039;data&#039; .. tostring(num)]:gsub(&lt;br /&gt;
				category_in_empty_row_pattern, &#039;&#039;&lt;br /&gt;
			):match(&#039;^%S&#039;) then&lt;br /&gt;
			local data = args[&#039;data&#039; .. tostring(num)]&lt;br /&gt;
			if data:gsub(category_in_empty_row_pattern, &#039;&#039;):match(&#039;%S&#039;) then&lt;br /&gt;
				lastheader = nil&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	if lastheader then&lt;br /&gt;
		args[&#039;header&#039; .. tostring(lastheader)] = nil&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Gets the union of the header and data argument numbers,&lt;br /&gt;
-- and renders them all in order&lt;br /&gt;
local function renderRows()&lt;br /&gt;
&lt;br /&gt;
	local rownums = union(getArgNums(&#039;header&#039;), getArgNums(&#039;data&#039;))&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[&#039;header&#039; .. tostring(num)],&lt;br /&gt;
			label = args[&#039;label&#039; .. tostring(num)],&lt;br /&gt;
			data = args[&#039;data&#039; .. tostring(num)],&lt;br /&gt;
			datastyle = args.datastyle,&lt;br /&gt;
			class = args[&#039;class&#039; .. tostring(num)],&lt;br /&gt;
			rowclass = args[&#039;rowclass&#039; .. tostring(num)],&lt;br /&gt;
			-- @deprecated next; target .infobox-&amp;lt;name&amp;gt; rowclass&lt;br /&gt;
			rowstyle = args[&#039;rowstyle&#039; .. tostring(num)],&lt;br /&gt;
			rowcellstyle = args[&#039;rowcellstyle&#039; .. 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;
	has_rows = true&lt;br /&gt;
	root&lt;br /&gt;
		:tag(&#039;tr&#039;)&lt;br /&gt;
			:tag(&#039;td&#039;)&lt;br /&gt;
				:attr(&#039;colspan&#039;, &#039;2&#039;)&lt;br /&gt;
				:addClass(&#039;infobox-navbar&#039;)&lt;br /&gt;
				:wikitext(require(&#039;Module:Navbar&#039;)._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[&#039;italic title&#039;] and mw.ustring.lower(args[&#039;italic title&#039;])&lt;br /&gt;
	if italicTitle == &#039;&#039; or italicTitle == &#039;force&#039; or italicTitle == &#039;yes&#039; then&lt;br /&gt;
		root:wikitext(mw.getCurrentFrame():expandTemplate({title = &#039;italic title&#039;}))&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Categories in otherwise empty rows are collected in empty_row_categories.&lt;br /&gt;
-- This function adds them to the module output. It is not affected by&lt;br /&gt;
-- args.decat because this module should not prevent module-external categories&lt;br /&gt;
-- from rendering.&lt;br /&gt;
local function renderEmptyRowCategories()&lt;br /&gt;
	for _, s in ipairs(empty_row_categories) do&lt;br /&gt;
		root:wikitext(s)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Render tracking categories. args.decat == turns off tracking categories.&lt;br /&gt;
local function renderTrackingCategories()&lt;br /&gt;
	if args.decat == &#039;yes&#039; then return end&lt;br /&gt;
	if args.child == &#039;yes&#039; then&lt;br /&gt;
		if args.title then&lt;br /&gt;
			root:wikitext(&lt;br /&gt;
				&#039;[[Category:Pages which use embedded infobox templates with the title parameter]]&#039;&lt;br /&gt;
			)&lt;br /&gt;
		end&lt;br /&gt;
	elseif #(getArgNums(&#039;data&#039;)) == 0 and mw.title.getCurrentTitle().namespace == 0 then&lt;br /&gt;
		root:wikitext(&#039;[[Category:Articles which use infobox templates with no data rows]]&#039;)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[=[&lt;br /&gt;
Loads the templatestyles for the infobox.&lt;br /&gt;
&lt;br /&gt;
TODO: load base templatestyles here rather than in MediaWiki:Common.css&lt;br /&gt;
We aren&#039;t doing it here yet because there are 4-5000 pages with &#039;raw&#039; infobox&lt;br /&gt;
tables. See [[Mediawiki_talk:Common.css/to_do#Infobox]] and/or come help :).&lt;br /&gt;
When we do this we should clean up the inline CSS below too.&lt;br /&gt;
Will have to do some bizarre conversion category like with sidebar.&lt;br /&gt;
	&lt;br /&gt;
]=]&lt;br /&gt;
local function loadTemplateStyles()&lt;br /&gt;
	local frame = mw.getCurrentFrame()&lt;br /&gt;
	&lt;br /&gt;
-- See function description&lt;br /&gt;
--	local base_templatestyles = frame:extensionTag{&lt;br /&gt;
--		name = &#039;templatestyles&#039;, args = { src = cfg.i18n.templatestyles }&lt;br /&gt;
--	}&lt;br /&gt;
	&lt;br /&gt;
	local templatestyles = &#039;&#039;&lt;br /&gt;
	if args[&#039;templatestyles&#039;] then templatestyles = frame:extensionTag{&lt;br /&gt;
			name = &#039;templatestyles&#039;, args = { src = args[&#039;templatestyles&#039;] }&lt;br /&gt;
		}&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	local child_templatestyles = &#039;&#039;&lt;br /&gt;
	if args[&#039;child templatestyles&#039;] then child_templatestyles = frame:extensionTag{&lt;br /&gt;
			name = &#039;templatestyles&#039;, args = { src = args[&#039;child templatestyles&#039;] }&lt;br /&gt;
		}&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	local grandchild_templatestyles = &#039;&#039;&lt;br /&gt;
	if args[&#039;grandchild templatestyles&#039;] then grandchild_templatestyles = frame:extensionTag{&lt;br /&gt;
			name = &#039;templatestyles&#039;, args = { src = args[&#039;grandchild templatestyles&#039;] }&lt;br /&gt;
		}&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	return table.concat({&lt;br /&gt;
--		base_templatestyles, -- see function description&lt;br /&gt;
		templatestyles,&lt;br /&gt;
		child_templatestyles,&lt;br /&gt;
		grandchild_templatestyles&lt;br /&gt;
	})	&lt;br /&gt;
	&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Specify the overall layout of the infobox, with special settings if the&lt;br /&gt;
-- infobox is used as a &#039;child&#039; inside another infobox.&lt;br /&gt;
local function _infobox()&lt;br /&gt;
	if args.child ~= &#039;yes&#039; then&lt;br /&gt;
		root = mw.html.create(&#039;table&#039;)&lt;br /&gt;
&lt;br /&gt;
		root&lt;br /&gt;
			:addClass(args.subbox == &#039;yes&#039; and &#039;infobox-subbox&#039; or &#039;infobox&#039;)&lt;br /&gt;
			:addClass(args.bodyclass)&lt;br /&gt;
			-- @deprecated next; target .infobox-&amp;lt;name&amp;gt;&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;
	preprocessRows()&lt;br /&gt;
	renderRows()&lt;br /&gt;
	renderBelowRow()&lt;br /&gt;
	renderNavBar()&lt;br /&gt;
	renderItalicTitle()&lt;br /&gt;
	renderEmptyRowCategories()&lt;br /&gt;
	renderTrackingCategories()&lt;br /&gt;
	cleanInfobox()&lt;br /&gt;
&lt;br /&gt;
	return loadTemplateStyles() .. root&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- If the argument exists and isn&#039;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;
local function preprocessSingleArg(argName)&lt;br /&gt;
	if origArgs[argName] and origArgs[argName] ~= &#039;&#039; then&lt;br /&gt;
		args[argName] = origArgs[argName]&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Assign the parameters with the given prefixes to the args table, in order, in&lt;br /&gt;
-- batches of the step size specified. This is to prevent references etc. from&lt;br /&gt;
-- appearing in the wrong order. The prefixTable should be an array containing&lt;br /&gt;
-- tables, each of which has two possible fields, a &amp;quot;prefix&amp;quot; string and a&lt;br /&gt;
-- &amp;quot;depend&amp;quot; table. The function always parses parameters containing the &amp;quot;prefix&amp;quot;&lt;br /&gt;
-- string, but only parses parameters in the &amp;quot;depend&amp;quot; table if the prefix&lt;br /&gt;
-- parameter is present and non-blank.&lt;br /&gt;
local function preprocessArgs(prefixTable, step)&lt;br /&gt;
	if type(prefixTable) ~= &#039;table&#039; 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) ~= &#039;number&#039; 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) ~= &#039;table&#039; or type(v.prefix) ~= &amp;quot;string&amp;quot; or&lt;br /&gt;
			(v.depend and type(v.depend) ~= &#039;table&#039;) then&lt;br /&gt;
			error(&#039;Invalid input detected to preprocessArgs prefix table&#039;, 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&lt;br /&gt;
		-- 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) ~= &#039;string&#039; then&lt;br /&gt;
					error(&#039;Invalid &amp;quot;depend&amp;quot; parameter value detected in preprocessArgs&#039;)&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;
					-- Do another loop if any arguments are found, even blank ones.&lt;br /&gt;
					moreArgumentsExist = true&lt;br /&gt;
					preprocessSingleArg(prefixArgName)&lt;br /&gt;
				end&lt;br /&gt;
				-- Process the depend table if the prefix argument is present&lt;br /&gt;
				-- and not blank, or we are processing &amp;quot;prefix1&amp;quot; and &amp;quot;prefix&amp;quot; is&lt;br /&gt;
				-- present and not blank, and 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;
-- Parse the data parameters in the same order that the old {{infobox}} did, so&lt;br /&gt;
-- that references etc. will display in the expected places. Parameters that&lt;br /&gt;
-- depend on another parameter are only processed if that parameter is present,&lt;br /&gt;
-- to avoid phantom references appearing in article reference lists.&lt;br /&gt;
local function parseDataParameters()&lt;br /&gt;
&lt;br /&gt;
	preprocessSingleArg(&#039;autoheaders&#039;)&lt;br /&gt;
	preprocessSingleArg(&#039;child&#039;)&lt;br /&gt;
	preprocessSingleArg(&#039;bodyclass&#039;)&lt;br /&gt;
	preprocessSingleArg(&#039;subbox&#039;)&lt;br /&gt;
	preprocessSingleArg(&#039;bodystyle&#039;)&lt;br /&gt;
	preprocessSingleArg(&#039;title&#039;)&lt;br /&gt;
	preprocessSingleArg(&#039;titleclass&#039;)&lt;br /&gt;
	preprocessSingleArg(&#039;titlestyle&#039;)&lt;br /&gt;
	preprocessSingleArg(&#039;above&#039;)&lt;br /&gt;
	preprocessSingleArg(&#039;aboveclass&#039;)&lt;br /&gt;
	preprocessSingleArg(&#039;abovestyle&#039;)&lt;br /&gt;
	preprocessArgs({&lt;br /&gt;
		{prefix = &#039;subheader&#039;, depend = {&#039;subheaderstyle&#039;, &#039;subheaderrowclass&#039;}}&lt;br /&gt;
	}, 10)&lt;br /&gt;
	preprocessSingleArg(&#039;subheaderstyle&#039;)&lt;br /&gt;
	preprocessSingleArg(&#039;subheaderclass&#039;)&lt;br /&gt;
	preprocessArgs({&lt;br /&gt;
		{prefix = &#039;image&#039;, depend = {&#039;caption&#039;, &#039;imagerowclass&#039;}}&lt;br /&gt;
	}, 10)&lt;br /&gt;
	preprocessSingleArg(&#039;captionstyle&#039;)&lt;br /&gt;
	preprocessSingleArg(&#039;imagestyle&#039;)&lt;br /&gt;
	preprocessSingleArg(&#039;imageclass&#039;)&lt;br /&gt;
	preprocessArgs({&lt;br /&gt;
		{prefix = &#039;header&#039;},&lt;br /&gt;
		{prefix = &#039;data&#039;, depend = {&#039;label&#039;}},&lt;br /&gt;
		{prefix = &#039;rowclass&#039;},&lt;br /&gt;
		{prefix = &#039;rowstyle&#039;},&lt;br /&gt;
		{prefix = &#039;rowcellstyle&#039;},&lt;br /&gt;
		{prefix = &#039;class&#039;}&lt;br /&gt;
	}, 50)&lt;br /&gt;
	preprocessSingleArg(&#039;headerclass&#039;)&lt;br /&gt;
	preprocessSingleArg(&#039;headerstyle&#039;)&lt;br /&gt;
	preprocessSingleArg(&#039;labelstyle&#039;)&lt;br /&gt;
	preprocessSingleArg(&#039;datastyle&#039;)&lt;br /&gt;
	preprocessSingleArg(&#039;below&#039;)&lt;br /&gt;
	preprocessSingleArg(&#039;belowclass&#039;)&lt;br /&gt;
	preprocessSingleArg(&#039;belowstyle&#039;)&lt;br /&gt;
	preprocessSingleArg(&#039;name&#039;)&lt;br /&gt;
	-- different behaviour for italics if blank or absent&lt;br /&gt;
	args[&#039;italic title&#039;] = origArgs[&#039;italic title&#039;]&lt;br /&gt;
	preprocessSingleArg(&#039;decat&#039;)&lt;br /&gt;
	preprocessSingleArg(&#039;templatestyles&#039;)&lt;br /&gt;
	preprocessSingleArg(&#039;child templatestyles&#039;)&lt;br /&gt;
	preprocessSingleArg(&#039;grandchild templatestyles&#039;)&lt;br /&gt;
end&lt;br /&gt;
&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;
function p.infobox(frame)&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;
	parseDataParameters()&lt;br /&gt;
	&lt;br /&gt;
	return _infobox()&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- For calling via #invoke within a template&lt;br /&gt;
function p.infoboxTemplate(frame)&lt;br /&gt;
	origArgs = {}&lt;br /&gt;
	for k,v in pairs(frame.args) do origArgs[k] = mw.text.trim(v) end&lt;br /&gt;
	&lt;br /&gt;
	parseDataParameters()&lt;br /&gt;
	&lt;br /&gt;
	return _infobox()&lt;br /&gt;
end&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>User</name></author>
	</entry>
	<entry>
		<id>https://shreloaded.net/index.php?title=Module:Authority_control&amp;diff=64331</id>
		<title>Module:Authority control</title>
		<link rel="alternate" type="text/html" href="https://shreloaded.net/index.php?title=Module:Authority_control&amp;diff=64331"/>
		<updated>2021-08-09T10:23:31Z</updated>

		<summary type="html">&lt;p&gt;User: 1 revision imported&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;require(&#039;Module:No globals&#039;)&lt;br /&gt;
&lt;br /&gt;
local p = {}&lt;br /&gt;
local title = mw.title.getCurrentTitle()&lt;br /&gt;
local namespace = title.namespace&lt;br /&gt;
local testcases = (string.sub(title.subpageText,1,9) == &#039;testcases&#039;)&lt;br /&gt;
&lt;br /&gt;
--[[==========================================================================]]&lt;br /&gt;
--[[                            Category functions                            ]]&lt;br /&gt;
--[[==========================================================================]]&lt;br /&gt;
&lt;br /&gt;
function p.getCatForId( id )&lt;br /&gt;
	local catName = &#039;&#039;&lt;br /&gt;
	if namespace == 0 then&lt;br /&gt;
		catName = &#039;Wikipedia articles with &#039;..id..&#039; identifiers&#039;&lt;br /&gt;
	elseif namespace == 2 and not title.isSubpage then&lt;br /&gt;
		catName = &#039;User pages with &#039;..id..&#039; identifiers&#039;&lt;br /&gt;
	else&lt;br /&gt;
		catName = &#039;Miscellaneous pages with &#039;..id..&#039; identifiers&#039;&lt;br /&gt;
	end&lt;br /&gt;
	return &#039;[[Category:&#039;..catName..&#039;]]&#039;..p.redCatLink(catName)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.redCatLink( catName ) --catName == &#039;Blah&#039; (not &#039;Category:Blah&#039;, not &#039;[[Category:Blah]]&#039;)&lt;br /&gt;
	if catName and catName ~= &#039;&#039; and&lt;br /&gt;
	   testcases == false and&lt;br /&gt;
	   mw.title.new(catName, 14).exists == false&lt;br /&gt;
	then&lt;br /&gt;
		return &#039;[[Category:Pages with red-linked authority control categories]]&#039;&lt;br /&gt;
	end&lt;br /&gt;
	return &#039;&#039;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.createRow( id, rawValues, link, links, withUid, specialCat, prefix)&lt;br /&gt;
	local catName = &#039;Wikipedia articles with faulty &#039;..(specialCat or id)..&#039; identifiers&#039;&lt;br /&gt;
	if links then -- all links[] use withUid = false; no check needed&lt;br /&gt;
		local row = &#039;&#039;&lt;br /&gt;
		if prefix then &lt;br /&gt;
			row = row .. &#039;*&#039; .. prefix&lt;br /&gt;
		end&lt;br /&gt;
		for i, l in ipairs( links ) do&lt;br /&gt;
			if i == 1 and not prefix then row = row..&#039;*&#039;&lt;br /&gt;
			else           row = row..&#039;\n**&#039; end&lt;br /&gt;
			if l then&lt;br /&gt;
				row = row..&#039;&amp;lt;span class=&amp;quot;uid&amp;quot;&amp;gt;&#039;..l..&#039;&amp;lt;/span&amp;gt;&#039;&lt;br /&gt;
			else&lt;br /&gt;
				row = row..&#039;&amp;lt;span class=&amp;quot;error&amp;quot;&amp;gt;The &#039;..id..&#039; id &#039;..rawValues[i]..&#039; is not valid.&amp;lt;/span&amp;gt;[[Category:&#039;..catName..&#039;]]&#039;..p.redCatLink(catName)&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
		return row..&#039;\n&#039;&lt;br /&gt;
	elseif link then -- All IDs that have a prefix support multiple identifiers, so prefix is not needed&lt;br /&gt;
		if withUid then&lt;br /&gt;
			return &#039;*&amp;lt;span class=&amp;quot;nowrap&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;uid&amp;quot;&amp;gt;&#039;..link..&#039;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;\n&#039;&lt;br /&gt;
		end&lt;br /&gt;
		return &#039;*&amp;lt;span class=&amp;quot;nowrap&amp;quot;&amp;gt;&#039;..link..&#039;&amp;lt;/span&amp;gt;\n&#039;&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	return &#039;* &amp;lt;span class=&amp;quot;error&amp;quot;&amp;gt;The &#039;..id..&#039; id &#039;..rawValues..&#039; is not valid.&amp;lt;/span&amp;gt;[[Category:&#039;..catName..&#039;]]&#039;..p.redCatLink(catName)..&#039;\n&#039;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[[==========================================================================]]&lt;br /&gt;
--[[                      Property formatting functions                       ]]&lt;br /&gt;
--[[==========================================================================]]&lt;br /&gt;
&lt;br /&gt;
-- If a link has a suitable entry in the global inter-wiki prefix table at [[:m:Interwiki_map]], please consider routing through this prefix rather than as external link URL. This will ease future maintenance as necessary updates to the link can be centrally carried out there rather than by updating this module. The &amp;quot;external link&amp;quot; icon would disappear for such entries.&lt;br /&gt;
&lt;br /&gt;
function p.aagLink( id, label)&lt;br /&gt;
	--P3372&#039;s format regex: \d+ (e.g. 1)&lt;br /&gt;
	if not id:match( &#039;^%d+$&#039; ) then&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
	return &#039;[https://www.aucklandartgallery.com/explore-art-and-ideas/artist/&#039;..id..&#039;/ &#039;..(label or &#039;Auckland&#039;)..&#039;]&#039;..p.getCatForId( &#039;AAG&#039; )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.acmLink( id, label )&lt;br /&gt;
	--P864&#039;s format regex: \d{11} (e.g. 12345678901)&lt;br /&gt;
	if not id:match( &#039;^%d%d%d%d%d%d%d%d%d%d%d$&#039; ) then&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
	return &#039;[https://dl.acm.org/profile/&#039;..id..&#039; &#039;..(label or &#039;Association for Computing Machinery&#039;)..&#039;]&#039;..p.getCatForId( &#039;ACM-DL&#039; )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.adbLink( id, label )&lt;br /&gt;
	--P1907&#039;s format regex: [a-z][-a-z]+-([1-3]\d|[1-9])\d{0,3} (e.g. barton-sir-edmund-toby-71)&lt;br /&gt;
	if not id:match( &#039;^[a-z][-a-z]+-[1-3]%d%d?%d?%d?$&#039; ) and&lt;br /&gt;
	   not id:match( &#039;^[a-z][-a-z]+-[1-9]%d?%d?%d?$&#039; ) then&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
	return &#039;[http://adb.anu.edu.au/biography/&#039;..id..&#039; &#039;..(label or &#039;Australia&#039;)..&#039;]&#039;..p.getCatForId( &#039;ADB&#039; )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.agsaLink( id, label )&lt;br /&gt;
	--P6804&#039;s format regex: [1-9]\d* (e.g. 3625)&lt;br /&gt;
	if not id:match( &#039;^[1-9]%d*$&#039; ) then&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
	return &#039;[https://www.agsa.sa.gov.au/collection-publications/collection/creators/_/&#039;..id..&#039;/ &#039;..(label or &#039;South Australia&#039;)..&#039;]&#039;..p.getCatForId( &#039;AGSA&#039; )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.autoresuyLink( id, label )&lt;br /&gt;
	--P2558&#039;s format regex: [1-9]\d{0,4} (e.g. 12345)&lt;br /&gt;
	if not id:match( &#039;^[1-9]%d?%d?%d?%d?$&#039; ) then&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
	return &#039;[https://autores.uy/autor/&#039;..id..&#039; &#039;..(label or &#039;Uruguay&#039;)..&#039;]&#039;..p.getCatForId( &#039;autores.uy&#039; )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.awrLink( id, label )&lt;br /&gt;
	--P4186&#039;s format regex: (([A-Z]{3}\d{4})|([A-Z]{2}\d{5}))[a-z] (e.g. PR00768b)&lt;br /&gt;
	if not id:match( &#039;^[A-Z][A-Z][A-Z]%d%d%d%d[a-z]$&#039; ) and&lt;br /&gt;
	   not id:match( &#039;^[A-Z][A-Z]%d%d%d%d%d[a-z]$&#039; ) then&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
	return &#039;[http://www.womenaustralia.info/biogs/&#039;..id..&#039;.htm &#039;..(label or &#039;Australian Women\&#039;s Register&#039;)..&#039;]&#039;..p.getCatForId( &#039;AWR&#039; )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.bibsysLink( id, label )&lt;br /&gt;
	--P1015&#039;s format regex: [1-9]\d* or [1-9](\d{0,8}|\d{12}) (e.g. 1234567890123)&lt;br /&gt;
	--TODO: follow up @ [[d:Property talk:P1015#Discrepancy between the 2 regex constraints]] or escalate/investigate&lt;br /&gt;
	if not id:match( &#039;^[1-9]%d?%d?%d?%d?%d?%d?%d?%d?$&#039; ) and&lt;br /&gt;
	   not id:match( &#039;^[1-9]%d%d%d%d%d%d%d%d%d%d%d%d$&#039; ) then&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
	return &#039;[https://authority.bibsys.no/authority/rest/authorities/html/&#039;..id..&#039; &#039;..(label or &#039;Norway&#039;)..&#039;]&#039;..p.getCatForId( &#039;BIBSYS&#039; )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.bildLink( id, label )&lt;br /&gt;
	--P2092&#039;s format regex: \d+ (e.g. 1)&lt;br /&gt;
	if not id:match( &#039;^%d+$&#039; ) then&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
	return &#039;[https://www.bildindex.de/document/obj&#039;..id..&#039; &#039;..(label or &#039;Bildindex (Germany)&#039;)..&#039;]&#039;..p.getCatForId( &#039;Bildindex&#039; )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.bncLink( id, label )&lt;br /&gt;
	--P1890&#039;s format regex: \d{9} (e.g. 123456789)&lt;br /&gt;
	if not id:match( &#039;^%d%d%d%d%d%d%d%d%d$&#039; ) then&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
	return &#039;[http://www.bncatalogo.cl/F?func=direct&amp;amp;local_base=red10&amp;amp;doc_number=&#039;..id..&#039; &#039;..(label or &#039;Chile&#039;)..&#039;]&#039;..p.getCatForId( &#039;BNC&#039; )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.bneLink( id, label )&lt;br /&gt;
	--P950&#039;s format regex: (XX|FF|a)\d{4,7}|(bima|bimo|bica|bis[eo]|bivi|Mise|Mimo|Mima)\d{10} (e.g. XX1234567)&lt;br /&gt;
	if not id:match( &#039;^[XF][XF]%d%d%d%d%d?%d?%d?$&#039; ) and&lt;br /&gt;
	   not id:match( &#039;^a%d%d%d%d%d?%d?%d?$&#039; ) and&lt;br /&gt;
	   not id:match( &#039;^bi[mcsv][aoei]%d%d%d%d%d%d%d%d%d%d$&#039; ) and&lt;br /&gt;
	   not id:match( &#039;^Mi[sm][eoa]%d%d%d%d%d%d%d%d%d%d$&#039; ) then&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
	return &#039;[http://catalogo.bne.es/uhtbin/authoritybrowse.cgi?action=display&amp;amp;authority_id=&#039;..id..&#039; &#039;..(label or &#039;Spain&#039;)..&#039;]&#039;..p.getCatForId( &#039;BNE&#039; ) --no https as of 9/2019&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.bnfLink( id, label )&lt;br /&gt;
	--P268&#039;s format regex: \d{8}[0-9bcdfghjkmnpqrstvwxz] (e.g. 123456789)&lt;br /&gt;
	if not id:match( &#039;^c?b?%d%d%d%d%d%d%d%d[0-9bcdfghjkmnpqrstvwxz]$&#039; ) then&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
	--Add cb prefix if it has been removed&lt;br /&gt;
	if not id:match( &#039;^cb.+$&#039; ) then&lt;br /&gt;
		id = &#039;cb&#039;..id&lt;br /&gt;
	end&lt;br /&gt;
	return &#039;[https://catalogue.bnf.fr/ark:/12148/&#039;..id..&#039; &#039; .. (label or &#039;France&#039;)..&#039;] [https://data.bnf.fr/ark:/12148/&#039;..id..&#039; (data)]&#039;..p.getCatForId( &#039;BNF&#039; )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.botanistLink( id, label )&lt;br /&gt;
	--P428&#039;s format regex: (&#039;t )?(d&#039;)?(de )?(la )?(van (der )?)?(Ma?c)?(De)?(Di)?\p{Lu}?C?[&#039;\p{Ll}]*([-&#039;. ]*(van )?(y )?(d[ae][nr]?[- ])?(Ma?c)?[\p{Lu}bht]?C?[&#039;\p{Ll}]*)*\.? ?f?\.? (e.g. L.)&lt;br /&gt;
	--not easily/meaningfully implementable in Lua&#039;s regex since &amp;quot;(this)?&amp;quot; is not allowed...&lt;br /&gt;
	if not mw.ustring.match( id, &amp;quot;^[%u%l%d%. &#039;-]+$&amp;quot; ) then --better than nothing&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
	id = id:gsub(&#039; +&#039;, &#039;%%20&#039;)&lt;br /&gt;
	return &#039;[https://www.ipni.org/ipni/advAuthorSearch.do?find_abbreviation=&#039;..id..&#039; &#039;..(label or &#039;International Plant Names Index&#039;)..&#039;]&#039;..p.getCatForId( &#039;Botanist&#039; )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.bpnLink( id, label )&lt;br /&gt;
	--P651&#039;s format regex: \d{6,8} (e.g. 00123456)&lt;br /&gt;
	if not id:match( &#039;^%d%d%d%d%d%d%d%d$&#039; ) and --original format regex, changed 8/2019 to&lt;br /&gt;
	   not id:match( &#039;^0?%d%d%d%d%d%d%d$&#039; ) and --allow 1-2 leading 0s, allowed by the website&lt;br /&gt;
	   not id:match( &#039;^0?0?%d%d%d%d%d%d$&#039; ) then&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
	return &#039;[http://www.biografischportaal.nl/en/persoon/&#039;..id..&#039; &#039;..(label or &#039;Netherlands&#039;)..&#039;]&#039;..p.getCatForId( &#039;BPN&#039; ) --no https as of 9/2019&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.canticLink( id, label )&lt;br /&gt;
	--P1273&#039;s format regex: a\d{7}[0-9x] (e.g. a10640745)&lt;br /&gt;
	if not id:match( &#039;^a%d%d%d%d%d%d%d[%dx]$&#039; ) then&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
	return &#039;[http://cantic.bnc.cat/registres/CUCId/&#039;..id..&#039; &#039;..(label or &#039;Catalonia&#039;)..&#039;]&#039;..p.getCatForId( &#039;CANTIC&#039; ) --no https as of 10/2019&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.ciniiLink( id, label )&lt;br /&gt;
	--P271&#039;s format regex: DA\d{7}[\dX] (e.g. DA12345678)&lt;br /&gt;
	if not id:match( &#039;^DA%d%d%d%d%d%d%d[%dX]$&#039; ) then&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
	return &#039;[https://ci.nii.ac.jp/author/&#039;..id..&#039;?l=en &#039;..(label or &#039;CiNii (Japan)&#039;)..&#039;]&#039;..p.getCatForId( &#039;CINII&#039; )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.cwgcLink( id, label )&lt;br /&gt;
	--P1908&#039;s format regex: [1-9]\d* (e.g. 75228351)&lt;br /&gt;
	if not id:match( &#039;^[1-9]%d*$&#039; ) then&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
	return &#039;[https://www.cwgc.org/find-war-dead/casualty/&#039;..id..&#039;/ &#039;..(label or &#039;Commonwealth War Graves Commission&#039;)..&#039;]&#039;..p.getCatForId( &#039;CWGC&#039; )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.daaoLink( id, label )&lt;br /&gt;
	--P1707&#039;s format regex: [a-z\-]+\d* (e.g. rolf-harris)&lt;br /&gt;
	if not id:match( &#039;^[a-z%-]+%d*$&#039; ) then&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
	return &#039;[https://www.daao.org.au/bio/&#039;..id..&#039; &#039;..(label or &#039;Australian Artists&#039;)..&#039;]&#039;..p.getCatForId( &#039;DAAO&#039; )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.dblpLink( id, label )&lt;br /&gt;
	--P2456&#039;s format regex: \d{2,3} /\d+(-\d+)?|[a-z] /[a-zA-Z][0-9A-Za-z]*(-\d+)? (e.g. 123/123)&lt;br /&gt;
	if not id:match( &#039;^%d%d%d?/%d+$&#039; ) and&lt;br /&gt;
	   not id:match( &#039;^%d%d%d?/%d+%-%d+$&#039; ) and&lt;br /&gt;
	   not id:match( &#039;^[a-z]/[a-zA-Z][0-9A-Za-z]*$&#039; ) and&lt;br /&gt;
	   not id:match( &#039;^[a-z]/[a-zA-Z][0-9A-Za-z]*%-%d+$&#039; ) then&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
	return &#039;[https://dblp.org/pid/&#039;..id..&#039; &#039;..(label or &#039;DBLP (computer science)&#039;)..&#039;]&#039;..p.getCatForId( &#039;DBLP&#039; )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.dibLink( id, label )&lt;br /&gt;
	--P6829&#039;s format regex: a\d{4}\d?(-[A-D])? (e.g. a1953)&lt;br /&gt;
	if not id:match( &#039;^a%d%d%d%d%d?%-?[A-D]?$&#039; ) then&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
	return &#039;[https://dib.cambridge.org/viewReadPage.do?articleId=&#039;..id..&#039; &#039;..(label or &#039;Ireland&#039;)..&#039;]&#039;..p.getCatForId( &#039;DIB&#039; )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.dsiLink( id, label )&lt;br /&gt;
	--P2349&#039;s format regex: [1-9]\d* (e.g. 1538)&lt;br /&gt;
	if not id:match( &#039;^[1-9]%d*$&#039; ) then&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
	return &#039;[http://www.uni-stuttgart.de/hi/gnt/dsi2/index.php?table_name=dsi&amp;amp;function=details&amp;amp;where_field=id&amp;amp;where_value=&#039;..id..&#039; &#039;..(label or &#039;Scientific illustrators&#039;)..&#039;]&#039;..p.getCatForId( &#039;DSI&#039; )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.fastLink( id, label )&lt;br /&gt;
	--P2163&#039;s format regex: [1-9]\d{0,7} (e.g. 1916996)&lt;br /&gt;
	if not id:match( &#039;^[1-9]%d?%d?%d?%d?%d?%d?%d?$&#039; ) then&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
	return &#039;[http://id.worldcat.org/fast/&#039;..id..&#039;/ &#039;..(label or &#039;Faceted Application of Subject Terminology&#039;)..&#039;]&#039;..p.getCatForId( &#039;FAST&#039; )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function p.fnzaLink( id, label )&lt;br /&gt;
	--P6792&#039;s format regex: [1-9]\d* (e.g. 9785)&lt;br /&gt;
	if not id:match( &#039;^[1-9]%d*$&#039; ) then&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
	return &#039;[https://findnzartists.org.nz/artist/&#039;..id..&#039;/ &#039;..(label or &#039;New Zealand Artists&#039;)..&#039;]&#039;..p.getCatForId( &#039;FNZA&#039; )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.gndLink( id, label )&lt;br /&gt;
	--P227&#039;s format regex: 1[012]?\d{7}[0-9X]|[47]\d{6}-\d|[1-9]\d{0,7}-[0-9X]|3\d{7}[0-9X] (e.g. 4079154-3)&lt;br /&gt;
	if not id:match( &#039;^1[012]?%d%d%d%d%d%d%d[0-9X]$&#039; ) and&lt;br /&gt;
	   not id:match( &#039;^[47]%d%d%d%d%d%d%-%d$&#039; ) and&lt;br /&gt;
	   not id:match( &#039;^[1-9]%d?%d?%d?%d?%d?%d?%d?%-[0-9X]$&#039; ) and&lt;br /&gt;
	   not id:match( &#039;^3%d%d%d%d%d%d%d[0-9X]$&#039; ) then&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
	return &#039;[https://d-nb.info/gnd/&#039;..id..&#039; &#039;..(label or &#039;Integrated Authority File (Germany)&#039;)..&#039;]&#039;..p.getCatForId( &#039;GND&#039; )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.hdsLink( id, label )&lt;br /&gt;
	--P902&#039;s format regex: \d{6} (e.g. 050123)&lt;br /&gt;
	if not id:match( &#039;^%d%d%d%d%d%d$&#039; ) then&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
	return &#039;[https://hls-dhs-dss.ch/fr/articles/&#039;..id..&#039; &#039;..(label or &#039;Historical Dictionary of Switzerland&#039;)..&#039;]&#039;..p.getCatForId( &#039;HDS&#039; )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.iaafLink( id, label )&lt;br /&gt;
	--P1146&#039;s format regex: [0-9][0-9]* (e.g. 012)&lt;br /&gt;
	if not id:match( &#039;^%d+$&#039; ) then&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
	return &#039;[https://www.iaaf.org/athletes/_/&#039;..id..&#039; &#039;..(label or &#039;World Athletics&#039;)..&#039;]&#039;..p.getCatForId( &#039;IAAF&#039; )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function p.iccuLink( id, label )&lt;br /&gt;
	--P396&#039;s format regex: IT\\ICCU\\(\d{10}|\D\D[\D\d]\D\\\d{6}) (e.g. IT\ICCU\CFIV\000163)&lt;br /&gt;
	if not id:match( &#039;^IT\\ICCU\\%d%d%d%d%d%d%d%d%d%d$&#039; ) and&lt;br /&gt;
	   not id:match( &#039;^IT\\ICCU\\%u%u[%u%d]%u\\%d%d%d%d%d%d$&#039; ) then --legacy: %u used here instead of %D (but the faulty ID cat is empty, out of ~12k uses)&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
	return &#039;[https://opac.sbn.it/opacsbn/opac/iccu/scheda_authority.jsp?bid=&#039;..id..&#039; &#039;..(label or &#039;Italy&#039;)..&#039;]&#039;..p.getCatForId( &#039;ICCU&#039; )&lt;br /&gt;
end&lt;br /&gt;
function p.iciaLink( id, label )&lt;br /&gt;
	--P1736&#039;s format regex: \d+ (e.g. 1)&lt;br /&gt;
	if not id:match( &#039;^%d+$&#039; ) then&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
	return &#039;[https://www.imj.org.il/artcenter/newsite/en/?artist=&#039;..id..&#039; &#039;..(label or &#039;ICIA (Israel)&#039;)..&#039;]&#039;..p.getCatForId( &#039;ICIA&#039; )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.ieuLink( id, label )&lt;br /&gt;
	--P9070&#039;s format regex: [A-Z]\\[A-Z]\\[A-Za-z0-9]+ (e.g. K\Y\Kyiv)&lt;br /&gt;
	if not id:match( &#039;^[A-Z]\\[A-Z]\\%w+$&#039; ) then&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
	return &#039;[http://www.encyclopediaofukraine.com/display.asp?linkpath=pages\\&#039;..id..&#039; &#039;..(label or &#039;Internet Encyclopedia of Ukraine&#039;)..&#039;]&#039;..p.getCatForId( &#039;IEU&#039; )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.isniLink( id, label )&lt;br /&gt;
	id = p.validateIsni( id ) --e.g. 0000-0000-6653-4145&lt;br /&gt;
	if not id then&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
	return &#039;[https://isni.org/isni/&#039;..id..&#039; &#039;..(label or &#039;ISNI&#039;)..&#039;]&#039;..p.getCatForId( &#039;ISNI&#039; )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.jocondeLink( id, label )&lt;br /&gt;
	--P347&#039;s format regex: [\-0-9A-Za-z]{11} (e.g. 12345678901)&lt;br /&gt;
	local regex = &#039;^&#039;..string.rep(&#039;[%-0-9A-Za-z]&#039;, 11)..&#039;$&#039;&lt;br /&gt;
	if not id:match( regex ) then&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
	return &#039;[https://www.pop.culture.gouv.fr/notice/joconde/&#039;..id..&#039; &#039;..(label or &#039;Joconde (France)&#039;)..&#039;]&#039;..p.getCatForId( &#039;Joconde&#039; )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.kulturnavLink( id, label )&lt;br /&gt;
	--P1248&#039;s format regex: [0-9a-f]{8}\-[0-9a-f]{4}\-[0-9a-f]{4}\-[0-9a-f]{4}\-[0-9a-f]{12} (e.g. 12345678-1234-1234-1234-1234567890AB)&lt;br /&gt;
	if not id:match( &#039;^%x%x%x%x%x%x%x%x%-%x%x%x%x%-%x%x%x%x%-%x%x%x%x%-%x%x%x%x%x%x%x%x%x%x%x%x$&#039; ) then&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
	return &#039;[http://kulturnav.org/&#039;..id..&#039; &#039;..(label or &#039;KulturNav (Norway)&#039;)..&#039;]&#039;..p.getCatForId( &#039;KULTURNAV&#039; ) --no https as of 9/2019&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.lccnLink( id, label )&lt;br /&gt;
	local parts = p.splitLccn( id ) --e.g. n78039510&lt;br /&gt;
	if not parts then&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
	local lccnType = parts[1] ~= &#039;sh&#039; and &#039;names&#039; or &#039;subjects&#039;&lt;br /&gt;
	id = parts[1] .. parts[2] .. p.append( parts[3], &#039;0&#039;, 6 )&lt;br /&gt;
	return &#039;[https://id.loc.gov/authorities/&#039;..lccnType..&#039;/&#039;..id..&#039; &#039;..(label or &#039;United States&#039;)..&#039;]&#039;..p.getCatForId( &#039;LCCN&#039; )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.lirLink( id, label )&lt;br /&gt;
	--P886&#039;s format regex: \d+ (e.g. 1)&lt;br /&gt;
	if not id:match( &#039;^%d+$&#039; ) then&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
	return &#039;[http://www.e-lir.ch/e-LIR___Lexicon.&#039;..id..&#039;.450.0.html &#039;..(label or &#039;Lexicon Istoric Retic (Switzerland)&#039;)..&#039;]&#039;..p.getCatForId( &#039;LIR&#039; ) --no https as of 9/2019&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.lnbLink( id, label )&lt;br /&gt;
	--P1368&#039;s format regex: \d{9} (e.g. 123456789)&lt;br /&gt;
	if not id:match( &#039;^%d%d%d%d%d%d%d%d%d$&#039; ) then&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
	return &#039;[https://kopkatalogs.lv/F?func=direct&amp;amp;local_base=lnc10&amp;amp;doc_number=&#039;..id..&#039;&amp;amp;P_CON_LNG=ENG &#039;..(label or &#039;Latvia&#039;)..&#039;]&#039;..p.getCatForId( &#039;LNB&#039; )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.leonoreLink( id, label )&lt;br /&gt;
	--P640&#039;s format regex: LH/\d{1,4}/\d{1,3}|19800035/\d{1,4}/\d{1,5}(Bis)?|C/0/\d{1,2} (e.g. LH/2064/18)&lt;br /&gt;
	if not id:match( &#039;^LH/%d%d?%d?%d?/%d%d?%d?$&#039; ) and             --IDs from       LH/1/1 to         LH/2794/54 (legionaries)&lt;br /&gt;
	   not id:match( &#039;^19800035/%d%d?%d?%d?/%d%d?%d?%d?%d?$&#039; ) and --IDs from 19800035/1/1 to 19800035/385/51670 (legionnaires who died 1954-1977 &amp;amp; some who died &amp;lt; 1954)&lt;br /&gt;
	   not id:match( &#039;^C/0/%d%d?$&#039; ) then                          --IDs from        C/0/1 to             C/0/84 (84 famous legionaries)&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
	return &#039;[http://www.culture.gouv.fr/public/mistral/leonore_fr?ACTION=CHERCHER&amp;amp;FIELD_1=COTE&amp;amp;VALUE_1=&#039;..id..&#039; &#039;..(label or &#039;Léonore (France)&#039;)..&#039;]&#039;..p.getCatForId( &#039;Léonore&#039; ) --no https as of 9/2019&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.maLink( id, label )&lt;br /&gt;
	--P6366&#039;s format regex: [1-9]\d{3,9} (e.g. 1498221862)&lt;br /&gt;
	if not id:match( &#039;^[1-9]%d%d%d%d?%d?%d?%d?%d?%d?$&#039; ) then&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
	return &#039;[https://academic.microsoft.com/v2/detail/&#039;..id..&#039; &#039;..(label or &#039;Microsoft Academic&#039;)..&#039;]&#039;..p.getCatForId( &#039;MA&#039; )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.mbaLink( id, label )&lt;br /&gt;
	--P434&#039;s format regex: [0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12} (e.g. 12345678-1234-1234-1234-1234567890AB)&lt;br /&gt;
	if not id:match( &#039;^%x%x%x%x%x%x%x%x%-%x%x%x%x%-%x%x%x%x%-%x%x%x%x%-%x%x%x%x%x%x%x%x%x%x%x%x$&#039; ) then&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
	local url = &#039;https://musicbrainz.org/artist/&#039;..id&lt;br /&gt;
	local cat = p.getCatForId( &#039;MusicBrainz&#039; )--special cat name&lt;br /&gt;
	if label then&lt;br /&gt;
		return &#039;[&#039;..url..&#039; &#039;..label..&#039;]&#039;..cat	&lt;br /&gt;
	else&lt;br /&gt;
		return &#039;[[MBA (identifier)|MusicBrainz]] [&#039; .. url .. &#039; artist]&#039; .. cat&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.mbareaLink( id, label )&lt;br /&gt;
	--P982&#039;s format regex: [0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12} (e.g. 12345678-1234-1234-1234-1234567890AB)&lt;br /&gt;
	if not id:match( &#039;^%x%x%x%x%x%x%x%x%-%x%x%x%x%-%x%x%x%x%-%x%x%x%x%-%x%x%x%x%x%x%x%x%x%x%x%x$&#039; ) then&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
	local url = &#039;https://musicbrainz.org/area/&#039;..id&lt;br /&gt;
	local cat = p.getCatForId( &#039;MusicBrainz area&#039; )--special cat name&lt;br /&gt;
	if label then&lt;br /&gt;
		return &#039;[&#039;..url..&#039; &#039;..label..&#039;]&#039;..cat	&lt;br /&gt;
	else&lt;br /&gt;
		return &#039;[[MBAREA (identifier)|MusicBrainz]] [&#039; .. url .. &#039; area]&#039; .. cat&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.mbiLink( id, label )&lt;br /&gt;
	--P1330&#039;s format regex: [0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12} (e.g. 12345678-1234-1234-1234-1234567890AB)&lt;br /&gt;
	if not id:match( &#039;^%x%x%x%x%x%x%x%x%-%x%x%x%x%-%x%x%x%x%-%x%x%x%x%-%x%x%x%x%x%x%x%x%x%x%x%x$&#039; ) then&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
	local url = &#039;https://musicbrainz.org/instrument/&#039;..id&lt;br /&gt;
	local cat = p.getCatForId( &#039;MusicBrainz instrument&#039; )--special cat name&lt;br /&gt;
	if label then&lt;br /&gt;
		return &#039;[&#039;..url..&#039; &#039;..label..&#039;]&#039;..cat	&lt;br /&gt;
	else&lt;br /&gt;
		return &#039;[[MBI (identifier)|MusicBrainz]] [&#039; .. url .. &#039; instrument]&#039; .. cat&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.mblLink( id, label )&lt;br /&gt;
	--P966&#039;s format regex: [0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12} (e.g. 12345678-1234-1234-1234-1234567890AB)&lt;br /&gt;
	if not id:match( &#039;^%x%x%x%x%x%x%x%x%-%x%x%x%x%-%x%x%x%x%-%x%x%x%x%-%x%x%x%x%x%x%x%x%x%x%x%x$&#039; ) then&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
	local url = &#039;https://musicbrainz.org/label/&#039;..id&lt;br /&gt;
	local cat = p.getCatForId( &#039;MusicBrainz label&#039; )--special cat name&lt;br /&gt;
	if label then&lt;br /&gt;
		return &#039;[&#039;..url..&#039; &#039;..label..&#039;]&#039;..cat	&lt;br /&gt;
	else&lt;br /&gt;
		return &#039;[[MBL (identifier)|MusicBrainz]] [&#039; .. url .. &#039; label]&#039; .. cat&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.mbpLink( id, label )&lt;br /&gt;
	--P1004&#039;s format regex: [0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12} (e.g. 12345678-1234-1234-1234-1234567890AB)&lt;br /&gt;
	if not id:match( &#039;^%x%x%x%x%x%x%x%x%-%x%x%x%x%-%x%x%x%x%-%x%x%x%x%-%x%x%x%x%x%x%x%x%x%x%x%x$&#039; ) then&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
	local url = &#039;https://musicbrainz.org/place/&#039;..id&lt;br /&gt;
	local cat = p.getCatForId( &#039;MusicBrainz place&#039; )--special cat name&lt;br /&gt;
	if label then&lt;br /&gt;
		return &#039;[&#039;..url..&#039; &#039;..label..&#039;]&#039;..cat	&lt;br /&gt;
	else&lt;br /&gt;
		return &#039;[[MBP (identifier)|MusicBrainz]] [&#039; .. url .. &#039; place]&#039; .. cat&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.mbrgLink( id, label )&lt;br /&gt;
	--P436&#039;s format regex: [0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12} (e.g. 12345678-1234-1234-1234-1234567890AB)&lt;br /&gt;
	if not id:match( &#039;^%x%x%x%x%x%x%x%x%-%x%x%x%x%-%x%x%x%x%-%x%x%x%x%-%x%x%x%x%x%x%x%x%x%x%x%x$&#039; ) then&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
	local url = &#039;https://musicbrainz.org/release-group/&#039;..id&lt;br /&gt;
	local cat = p.getCatForId( &#039;MusicBrainz release group&#039; )--special cat name&lt;br /&gt;
	if label then&lt;br /&gt;
		return &#039;[&#039;..url..&#039; &#039;..label..&#039;]&#039;..cat	&lt;br /&gt;
	else&lt;br /&gt;
		return &#039;[[MBRG (identifier)|MusicBrainz]] [&#039; .. url .. &#039; release group]&#039; .. cat&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.mbsLink( id, label )&lt;br /&gt;
	--P1407&#039;s format regex: [0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12} (e.g. 12345678-1234-1234-1234-1234567890AB)&lt;br /&gt;
	if not id:match( &#039;^%x%x%x%x%x%x%x%x%-%x%x%x%x%-%x%x%x%x%-%x%x%x%x%-%x%x%x%x%x%x%x%x%x%x%x%x$&#039; ) then&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
	local url = &#039;https://musicbrainz.org/series/&#039;..id&lt;br /&gt;
	local cat = p.getCatForId( &#039;MusicBrainz series&#039; )--special cat name&lt;br /&gt;
	if label then&lt;br /&gt;
		return &#039;[&#039;..url..&#039; &#039;..label..&#039;]&#039;..cat	&lt;br /&gt;
	else&lt;br /&gt;
		return &#039;[[MBS (identifier)|MusicBrainz]] [&#039; .. url .. &#039; series]&#039; .. cat&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.mbwLink( id, label )&lt;br /&gt;
	--P435&#039;s format regex: [0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12} (e.g. 12345678-1234-1234-1234-1234567890AB)&lt;br /&gt;
	if not id:match( &#039;^%x%x%x%x%x%x%x%x%-%x%x%x%x%-%x%x%x%x%-%x%x%x%x%-%x%x%x%x%x%x%x%x%x%x%x%x$&#039; ) then&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	local url = &#039;https://musicbrainz.org/work/&#039;..id&lt;br /&gt;
	local cat = p.getCatForId( &#039;MusicBrainz work&#039; )--special cat name&lt;br /&gt;
	if label then&lt;br /&gt;
		return &#039;[&#039;..url..&#039; &#039;..label..&#039;]&#039;..cat	&lt;br /&gt;
	else&lt;br /&gt;
		return &#039;[[MBW (identifier)|MusicBrainz]] [&#039; .. url .. &#039; work]&#039; .. cat&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.mgpLink( id, label )&lt;br /&gt;
	--P549&#039;s format regex: \d{1,6} (e.g. 123456)&lt;br /&gt;
	if not id:match( &#039;^%d%d?%d?%d?%d?%d?$&#039; ) then&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
	return &#039;[https://genealogy.math.ndsu.nodak.edu/id.php?id=&#039;..id..&#039; &#039;..(label or &#039;Mathematics Genealogy Project&#039;)..&#039;]&#039;..p.getCatForId( &#039;MGP&#039; )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.naraLink( id, label )&lt;br /&gt;
	--P1225&#039;s format regex: ^([1-9]\d{0,8})$ (e.g. 123456789)&lt;br /&gt;
	if not id:match( &#039;^[1-9]%d?%d?%d?%d?%d?%d?%d?%d?$&#039; ) then&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
	return &#039;[https://catalog.archives.gov/id/&#039;..id..&#039; &#039;..(label or &#039;National Archives (US)&#039;)..&#039;]&#039;..p.getCatForId( &#039;NARA&#039; )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.nclLink( id, label )&lt;br /&gt;
	--P1048&#039;s format regex: \d+ (e.g. 1081436)&lt;br /&gt;
	if not id:match( &#039;^%d+$&#039; ) then&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
	return &#039;[http://aleweb.ncl.edu.tw/F/?func=accref&amp;amp;acc_sequence=&#039;..id..&#039;&amp;amp;CON_LNG=ENG &#039;..(label or &#039;Taiwan&#039;)..&#039;]&#039;..p.getCatForId( &#039;NCL&#039; ) --no https as of 9/2019&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.ndlLink( id, label )&lt;br /&gt;
	--P349&#039;s format regex: 0?\d{8} (e.g. 012345678)&lt;br /&gt;
	if not id:match( &#039;^0?%d%d%d%d%d%d%d%d$&#039; ) then&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
	return &#039;[https://id.ndl.go.jp/auth/ndlna/&#039;..id..&#039; &#039;..(label or &#039;Japan&#039;)..&#039;]&#039;..p.getCatForId( &#039;NDL&#039; )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.ngvLink( id, label )&lt;br /&gt;
	--P2041&#039;s format regex: \d+ (e.g. 12354)&lt;br /&gt;
	if not id:match( &#039;^%d+$&#039; ) then&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
	return &#039;[https://www.ngv.vic.gov.au/explore/collection/artist/&#039;..id..&#039;/ &#039;..(label or &#039;Victoria&#039;)..&#039;]&#039;..p.getCatForId( &#039;NGV&#039; )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.nkcLink( id, label )&lt;br /&gt;
	--P691&#039;s format regex: [a-z]{2,4}[0-9]{2,14} (e.g. abcd12345678901234)&lt;br /&gt;
	if not id:match( &#039;^[a-z][a-z][a-z]?[a-z]?%d%d%d?%d?%d?%d?%d?%d?%d?%d?%d?%d?%d?%d?$&#039; ) then&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
	return &#039;[https://aleph.nkp.cz/F/?func=find-c&amp;amp;local_base=aut&amp;amp;ccl_term=ica=&#039;..id..&#039;&amp;amp;CON_LNG=ENG &#039;..(label or &#039;Czech Republic&#039;)..&#039;]&#039;..p.getCatForId( &#039;NKC&#039; )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.nlaLink( id, label )&lt;br /&gt;
	--P409&#039;s format regex: [1-9][0-9]{0,11} (e.g. 123456789012)&lt;br /&gt;
	if not id:match( &#039;^[1-9]%d?%d?%d?%d?%d?%d?%d?%d?%d?%d?%d?$&#039; ) then&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
	return &#039;[https://nla.gov.au/anbd.aut-an&#039;..id..&#039; &#039;..(label or &#039;Australia&#039;)..&#039;]&#039;..p.getCatForId( &#039;NLA&#039; )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.nlgLink( id, label )&lt;br /&gt;
	--P3348&#039;s format regex: [1-9]\d* (e.g. 1)&lt;br /&gt;
	if not id:match( &#039;^[1-9]%d*$&#039; ) then&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
	return &#039;[https://data.nlg.gr/resource/authority/record&#039;..id..&#039; &#039;..(label or &#039;Greece&#039;)..&#039;]&#039;..p.getCatForId( &#039;NLG&#039; )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.nliLink( id, label )&lt;br /&gt;
	--P949&#039;s format regex: \d{9} (e.g. 123456789)&lt;br /&gt;
	if not id:match( &#039;^%d%d%d%d%d%d%d%d%d$&#039; ) then&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
	return &#039;[http://uli.nli.org.il/F/?func=direct&amp;amp;doc_number=&#039;..id..&#039;&amp;amp;local_base=nlx10&#039;..&#039; &#039;..(label or &#039;Israel&#039;)..&#039;]&#039;..p.getCatForId( &#039;NLI&#039; )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.nlkLink( id, label )&lt;br /&gt;
	--P5034&#039;s format regex: KA.(19|20).{7} (e.g. KAC201501465)&lt;br /&gt;
	if not id:match( &#039;^KA.19.......$&#039; ) and&lt;br /&gt;
	   not id:match( &#039;^KA.20.......$&#039; ) then&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
	return &#039;[https://nl.go.kr/authorities/resource/&#039;..id..&#039; &#039;..(label or &#039;Korea&#039;)..&#039;]&#039;..p.getCatForId( &#039;NLK&#039; )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.nlpLink( id, label )&lt;br /&gt;
	--P1695&#039;s format regex: 9810[0-9]\d* or A[0-9]{7}[0-9X] (e.g. 9810123456789012345 or A10414836)&lt;br /&gt;
	if not id:match( &#039;^9810%d+$&#039; ) and&lt;br /&gt;
	   not id:match( &#039;^A%d%d%d%d%d%d%d[%dX]$&#039; ) then&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
	return &#039;[https://tools.wmflabs.org/wikidata-externalid-url?p=1695&amp;amp;id=&#039;..id..&#039; &#039;..(label or &#039;Poland&#039;)..&#039;]&#039;..p.getCatForId( &#039;NLP&#039; )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.nlrLink( id, label )&lt;br /&gt;
	--P1003&#039;s format regex: \d{9} (e.g. 123456789)&lt;br /&gt;
	if not id:match( &#039;^%d%d%d%d%d%d%d%d%d$&#039; ) then&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
	return &#039;[http://aleph.bibnat.ro:8991/F/?func=direct&amp;amp;local_base=NLR10&amp;amp;doc_number=&#039;..id..&#039; &#039;..(label or &#039;Romania&#039;)..&#039;]&#039;..p.getCatForId( &#039;NLR&#039; )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.nskLink( id, label )&lt;br /&gt;
	--P1375&#039;s format regex: \d{9} (e.g. 123456789)&lt;br /&gt;
	if not id:match( &#039;^%d%d%d%d%d%d%d%d%d$&#039; ) then&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
	return &#039;[http://katalog.nsk.hr/F/?func=direct&amp;amp;doc_number=&#039;..id..&#039;&amp;amp;local_base=nsk10 &#039;..(label or &#039;Croatia&#039;)..&#039;]&#039;..p.getCatForId( &#039;NSK&#039; ) --no https as of 9/2019&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.ntaLink( id, label )&lt;br /&gt;
	--P1006&#039;s format regex: \d{8}[\dX] (e.g. 12345678X)&lt;br /&gt;
	if not id:match( &#039;^%d%d%d%d%d%d%d%d[%dX]$&#039; ) then&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
	return &#039;[http://data.bibliotheken.nl/id/thes/p&#039;..id..&#039; &#039;..(label or &#039;Netherlands&#039;)..&#039;]&#039;..p.getCatForId( &#039;NTA&#039; )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.orcidLink( id, label )&lt;br /&gt;
	id = p.validateIsni( id ) --e.g. 0000-0002-7398-5483&lt;br /&gt;
	if not id then&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
	id = id:sub( 1, 4 )..&#039;-&#039;..id:sub( 5, 8 )..&#039;-&#039;..id:sub( 9, 12 )..&#039;-&#039;..id:sub( 13, 16 )&lt;br /&gt;
	return &#039;[https://orcid.org/&#039;..id..&#039; &#039;..(label or &#039;ORCID&#039;)..&#039;]&#039;..p.getCatForId( &#039;ORCID&#039; )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.picLink( id, label )&lt;br /&gt;
	--P2750&#039;s format regex: [1-9]\d* (e.g. 1)&lt;br /&gt;
	if not id:match( &#039;^[1-9]%d*$&#039; ) then&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
	return &#039;[https://pic.nypl.org/constituents/&#039;..id..&#039; &#039;..(label or &#039;Photographers\&#039; Identities&#039;)..&#039;]&#039;..p.getCatForId( &#039;PIC&#039; )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.plwabnLink( id, label )&lt;br /&gt;
	--P7293&#039;s format regex: 981[0-9]{8}05606 (e.g. 9810696457305606)&lt;br /&gt;
	if not id:match( &#039;^981%d%d%d%d%d%d%d%d05606*$&#039; ) then&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
	return &#039;[http://mak.bn.org.pl/cgi-bin/KHW/makwww.exe?BM=1&amp;amp;NU=1&amp;amp;IM=4&amp;amp;WI=&#039;..id..&#039; &#039;..(label or &#039;Poland&#039;)..&#039;]&#039;..p.getCatForId( &#039;PLWABN&#039; )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.publonsLink( id, label )&lt;br /&gt;
	--P3829&#039;s format regex: \d+ (e.g. 654601)&lt;br /&gt;
	if not id:match( &#039;^%d+$&#039; ) then&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
	return &#039;[https://publons.com/author/&#039;..id..&#039;/ &#039;..(label or &#039;Publons (researchers)&#039;)..&#039;]&#039;..p.getCatForId( &#039;Publons&#039; )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.ridLink( id, label )&lt;br /&gt;
	--P1053&#039;s format regex: [A-Z]{1,3}-\d{4}-(19|20)\d\d (e.g. AAS-5150-2020)&lt;br /&gt;
	if not id:match( &#039;^[A-Z][A-Z]?[A-Z]?%-%d%d%d%d%-19%d%d$&#039; ) and&lt;br /&gt;
	   not id:match( &#039;^[A-Z][A-Z]?[A-Z]?%-%d%d%d%d%-20%d%d$&#039; ) then&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
	return &#039;[https://www.researcherid.com/rid/&#039;..id..&#039; &#039;..(label or &#039;ResearcherID&#039;)..&#039;]&#039;..p.getCatForId( &#039;RID&#039; )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.rismLink( id, label )&lt;br /&gt;
	--P5504&#039;s format regex: (pe|ks)?\[1-9]d* (e.g. pe30006410)&lt;br /&gt;
	if not id:match( &#039;^pe[1-9]%d*$&#039; ) and --99% start with &#039;pe&#039;&lt;br /&gt;
	   not id:match( &#039;^ks[1-9]%d*$&#039; ) and&lt;br /&gt;
	   not id:match( &#039;^[1-9]%d*$&#039; ) then&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
	return &#039;[https://opac.rism.info/search?id=&#039;..id..&#039; &#039;..(label or &#039;RISM (France)&#039;)..&#039;]&#039;..p.getCatForId( &#039;RISM&#039; )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.reroLink( id, label )&lt;br /&gt;
	--P3065&#039;s format regex: 0[1-2]-[A-Z0-9]{1,10} (e.g. 02-A012345678)&lt;br /&gt;
	if not id:match( &#039;^0[1-2]%-[A-Z%d][A-Z%d]?[A-Z%d]?[A-Z%d]?[A-Z%d]?[A-Z%d]?[A-Z%d]?[A-Z%d]?[A-Z%d]?[A-Z%d]?$&#039; ) then&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
	return &#039;[http://data.rero.ch/&#039;..id..&#039; &#039;..(label or &#039;RERO (Switzerland)&#039;)..&#039;]&#039;..p.getCatForId( &#039;RERO&#039; )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.rkdartistsLink( id, label )&lt;br /&gt;
	--P650&#039;s format regex: [1-9]\d{0,5} (e.g. 123456)&lt;br /&gt;
	if not id:match( &#039;^[1-9]%d?%d?%d?%d?%d?$&#039; ) then&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
	return &#039;[https://rkd.nl/en/explore/artists/&#039;..id..&#039; &#039;..(label or &#039;RKD Artists (Netherlands)&#039;)..&#039;]&#039;..p.getCatForId( &#039;RKDartists&#039; )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.rkdidLink( id, label )&lt;br /&gt;
	--P350&#039;s format regex: [1-9]\d{0,5} (e.g. 123456)&lt;br /&gt;
	if not id:match( &#039;^[1-9]%d?%d?%d?%d?%d?$&#039; ) then&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
	return &#039;[https://rkd.nl/nl/explore/images/&#039;..id..&#039; &#039;..(label or &#039;RKD ID (Netherlands)&#039;)..&#039;]&#039;..p.getCatForId( &#039;RKDID&#039; )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.rslLink( id, label )&lt;br /&gt;
	--P947&#039;s format regex: \d{1,9} (e.g. 123456789)&lt;br /&gt;
	if not id:match( &#039;^%d%d?%d?%d?%d?%d?%d?%d?%d?$&#039; ) then&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
	return &#039;[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=&#039;..id..&#039;&amp;amp;CON_LNG=ENG &#039;..(label or &#039;Russia&#039;)..&#039;]&#039;..p.getCatForId( &#039;RSL&#039; ) --no https as of 9/2019&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.selibrLink( id, label )&lt;br /&gt;
	--P906&#039;s format regex: [1-9]\d{4,5} (e.g. 123456)&lt;br /&gt;
	if not id:match( &#039;^[1-9]%d%d%d%d%d?$&#039; ) then&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
	return &#039;[https://libris.kb.se/auth/&#039;..id..&#039; &#039;..(label or &#039;Sweden&#039;)..&#039;]&#039;..p.getCatForId( &#039;SELIBR&#039; )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.sikartLink( id, label )&lt;br /&gt;
	--P781&#039;s format regex: \d{7,9} (e.g. 123456789)&lt;br /&gt;
	if not id:match( &#039;^%d%d%d%d%d%d%d%d?%d?$&#039; ) then&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
	return &#039;[http://www.sikart.ch/KuenstlerInnen.aspx?id=&#039;..id..&#039;&amp;amp;lng=en &#039;..(label or &#039;SIKART (Switzerland)&#039;)..&#039;]&#039;..p.getCatForId( &#039;SIKART&#039; ) --no https as of 9/2019&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.snacLink( id, label )&lt;br /&gt;
	--P3430&#039;s format regex: \d*[A-Za-z][0-9A-Za-z]* (e.g. A)&lt;br /&gt;
	if not id:match( &#039;^%d*[A-Za-z][0-9A-Za-z]*$&#039; ) then&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
	return &#039;[https://snaccooperative.org/ark:/99166/&#039;..id..&#039; &#039;..(label or &#039;Social Networks and Archival Context&#039;)..&#039;]&#039;..p.getCatForId( &#039;SNAC-ID&#039; )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.sudocLink( id, label )&lt;br /&gt;
	--P269&#039;s format regex: (\d{8}[\dX]|) (e.g. 026927608)&lt;br /&gt;
	if not id:match( &#039;^%d%d%d%d%d%d%d%d[%dxX]$&#039; ) then --legacy: allow lowercase &#039;x&#039;&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
	return &#039;[https://www.idref.fr/&#039;..id..&#039; &#039;..(label or &#039;SUDOC (France)&#039;)..&#039;]&#039;..p.getCatForId( &#039;SUDOC&#039; )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.s2authoridLink( id, label )&lt;br /&gt;
	--P4012&#039;s format regex: [1-9]\d* (e.g. 1796130)&lt;br /&gt;
	if not id:match( &#039;^[1-9]%d*$&#039; ) then&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
	return &#039;[https://www.semanticscholar.org/author/&#039;..id..&#039; &#039;..(label or &#039;Semantic Scholar&#039;)..&#039;]&#039;..p.getCatForId( &#039;Semantic Scholar author&#039; ) --special cat name&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.ta98Link( id, label )&lt;br /&gt;
	--P1323&#039;s format regex: A\d{2}\.\d\.\d{2}\.\d{3}[FM]? (e.g. A12.3.45.678)&lt;br /&gt;
	if not id:match( &#039;^A%d%d%.%d%.%d%d%.%d%d%d[FM]?$&#039; ) then&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
	return &#039;[http://tools.wmflabs.org/wikidata-externalid-url/?p=1323&amp;amp;url_prefix=https:%2F%2Fwww.unifr.ch%2Fifaa%2FPublic%2FEntryPage%2FTA98%20Tree%2FEntity%20TA98%20EN%2F&amp;amp;url_suffix=%20Entity%20TA98%20EN.htm&amp;amp;id=&#039;..id..&#039; &#039;..(label or &#039;Terminologia Anatomica&#039;)..&#039;]&#039;..p.getCatForId( &#039;TA98&#039; )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.tdviaLink( id, label )&lt;br /&gt;
	--P7314&#039;s format regex: [a-z/-]+] (e.g. barkan-omer-lutfi)&lt;br /&gt;
	if not id:match( &#039;^[a-z/-]+$&#039; ) then&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
	return &#039;[https://islamansiklopedisi.org.tr/&#039;..id..&#039; &#039;..(label or &#039;Encyclopedia of Islam&#039;)..&#039;]&#039;..p.getCatForId( &#039;TDVİA&#039; )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function p.tepapaLink( id, label )&lt;br /&gt;
	--P3544&#039;s format regex: \d+ (e.g. 1)&lt;br /&gt;
	if not id:match( &#039;^%d+$&#039; ) then&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
	return &#039;[https://collections.tepapa.govt.nz/agent/&#039;..id..&#039; &#039;..(label or &#039;Te Papa (New Zealand)&#039;)..&#039;]&#039;..p.getCatForId( &#039;TePapa&#039; )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.tlsLink( id, label )&lt;br /&gt;
	id = id:gsub(&#039; +&#039;, &#039;_&#039;)&lt;br /&gt;
	--P1362&#039;s format regex: \p{Lu}[\p{L}\d_&#039;,\.\-\(\)\*/–]{3,59} (e.g. Abcd)&lt;br /&gt;
	local class = &amp;quot;[%a%d_&#039;,%.%-%(%)%*/–]&amp;quot;&lt;br /&gt;
	local regex = &amp;quot;^%u&amp;quot;..string.rep(class, 3)..string.rep(class..&amp;quot;?&amp;quot;, 56)..&amp;quot;$&amp;quot;&lt;br /&gt;
	if not mw.ustring.match( id, regex ) then&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
	return &#039;[http://tls.theaterwissenschaft.ch/wiki/&#039;..id..&#039; &#039;..(label or &#039;Theaterlexikon (Switzerland)&#039;)..&#039;]&#039;..p.getCatForId( &#039;TLS&#039; ) --no https as of 9/2019&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.troveLink( id, label )&lt;br /&gt;
	--P1315&#039;s format regex: [1-9]\d{5,7} (e.g. 12345678)&lt;br /&gt;
	if not id:match( &#039;^[1-9]%d%d%d%d%d%d?%d?$&#039; ) then&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
	return &#039;[https://trove.nla.gov.au/people/&#039;..id..&#039; &#039;..(label or &#039;Trove (Australia)&#039;)..&#039;]&#039;..p.getCatForId( &#039;Trove&#039; )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.ukparlLink( id, label )&lt;br /&gt;
	--P6213&#039;s format regex: [a-zA-Z\d]{8} (e.g. AQUupyiR)&lt;br /&gt;
	if not id:match( &#039;^[a-zA-Z%d][a-zA-Z%d][a-zA-Z%d][a-zA-Z%d][a-zA-Z%d][a-zA-Z%d][a-zA-Z%d][a-zA-Z%d]$&#039; ) then&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
	return &#039;[https://id.parliament.uk/&#039;..id..&#039; &#039;..(label or &#039;UK Parliament&#039;)..&#039;]&#039;..p.getCatForId( &#039;UKPARL&#039; )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.ulanLink( id, label )&lt;br /&gt;
	--P245&#039;s format regex: 500\d{6} (e.g. 500123456)&lt;br /&gt;
	if not id:match( &#039;^500%d%d%d%d%d%d$&#039; ) then&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
	return &#039;[https://www.getty.edu/vow/ULANFullDisplay?find=&amp;amp;role=&amp;amp;nation=&amp;amp;subjectid=&#039;..id..&#039; &#039;..(label or &#039;Artist Names (Getty)&#039;)..&#039;]&#039;..p.getCatForId( &#039;ULAN&#039; )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.uscongressLink( id, label )&lt;br /&gt;
	--P1157&#039;s format regex: [A-Z]00[01]\d{3} (e.g. A000123)&lt;br /&gt;
	if not id:match( &#039;^[A-Z]00[01]%d%d%d$&#039; ) then&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
	return &#039;[http://bioguide.congress.gov/scripts/biodisplay.pl?index=&#039;..id..&#039; &#039;..(label or &#039;US Congress&#039;)..&#039;]&#039;..p.getCatForId( &#039;USCongress&#039; ) --no https as of 9/2019&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.vcbaLink( id, label )&lt;br /&gt;
	--P8034&#039;s format regex: \d{3}\/[1-9]\d{0,5} (e.g. 494/9793)&lt;br /&gt;
	if not id:match( &#039;^%d%d%d\/[1-9]%d?%d?%d?%d?%d?$&#039; ) then&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
	id = id:gsub(&#039;\/&#039;, &#039;_&#039;)&lt;br /&gt;
	return &#039;[https://opac.vatlib.it/auth/detail/&#039;..id..&#039; &#039;..(label or &#039;Vatican&#039;)..&#039;]&#039;..p.getCatForId( &#039;VcBA&#039; )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.viafLink( id, label )&lt;br /&gt;
	--P214&#039;s format regex: [1-9]\d(\d{0,7}|\d{17,20}) (e.g. 123456789, 1234567890123456789012)&lt;br /&gt;
	if not id:match( &#039;^[1-9]%d%d?%d?%d?%d?%d?%d?%d?$&#039; ) and&lt;br /&gt;
	   not id:match( &#039;^[1-9]%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d?%d?%d?$&#039; ) then&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
	-- If the &amp;quot;VIAF&amp;quot; entry at [[:m:Interwiki map]] would resolve to &amp;quot;https://viaf.org/viaf/$1&amp;quot; (rather than &amp;quot;http://viaf.org/viaf/$1&amp;quot;, as it currently still does), the code below could change from &#039;[https://viaf.org/viaf/&#039;..id..&#039; &#039;..id..&#039;]&#039; to &#039;[[:VIAF:&#039;..id..&#039;|&#039;..id..&#039;]]&#039;.&lt;br /&gt;
	return &#039;[https://viaf.org/viaf/&#039;..id..&#039; &#039;..(label or &#039;VIAF&#039;)..&#039;]&#039;..p.getCatForId( &#039;VIAF&#039; )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[[=========================== Helper functions =============================]]&lt;br /&gt;
&lt;br /&gt;
function p.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;
--Returns the ISNI check digit isni must be a string where the 15 first elements are digits, e.g. 0000000066534145&lt;br /&gt;
function p.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&#039;s invalid&lt;br /&gt;
--See http://support.orcid.org/knowledgebase/articles/116780-structure-of-the-orcid-identifier&lt;br /&gt;
function p.validateIsni( id )&lt;br /&gt;
	--P213 (ISNI) format regex: [0-9]{4} [0-9]{4} [0-9]{4} [0-9]{3}[0-9X] (e.g. 0000-0000-6653-4145)&lt;br /&gt;
	--P496 (ORCID) format regex: 0000-000(1-[5-9]|2-[0-9]|3-[0-4])\d{3}-\d{3}[\dX] (e.g. 0000-0002-7398-5483)&lt;br /&gt;
	id = id:gsub( &#039;[ %-]&#039;, &#039;&#039; ):upper()&lt;br /&gt;
	if not id:match( &#039;^%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d[%dX]$&#039; ) then&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
	if p.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;
function p.splitLccn( id )&lt;br /&gt;
	--P244&#039;s format regex: (n|nb|nr|no|ns|sh)([4-9][0-9]|00|20[0-1][0-9])[0-9]{6} (e.g. n78039510)&lt;br /&gt;
	if id:match( &#039;^%l%l?%l?%d%d%d%d%d%d%d%d%d?%d?$&#039; ) then&lt;br /&gt;
		id = id:gsub( &#039;^(%l+)(%d+)(%d%d%d%d%d%d)$&#039;, &#039;%1/%2/%3&#039; )&lt;br /&gt;
	end&lt;br /&gt;
	if id:match( &#039;^%l%l?%l?/%d%d%d?%d?/%d+$&#039; ) then&lt;br /&gt;
		return mw.text.split( id, &#039;/&#039; )&lt;br /&gt;
	end&lt;br /&gt;
	return false&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[[==========================================================================]]&lt;br /&gt;
--[[                    Wikidata &amp;amp; documentation functions                    ]]&lt;br /&gt;
--[[==========================================================================]]&lt;br /&gt;
&lt;br /&gt;
function p.getIdsFromWikidata( itemId, property )&lt;br /&gt;
	local ids = {}&lt;br /&gt;
	local statements = mw.wikibase.getBestStatements( itemId, property )&lt;br /&gt;
	if statements then&lt;br /&gt;
		for _, statement in ipairs( statements ) 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;
	end&lt;br /&gt;
	return ids&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Creates a human-readable standalone wikitable version of p.conf, and tracking categories with page counts, for use in the documentation&lt;br /&gt;
function p.docConfTable( frame )&lt;br /&gt;
	local wikiTable = &#039;{| class=&amp;quot;wikitable sortable&amp;quot;\n&#039;..&lt;br /&gt;
					  &#039;! rowspan=2 | Parameter\n&#039;..&lt;br /&gt;
					  &#039;! rowspan=2 | Section\n&#039;..&lt;br /&gt;
					  &#039;! rowspan=2 | Appears as\n&#039;..&lt;br /&gt;
					  &#039;! rowspan=2; data-sort-type=number | Wikidata property\n&#039;..&lt;br /&gt;
					  &#039;! colspan=4 | Tracking categories and page counts\n&#039;..&lt;br /&gt;
					  &#039;|-\n&#039;..&lt;br /&gt;
					  &#039;! [[:Category:Wikipedia articles with authority control information|&#039;..       &#039;Articles]]\n&#039;..&lt;br /&gt;
					  &#039;! [[:Category:User pages with authority control information|&#039;..               &#039;User pages]]\n&#039;..&lt;br /&gt;
					  &#039;! [[:Category:Miscellaneous pages with authority control information|&#039;..      &#039;Misc. pages]]\n&#039;..&lt;br /&gt;
					  &#039;! [[:Category:Wikipedia articles with faulty authority control information|&#039;..&#039;Faulty IDs]]\n&#039;..&lt;br /&gt;
					  &#039;|-\n&#039;&lt;br /&gt;
	local lang = mw.getContentLanguage()&lt;br /&gt;
	for _, conf in pairs( p.conf ) do&lt;br /&gt;
		local param, pid, section = conf[1], conf[2], conf[4]&lt;br /&gt;
		local appearsAs&lt;br /&gt;
		if param == &amp;quot;WORLDCATID&amp;quot; then&lt;br /&gt;
			-- WorldCat is special&lt;br /&gt;
			appearsAs = &amp;quot;[https://www.worldcat.org/identities/lccn-n78039510 WorldCat]&amp;quot;&lt;br /&gt;
		elseif conf.prefix then&lt;br /&gt;
			appearsAs = conf.prefix&lt;br /&gt;
		else&lt;br /&gt;
			appearsAs = conf[3](conf[5])&lt;br /&gt;
		end&lt;br /&gt;
		local link = conf.link or param .. &#039; (identifier)&#039;&lt;br /&gt;
		local category = conf.category or param&lt;br /&gt;
		local args = { id = &#039;f&#039;, pid }&lt;br /&gt;
		local wpl = frame:expandTemplate{ title = &#039;Wikidata property link&#039;, args = args }&lt;br /&gt;
		--cats&lt;br /&gt;
		local articleCat = &#039;Wikipedia articles with &#039;..category..&#039; identifiers&#039;&lt;br /&gt;
		local userCat =    &#039;User pages with &#039;..category..&#039; identifiers&#039;&lt;br /&gt;
		local miscCat =    &#039;Miscellaneous pages with &#039;..category..&#039; identifiers&#039;&lt;br /&gt;
		local faultyCat =  &#039;Wikipedia articles with faulty &#039;..category..&#039; identifiers&#039;&lt;br /&gt;
		--counts&lt;br /&gt;
		local articleCount = lang:formatNum( mw.site.stats.pagesInCategory(articleCat, &#039;pages&#039;) )&lt;br /&gt;
		local userCount =    lang:formatNum( mw.site.stats.pagesInCategory(userCat, &#039;pages&#039;) )&lt;br /&gt;
		local miscCount =    lang:formatNum( mw.site.stats.pagesInCategory(miscCat, &#039;pages&#039;) )&lt;br /&gt;
		local faultyCount =  lang:formatNum( mw.site.stats.pagesInCategory(faultyCat, &#039;pages&#039;) )&lt;br /&gt;
		&lt;br /&gt;
		--concat&lt;br /&gt;
		wikiTable = wikiTable..&#039;\n&#039;..&lt;br /&gt;
					&#039;|-\n&#039;..&lt;br /&gt;
					&#039;||[[&#039;..link..&#039;|&#039;..param..&#039;]]&#039;..&lt;br /&gt;
					&#039;||&#039;..section..&lt;br /&gt;
					&#039;||&#039;..appearsAs..&lt;br /&gt;
					&#039;||data-sort-value=&#039;..pid..&#039;|&#039;..wpl..&lt;br /&gt;
					&#039;||style=&amp;quot;text-align: right;&amp;quot;|[[:Category:&#039;..articleCat..&#039;|&#039;..articleCount..&#039;]]&#039;..&lt;br /&gt;
					&#039;||style=&amp;quot;text-align: right;&amp;quot;|[[:Category:&#039;..   userCat..&#039;|&#039;..   userCount..&#039;]]&#039;..&lt;br /&gt;
					&#039;||style=&amp;quot;text-align: right;&amp;quot;|[[:Category:&#039;..   miscCat..&#039;|&#039;..   miscCount..&#039;]]&#039;..&lt;br /&gt;
					&#039;||style=&amp;quot;text-align: right;&amp;quot;|[[:Category:&#039;.. faultyCat..&#039;|&#039;.. faultyCount..&#039;]]&#039;&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	--append derivative WorldCat cats&lt;br /&gt;
	local wcd = { &#039;WorldCat-LCCN&#039;, &#039;WorldCat-VIAF&#039; }&lt;br /&gt;
	for _, w in pairs(wcd) do&lt;br /&gt;
		local articleCat = &#039;Wikipedia articles with &#039;..w..&#039; identifiers&#039;&lt;br /&gt;
		local articleCount = lang:formatNum( mw.site.stats.pagesInCategory(articleCat, &#039;pages&#039;) )&lt;br /&gt;
		local appearsAs &lt;br /&gt;
		if w == &amp;quot;WorldCat-LCCN&amp;quot; then&lt;br /&gt;
			appearsAs = &amp;quot;[https://www.worldcat.org/identities/lccn-n79-113947 WorldCat (via Library of Congress)]&amp;quot;&lt;br /&gt;
		else&lt;br /&gt;
			appearsAs = &amp;quot;[https://www.worldcat.org/identities/containsVIAFID/12345789 WorldCat (via VIAF)]&amp;quot;&lt;br /&gt;
		end&lt;br /&gt;
		wikiTable = wikiTable..&#039;\n&#039;..&lt;br /&gt;
					&#039;|-\n&#039;..&lt;br /&gt;
					&#039;||&#039;..&#039;—&#039;..&lt;br /&gt;
					&#039;||General&#039;..&lt;br /&gt;
					&#039;||&#039;..appearsAs..&lt;br /&gt;
					&#039;||data-sort-value=&#039;..w..&#039;|&#039;..&#039;—&#039;..&lt;br /&gt;
					&#039;||style=&amp;quot;text-align: right;&amp;quot;|[[:Category:&#039;..articleCat..&#039;|&#039;..articleCount..&#039;]]&#039;..&lt;br /&gt;
					&#039;||style=&amp;quot;text-align: right;&amp;quot;|—&#039;..&lt;br /&gt;
					&#039;||style=&amp;quot;text-align: right;&amp;quot;|—&#039;..&lt;br /&gt;
					&#039;||style=&amp;quot;text-align: right;&amp;quot;|—&#039;&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	return require(&amp;quot;Module:Suppress categories&amp;quot;).main(wikiTable)..&#039;\n|}&#039;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[[==========================================================================]]&lt;br /&gt;
--[[                              Configuration                               ]]&lt;br /&gt;
--[[==========================================================================]]&lt;br /&gt;
&lt;br /&gt;
-- If a specific &amp;quot;(identifier) redirect&amp;quot; exists for an identifier, please route through this particular redirect rather than linking directly to the target page. This reduces clutter in &amp;quot;What links here&amp;quot; and improves reverse lookup of articles where a manifestation of this particular identifier is used.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Parameter format: { &#039;parameter name&#039;, propertyId # in Wikidata, formatting/validation function, section, example ID for documentation }&lt;br /&gt;
-- Optional named parameters: `link` to override the link in the documentation (defaults to parameter + (identifer)),&lt;br /&gt;
-- category to override the ID in category names (defaults to parameter),&lt;br /&gt;
-- prefix to include a prefix (usually a wikilink explaining what the identifier is) before the external link itself&lt;br /&gt;
p.conf = {&lt;br /&gt;
	{ &#039;AAG&#039;, 3372, p.aagLink, &amp;quot;Art galleries and museums&amp;quot;, &amp;quot;1&amp;quot;},&lt;br /&gt;
	{ &#039;ACM-DL&#039;, 864, p.acmLink, &amp;quot;Scientific databases&amp;quot;, &amp;quot;12345678901&amp;quot;, link=&amp;quot;ACM DL (identifier)&amp;quot;},&lt;br /&gt;
	{ &#039;ADB&#039;, 1907, p.adbLink,&amp;quot;Biographical dictionaries&amp;quot;, &amp;quot;barton-sir-edmund-toby-71&amp;quot;},&lt;br /&gt;
	{ &#039;AGSA&#039;, 6804, p.agsaLink, &amp;quot;Art galleries and museums&amp;quot;, &amp;quot;3625&amp;quot;},&lt;br /&gt;
	{ &#039;autores.uy&#039;, 2558, p.autoresuyLink, &amp;quot;Biographical dictionaries&amp;quot;, &amp;quot;12345&amp;quot;},&lt;br /&gt;
	{ &#039;AWR&#039;, 4186, p.awrLink, &amp;quot;Biographical dictionaries&amp;quot;, &amp;quot;PR00768b&amp;quot;},&lt;br /&gt;
	{ &#039;BIBSYS&#039;, 1015, p.bibsysLink, &amp;quot;National libraries&amp;quot;, &amp;quot;1234567890123&amp;quot;},&lt;br /&gt;
	{ &#039;Bildindex&#039;, 2092, p.bildLink, &amp;quot;Art research institutes&amp;quot;, &amp;quot;1&amp;quot;},&lt;br /&gt;
	{ &#039;BNC&#039;, 1890, p.bncLink, &amp;quot;National libraries&amp;quot;, &amp;quot;123456789&amp;quot;},&lt;br /&gt;
	{ &#039;BNE&#039;, 950, p.bneLink, &amp;quot;National libraries&amp;quot;, &amp;quot;XX1234567&amp;quot;},&lt;br /&gt;
	{ &#039;BNF&#039;, 268, p.bnfLink, &amp;quot;National libraries&amp;quot;, &amp;quot;123456789&amp;quot;},&lt;br /&gt;
	{ &#039;Botanist&#039;, 428, p.botanistLink , &amp;quot;Scientific databases&amp;quot;, &amp;quot;L.&amp;quot;},&lt;br /&gt;
	{ &#039;BPN&#039;, 651, p.bpnLink , &amp;quot;Biographical dictionaries&amp;quot;, &amp;quot;12345678&amp;quot;},&lt;br /&gt;
	{ &#039;CANTIC&#039;, 1273, p.canticLink, &amp;quot;National libraries&amp;quot;, &amp;quot;a12345678&amp;quot;},&lt;br /&gt;
	{ &#039;CINII&#039;, 271, p.ciniiLink, &amp;quot;Scientific databases&amp;quot;, &amp;quot;DA12345678&amp;quot;, link = &amp;quot;CiNii (identifier)&amp;quot;},&lt;br /&gt;
	{ &#039;CWGC&#039;, 1908, p.cwgcLink, &amp;quot;Other&amp;quot;, &amp;quot;1234567&amp;quot;},&lt;br /&gt;
	{ &#039;DAAO&#039;, 1707, p.daaoLink, &amp;quot;Art research institutes&amp;quot;, &amp;quot;rolf-harris&amp;quot;},&lt;br /&gt;
	{ &#039;DBLP&#039;, 2456, p.dblpLink, &amp;quot;Scientific databases&amp;quot;, &amp;quot;123/123&amp;quot;},&lt;br /&gt;
	{ &#039;DIB&#039;,  6829, p.dibLink, &amp;quot;Biographical dictionaries&amp;quot;, &amp;quot;a1234&amp;quot;},&lt;br /&gt;
	{ &#039;DSI&#039;, 2349, p.dsiLink, &amp;quot;Art research institutes&amp;quot;, &amp;quot;1538&amp;quot;},&lt;br /&gt;
	{ &#039;FAST&#039;, 2163, p.fastLink, &amp;quot;Other&amp;quot;, &amp;quot;1&amp;quot;},&lt;br /&gt;
	{ &#039;FNZA&#039;, 6792, p.fnzaLink, &amp;quot;Art research institutes&amp;quot;, &amp;quot;12&amp;quot;},&lt;br /&gt;
	{ &#039;GND&#039;, 227, p.gndLink, &amp;quot;General&amp;quot;, &amp;quot;4079154-3&amp;quot;},&lt;br /&gt;
	{ &#039;HDS&#039;, 902, p.hdsLink, &amp;quot;Other&amp;quot;, &amp;quot;050123&amp;quot;},&lt;br /&gt;
	{ &#039;IAAF&#039;, 1146, p.iaafLink, &amp;quot;Other&amp;quot;, &amp;quot;123&amp;quot;},&lt;br /&gt;
	{ &#039;ICCU&#039;, 396, p.iccuLink, &amp;quot;National libraries&amp;quot;, &amp;quot;IT\\ICCU\\CFIV\\000163&amp;quot;}, --formerly SBN&lt;br /&gt;
	{ &#039;ICIA&#039;, 1736, p.iciaLink, &amp;quot;Art research institutes&amp;quot;, &amp;quot;1&amp;quot;},&lt;br /&gt;
	{ &#039;IEU&#039;, 9070, p.ieuLink, &amp;quot;Other&amp;quot;, &amp;quot;N\\A\\NationalAcademyofArtandArchitecture&amp;quot;},&lt;br /&gt;
	{ &#039;ISNI&#039;, 213, p.isniLink, &amp;quot;General&amp;quot;, &amp;quot;0000-0000-6653-4145&amp;quot;, prefix = &#039;[[ISNI (identifier)|ISNI]]&#039;},&lt;br /&gt;
	{ &#039;Joconde&#039;, 347, p.jocondeLink, &amp;quot;Art research institutes&amp;quot;, &amp;quot;12345678901&amp;quot;},&lt;br /&gt;
	{ &#039;KULTURNAV&#039;, 1248, p.kulturnavLink, &amp;quot;Art research institutes&amp;quot;, &amp;quot;12345678-1234-1234-1234-1234567890AB&amp;quot;, link=&amp;quot;KulturNav (identifier)&amp;quot;},&lt;br /&gt;
	{ &#039;LCCN&#039;, 244, p.lccnLink, &amp;quot;National libraries&amp;quot;, &amp;quot;n78039510&amp;quot;},&lt;br /&gt;
	{ &#039;LIR&#039;, 886, p.lirLink, &amp;quot;Other&amp;quot;, &amp;quot;1&amp;quot;},&lt;br /&gt;
	{ &#039;LNB&#039;, 1368, p.lnbLink, &amp;quot;National libraries&amp;quot;, &amp;quot;123456789&amp;quot;},&lt;br /&gt;
	{ &#039;Léonore&#039;, 640, p.leonoreLink, &amp;quot;Other&amp;quot;, &amp;quot;LH/1/1&amp;quot;, prefix = &amp;quot;[[Léonore (identifier)|Léonore (France)]]&amp;quot;},&lt;br /&gt;
	{ &#039;MA&#039;, 6366, p.maLink, &amp;quot;Other&amp;quot;, &amp;quot;123456789&amp;quot;},&lt;br /&gt;
	{ &#039;MBA&#039;, 434, p.mbaLink, &amp;quot;Other&amp;quot;, &amp;quot;12345678-1234-1234-1234-1234567890AB&amp;quot;, category = &#039;MusicBrainz&#039;}, --special cat name&lt;br /&gt;
	{ &#039;MBAREA&#039;, 982, p.mbareaLink, &amp;quot;Other&amp;quot;, &amp;quot;12345678-1234-1234-1234-1234567890AB&amp;quot;, category = &#039;MusicBrainz area&#039; }, --special cat name&lt;br /&gt;
	{ &#039;MBI&#039;, 1330, p.mbiLink, &amp;quot;Other&amp;quot;, &amp;quot;12345678-1234-1234-1234-1234567890AB&amp;quot;, category = &#039;MusicBrainz instrument&#039; }, --special cat name&lt;br /&gt;
	{ &#039;MBL&#039;, 966, p.mblLink, &amp;quot;Other&amp;quot;, &amp;quot;12345678-1234-1234-1234-1234567890AB&amp;quot;, category = &#039;MusicBrainz label&#039; }, --special cat name&lt;br /&gt;
	{ &#039;MBP&#039;, 1004, p.mbpLink, &amp;quot;Other&amp;quot;, &amp;quot;12345678-1234-1234-1234-1234567890AB&amp;quot;, category = &#039;MusicBrainz place&#039; }, --special cat name&lt;br /&gt;
	{ &#039;MBRG&#039;, 436, p.mbrgLink, &amp;quot;Other&amp;quot;, &amp;quot;12345678-1234-1234-1234-1234567890AB&amp;quot;, category = &#039;MusicBrainz release group&#039; }, --special cat name&lt;br /&gt;
	{ &#039;MBS&#039;, 1407, p.mbsLink, &amp;quot;Other&amp;quot;, &amp;quot;12345678-1234-1234-1234-1234567890AB&amp;quot;, category = &#039;MusicBrainz series&#039; }, --special cat name&lt;br /&gt;
	{ &#039;MBW&#039;,  435, p.mbwLink, &amp;quot;Other&amp;quot;, &amp;quot;12345678-1234-1234-1234-1234567890AB&amp;quot;, category = &#039;MusicBrainz work&#039; }, --special cat name&lt;br /&gt;
	{ &#039;MGP&#039;, 549, p.mgpLink, &amp;quot;Scientific databases&amp;quot;, &amp;quot;123456&amp;quot;},&lt;br /&gt;
	{ &#039;NARA&#039;, 1225, p.naraLink, &amp;quot;Other&amp;quot;, &amp;quot;12345678&amp;quot;},&lt;br /&gt;
	{ &#039;NCL&#039;, 1048, p.nclLink, &amp;quot;National libraries&amp;quot;, &amp;quot;1081436&amp;quot;},&lt;br /&gt;
	{ &#039;NDL&#039;, 349, p.ndlLink, &amp;quot;National libraries&amp;quot;, &amp;quot;012345678&amp;quot;},&lt;br /&gt;
	{ &#039;NGV&#039;, 2041, p.ngvLink, &amp;quot;Art galleries and museums&amp;quot;, &amp;quot;12354&amp;quot;},&lt;br /&gt;
	{ &#039;NKC&#039;, 691, p.nkcLink, &amp;quot;National libraries&amp;quot;, &amp;quot;abcd12345678901234&amp;quot;},&lt;br /&gt;
	{ &#039;NLA&#039;, 409, p.nlaLink, &amp;quot;National libraries&amp;quot;, &amp;quot;123456789012&amp;quot;},&lt;br /&gt;
	{ &#039;NLG&#039;, 3348, p.nlgLink, &amp;quot;National libraries&amp;quot;, &amp;quot;12345678&amp;quot;},&lt;br /&gt;
	{ &#039;NLI&#039;, 949, p.nliLink, &amp;quot;National libraries&amp;quot;, &amp;quot;123456789&amp;quot;},&lt;br /&gt;
	{ &#039;NLK&#039;, 5034, p.nlkLink, &amp;quot;National libraries&amp;quot;, &amp;quot;KAB197000000&amp;quot;},&lt;br /&gt;
	{ &#039;NLP&#039;, 1695, p.nlpLink, &amp;quot;National libraries&amp;quot;, &amp;quot;9810123456789012345&amp;quot;},&lt;br /&gt;
	{ &#039;NLR&#039;, 1003, p.nlrLink, &amp;quot;National libraries&amp;quot;, &amp;quot;123456789&amp;quot;},&lt;br /&gt;
	{ &#039;NSK&#039;, 1375, p.nskLink, &amp;quot;National libraries&amp;quot;, &amp;quot;123456789&amp;quot;},&lt;br /&gt;
	{ &#039;NTA&#039;, 1006, p.ntaLink, &amp;quot;National libraries&amp;quot;, &amp;quot;12345678X&amp;quot;},&lt;br /&gt;
	{ &#039;ORCID&#039;, 496, p.orcidLink, &amp;quot;General&amp;quot;, &amp;quot;0000-0002-7398-5483&amp;quot;, prefix = &#039;[[ORCID (identifier)|ORCID]]&#039;},&lt;br /&gt;
	{ &#039;PIC&#039;, 2750, p.picLink, &amp;quot;Art research institutes&amp;quot;, &amp;quot;1&amp;quot;},&lt;br /&gt;
	{ &#039;PLWABN&#039;,  7293, p.plwabnLink, &amp;quot;National libraries&amp;quot;, &amp;quot;9812345678905606&amp;quot;},&lt;br /&gt;
	{ &#039;Publons&#039;, 3829, p.publonsLink, &amp;quot;Scientific databases&amp;quot;, &amp;quot;2776255&amp;quot;},&lt;br /&gt;
	{ &#039;RID&#039;, 1053, p.ridLink, &amp;quot;Scientific databases&amp;quot;, &amp;quot;A-1234-1934&amp;quot;},&lt;br /&gt;
	{ &#039;RISM&#039;, 5504, p.rismLink, &amp;quot;Other&amp;quot;, &amp;quot;pe1&amp;quot;,  prefix = &#039;[[RISM (identifier)|RISM (France)]]&#039;},&lt;br /&gt;
	{ &#039;RERO&#039;, 3065, p.reroLink, &amp;quot;Other&amp;quot;, &amp;quot;02-A012345678&amp;quot;, prefix = &#039;[[RERO (identifier)|RERO (Switzerland)]]&#039;},&lt;br /&gt;
	{ &#039;RKDartists&#039;, 650, p.rkdartistsLink, &amp;quot;Art research institutes&amp;quot;, &amp;quot;123456&amp;quot;},&lt;br /&gt;
	{ &#039;RKDID&#039;, 350, p.rkdidLink, &amp;quot;Art research institutes&amp;quot;, &amp;quot;123456&amp;quot;},&lt;br /&gt;
	{ &#039;RSL&#039;, 947, p.rslLink, &amp;quot;National libraries&amp;quot;, &amp;quot;123456789&amp;quot;},&lt;br /&gt;
	{ &#039;SELIBR&#039;, 906, p.selibrLink, &amp;quot;National libraries&amp;quot;, &amp;quot;123456&amp;quot;},&lt;br /&gt;
	{ &#039;SIKART&#039;, 781, p.sikartLink, &amp;quot;Art research institutes&amp;quot;, &#039;123456789&#039;},&lt;br /&gt;
	{ &#039;SNAC-ID&#039;, 3430, p.snacLink, &amp;quot;Other&amp;quot;, &amp;quot;A&amp;quot;},&lt;br /&gt;
	{ &#039;SUDOC&#039;, 269, p.sudocLink, &amp;quot;Other&amp;quot;, &amp;quot;026927608&amp;quot;, prefix = &#039;[[SUDOC (identifier)|SUDOC (France)]]&#039;},&lt;br /&gt;
	{ &#039;S2AuthorId&#039;, 4012, p.s2authoridLink, &amp;quot;Scientific databases&amp;quot;, &amp;quot;1796130&amp;quot;, category = &#039;Semantic Scholar author&#039; }, --special cat name&lt;br /&gt;
	{ &#039;TA98&#039;, 1323, p.ta98Link, &amp;quot;Scientific databases&amp;quot;, &amp;quot;A12.3.45.678&amp;quot;},&lt;br /&gt;
	{ &#039;TDVİA&#039;, 7314, p.tdviaLink, &amp;quot;Other&amp;quot;, &amp;quot;asim-b-behdele&amp;quot;},&lt;br /&gt;
	{ &#039;TePapa&#039;, 3544, p.tepapaLink, &amp;quot;Art galleries and museums&amp;quot;, &amp;quot;1&amp;quot;},&lt;br /&gt;
	{ &#039;TLS&#039;,  1362, p.tlsLink, &amp;quot;Other&amp;quot;, &amp;quot;Abcd&amp;quot;},&lt;br /&gt;
	{ &#039;Trove&#039;, 1315, p.troveLink, &amp;quot;Other&amp;quot;, &amp;quot;12345678&amp;quot;, prefix = &#039;[[Trove (identifier)|Trove (Australia)]]&#039;}, --formerly NLA-person&lt;br /&gt;
	{ &#039;UKPARL&#039;, 6213, p.ukparlLink, &amp;quot;Other&amp;quot;, &amp;quot;AQUupyiR&amp;quot;},&lt;br /&gt;
	{ &#039;ULAN&#039;, 245, p.ulanLink, &amp;quot;Art research institutes&amp;quot;, &amp;quot;500123456&amp;quot;},&lt;br /&gt;
	{ &#039;USCongress&#039;, 1157, p.uscongressLink, &amp;quot;Other&amp;quot;, &amp;quot;A000123&amp;quot;, link = &amp;quot;US Congress (identifier)&amp;quot;},&lt;br /&gt;
	{ &#039;VcBA&#039;, 8034, p.vcbaLink, &amp;quot;National libraries&amp;quot;, &amp;quot;494/9793&amp;quot;},&lt;br /&gt;
	{ &#039;VIAF&#039;, 214, p.viafLink, &amp;quot;General&amp;quot;, &amp;quot;123456789&amp;quot;, prefix = &amp;quot;[[VIAF (identifier)|VIAF]]&amp;quot;},&lt;br /&gt;
	{ &#039;WORLDCATID&#039;, 7859, nil, &amp;quot;General&amp;quot;, nil, link = &amp;quot;WorldCat Identities (identifier)&amp;quot;},&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
-- Legitimate aliases to p.conf, for convenience&lt;br /&gt;
-- Format: { &#039;alias&#039;, &#039;parameter name in p.conf&#039; }&lt;br /&gt;
p.aliases = {&lt;br /&gt;
	{ &#039;DNB&#039;, &#039;GND&#039; }, --Deutsche Nationalbibliothek -&amp;gt; Gemeinsame Normdatei&lt;br /&gt;
	{ &#039;Leonore&#039;, &#039;Léonore&#039; }, --alias name without diacritics&lt;br /&gt;
	{ &#039;leonore&#039;, &#039;Léonore&#039; }, --lowercase variant without diacritics&lt;br /&gt;
	{ &#039;MusicBrainz&#039;, &#039;MBA&#039; },&lt;br /&gt;
	{ &#039;MusicBrainz artist&#039;, &#039;MBA&#039; },&lt;br /&gt;
	{ &#039;MusicBrainz label&#039;, &#039;MBL&#039; },&lt;br /&gt;
	{ &#039;MusicBrainz release group&#039;, &#039;MBRG&#039; },&lt;br /&gt;
	{ &#039;MusicBrainz work&#039;, &#039;MBW&#039; },&lt;br /&gt;
	{ &#039;SBN&#039;, &#039;ICCU&#039; }, --SBN alias to be deprecated at a later stage&lt;br /&gt;
	{ &#039;TDVIA&#039;, &#039;TDVİA&#039; }, --alias name without diacritics&lt;br /&gt;
	{ &#039;tdvia&#039;, &#039;TDVİA&#039; }, --lowercase variant without diacritics&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
-- Deprecated aliases to p.conf; tracked in [[Category:Wikipedia articles with deprecated authority control identifiers]]&lt;br /&gt;
-- Format: { &#039;deprecated parameter name&#039;, &#039;replacement parameter name in p.conf&#039; }&lt;br /&gt;
p.deprecated = {&lt;br /&gt;
	{ &#039;GKD&#039;, &#039;GND&#039; },&lt;br /&gt;
	{ &#039;PND&#039;, &#039;GND&#039; },&lt;br /&gt;
	{ &#039;RLS&#039;, &#039;RSL&#039; },	&lt;br /&gt;
	{ &#039;SWD&#039;, &#039;GND&#039; },&lt;br /&gt;
	{ &#039;NARA-organization&#039;, &#039;NARA&#039; },&lt;br /&gt;
	{ &#039;NARA-person&#039;, &#039;NARA&#039; },&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
--[[==========================================================================]]&lt;br /&gt;
--[[                                   Main                                   ]]&lt;br /&gt;
--[[==========================================================================]]&lt;br /&gt;
&lt;br /&gt;
function p.authorityControl( frame )&lt;br /&gt;
	local resolveEntity = require( &amp;quot;Module:ResolveEntityId&amp;quot; )&lt;br /&gt;
	local parentArgs = frame:getParent().args --WD IDs added here later&lt;br /&gt;
	local iParentArgs = 0 --count original/manual parent args only later&lt;br /&gt;
	local worldcatCat = &#039;&#039;&lt;br /&gt;
	local multipleIdCat = &#039;&#039;&lt;br /&gt;
	local suppressedIdCat = &#039;&#039;&lt;br /&gt;
	local deprecatedIdCat = &#039;&#039;&lt;br /&gt;
	local differentOnWDCat = &#039;&#039;&lt;br /&gt;
	local sameOnWDCat = &#039;&#039;&lt;br /&gt;
	&lt;br /&gt;
	--Redirect aliases to proper parameter names&lt;br /&gt;
	for _, a in pairs( p.aliases ) do&lt;br /&gt;
		local alias, param = a[1], a[2]&lt;br /&gt;
		if (parentArgs[param] == nil or parentArgs[param] == &#039;&#039;) and parentArgs[alias] then&lt;br /&gt;
			parentArgs[param] = parentArgs[alias]&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	--Redirect deprecated parameters to proper parameter names, and assign tracking cat&lt;br /&gt;
	for _, d in pairs( p.deprecated ) do&lt;br /&gt;
		local dep, param = d[1], d[2]&lt;br /&gt;
		if (parentArgs[param] == nil or parentArgs[param] == &#039;&#039;) and parentArgs[dep] then&lt;br /&gt;
			parentArgs[param] = parentArgs[dep]&lt;br /&gt;
			if namespace == 0 then&lt;br /&gt;
				deprecatedIdCat = &#039;[[Category:Wikipedia articles with deprecated authority control identifiers|&#039;..dep..&#039;]]&#039;&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	--Use QID= parameter for testing/example purposes only&lt;br /&gt;
	local itemId = nil&lt;br /&gt;
	if namespace ~= 0 then&lt;br /&gt;
		local qid = parentArgs[&#039;qid&#039;] or parentArgs[&#039;QID&#039;]&lt;br /&gt;
		if qid then&lt;br /&gt;
			itemId = &#039;Q&#039;..mw.ustring.gsub(qid, &#039;^[Qq]&#039;, &#039;&#039;)&lt;br /&gt;
			itemId = resolveEntity._id(itemId) --nil if unresolvable&lt;br /&gt;
		end&lt;br /&gt;
	else&lt;br /&gt;
		itemId = mw.wikibase.getEntityIdForCurrentPage()&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	--Wikidata fallback if available&lt;br /&gt;
	if itemId then&lt;br /&gt;
		local iMatches = 0&lt;br /&gt;
		for _, params in ipairs( p.conf ) do&lt;br /&gt;
			if params[2] &amp;gt; 0 then&lt;br /&gt;
				local val = parentArgs[mw.ustring.lower(params[1])] or parentArgs[params[1]]&lt;br /&gt;
				if val == nil or val == &#039;&#039; then&lt;br /&gt;
					local wikidataIds = p.getIdsFromWikidata( itemId, &#039;P&#039;..params[2] )&lt;br /&gt;
					if wikidataIds[1] then&lt;br /&gt;
						if val == &#039;&#039; and (namespace == 0 or testcases) then&lt;br /&gt;
							suppressedIdCat = &#039;[[Category:Wikipedia articles with suppressed authority control identifiers|&#039;..params[1]..&#039;]]&#039;&lt;br /&gt;
						else&lt;br /&gt;
							parentArgs[params[1]] = wikidataIds[1] --add ID from WD&lt;br /&gt;
						end&lt;br /&gt;
					end&lt;br /&gt;
				else&lt;br /&gt;
					iParentArgs = iParentArgs + 1&lt;br /&gt;
					local wikidataIds = p.getIdsFromWikidata( itemId, &#039;P&#039;..params[2] )&lt;br /&gt;
					if wikidataIds[1] and differentOnWDCat == &#039;&#039; then&lt;br /&gt;
						local bMatch = false&lt;br /&gt;
						for _, wd in pairs( wikidataIds ) do&lt;br /&gt;
							if val == wd then&lt;br /&gt;
								iMatches = iMatches + 1&lt;br /&gt;
								bMatch = true&lt;br /&gt;
							end&lt;br /&gt;
						end&lt;br /&gt;
						if bMatch == false then&lt;br /&gt;
							differentOnWDCat = &#039;[[Category:Pages using authority control with parameters different on Wikidata|&#039;..params[1]..&#039;]]&#039;&lt;br /&gt;
		end	end	end	end	end&lt;br /&gt;
		if iMatches &amp;gt; 0 and iMatches == iParentArgs then&lt;br /&gt;
			sameOnWDCat = &#039;[[Category:Pages using authority control with parameters all matching Wikidata]]&#039;&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	--Configured rows&lt;br /&gt;
	local rct = 0&lt;br /&gt;
	local sectionOrder = {&amp;quot;General&amp;quot;,&amp;quot;National libraries&amp;quot;,&amp;quot;Art galleries and museums&amp;quot;,&lt;br /&gt;
						  &amp;quot;Art research institutes&amp;quot;,&amp;quot;Biographical dictionaries&amp;quot;,&amp;quot;Scientific databases&amp;quot;,&lt;br /&gt;
						  &amp;quot;Other&amp;quot;}&lt;br /&gt;
	local sections = {&lt;br /&gt;
		[&amp;quot;General&amp;quot;] = {},&lt;br /&gt;
		[&amp;quot;National libraries&amp;quot;] = {},&lt;br /&gt;
		[&amp;quot;Art galleries and museums&amp;quot;] = {},&lt;br /&gt;
		[&amp;quot;Art research institutes&amp;quot;] = {},&lt;br /&gt;
		[&amp;quot;Biographical dictionaries&amp;quot;] = {},&lt;br /&gt;
		[&amp;quot;Scientific databases&amp;quot;] = {},&lt;br /&gt;
		[&amp;quot;Other&amp;quot;] = {}&lt;br /&gt;
	}&lt;br /&gt;
	-- Don&#039;t show NLP is PLWABN is present, since they both go to the National Library of Poland&lt;br /&gt;
	-- and the library has deprecated NLP IDs in favor of PLWABN IDs&lt;br /&gt;
	if parentArgs.PLWABN or parentArgs.plwabn then&lt;br /&gt;
		parentArgs.NLP = &#039;&#039;&lt;br /&gt;
		parentArgs.nlp = &#039;&#039;&lt;br /&gt;
	end&lt;br /&gt;
	for _, params in ipairs( p.conf ) do&lt;br /&gt;
		local val = parentArgs[mw.ustring.lower(params[1])] or parentArgs[params[1]]&lt;br /&gt;
		local tval, tlinks = {}, {} --init tables&lt;br /&gt;
		if val and val ~= &#039;&#039; and type(params[3]) == &#039;function&#039; then&lt;br /&gt;
			table.insert( tval, val )&lt;br /&gt;
			if params.prefix then &lt;br /&gt;
				table.insert( tlinks, params[3]( val, &amp;quot;1&amp;quot; ) )&lt;br /&gt;
			else&lt;br /&gt;
				table.insert( tlinks, params[3]( val ) )&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
		--collect other unique vals (IDs) from WD, if present&lt;br /&gt;
		if itemId and tval[1] then&lt;br /&gt;
			local nextIdVal = 2&lt;br /&gt;
			local wikidataIds = p.getIdsFromWikidata( itemId, &#039;P&#039;..params[2] )&lt;br /&gt;
			for _, v in pairs( wikidataIds ) do&lt;br /&gt;
				local bnew = true&lt;br /&gt;
				for _, w in pairs( tval ) do&lt;br /&gt;
					if v == w then bnew = false end&lt;br /&gt;
				end&lt;br /&gt;
				if bnew then&lt;br /&gt;
					table.insert( tval, v )&lt;br /&gt;
					table.insert( tlinks, params[3]( v, tostring(nextIdVal) ) )&lt;br /&gt;
					nextIdVal = nextIdVal + 1&lt;br /&gt;
				end&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
		--assemble&lt;br /&gt;
		if tval[1] then&lt;br /&gt;
			table.insert( sections[params[4]], p.createRow( params[1], tval, nil, tlinks, true, params.category, params.prefix) )&lt;br /&gt;
			rct = rct + 1&lt;br /&gt;
			if tval[2] then&lt;br /&gt;
				multipleIdCat = p.getCatForId( &#039;multiple&#039; )&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	--WorldCat&lt;br /&gt;
	local worldcatId = parentArgs[&#039;worldcatid&#039;] or parentArgs[&#039;WORLDCATID&#039;]&lt;br /&gt;
	if worldcatId and worldcatId ~= &#039;&#039; then --if WORLDCATID present &amp;amp; unsuppressed&lt;br /&gt;
		table.insert( sections[&amp;quot;General&amp;quot;], p.createRow( &#039;WORLDCATID&#039;, worldcatId, &#039;[https://www.worldcat.org/identities/&#039;..mw.uri.encode(worldcatId, &#039;PATH&#039;)..&#039; WorldCat]&#039;, nil, false ) ) --Validation?&lt;br /&gt;
		worldcatCat = p.getCatForId( &#039;WORLDCATID&#039; )&lt;br /&gt;
		rct = rct + 1&lt;br /&gt;
	elseif worldcatId == nil then --if WORLDCATID absent but unsuppressed&lt;br /&gt;
		local viafId = parentArgs[&#039;viaf&#039;] or parentArgs[&#039;VIAF&#039;]&lt;br /&gt;
		local lccnId = parentArgs[&#039;lccn&#039;] or parentArgs[&#039;LCCN&#039;]&lt;br /&gt;
		if viafId and viafId ~= &#039;&#039; and p.viafLink( viafId ) then --VIAF must be present, unsuppressed, &amp;amp; validated&lt;br /&gt;
			table.insert( sections[&amp;quot;General&amp;quot;], p.createRow( &#039;VIAF&#039;, viafId, &#039;[https://www.worldcat.org/identities/containsVIAFID/&#039;..viafId..&#039; WorldCat (via VIAF)]&#039;, nil, false ) )&lt;br /&gt;
			if namespace == 0 then &lt;br /&gt;
				worldcatCat = &#039;[[Category:Wikipedia articles with WorldCat-VIAF identifiers]]&#039;&lt;br /&gt;
			end&lt;br /&gt;
			rct = rct + 1&lt;br /&gt;
		elseif lccnId and lccnId ~= &#039;&#039; and p.lccnLink( lccnId ) then --LCCN must be present, unsuppressed, &amp;amp; validated&lt;br /&gt;
			local lccnParts = p.splitLccn( lccnId )&lt;br /&gt;
			if lccnParts and lccnParts[1] ~= &#039;sh&#039; then&lt;br /&gt;
				local lccnIdFmtd = lccnParts[1]..lccnParts[2]..&#039;-&#039;..lccnParts[3]&lt;br /&gt;
				table.insert( sections[&amp;quot;General&amp;quot;], p.createRow( &#039;LCCN&#039;, lccnId, &#039;[https://www.worldcat.org/identities/lccn-&#039;..lccnIdFmtd..&#039; WorldCat (via Library of Congress)]&#039;, nil, false ) )&lt;br /&gt;
				if namespace == 0 then&lt;br /&gt;
					worldcatCat = &#039;[[Category:Wikipedia articles with WorldCat-LCCN identifiers]]&#039;&lt;br /&gt;
				end&lt;br /&gt;
			end&lt;br /&gt;
			rct = rct + 1&lt;br /&gt;
		end&lt;br /&gt;
	elseif worldcatId == &#039;&#039; then --if WORLDCATID suppressed&lt;br /&gt;
		suppressedIdCat = &#039;[[Category:Wikipedia articles with suppressed authority control identifiers|WORLDCATID]]&#039;&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	local Navbox = require(&#039;Module:Navbox&#039;)&lt;br /&gt;
	local elementsCat = &#039;&#039;&lt;br /&gt;
	if rct == 0 or rct &amp;gt;= 25 then&lt;br /&gt;
		local eCat = &#039;AC with &#039;..rct..&#039; elements&#039;&lt;br /&gt;
		elementsCat  = &#039;[[Category:&#039;..eCat..&#039;]]&#039;..p.redCatLink(eCat)&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	local outString = &#039;&#039;&lt;br /&gt;
	if rct &amp;gt; 0 then&lt;br /&gt;
		local sectionID = 1&lt;br /&gt;
		local args = { pid = &#039;identifiers&#039; } -- #target the list of identifiers&lt;br /&gt;
		if testcases and itemId then args = { pid = &#039;identifiers&#039;, qid = itemId } end --expensive&lt;br /&gt;
		local pencil = frame:expandTemplate{ title = &#039;EditAtWikidata&#039;, args = args}&lt;br /&gt;
		local navboxArgs = {&lt;br /&gt;
			name  = &#039;Authority control&#039;,&lt;br /&gt;
			navboxclass = &#039;authority-control&#039;,&lt;br /&gt;
			bodyclass = &#039;hlist&#039;,&lt;br /&gt;
			state = parentArgs.state or &#039;autocollapse&#039;,&lt;br /&gt;
			navbar = &#039;off&#039;&lt;br /&gt;
		}&lt;br /&gt;
		for _, sectName in ipairs(sectionOrder) do&lt;br /&gt;
			if #sections[sectName] ~= 0 then&lt;br /&gt;
				navboxArgs[&amp;quot;group&amp;quot; .. sectionID] = sectName&lt;br /&gt;
				navboxArgs[&amp;quot;list&amp;quot; .. sectionID] = table.concat(sections[sectName])&lt;br /&gt;
				sectionID = sectionID + 1&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
		if navboxArgs.group2 then&lt;br /&gt;
			navboxArgs.title = &amp;quot;[[Help:Authority control|Authority control]]&amp;quot; .. pencil&lt;br /&gt;
		else&lt;br /&gt;
			local sect = navboxArgs.group1&lt;br /&gt;
			if sect == &amp;quot;General&amp;quot; or sect == &amp;quot;Other&amp;quot; then&lt;br /&gt;
				-- Just say &amp;quot;Authority control&amp;quot; with no label if only general or only other IDs are present&lt;br /&gt;
				-- since &amp;quot;general&amp;quot; is redundant and &amp;quot;other&amp;quot; is silly when there&#039;s nothing to contrast it with&lt;br /&gt;
				navboxArgs.group1 = &amp;quot;[[Help:Authority control|Authority control]]&amp;quot; .. pencil&lt;br /&gt;
			else &lt;br /&gt;
				navboxArgs.group1 = &amp;quot;[[Help:Authority control|Authority control: &amp;quot; .. sect .. &amp;quot;]] &amp;quot; .. pencil&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
		outString = Navbox._navbox(navboxArgs)&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	local auxCats = worldcatCat .. elementsCat .. multipleIdCat .. suppressedIdCat .. &lt;br /&gt;
					deprecatedIdCat .. differentOnWDCat .. sameOnWDCat&lt;br /&gt;
	if testcases then&lt;br /&gt;
		auxCats = mw.ustring.gsub(auxCats, &#039;(%[%[)(Category)&#039;, &#039;%1:%2&#039;) --for easier checking&lt;br /&gt;
	end&lt;br /&gt;
	outString = outString .. auxCats&lt;br /&gt;
	if namespace ~= 0 then&lt;br /&gt;
		outString = mw.ustring.gsub(outString, &#039;(%[%[)(Category:Wikipedia articles)&#039;, &#039;%1:%2&#039;) --by definition&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	return outString&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>User</name></author>
	</entry>
	<entry>
		<id>https://shreloaded.net/index.php?title=Module:Yesno&amp;diff=64329</id>
		<title>Module:Yesno</title>
		<link rel="alternate" type="text/html" href="https://shreloaded.net/index.php?title=Module:Yesno&amp;diff=64329"/>
		<updated>2021-08-09T10:23:31Z</updated>

		<summary type="html">&lt;p&gt;User: 1 revision imported&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) == &#039;string&#039; 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 == &#039;yes&#039;&lt;br /&gt;
		or val == &#039;y&#039;&lt;br /&gt;
		or val == &#039;true&#039;&lt;br /&gt;
		or val == &#039;t&#039;&lt;br /&gt;
		or val == &#039;on&#039;&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 == &#039;no&#039;&lt;br /&gt;
		or val == &#039;n&#039;&lt;br /&gt;
		or val == &#039;false&#039;&lt;br /&gt;
		or val == &#039;f&#039;&lt;br /&gt;
		or val == &#039;off&#039;&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>User</name></author>
	</entry>
	<entry>
		<id>https://shreloaded.net/index.php?title=Module:Arguments&amp;diff=64327</id>
		<title>Module:Arguments</title>
		<link rel="alternate" type="text/html" href="https://shreloaded.net/index.php?title=Module:Arguments&amp;diff=64327"/>
		<updated>2021-08-09T10:23:31Z</updated>

		<summary type="html">&lt;p&gt;User: 1 revision imported&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;-- This module provides easy processing of arguments passed to Scribunto from&lt;br /&gt;
-- #invoke. It is intended for use by other Lua modules, and should not be&lt;br /&gt;
-- called from #invoke directly.&lt;br /&gt;
&lt;br /&gt;
local libraryUtil = require(&#039;libraryUtil&#039;)&lt;br /&gt;
local checkType = libraryUtil.checkType&lt;br /&gt;
&lt;br /&gt;
local arguments = {}&lt;br /&gt;
&lt;br /&gt;
-- Generate four different tidyVal functions, so that we don&#039;t have to check the&lt;br /&gt;
-- options every time we call it.&lt;br /&gt;
&lt;br /&gt;
local function tidyValDefault(key, val)&lt;br /&gt;
	if type(val) == &#039;string&#039; then&lt;br /&gt;
		val = val:match(&#039;^%s*(.-)%s*$&#039;)&lt;br /&gt;
		if val == &#039;&#039; then&lt;br /&gt;
			return nil&lt;br /&gt;
		else&lt;br /&gt;
			return val&lt;br /&gt;
		end&lt;br /&gt;
	else&lt;br /&gt;
		return val&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function tidyValTrimOnly(key, val)&lt;br /&gt;
	if type(val) == &#039;string&#039; then&lt;br /&gt;
		return val:match(&#039;^%s*(.-)%s*$&#039;)&lt;br /&gt;
	else&lt;br /&gt;
		return val&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function tidyValRemoveBlanksOnly(key, val)&lt;br /&gt;
	if type(val) == &#039;string&#039; then&lt;br /&gt;
		if val:find(&#039;%S&#039;) then&lt;br /&gt;
			return val&lt;br /&gt;
		else&lt;br /&gt;
			return nil&lt;br /&gt;
		end&lt;br /&gt;
	else&lt;br /&gt;
		return val&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function tidyValNoChange(key, val)&lt;br /&gt;
	return val&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function matchesTitle(given, title)&lt;br /&gt;
	local tp = type( given )&lt;br /&gt;
	return (tp == &#039;string&#039; or tp == &#039;number&#039;) and mw.title.new( given ).prefixedText == title&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local translate_mt = { __index = function(t, k) return k end }&lt;br /&gt;
&lt;br /&gt;
function arguments.getArgs(frame, options)&lt;br /&gt;
	checkType(&#039;getArgs&#039;, 1, frame, &#039;table&#039;, true)&lt;br /&gt;
	checkType(&#039;getArgs&#039;, 2, options, &#039;table&#039;, true)&lt;br /&gt;
	frame = frame or {}&lt;br /&gt;
	options = options or {}&lt;br /&gt;
&lt;br /&gt;
	--[[&lt;br /&gt;
	-- Set up argument translation.&lt;br /&gt;
	--]]&lt;br /&gt;
	options.translate = options.translate or {}&lt;br /&gt;
	if getmetatable(options.translate) == nil then&lt;br /&gt;
		setmetatable(options.translate, translate_mt)&lt;br /&gt;
	end&lt;br /&gt;
	if options.backtranslate == nil then&lt;br /&gt;
		options.backtranslate = {}&lt;br /&gt;
		for k,v in pairs(options.translate) do&lt;br /&gt;
			options.backtranslate[v] = k&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	if options.backtranslate and getmetatable(options.backtranslate) == nil then&lt;br /&gt;
		setmetatable(options.backtranslate, {&lt;br /&gt;
			__index = function(t, k)&lt;br /&gt;
				if options.translate[k] ~= k then&lt;br /&gt;
					return nil&lt;br /&gt;
				else&lt;br /&gt;
					return k&lt;br /&gt;
				end&lt;br /&gt;
			end&lt;br /&gt;
		})&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	--[[&lt;br /&gt;
	-- Get the argument tables. If we were passed a valid frame object, get the&lt;br /&gt;
	-- frame arguments (fargs) and the parent frame arguments (pargs), depending&lt;br /&gt;
	-- on the options set and on the parent frame&#039;s availability. If we weren&#039;t&lt;br /&gt;
	-- passed a valid frame object, we are being called from another Lua module&lt;br /&gt;
	-- or from the debug console, so assume that we were passed a table of args&lt;br /&gt;
	-- directly, and assign it to a new variable (luaArgs).&lt;br /&gt;
	--]]&lt;br /&gt;
	local fargs, pargs, luaArgs&lt;br /&gt;
	if type(frame.args) == &#039;table&#039; and type(frame.getParent) == &#039;function&#039; then&lt;br /&gt;
		if options.wrappers then&lt;br /&gt;
			--[[&lt;br /&gt;
			-- The wrappers option makes Module:Arguments look up arguments in&lt;br /&gt;
			-- either the frame argument table or the parent argument table, but&lt;br /&gt;
			-- not both. This means that users can use either the #invoke syntax&lt;br /&gt;
			-- or a wrapper template without the loss of performance associated&lt;br /&gt;
			-- with looking arguments up in both the frame and the parent frame.&lt;br /&gt;
			-- Module:Arguments will look up arguments in the parent frame&lt;br /&gt;
			-- if it finds the parent frame&#039;s title in options.wrapper;&lt;br /&gt;
			-- otherwise it will look up arguments in the frame object passed&lt;br /&gt;
			-- to getArgs.&lt;br /&gt;
			--]]&lt;br /&gt;
			local parent = frame:getParent()&lt;br /&gt;
			if not parent then&lt;br /&gt;
				fargs = frame.args&lt;br /&gt;
			else&lt;br /&gt;
				local title = parent:getTitle():gsub(&#039;/sandbox$&#039;, &#039;&#039;)&lt;br /&gt;
				local found = false&lt;br /&gt;
				if matchesTitle(options.wrappers, title) then&lt;br /&gt;
					found = true&lt;br /&gt;
				elseif type(options.wrappers) == &#039;table&#039; then&lt;br /&gt;
					for _,v in pairs(options.wrappers) do&lt;br /&gt;
						if matchesTitle(v, title) then&lt;br /&gt;
							found = true&lt;br /&gt;
							break&lt;br /&gt;
						end&lt;br /&gt;
					end&lt;br /&gt;
				end&lt;br /&gt;
&lt;br /&gt;
				-- We test for false specifically here so that nil (the default) acts like true.&lt;br /&gt;
				if found or options.frameOnly == false then&lt;br /&gt;
					pargs = parent.args&lt;br /&gt;
				end&lt;br /&gt;
				if not found or options.parentOnly == false then&lt;br /&gt;
					fargs = frame.args&lt;br /&gt;
				end&lt;br /&gt;
			end&lt;br /&gt;
		else&lt;br /&gt;
			-- options.wrapper isn&#039;t set, so check the other options.&lt;br /&gt;
			if not options.parentOnly then&lt;br /&gt;
				fargs = frame.args&lt;br /&gt;
			end&lt;br /&gt;
			if not options.frameOnly then&lt;br /&gt;
				local parent = frame:getParent()&lt;br /&gt;
				pargs = parent and parent.args or nil&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
		if options.parentFirst then&lt;br /&gt;
			fargs, pargs = pargs, fargs&lt;br /&gt;
		end&lt;br /&gt;
	else&lt;br /&gt;
		luaArgs = frame&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Set the order of precedence of the argument tables. If the variables are&lt;br /&gt;
	-- nil, nothing will be added to the table, which is how we avoid clashes&lt;br /&gt;
	-- between the frame/parent args and the Lua args.&lt;br /&gt;
	local argTables = {fargs}&lt;br /&gt;
	argTables[#argTables + 1] = pargs&lt;br /&gt;
	argTables[#argTables + 1] = luaArgs&lt;br /&gt;
&lt;br /&gt;
	--[[&lt;br /&gt;
	-- Generate the tidyVal function. If it has been specified by the user, we&lt;br /&gt;
	-- use that; if not, we choose one of four functions depending on the&lt;br /&gt;
	-- options chosen. This is so that we don&#039;t have to call the options table&lt;br /&gt;
	-- every time the function is called.&lt;br /&gt;
	--]]&lt;br /&gt;
	local tidyVal = options.valueFunc&lt;br /&gt;
	if tidyVal then&lt;br /&gt;
		if type(tidyVal) ~= &#039;function&#039; then&lt;br /&gt;
			error(&lt;br /&gt;
				&amp;quot;bad value assigned to option &#039;valueFunc&#039;&amp;quot;&lt;br /&gt;
					.. &#039;(function expected, got &#039;&lt;br /&gt;
					.. type(tidyVal)&lt;br /&gt;
					.. &#039;)&#039;,&lt;br /&gt;
				2&lt;br /&gt;
			)&lt;br /&gt;
		end&lt;br /&gt;
	elseif options.trim ~= false then&lt;br /&gt;
		if options.removeBlanks ~= false then&lt;br /&gt;
			tidyVal = tidyValDefault&lt;br /&gt;
		else&lt;br /&gt;
			tidyVal = tidyValTrimOnly&lt;br /&gt;
		end&lt;br /&gt;
	else&lt;br /&gt;
		if options.removeBlanks ~= false then&lt;br /&gt;
			tidyVal = tidyValRemoveBlanksOnly&lt;br /&gt;
		else&lt;br /&gt;
			tidyVal = tidyValNoChange&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	--[[&lt;br /&gt;
	-- Set up the args, metaArgs and nilArgs tables. args will be the one&lt;br /&gt;
	-- accessed from functions, and metaArgs will hold the actual arguments. Nil&lt;br /&gt;
	-- arguments are memoized in nilArgs, and the metatable connects all of them&lt;br /&gt;
	-- together.&lt;br /&gt;
	--]]&lt;br /&gt;
	local args, metaArgs, nilArgs, metatable = {}, {}, {}, {}&lt;br /&gt;
	setmetatable(args, metatable)&lt;br /&gt;
&lt;br /&gt;
	local function mergeArgs(tables)&lt;br /&gt;
		--[[&lt;br /&gt;
		-- Accepts multiple tables as input and merges their keys and values&lt;br /&gt;
		-- into one table. If a value is already present it is not overwritten;&lt;br /&gt;
		-- tables listed earlier have precedence. We are also memoizing nil&lt;br /&gt;
		-- values, which can be overwritten if they are &#039;s&#039; (soft).&lt;br /&gt;
		--]]&lt;br /&gt;
		for _, t in ipairs(tables) do&lt;br /&gt;
			for key, val in pairs(t) do&lt;br /&gt;
				if metaArgs[key] == nil and nilArgs[key] ~= &#039;h&#039; then&lt;br /&gt;
					local tidiedVal = tidyVal(key, val)&lt;br /&gt;
					if tidiedVal == nil then&lt;br /&gt;
						nilArgs[key] = &#039;s&#039;&lt;br /&gt;
					else&lt;br /&gt;
						metaArgs[key] = tidiedVal&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;
	--[[&lt;br /&gt;
	-- Define metatable behaviour. Arguments are memoized in the metaArgs table,&lt;br /&gt;
	-- and are only fetched from the argument tables once. Fetching arguments&lt;br /&gt;
	-- from the argument tables is the most resource-intensive step in this&lt;br /&gt;
	-- module, so we try and avoid it where possible. For this reason, nil&lt;br /&gt;
	-- arguments are also memoized, in the nilArgs table. Also, we keep a record&lt;br /&gt;
	-- in the metatable of when pairs and ipairs have been called, so we do not&lt;br /&gt;
	-- run pairs and ipairs on the argument tables more than once. We also do&lt;br /&gt;
	-- not run ipairs on fargs and pargs if pairs has already been run, as all&lt;br /&gt;
	-- the arguments will already have been copied over.&lt;br /&gt;
	--]]&lt;br /&gt;
&lt;br /&gt;
	metatable.__index = function (t, key)&lt;br /&gt;
		--[[&lt;br /&gt;
		-- Fetches an argument when the args table is indexed. First we check&lt;br /&gt;
		-- to see if the value is memoized, and if not we try and fetch it from&lt;br /&gt;
		-- the argument tables. When we check memoization, we need to check&lt;br /&gt;
		-- metaArgs before nilArgs, as both can be non-nil at the same time.&lt;br /&gt;
		-- If the argument is not present in metaArgs, we also check whether&lt;br /&gt;
		-- pairs has been run yet. If pairs has already been run, we return nil.&lt;br /&gt;
		-- This is because all the arguments will have already been copied into&lt;br /&gt;
		-- metaArgs by the mergeArgs function, meaning that any other arguments&lt;br /&gt;
		-- must be nil.&lt;br /&gt;
		--]]&lt;br /&gt;
		if type(key) == &#039;string&#039; then&lt;br /&gt;
			key = options.translate[key]&lt;br /&gt;
		end&lt;br /&gt;
		local val = metaArgs[key]&lt;br /&gt;
		if val ~= nil then&lt;br /&gt;
			return val&lt;br /&gt;
		elseif metatable.donePairs or nilArgs[key] then&lt;br /&gt;
			return nil&lt;br /&gt;
		end&lt;br /&gt;
		for _, argTable in ipairs(argTables) do&lt;br /&gt;
			local argTableVal = tidyVal(key, argTable[key])&lt;br /&gt;
			if argTableVal ~= nil then&lt;br /&gt;
				metaArgs[key] = argTableVal&lt;br /&gt;
				return argTableVal&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
		nilArgs[key] = &#039;h&#039;&lt;br /&gt;
		return nil&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	metatable.__newindex = function (t, key, val)&lt;br /&gt;
		-- This function is called when a module tries to add a new value to the&lt;br /&gt;
		-- args table, or tries to change an existing value.&lt;br /&gt;
		if type(key) == &#039;string&#039; then&lt;br /&gt;
			key = options.translate[key]&lt;br /&gt;
		end&lt;br /&gt;
		if options.readOnly then&lt;br /&gt;
			error(&lt;br /&gt;
				&#039;could not write to argument table key &amp;quot;&#039;&lt;br /&gt;
					.. tostring(key)&lt;br /&gt;
					.. &#039;&amp;quot;; the table is read-only&#039;,&lt;br /&gt;
				2&lt;br /&gt;
			)&lt;br /&gt;
		elseif options.noOverwrite and args[key] ~= nil then&lt;br /&gt;
			error(&lt;br /&gt;
				&#039;could not write to argument table key &amp;quot;&#039;&lt;br /&gt;
					.. tostring(key)&lt;br /&gt;
					.. &#039;&amp;quot;; overwriting existing arguments is not permitted&#039;,&lt;br /&gt;
				2&lt;br /&gt;
			)&lt;br /&gt;
		elseif val == nil then&lt;br /&gt;
			--[[&lt;br /&gt;
			-- If the argument is to be overwritten with nil, we need to erase&lt;br /&gt;
			-- the value in metaArgs, so that __index, __pairs and __ipairs do&lt;br /&gt;
			-- not use a previous existing value, if present; and we also need&lt;br /&gt;
			-- to memoize the nil in nilArgs, so that the value isn&#039;t looked&lt;br /&gt;
			-- up in the argument tables if it is accessed again.&lt;br /&gt;
			--]]&lt;br /&gt;
			metaArgs[key] = nil&lt;br /&gt;
			nilArgs[key] = &#039;h&#039;&lt;br /&gt;
		else&lt;br /&gt;
			metaArgs[key] = val&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local function translatenext(invariant)&lt;br /&gt;
		local k, v = next(invariant.t, invariant.k)&lt;br /&gt;
		invariant.k = k&lt;br /&gt;
		if k == nil then&lt;br /&gt;
			return nil&lt;br /&gt;
		elseif type(k) ~= &#039;string&#039; or not options.backtranslate then&lt;br /&gt;
			return k, v&lt;br /&gt;
		else&lt;br /&gt;
			local backtranslate = options.backtranslate[k]&lt;br /&gt;
			if backtranslate == nil then&lt;br /&gt;
				-- Skip this one. This is a tail call, so this won&#039;t cause stack overflow&lt;br /&gt;
				return translatenext(invariant)&lt;br /&gt;
			else&lt;br /&gt;
				return backtranslate, v&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	metatable.__pairs = function ()&lt;br /&gt;
		-- Called when pairs is run on the args table.&lt;br /&gt;
		if not metatable.donePairs then&lt;br /&gt;
			mergeArgs(argTables)&lt;br /&gt;
			metatable.donePairs = true&lt;br /&gt;
		end&lt;br /&gt;
		return translatenext, { t = metaArgs }&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local function inext(t, i)&lt;br /&gt;
		-- This uses our __index metamethod&lt;br /&gt;
		local v = t[i + 1]&lt;br /&gt;
		if v ~= nil then&lt;br /&gt;
			return i + 1, v&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	metatable.__ipairs = function (t)&lt;br /&gt;
		-- Called when ipairs is run on the args table.&lt;br /&gt;
		return inext, t, 0&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	return args&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return arguments&lt;/div&gt;</summary>
		<author><name>User</name></author>
	</entry>
	<entry>
		<id>https://shreloaded.net/index.php?title=Module:Navbox&amp;diff=64325</id>
		<title>Module:Navbox</title>
		<link rel="alternate" type="text/html" href="https://shreloaded.net/index.php?title=Module:Navbox&amp;diff=64325"/>
		<updated>2021-08-09T10:23:31Z</updated>

		<summary type="html">&lt;p&gt;User: 1 revision imported&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(&#039;Module:Navbar&#039;)._navbar&lt;br /&gt;
local getArgs -- lazily initialized&lt;br /&gt;
&lt;br /&gt;
local args&lt;br /&gt;
local border&lt;br /&gt;
local listnums&lt;br /&gt;
local ODD_EVEN_MARKER = &#039;\127_ODDEVEN_\127&#039;&lt;br /&gt;
local RESTART_MARKER = &#039;\127_ODDEVEN0_\127&#039;&lt;br /&gt;
local REGEX_MARKER = &#039;\127_ODDEVEN(%d?)_\127&#039;&lt;br /&gt;
&lt;br /&gt;
local function striped(wikitext)&lt;br /&gt;
	-- Return wikitext with markers replaced for odd/even striping.&lt;br /&gt;
	-- Child (subgroup) navboxes are flagged with a category that is removed&lt;br /&gt;
	-- by parent navboxes. The result is that the category shows all pages&lt;br /&gt;
	-- where a child navbox is not contained in a parent navbox.&lt;br /&gt;
	local orphanCat = &#039;[[Category:Navbox orphans]]&#039;&lt;br /&gt;
	if border == &#039;subgroup&#039; and args.orphan ~= &#039;yes&#039; then&lt;br /&gt;
		-- No change; striping occurs in outermost navbox.&lt;br /&gt;
		return wikitext .. orphanCat&lt;br /&gt;
	end&lt;br /&gt;
	local first, second = &#039;odd&#039;, &#039;even&#039;&lt;br /&gt;
	if args.evenodd then&lt;br /&gt;
		if args.evenodd == &#039;swap&#039; then&lt;br /&gt;
			first, second = second, first&lt;br /&gt;
		else&lt;br /&gt;
			first = args.evenodd&lt;br /&gt;
			second = first&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	local changer&lt;br /&gt;
	if first == second then&lt;br /&gt;
		changer = first&lt;br /&gt;
	else&lt;br /&gt;
		local index = 0&lt;br /&gt;
		changer = function (code)&lt;br /&gt;
			if code == &#039;0&#039; then&lt;br /&gt;
				-- Current occurrence is for a group before a nested table.&lt;br /&gt;
				-- Set it to first as a valid although pointless class.&lt;br /&gt;
				-- The next occurrence will be the first row after a title&lt;br /&gt;
				-- in a subgroup and will also be first.&lt;br /&gt;
				index = 0&lt;br /&gt;
				return first&lt;br /&gt;
			end&lt;br /&gt;
			index = index + 1&lt;br /&gt;
			return index % 2 == 1 and first or second&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	local regex = orphanCat:gsub(&#039;([%[%]])&#039;, &#039;%%%1&#039;)&lt;br /&gt;
	return (wikitext:gsub(regex, &#039;&#039;):gsub(REGEX_MARKER, changer))  -- () omits gsub count&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function processItem(item, nowrapitems)&lt;br /&gt;
	if item:sub(1, 2) == &#039;{|&#039; then&lt;br /&gt;
		-- Applying nowrap to lines in a table does not make sense.&lt;br /&gt;
		-- Add newlines to compensate for trim of x in |parm=x in a template.&lt;br /&gt;
		return &#039;\n&#039; .. item ..&#039;\n&#039;&lt;br /&gt;
	end&lt;br /&gt;
	if nowrapitems == &#039;yes&#039; then&lt;br /&gt;
		local lines = {}&lt;br /&gt;
		for line in (item .. &#039;\n&#039;):gmatch(&#039;([^\n]*)\n&#039;) do&lt;br /&gt;
			local prefix, content = line:match(&#039;^([*:;#]+)%s*(.*)&#039;)&lt;br /&gt;
			if prefix and not content:match(&#039;^&amp;lt;span class=&amp;quot;nowrap&amp;quot;&amp;gt;&#039;) then&lt;br /&gt;
				line = prefix .. &#039;&amp;lt;span class=&amp;quot;nowrap&amp;quot;&amp;gt;&#039; .. content .. &#039;&amp;lt;/span&amp;gt;&#039;&lt;br /&gt;
			end&lt;br /&gt;
			table.insert(lines, line)&lt;br /&gt;
		end&lt;br /&gt;
		item = table.concat(lines, &#039;\n&#039;)&lt;br /&gt;
	end&lt;br /&gt;
	if item:match(&#039;^[*:;#]&#039;) then&lt;br /&gt;
		return &#039;\n&#039; .. item ..&#039;\n&#039;&lt;br /&gt;
	end&lt;br /&gt;
	return item&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function renderNavBar(titleCell)&lt;br /&gt;
&lt;br /&gt;
	if args.navbar ~= &#039;off&#039; and args.navbar ~= &#039;plain&#039; and not (not args.name and mw.getCurrentFrame():getParent():getTitle():gsub(&#039;/sandbox$&#039;, &#039;&#039;) == &#039;Template:Navbox&#039;) then&lt;br /&gt;
		titleCell:wikitext(navbar{&lt;br /&gt;
			args.name,&lt;br /&gt;
			mini = 1,&lt;br /&gt;
			fontstyle = (args.basestyle or &#039;&#039;) .. &#039;;&#039; .. (args.titlestyle or &#039;&#039;) .. &#039;;background:none transparent;border:none;box-shadow:none;padding:0;&#039;&lt;br /&gt;
		})&lt;br /&gt;
	end&lt;br /&gt;
&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 = tbl:tag(&#039;tr&#039;)&lt;br /&gt;
&lt;br /&gt;
	if args.titlegroup then&lt;br /&gt;
		titleRow&lt;br /&gt;
			:tag(&#039;th&#039;)&lt;br /&gt;
				:attr(&#039;scope&#039;, &#039;row&#039;)&lt;br /&gt;
				:addClass(&#039;navbox-group&#039;)&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(&#039;th&#039;):attr(&#039;scope&#039;, &#039;col&#039;)&lt;br /&gt;
&lt;br /&gt;
	if args.titlegroup then&lt;br /&gt;
		titleCell&lt;br /&gt;
			:css(&#039;border-left&#039;, &#039;2px solid #fdfdfd&#039;)&lt;br /&gt;
			:css(&#039;width&#039;, &#039;100%&#039;)&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(&#039;navbox-title&#039;)&lt;br /&gt;
		:attr(&#039;colspan&#039;, titleColspan)&lt;br /&gt;
&lt;br /&gt;
	renderNavBar(titleCell)&lt;br /&gt;
&lt;br /&gt;
	titleCell&lt;br /&gt;
		:tag(&#039;div&#039;)&lt;br /&gt;
			-- id for aria-labelledby attribute&lt;br /&gt;
			:attr(&#039;id&#039;, mw.uri.anchorEncode(args.title))&lt;br /&gt;
			:addClass(args.titleclass)&lt;br /&gt;
			:css(&#039;font-size&#039;, &#039;114%&#039;)&lt;br /&gt;
			:css(&#039;margin&#039;, &#039;0 4em&#039;)&lt;br /&gt;
			:wikitext(processItem(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;
	tbl:tag(&#039;tr&#039;)&lt;br /&gt;
		:tag(&#039;td&#039;)&lt;br /&gt;
			:addClass(&#039;navbox-abovebelow&#039;)&lt;br /&gt;
			:addClass(args.aboveclass)&lt;br /&gt;
			:cssText(args.basestyle)&lt;br /&gt;
			:cssText(args.abovestyle)&lt;br /&gt;
			:attr(&#039;colspan&#039;, getAboveBelowColspan())&lt;br /&gt;
			:tag(&#039;div&#039;)&lt;br /&gt;
				-- id for aria-labelledby attribute, if no title&lt;br /&gt;
				:attr(&#039;id&#039;, args.title and nil or mw.uri.anchorEncode(args.above))&lt;br /&gt;
				:wikitext(processItem(args.above, args.nowrapitems))&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;
	tbl:tag(&#039;tr&#039;)&lt;br /&gt;
		:tag(&#039;td&#039;)&lt;br /&gt;
			:addClass(&#039;navbox-abovebelow&#039;)&lt;br /&gt;
			:addClass(args.belowclass)&lt;br /&gt;
			:cssText(args.basestyle)&lt;br /&gt;
			:cssText(args.belowstyle)&lt;br /&gt;
			:attr(&#039;colspan&#039;, getAboveBelowColspan())&lt;br /&gt;
			:tag(&#039;div&#039;)&lt;br /&gt;
				:wikitext(processItem(args.below, args.nowrapitems))&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, index, listnum)&lt;br /&gt;
	local row = tbl:tag(&#039;tr&#039;)&lt;br /&gt;
&lt;br /&gt;
	if index == 1 and args.imageleft then&lt;br /&gt;
		row&lt;br /&gt;
			:tag(&#039;td&#039;)&lt;br /&gt;
				:addClass(&#039;noviewer&#039;)&lt;br /&gt;
				:addClass(&#039;navbox-image&#039;)&lt;br /&gt;
				:addClass(args.imageclass)&lt;br /&gt;
				:css(&#039;width&#039;, &#039;1px&#039;)               -- Minimize width&lt;br /&gt;
				:css(&#039;padding&#039;, &#039;0px 2px 0px 0px&#039;)&lt;br /&gt;
				:cssText(args.imageleftstyle)&lt;br /&gt;
				:attr(&#039;rowspan&#039;, #listnums)&lt;br /&gt;
				:tag(&#039;div&#039;)&lt;br /&gt;
					:wikitext(processItem(args.imageleft))&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if args[&#039;group&#039; .. listnum] then&lt;br /&gt;
		local groupCell = row:tag(&#039;th&#039;)&lt;br /&gt;
&lt;br /&gt;
		-- id for aria-labelledby attribute, if lone group with no title or above&lt;br /&gt;
		if listnum == 1 and not (args.title or args.above or args.group2) then&lt;br /&gt;
			groupCell&lt;br /&gt;
				:attr(&#039;id&#039;, mw.uri.anchorEncode(args.group1))&lt;br /&gt;
		end&lt;br /&gt;
&lt;br /&gt;
		groupCell&lt;br /&gt;
			:attr(&#039;scope&#039;, &#039;row&#039;)&lt;br /&gt;
			:addClass(&#039;navbox-group&#039;)&lt;br /&gt;
			:addClass(args.groupclass)&lt;br /&gt;
			:cssText(args.basestyle)&lt;br /&gt;
			:css(&#039;width&#039;, args.groupwidth or &#039;1%&#039;) -- If groupwidth not specified, minimize width&lt;br /&gt;
&lt;br /&gt;
		groupCell&lt;br /&gt;
			:cssText(args.groupstyle)&lt;br /&gt;
			:cssText(args[&#039;group&#039; .. listnum .. &#039;style&#039;])&lt;br /&gt;
			:wikitext(args[&#039;group&#039; .. listnum])&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local listCell = row:tag(&#039;td&#039;)&lt;br /&gt;
&lt;br /&gt;
	if args[&#039;group&#039; .. listnum] then&lt;br /&gt;
		listCell&lt;br /&gt;
			:css(&#039;text-align&#039;, &#039;left&#039;)&lt;br /&gt;
			:css(&#039;border-left-width&#039;, &#039;2px&#039;)&lt;br /&gt;
			:css(&#039;border-left-style&#039;, &#039;solid&#039;)&lt;br /&gt;
	else&lt;br /&gt;
		listCell:attr(&#039;colspan&#039;, 2)&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if not args.groupwidth then&lt;br /&gt;
		listCell:css(&#039;width&#039;, &#039;100%&#039;)&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local rowstyle  -- usually nil so cssText(rowstyle) usually adds nothing&lt;br /&gt;
	if index % 2 == 1 then&lt;br /&gt;
		rowstyle = args.oddstyle&lt;br /&gt;
	else&lt;br /&gt;
		rowstyle = args.evenstyle&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local listText = args[&#039;list&#039; .. listnum]&lt;br /&gt;
	local oddEven = ODD_EVEN_MARKER&lt;br /&gt;
	if listText:sub(1, 12) == &#039;&amp;lt;/div&amp;gt;&amp;lt;table&#039; then&lt;br /&gt;
		-- Assume list text is for a subgroup navbox so no automatic striping for this row.&lt;br /&gt;
		oddEven = listText:find(&#039;&amp;lt;th[^&amp;gt;]*&amp;quot;navbox%-title&amp;quot;&#039;) and RESTART_MARKER or &#039;odd&#039;&lt;br /&gt;
	end&lt;br /&gt;
	listCell&lt;br /&gt;
		:css(&#039;padding&#039;, &#039;0px&#039;)&lt;br /&gt;
		:cssText(args.liststyle)&lt;br /&gt;
		:cssText(rowstyle)&lt;br /&gt;
		:cssText(args[&#039;list&#039; .. listnum .. &#039;style&#039;])&lt;br /&gt;
		:addClass(&#039;navbox-list&#039;)&lt;br /&gt;
		:addClass(&#039;navbox-&#039; .. oddEven)&lt;br /&gt;
		:addClass(args.listclass)&lt;br /&gt;
		:addClass(args[&#039;list&#039; .. listnum .. &#039;class&#039;])&lt;br /&gt;
		:tag(&#039;div&#039;)&lt;br /&gt;
			:css(&#039;padding&#039;, (index == 1 and args.list1padding) or args.listpadding or &#039;0em 0.25em&#039;)&lt;br /&gt;
			:wikitext(processItem(listText, args.nowrapitems))&lt;br /&gt;
&lt;br /&gt;
	if index == 1 and args.image then&lt;br /&gt;
		row&lt;br /&gt;
			:tag(&#039;td&#039;)&lt;br /&gt;
				:addClass(&#039;noviewer&#039;)&lt;br /&gt;
				:addClass(&#039;navbox-image&#039;)&lt;br /&gt;
				:addClass(args.imageclass)&lt;br /&gt;
				:css(&#039;width&#039;, &#039;1px&#039;)               -- Minimize width&lt;br /&gt;
				:css(&#039;padding&#039;, &#039;0px 0px 0px 2px&#039;)&lt;br /&gt;
				:cssText(args.imagestyle)&lt;br /&gt;
				:attr(&#039;rowspan&#039;, #listnums)&lt;br /&gt;
				:tag(&#039;div&#039;)&lt;br /&gt;
					:wikitext(processItem(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 == &#039;subgroup&#039; or args.tracking == &#039;no&#039; then&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
	local listClasses = {&lt;br /&gt;
		[&#039;plainlist&#039;] = true, [&#039;hlist&#039;] = true, [&#039;hlist hnum&#039;] = true,&lt;br /&gt;
		[&#039;hlist hwrap&#039;] = true, [&#039;hlist vcard&#039;] = true, [&#039;vcard hlist&#039;] = true,&lt;br /&gt;
		[&#039;hlist vevent&#039;] = true,&lt;br /&gt;
	}&lt;br /&gt;
	return not (listClasses[args.listclass] or listClasses[args.bodyclass])&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function hasBackgroundColors()&lt;br /&gt;
	for _, key in ipairs({&#039;titlestyle&#039;, &#039;groupstyle&#039;, &#039;basestyle&#039;, &#039;abovestyle&#039;, &#039;belowstyle&#039;}) do&lt;br /&gt;
		if tostring(args[key]):find(&#039;background&#039;, 1, true) then&lt;br /&gt;
			return true&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function hasBorders()&lt;br /&gt;
	for _, key in ipairs({&#039;groupstyle&#039;, &#039;basestyle&#039;, &#039;abovestyle&#039;, &#039;belowstyle&#039;}) do&lt;br /&gt;
		if tostring(args[key]):find(&#039;border&#039;, 1, true) then&lt;br /&gt;
			return true&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function isIllegible()&lt;br /&gt;
	local styleratio = require(&#039;Module:Color contrast&#039;)._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, &#039;Navigational boxes without horizontal lists&#039;) end&lt;br /&gt;
	if hasBackgroundColors() then table.insert(cats, &#039;Navboxes using background colours&#039;) end&lt;br /&gt;
	if isIllegible() then table.insert(cats, &#039;Potentially illegible navboxes&#039;) end&lt;br /&gt;
	if hasBorders() then table.insert(cats, &#039;Navboxes using borders&#039;) 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 == &#039;doc&#039; or subpage == &#039;sandbox&#039; or subpage == &#039;testcases&#039; then return end&lt;br /&gt;
&lt;br /&gt;
	for _, cat in ipairs(getTrackingCategories()) do&lt;br /&gt;
		builder:wikitext(&#039;[[Category:&#039; .. cat .. &#039;]]&#039;)&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(&#039;table&#039;)&lt;br /&gt;
		:addClass(&#039;nowraplinks&#039;)&lt;br /&gt;
		:addClass(args.bodyclass)&lt;br /&gt;
&lt;br /&gt;
	if args.title and (args.state ~= &#039;plain&#039; and args.state ~= &#039;off&#039;) then&lt;br /&gt;
		if args.state == &#039;collapsed&#039; then args.state = &#039;mw-collapsed&#039; end&lt;br /&gt;
		tbl&lt;br /&gt;
			:addClass(&#039;mw-collapsible&#039;)&lt;br /&gt;
			:addClass(args.state or &#039;autocollapse&#039;)&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	tbl:css(&#039;border-spacing&#039;, 0)&lt;br /&gt;
	if border == &#039;subgroup&#039; or border == &#039;none&#039; then&lt;br /&gt;
		tbl&lt;br /&gt;
			:addClass(&#039;navbox-subgroup&#039;)&lt;br /&gt;
			:cssText(args.bodystyle)&lt;br /&gt;
			:cssText(args.style)&lt;br /&gt;
	else  -- regular navbox - bodystyle and style will be applied to the wrapper table&lt;br /&gt;
		tbl&lt;br /&gt;
			:addClass(&#039;navbox-inner&#039;)&lt;br /&gt;
			:css(&#039;background&#039;, &#039;transparent&#039;)&lt;br /&gt;
			:css(&#039;color&#039;, &#039;inherit&#039;)&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, i, 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;
	listnums = {}&lt;br /&gt;
&lt;br /&gt;
	for k, _ in pairs(args) do&lt;br /&gt;
		if type(k) == &#039;string&#039; then&lt;br /&gt;
			local listnum = k:match(&#039;^list(%d+)$&#039;)&lt;br /&gt;
			if listnum then table.insert(listnums, tonumber(listnum)) end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	table.sort(listnums)&lt;br /&gt;
&lt;br /&gt;
	border = mw.text.trim(args.border or args[1] or &#039;&#039;)&lt;br /&gt;
	if border == &#039;child&#039; then&lt;br /&gt;
		border = &#039;subgroup&#039;&lt;br /&gt;
	end&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 == &#039;none&#039; then&lt;br /&gt;
		local nav = res:tag(&#039;div&#039;)&lt;br /&gt;
			:attr(&#039;role&#039;, &#039;navigation&#039;)&lt;br /&gt;
			:node(tbl)&lt;br /&gt;
		-- aria-labelledby title, otherwise above, otherwise lone group&lt;br /&gt;
		if args.title or args.above or (args.group1 and not args.group2) then&lt;br /&gt;
			nav:attr(&#039;aria-labelledby&#039;, mw.uri.anchorEncode(args.title or args.above or args.group1))&lt;br /&gt;
		else&lt;br /&gt;
			nav:attr(&#039;aria-label&#039;, &#039;Navbox&#039;)&lt;br /&gt;
		end&lt;br /&gt;
	elseif border == &#039;subgroup&#039; 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&#039;s &amp;lt;/div&amp;gt;&lt;br /&gt;
		res&lt;br /&gt;
			:wikitext(&#039;&amp;lt;/div&amp;gt;&#039;)&lt;br /&gt;
			:node(tbl)&lt;br /&gt;
			:wikitext(&#039;&amp;lt;div&amp;gt;&#039;)&lt;br /&gt;
	else&lt;br /&gt;
		local nav = res:tag(&#039;div&#039;)&lt;br /&gt;
			:attr(&#039;role&#039;, &#039;navigation&#039;)&lt;br /&gt;
			:addClass(&#039;navbox&#039;)&lt;br /&gt;
			:addClass(args.navboxclass)&lt;br /&gt;
			:cssText(args.bodystyle)&lt;br /&gt;
			:cssText(args.style)&lt;br /&gt;
			:css(&#039;padding&#039;, &#039;3px&#039;)&lt;br /&gt;
			:node(tbl)&lt;br /&gt;
		-- aria-labelledby title, otherwise above, otherwise lone group&lt;br /&gt;
		if args.title or args.above or (args.group1 and not args.group2) then&lt;br /&gt;
			nav:attr(&#039;aria-labelledby&#039;, mw.uri.anchorEncode(args.title or args.above or args.group1))&lt;br /&gt;
		else&lt;br /&gt;
			nav:attr(&#039;aria-label&#039;, &#039;Navbox&#039;)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if (args.nocat or &#039;false&#039;):lower() == &#039;false&#039; then&lt;br /&gt;
		renderTrackingCategories(res)&lt;br /&gt;
	end&lt;br /&gt;
	return striped(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(&#039;Module:Arguments&#039;).getArgs&lt;br /&gt;
	end&lt;br /&gt;
	args = getArgs(frame, {wrappers = {&#039;Template:Navbox&#039;}})&lt;br /&gt;
&lt;br /&gt;
	-- Read the arguments in the order they&#039;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>User</name></author>
	</entry>
	<entry>
		<id>https://shreloaded.net/index.php?title=Module:Message_box&amp;diff=64323</id>
		<title>Module:Message box</title>
		<link rel="alternate" type="text/html" href="https://shreloaded.net/index.php?title=Module:Message_box&amp;diff=64323"/>
		<updated>2021-08-09T10:23:30Z</updated>

		<summary type="html">&lt;p&gt;User: 1 revision imported&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(&#039;Module:No globals&#039;)&lt;br /&gt;
local getArgs&lt;br /&gt;
local yesno = require(&#039;Module:Yesno&#039;)&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 = &#039;Module:Message box/configuration&#039;&lt;br /&gt;
local DEMOSPACES = {talk = &#039;tmbox&#039;, image = &#039;imbox&#039;, file = &#039;imbox&#039;, category = &#039;cmbox&#039;, article = &#039;ambox&#039;, main = &#039;ambox&#039;}&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), &#039;^&#039; .. prefix .. &#039;([1-9]%d*)$&#039;)&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 args.demospace and args.demospace ~= &#039;&#039; then&lt;br /&gt;
			-- implement demospace parameter of mbox&lt;br /&gt;
			local demospace = string.lower(args.demospace)&lt;br /&gt;
			if DEMOSPACES[demospace] then&lt;br /&gt;
				-- use template from DEMOSPACES&lt;br /&gt;
				obj.cfg = cfg[DEMOSPACES[demospace]]&lt;br /&gt;
			elseif string.find( demospace, &#039;talk&#039; ) then&lt;br /&gt;
				-- demo as a talk page&lt;br /&gt;
				obj.cfg = cfg.tmbox&lt;br /&gt;
			else&lt;br /&gt;
				-- default to ombox&lt;br /&gt;
				obj.cfg = cfg.ombox&lt;br /&gt;
			end&lt;br /&gt;
		elseif 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 ~= &#039;&#039; 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;
	-- For lazy loading of [[Module:Category handler]].&lt;br /&gt;
	obj.hasCategories = false&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(&#039;[[Category:%s|%s]]&#039;, cat, sort)&lt;br /&gt;
	else&lt;br /&gt;
		cat = string.format(&#039;[[Category:%s]]&#039;, cat)&lt;br /&gt;
	end&lt;br /&gt;
	self.hasCategories = true&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 == &#039;SUBST&#039;&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.name = args.name&lt;br /&gt;
	if self.name then&lt;br /&gt;
		self:addClass(&#039;box-&#039; .. string.gsub(self.name,&#039; &#039;,&#039;_&#039;))&lt;br /&gt;
	end&lt;br /&gt;
	if yesno(args.plainlinks) ~= false then&lt;br /&gt;
		self:addClass(&#039;plainlinks&#039;)&lt;br /&gt;
	end&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 &#039;mbox-small&#039;)&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;
		if self.name then&lt;br /&gt;
			local templateName = mw.ustring.match(&lt;br /&gt;
				self.name,&lt;br /&gt;
				&#039;^[tT][eE][mM][pP][lL][aA][tT][eE][%s_]*:[%s_]*(.*)$&#039;&lt;br /&gt;
			) or self.name&lt;br /&gt;
			templateName = &#039;Template:&#039; .. 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 == &#039;&#039; then&lt;br /&gt;
				sect = &#039;This &#039; .. (cfg.sectionDefault or &#039;page&#039;)&lt;br /&gt;
			elseif type(args.sect) == &#039;string&#039; then&lt;br /&gt;
				sect = &#039;This &#039; .. args.sect&lt;br /&gt;
			end&lt;br /&gt;
			local issue = args.issue&lt;br /&gt;
			issue = type(issue) == &#039;string&#039; and issue ~= &#039;&#039; and issue or nil&lt;br /&gt;
			local text = args.text&lt;br /&gt;
			text = type(text) == &#039;string&#039; 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, &#039; &#039;)&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 == &#039;&#039;&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 = &#039;#&#039;&lt;br /&gt;
		elseif talk == &#039;&#039; 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&#039;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&lt;br /&gt;
                if self.isSmall then&lt;br /&gt;
                    local talkLink = talkArgIsTalkPage and talk or (talkTitle.prefixedText .. &#039;#&#039; .. talk)&lt;br /&gt;
                    talkText = string.format(&#039;([[%s|talk]])&#039;, talkLink)&lt;br /&gt;
                else&lt;br /&gt;
                    talkText = &#039;Relevant discussion may be found on&#039;&lt;br /&gt;
                    if talkArgIsTalkPage then&lt;br /&gt;
                        talkText = string.format(&lt;br /&gt;
                            &#039;%s [[%s|%s]].&#039;,&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;
                            &#039;%s the [[%s#%s|talk page]].&#039;,&lt;br /&gt;
                            talkText,&lt;br /&gt;
                            talkTitle.prefixedText,&lt;br /&gt;
                            talk&lt;br /&gt;
                        )&lt;br /&gt;
                    end&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 ~= &#039;&#039; and args.fix or nil&lt;br /&gt;
		local date&lt;br /&gt;
		if args.date and args.date ~= &#039;&#039; then&lt;br /&gt;
			date = args.date&lt;br /&gt;
		elseif args.date == &#039;&#039; and self.isTemplatePage then&lt;br /&gt;
			date = lang:formatDate(&#039;F Y&#039;)&lt;br /&gt;
		end&lt;br /&gt;
		if date then&lt;br /&gt;
			self.date = string.format(&amp;quot; &amp;lt;span class=&#039;date-container&#039;&amp;gt;&#039;&#039;(&amp;lt;span class=&#039;date&#039;&amp;gt;%s&amp;lt;/span&amp;gt;)&#039;&#039;&amp;lt;/span&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 = &#039;border:none;padding:0;width:1px&#039;&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 ~= &#039;blank&#039; and imageLeft ~= &#039;none&#039;&lt;br /&gt;
		or not cfg.imageCheckBlank and imageLeft ~= &#039;none&#039;&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 &#039;30x30px&#039;)&lt;br /&gt;
				or &#039;40x40px&#039;&lt;br /&gt;
			self.imageLeft = string.format(&#039;[[File:%s|%s|link=|alt=]]&#039;, self.typeImage&lt;br /&gt;
				or &#039;Imbox notice.png&#039;, 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 == &#039;none&#039;) 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{&#039;cat&#039;, &#039;category&#039;, &#039;all&#039;} do&lt;br /&gt;
		args[prefix .. &#039;1&#039;] = 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) == &#039;string&#039; and date&lt;br /&gt;
	local preposition = &#039;from&#039;&lt;br /&gt;
	for _, num in ipairs(nums) do&lt;br /&gt;
		local mainCat = args[&#039;cat&#039; .. tostring(num)]&lt;br /&gt;
			or args[&#039;category&#039; .. tostring(num)]&lt;br /&gt;
		local allCat = args[&#039;all&#039; .. tostring(num)]&lt;br /&gt;
		mainCat = type(mainCat) == &#039;string&#039; and mainCat&lt;br /&gt;
		allCat = type(allCat) == &#039;string&#039; and allCat&lt;br /&gt;
		if mainCat and date and date ~= &#039;&#039; then&lt;br /&gt;
			local catTitle = string.format(&#039;%s %s %s&#039;, mainCat, preposition, date)&lt;br /&gt;
			self:addCat(0, catTitle)&lt;br /&gt;
			catTitle = getTitleObject(&#039;Category:&#039; .. catTitle)&lt;br /&gt;
			if not catTitle or not catTitle.exists then&lt;br /&gt;
				self:addCat(0, &#039;Articles with invalid date parameter in template&#039;)&lt;br /&gt;
			end&lt;br /&gt;
		elseif mainCat and (not date or date == &#039;&#039;) 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 = &#039;C&#039;&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 &#039;Main:&#039; or &#039;&#039;) .. self.title.prefixedText&lt;br /&gt;
		self:addCat(&#039;all&#039;, &#039;Wikipedia message box parameter needs fixing&#039;, allSort)&lt;br /&gt;
	end&lt;br /&gt;
	if self.isSubstituted then&lt;br /&gt;
		self:addCat(&#039;all&#039;, &#039;Pages with incorrectly substituted templates&#039;)&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;
	if not self.hasCategories then&lt;br /&gt;
		-- No categories added, no need to pass them to Category handler so,&lt;br /&gt;
		-- if it was invoked, it would return the empty string.&lt;br /&gt;
		-- So we shortcut and return the empty string.&lt;br /&gt;
		return &amp;quot;&amp;quot;&lt;br /&gt;
	end&lt;br /&gt;
	-- Convert category tables to strings and pass them through&lt;br /&gt;
	-- [[Module:Category handler]].&lt;br /&gt;
	return require(&#039;Module:Category handler&#039;)._main{&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(&#039;b&#039;)&lt;br /&gt;
			:addClass(&#039;error&#039;)&lt;br /&gt;
			:wikitext(string.format(&lt;br /&gt;
				&#039;Template &amp;lt;code&amp;gt;%s[[Template:%s|%s]]%s&amp;lt;/code&amp;gt; has been incorrectly substituted.&#039;,&lt;br /&gt;
				mw.text.nowiki(&#039;{{&#039;), self.name, self.name, mw.text.nowiki(&#039;}}&#039;)&lt;br /&gt;
			))&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Create the box table.&lt;br /&gt;
	local boxTable = root:tag(&#039;table&#039;)&lt;br /&gt;
	boxTable:attr(&#039;id&#039;, 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(&#039;role&#039;, &#039;presentation&#039;)&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(&#039;tr&#039;)&lt;br /&gt;
	if self.imageLeft then&lt;br /&gt;
		local imageLeftCell = row:tag(&#039;td&#039;):addClass(&#039;mbox-image&#039;)&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(&#039;div&#039;):css(&#039;width&#039;, &#039;52px&#039;)&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&#039;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(&#039;td&#039;)&lt;br /&gt;
			:addClass(&#039;mbox-empty-cell&#039;)&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(&#039;td&#039;):addClass(&#039;mbox-text&#039;)&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 textCellDiv = textCell:tag(&#039;div&#039;)&lt;br /&gt;
		textCellDiv&lt;br /&gt;
			:addClass(&#039;mbox-text-span&#039;)&lt;br /&gt;
			:wikitext(self.issue or nil)&lt;br /&gt;
		if (self.talk or self.fix) then&lt;br /&gt;
			textCellDiv:tag(&#039;span&#039;)&lt;br /&gt;
				:addClass(&#039;hide-when-compact&#039;)&lt;br /&gt;
				:wikitext(self.talk and (&#039; &#039; .. self.talk) or nil)&lt;br /&gt;
				:wikitext(self.fix and (&#039; &#039; .. self.fix) or nil)&lt;br /&gt;
		end&lt;br /&gt;
		textCellDiv:wikitext(self.date and (&#039; &#039; .. self.date) or nil)&lt;br /&gt;
		if self.info and not self.isSmall then&lt;br /&gt;
			textCellDiv&lt;br /&gt;
				:tag(&#039;span&#039;)&lt;br /&gt;
				:addClass(&#039;hide-when-compact&#039;)&lt;br /&gt;
				:wikitext(self.info and (&#039; &#039; .. self.info) or nil)&lt;br /&gt;
		end&lt;br /&gt;
		if self.removalNotice then&lt;br /&gt;
			textCellDiv:tag(&#039;span&#039;)&lt;br /&gt;
				:addClass(&#039;hide-when-compact&#039;)&lt;br /&gt;
				:tag(&#039;i&#039;)&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(&#039;td&#039;):addClass(&#039;mbox-imageright&#039;)&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(&#039;div&#039;):css(&#039;width&#039;, &#039;52px&#039;)&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(&#039;tr&#039;)&lt;br /&gt;
			:tag(&#039;td&#039;)&lt;br /&gt;
				:attr(&#039;colspan&#039;, self.imageRight and &#039;3&#039; or &#039;2&#039;)&lt;br /&gt;
				:addClass(&#039;mbox-text&#039;)&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(&#039;div&#039;)&lt;br /&gt;
			:css(&#039;text-align&#039;, &#039;center&#039;)&lt;br /&gt;
			:wikitext(string.format(&lt;br /&gt;
				&#039;This message box is using an invalid &amp;quot;type=%s&amp;quot; parameter and needs fixing.&#039;,&lt;br /&gt;
				self.type or &#039;&#039;&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(&#039;Module:Arguments&#039;).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>User</name></author>
	</entry>
	<entry>
		<id>https://shreloaded.net/index.php?title=Module:Sidebar&amp;diff=64321</id>
		<title>Module:Sidebar</title>
		<link rel="alternate" type="text/html" href="https://shreloaded.net/index.php?title=Module:Sidebar&amp;diff=64321"/>
		<updated>2021-08-09T10:23:30Z</updated>

		<summary type="html">&lt;p&gt;User: 1 revision imported&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;--&lt;br /&gt;
-- This module implements {{Sidebar}}&lt;br /&gt;
--&lt;br /&gt;
require(&#039;Module:No globals&#039;)&lt;br /&gt;
local cfg = mw.loadData(&#039;Module:Sidebar/configuration&#039;)&lt;br /&gt;
&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
local getArgs = require(&#039;Module:Arguments&#039;).getArgs&lt;br /&gt;
&lt;br /&gt;
--[[&lt;br /&gt;
Categorizes calling templates and modules with a &#039;style&#039; parameter of any sort&lt;br /&gt;
for tracking to convert to TemplateStyles.&lt;br /&gt;
&lt;br /&gt;
TODO after a long cleanup: Catch sidebars in other namespaces than Template and Module.&lt;br /&gt;
TODO would probably want to remove /log and /archive as CS1 does&lt;br /&gt;
]]&lt;br /&gt;
local function categorizeTemplatesWithInlineStyles(args)&lt;br /&gt;
	local title = mw.title.getCurrentTitle()&lt;br /&gt;
	if title.namespace ~= 10 and title.namespace ~= 828 then return &#039;&#039; end&lt;br /&gt;
	for _, pattern in ipairs (cfg.i18n.pattern.uncategorized_conversion_titles) do&lt;br /&gt;
		if title.text:match(pattern) then return &#039;&#039; end&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	for key, _ in pairs(args) do&lt;br /&gt;
		if mw.ustring.find(key, cfg.i18n.pattern.style_conversion) or key == &#039;width&#039; then&lt;br /&gt;
			return cfg.i18n.category.conversion&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[[&lt;br /&gt;
For compatibility with the original {{sidebar with collapsible lists}}&lt;br /&gt;
implementation, which passed some parameters through {{#if}} to trim their&lt;br /&gt;
whitespace. This also triggered the automatic newline behavior.&lt;br /&gt;
]]&lt;br /&gt;
-- See ([[meta:Help:Newlines and spaces#Automatic newline]])&lt;br /&gt;
local function trimAndAddAutomaticNewline(s)&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, &#039;^[#*:;]&#039;) or mw.ustring.find(s, &#039;^{|&#039;) then&lt;br /&gt;
		return &#039;\n&#039; .. s&lt;br /&gt;
	else&lt;br /&gt;
		return s&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[[&lt;br /&gt;
Finds whether a sidebar has a subgroup sidebar.&lt;br /&gt;
]]&lt;br /&gt;
local function hasSubgroup(s)&lt;br /&gt;
	if mw.ustring.find(s, cfg.i18n.pattern.subgroup) 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;
Main sidebar function. Takes the frame, args, and an optional collapsibleClass.&lt;br /&gt;
The collapsibleClass is and should be used only for sidebars with collapsible&lt;br /&gt;
lists, as in p.collapsible.&lt;br /&gt;
]]&lt;br /&gt;
function p.sidebar(frame, args, collapsibleClass)&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) == cfg.i18n.child_yes&lt;br /&gt;
&lt;br /&gt;
	root = root:tag(&#039;table&#039;)&lt;br /&gt;
	if not child then&lt;br /&gt;
		root &lt;br /&gt;
			:addClass(cfg.i18n.class.sidebar)&lt;br /&gt;
			-- force collapsibleclass to be sidebar-collapse otherwise output nothing&lt;br /&gt;
			:addClass(collapsibleClass == cfg.i18n.class.collapse and cfg.i18n.class.collapse or nil)&lt;br /&gt;
			:addClass(&#039;nomobile&#039;)&lt;br /&gt;
			:addClass(args.float == cfg.i18n.float_none and cfg.i18n.class.float_none or nil)&lt;br /&gt;
			:addClass(args.float == cfg.i18n.float_left and cfg.i18n.class.float_left or nil)&lt;br /&gt;
			:addClass(args.wraplinks ~= cfg.i18n.wrap_true and cfg.i18n.class.wraplinks or nil)&lt;br /&gt;
			:addClass(args.bodyclass or args.class)&lt;br /&gt;
			:css(&#039;width&#039;, args.width or nil)&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(&#039;caption&#039;)&lt;br /&gt;
					:addClass(cfg.i18n.class.outer_title)&lt;br /&gt;
					:addClass(args.outertitleclass)&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(&#039;tr&#039;):tag(&#039;td&#039;)&lt;br /&gt;
&lt;br /&gt;
			imageCell&lt;br /&gt;
				:addClass(cfg.i18n.class.top_image)&lt;br /&gt;
				:addClass(args.topimageclass)&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(&#039;div&#039;)&lt;br /&gt;
						:addClass(cfg.i18n.class.top_caption)&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(&#039;tr&#039;)&lt;br /&gt;
					:tag(&#039;td&#039;)&lt;br /&gt;
						:addClass(args.topimage and cfg.i18n.class.pretitle_with_top_image&lt;br /&gt;
							or cfg.i18n.class.pretitle)&lt;br /&gt;
						:addClass(args.pretitleclass)&lt;br /&gt;
						:cssText(args.basestyle)&lt;br /&gt;
						:cssText(args.pretitlestyle)&lt;br /&gt;
						:wikitext(args.pretitle)&lt;br /&gt;
		end&lt;br /&gt;
	else&lt;br /&gt;
		root&lt;br /&gt;
			:addClass(cfg.i18n.class.subgroup)&lt;br /&gt;
			:addClass(args.bodyclass or args.class)&lt;br /&gt;
			:cssText(args.bodystyle or args.style)&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;
		else&lt;br /&gt;
			root&lt;br /&gt;
				:tag(&#039;tr&#039;)&lt;br /&gt;
					:tag(&#039;th&#039;)&lt;br /&gt;
						:addClass(args.pretitle and cfg.i18n.class.title_with_pretitle&lt;br /&gt;
							or cfg.i18n.class.title)&lt;br /&gt;
						:addClass(args.titleclass)&lt;br /&gt;
						:cssText(args.basestyle)&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(&#039;tr&#039;):tag(&#039;td&#039;)&lt;br /&gt;
&lt;br /&gt;
		imageCell&lt;br /&gt;
			:addClass(cfg.i18n.class.image)&lt;br /&gt;
			:addClass(args.imageclass)&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(&#039;div&#039;)&lt;br /&gt;
					:addClass(cfg.i18n.class.caption)&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(&#039;tr&#039;)&lt;br /&gt;
				:tag(&#039;td&#039;)&lt;br /&gt;
					:addClass(cfg.i18n.class.above)&lt;br /&gt;
					:addClass(args.aboveclass)&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 = &#039;&#039; .. k&lt;br /&gt;
		local num = k:match(&#039;^heading(%d+)$&#039;) or k:match(&#039;^content(%d+)$&#039;)&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&lt;br /&gt;
	-- 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[&#039;heading&#039; .. num]&lt;br /&gt;
		if heading then&lt;br /&gt;
			root&lt;br /&gt;
				:tag(&#039;tr&#039;)&lt;br /&gt;
					:tag(&#039;th&#039;)&lt;br /&gt;
						:addClass(cfg.i18n.class.heading)&lt;br /&gt;
						:addClass(args.headingclass)&lt;br /&gt;
						:addClass(args[&#039;heading&#039; .. num .. &#039;class&#039;])&lt;br /&gt;
						:cssText(args.basestyle)&lt;br /&gt;
						:cssText(args.headingstyle)&lt;br /&gt;
						:cssText(args[&#039;heading&#039; .. num .. &#039;style&#039;])&lt;br /&gt;
						:newline()&lt;br /&gt;
						:wikitext(heading)&lt;br /&gt;
		end&lt;br /&gt;
&lt;br /&gt;
		local content = args[&#039;content&#039; .. num]&lt;br /&gt;
		if content then&lt;br /&gt;
			root&lt;br /&gt;
				:tag(&#039;tr&#039;)&lt;br /&gt;
					:tag(&#039;td&#039;)&lt;br /&gt;
						:addClass(hasSubgroup(content) and cfg.i18n.class.content_with_subgroup&lt;br /&gt;
							or cfg.i18n.class.content)&lt;br /&gt;
						:addClass(args.contentclass)&lt;br /&gt;
						:addClass(args[&#039;content&#039; .. num .. &#039;class&#039;])&lt;br /&gt;
						:cssText(args.contentstyle)&lt;br /&gt;
						:cssText(args[&#039;content&#039; .. num .. &#039;style&#039;])&lt;br /&gt;
						:newline()&lt;br /&gt;
						:wikitext(content)&lt;br /&gt;
						:done()&lt;br /&gt;
					 -- Without a linebreak after the &amp;lt;/td&amp;gt;, a nested list like&lt;br /&gt;
					 -- &amp;quot;* {{hlist| ...}}&amp;quot; doesn&#039;t parse correctly.&lt;br /&gt;
					:newline()&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(&#039;tr&#039;)&lt;br /&gt;
				:tag(&#039;td&#039;)&lt;br /&gt;
					:addClass(cfg.i18n.class.below)&lt;br /&gt;
					:addClass(args.belowclass)&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;
		if args.navbar ~= cfg.i18n.navbar_none and args.navbar ~= cfg.i18n.navbar_off and&lt;br /&gt;
			(args.name or frame:getParent():getTitle():gsub(cfg.i18n.pattern.sandbox, &#039;&#039;) ~=&lt;br /&gt;
			cfg.i18n.title_not_to_add_navbar) then&lt;br /&gt;
			root&lt;br /&gt;
				:tag(&#039;tr&#039;)&lt;br /&gt;
					:tag(&#039;td&#039;)&lt;br /&gt;
						:addClass(cfg.i18n.class.navbar)&lt;br /&gt;
						:cssText(args.navbarstyle)&lt;br /&gt;
						:wikitext(require(&#039;Module:Navbar&#039;)._navbar{&lt;br /&gt;
							args.name,&lt;br /&gt;
							mini = 1,&lt;br /&gt;
							fontstyle = args.navbarfontstyle&lt;br /&gt;
						})&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	local base_templatestyles = frame:extensionTag{&lt;br /&gt;
		name = &#039;templatestyles&#039;, args = { src = cfg.i18n.templatestyles }&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	local templatestyles = &#039;&#039;&lt;br /&gt;
	if args[&#039;templatestyles&#039;] and args[&#039;templatestyles&#039;] ~= &#039;&#039; then&lt;br /&gt;
		templatestyles = frame:extensionTag{&lt;br /&gt;
			name = &#039;templatestyles&#039;, args = { src = args[&#039;templatestyles&#039;] }&lt;br /&gt;
		}&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	local child_templatestyles = &#039;&#039;&lt;br /&gt;
	if args[&#039;child templatestyles&#039;] and args[&#039;child templatestyles&#039;] ~= &#039;&#039; then&lt;br /&gt;
		child_templatestyles = frame:extensionTag{&lt;br /&gt;
			name = &#039;templatestyles&#039;, args = { src = args[&#039;child templatestyles&#039;] }&lt;br /&gt;
		}&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	local grandchild_templatestyles = &#039;&#039;&lt;br /&gt;
	if args[&#039;grandchild templatestyles&#039;] and args[&#039;grandchild templatestyles&#039;] ~= &#039;&#039; then&lt;br /&gt;
		grandchild_templatestyles = frame:extensionTag{&lt;br /&gt;
			name = &#039;templatestyles&#039;, args = { src = args[&#039;grandchild templatestyles&#039;] }&lt;br /&gt;
		}&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	return table.concat({&lt;br /&gt;
		base_templatestyles,&lt;br /&gt;
		templatestyles,&lt;br /&gt;
		child_templatestyles,&lt;br /&gt;
		grandchild_templatestyles,&lt;br /&gt;
		tostring(root),&lt;br /&gt;
		(child and cfg.i18n.category.child or &#039;&#039;),&lt;br /&gt;
		categorizeTemplatesWithInlineStyles(args)&lt;br /&gt;
	})&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function list_title(args, is_centered_list_titles, num)&lt;br /&gt;
	&lt;br /&gt;
	local title_text = trimAndAddAutomaticNewline(args[&#039;list&#039; .. num .. &#039;title&#039;]&lt;br /&gt;
		or cfg.i18n.default_list_title)&lt;br /&gt;
&lt;br /&gt;
	local title&lt;br /&gt;
	if is_centered_list_titles then&lt;br /&gt;
		-- collapsible can be finicky, so provide some CSS/HTML to support&lt;br /&gt;
		title = mw.html.create(&#039;div&#039;)&lt;br /&gt;
			:addClass(cfg.i18n.class.list_title_centered)&lt;br /&gt;
			:wikitext(title_text)&lt;br /&gt;
	else&lt;br /&gt;
		title = mw.html.create()&lt;br /&gt;
			:wikitext(title_text)&lt;br /&gt;
	end&lt;br /&gt;
		&lt;br /&gt;
	local title_container = mw.html.create(&#039;div&#039;)&lt;br /&gt;
		:addClass(cfg.i18n.class.list_title)&lt;br /&gt;
		-- don&#039;t /need/ a listnumtitleclass because you can do&lt;br /&gt;
		-- .templateclass .listnumclass .sidebar-list-title&lt;br /&gt;
		:addClass(args.listtitleclass)&lt;br /&gt;
		:cssText(args.basestyle)&lt;br /&gt;
		:cssText(args.listtitlestyle)&lt;br /&gt;
		:cssText(args[&#039;list&#039; .. num .. &#039;titlestyle&#039;])&lt;br /&gt;
		:node(title)&lt;br /&gt;
		:done()&lt;br /&gt;
	&lt;br /&gt;
	return title_container&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[[&lt;br /&gt;
Main entry point for sidebar with collapsible lists.&lt;br /&gt;
Does the work of creating the collapsible lists themselves and including them&lt;br /&gt;
into the args.&lt;br /&gt;
]]&lt;br /&gt;
function p.collapsible(frame)&lt;br /&gt;
	local args = getArgs(frame)&lt;br /&gt;
	if not args.name and&lt;br /&gt;
		frame:getParent():getTitle():gsub(cfg.i18n.pattern.collapse_sandbox, &#039;&#039;) ==&lt;br /&gt;
		cfg.i18n.collapse_title_not_to_add_navbar then&lt;br /&gt;
		args.navbar = cfg.i18n.navbar_none&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local contentArgs = {}&lt;br /&gt;
	&lt;br /&gt;
	local is_centered_list_titles&lt;br /&gt;
	if args[&#039;centered list titles&#039;] and args[&#039;centered list titles&#039;] ~= &#039;&#039; then&lt;br /&gt;
		is_centered_list_titles = true&lt;br /&gt;
	else&lt;br /&gt;
		is_centered_list_titles = false&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	for k, v in pairs(args) do&lt;br /&gt;
		local num = string.match(k, &#039;^list(%d+)$&#039;)&lt;br /&gt;
		if num then&lt;br /&gt;
			local expand = args.expanded and&lt;br /&gt;
				(args.expanded == &#039;all&#039; or args.expanded == args[&#039;list&#039; .. num .. &#039;name&#039;])&lt;br /&gt;
			local row = mw.html.create(&#039;div&#039;)&lt;br /&gt;
			row&lt;br /&gt;
				:addClass(cfg.i18n.class.list)&lt;br /&gt;
				:addClass(&#039;mw-collapsible&#039;)&lt;br /&gt;
				:addClass((not expand) and &#039;mw-collapsed&#039; or nil)&lt;br /&gt;
				:addClass(args[&#039;list&#039; .. num .. &#039;class&#039;])&lt;br /&gt;
				:cssText(args.listframestyle)&lt;br /&gt;
				:cssText(args[&#039;list&#039; .. num .. &#039;framestyle&#039;])&lt;br /&gt;
				:node(list_title(args, is_centered_list_titles, num))&lt;br /&gt;
				:tag(&#039;div&#039;)&lt;br /&gt;
					:addClass(cfg.i18n.class.list_content)&lt;br /&gt;
					:addClass(&#039;mw-collapsible-content&#039;)&lt;br /&gt;
					-- don&#039;t /need/ a listnumstyleclass because you can do&lt;br /&gt;
					-- .templatename .listnumclass .sidebar-list&lt;br /&gt;
					:addClass(args.listclass)&lt;br /&gt;
					:cssText(args.liststyle)&lt;br /&gt;
					:cssText(args[&#039;list&#039; .. num .. &#039;style&#039;])&lt;br /&gt;
					:wikitext(trimAndAddAutomaticNewline(args[&#039;list&#039; .. num]))&lt;br /&gt;
&lt;br /&gt;
			contentArgs[&#039;content&#039; .. 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, cfg.i18n.class.collapse)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>User</name></author>
	</entry>
	<entry>
		<id>https://shreloaded.net/index.php?title=Module:Unsubst&amp;diff=64319</id>
		<title>Module:Unsubst</title>
		<link rel="alternate" type="text/html" href="https://shreloaded.net/index.php?title=Module:Unsubst&amp;diff=64319"/>
		<updated>2021-08-09T10:23:30Z</updated>

		<summary type="html">&lt;p&gt;User: 1 revision imported&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;local checkType = require(&#039;libraryUtil&#039;).checkType&lt;br /&gt;
&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
local BODY_PARAM = &#039;$B&#039;&lt;br /&gt;
&lt;br /&gt;
local specialParams = {&lt;br /&gt;
	[&#039;$params&#039;] = &#039;parameter list&#039;,&lt;br /&gt;
	[&#039;$aliases&#039;] = &#039;parameter aliases&#039;,&lt;br /&gt;
	[&#039;$flags&#039;] = &#039;flags&#039;,&lt;br /&gt;
	[&#039;$B&#039;] = &#039;template content&#039;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
function p.main(frame, body)&lt;br /&gt;
	-- If we are substing, this function returns a template invocation, and if&lt;br /&gt;
	-- not, it returns the template body. The template body can be specified in&lt;br /&gt;
	-- the body parameter, or in the template parameter defined in the&lt;br /&gt;
	-- BODY_PARAM variable. This function can be called from Lua or from&lt;br /&gt;
	-- #invoke.&lt;br /&gt;
&lt;br /&gt;
	-- Return the template body if we aren&#039;t substing.&lt;br /&gt;
	if not mw.isSubsting() then&lt;br /&gt;
		if body ~= nil then&lt;br /&gt;
			return body&lt;br /&gt;
		elseif frame.args[BODY_PARAM] ~= nil then&lt;br /&gt;
			return frame.args[BODY_PARAM]&lt;br /&gt;
		else&lt;br /&gt;
			error(string.format(&lt;br /&gt;
				&amp;quot;no template content specified (use parameter &#039;%s&#039; from #invoke)&amp;quot;,&lt;br /&gt;
				BODY_PARAM&lt;br /&gt;
			), 2)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Sanity check for the frame object.&lt;br /&gt;
	if type(frame) ~= &#039;table&#039;&lt;br /&gt;
		or type(frame.getParent) ~= &#039;function&#039;&lt;br /&gt;
		or not frame:getParent()&lt;br /&gt;
	then&lt;br /&gt;
		error(&lt;br /&gt;
			&amp;quot;argument #1 to &#039;main&#039; must be a frame object with a parent &amp;quot; ..&lt;br /&gt;
			&amp;quot;frame available&amp;quot;,&lt;br /&gt;
			2&lt;br /&gt;
		)&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Find the invocation name.&lt;br /&gt;
	local mTemplateInvocation = require(&#039;Module:Template invocation&#039;)&lt;br /&gt;
	local name = mTemplateInvocation.name(frame:getParent():getTitle())&lt;br /&gt;
&lt;br /&gt;
	-- Combine passed args with passed defaults&lt;br /&gt;
	local args = {}&lt;br /&gt;
	if string.find( &#039;,&#039;..(frame.args[&#039;$flags&#039;] or &#039;&#039;)..&#039;,&#039;, &#039;,%s*override%s*,&#039; ) then&lt;br /&gt;
		for k, v in pairs( frame:getParent().args ) do&lt;br /&gt;
			args[k] = v&lt;br /&gt;
		end&lt;br /&gt;
		for k, v in pairs( frame.args ) do&lt;br /&gt;
			if not specialParams[k] then&lt;br /&gt;
				if v == &#039;__DATE__&#039; then&lt;br /&gt;
					v = mw.getContentLanguage():formatDate( &#039;F Y&#039; )&lt;br /&gt;
				end&lt;br /&gt;
				args[k] = v&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	else&lt;br /&gt;
		for k, v in pairs( frame.args ) do&lt;br /&gt;
			if not specialParams[k] then&lt;br /&gt;
				if v == &#039;__DATE__&#039; then&lt;br /&gt;
					v = mw.getContentLanguage():formatDate( &#039;F Y&#039; )&lt;br /&gt;
				end&lt;br /&gt;
				args[k] = v&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
		for k, v in pairs( frame:getParent().args ) do&lt;br /&gt;
			args[k] = v&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Trim parameters, if not specified otherwise&lt;br /&gt;
	if not string.find( &#039;,&#039;..(frame.args[&#039;$flags&#039;] or &#039;&#039;)..&#039;,&#039;, &#039;,%s*keep%-whitespace%s*,&#039; ) then&lt;br /&gt;
		for k, v in pairs( args ) do args[k] = mw.ustring.match(v, &#039;^%s*(.*)%s*$&#039;) or &#039;&#039; end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Pull information from parameter aliases&lt;br /&gt;
	local aliases = {}&lt;br /&gt;
	if frame.args[&#039;$aliases&#039;] then&lt;br /&gt;
		local list = mw.text.split( frame.args[&#039;$aliases&#039;], &#039;%s*,%s*&#039; )&lt;br /&gt;
		for k, v in ipairs( list ) do&lt;br /&gt;
			local tmp = mw.text.split( v, &#039;%s*&amp;gt;%s*&#039; )&lt;br /&gt;
			aliases[tonumber(mw.ustring.match(tmp[1], &#039;^[1-9][0-9]*$&#039;)) or tmp[1]] = ((tonumber(mw.ustring.match(tmp[2], &#039;^[1-9][0-9]*$&#039;))) or tmp[2])&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	for k, v in pairs( aliases ) do&lt;br /&gt;
		if args[k] and ( not args[v] or args[v] == &#039;&#039; ) then&lt;br /&gt;
			args[v] = args[k]&lt;br /&gt;
		end&lt;br /&gt;
		args[k] = nil&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Remove empty parameters, if specified&lt;br /&gt;
	if string.find( &#039;,&#039;..(frame.args[&#039;$flags&#039;] or &#039;&#039;)..&#039;,&#039;, &#039;,%s*remove%-empty%s*,&#039; ) then&lt;br /&gt;
		local tmp = 0&lt;br /&gt;
		for k, v in ipairs( args ) do&lt;br /&gt;
			if v ~= &#039;&#039; or ( args[k+1] and args[k+1] ~= &#039;&#039; ) or ( args[k+2] and args[k+2] ~= &#039;&#039; ) then&lt;br /&gt;
				tmp = k&lt;br /&gt;
			else&lt;br /&gt;
				break&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
		for k, v in pairs( args ) do&lt;br /&gt;
			if v == &#039;&#039; then&lt;br /&gt;
				if not (type(k) == &#039;number&#039; and k &amp;lt; tmp) then args[k] = nil end&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Order parameters&lt;br /&gt;
	if frame.args[&#039;$params&#039;] then&lt;br /&gt;
		local params, tmp = mw.text.split( frame.args[&#039;$params&#039;], &#039;%s*,%s*&#039; ), {}&lt;br /&gt;
		for k, v in ipairs(params) do&lt;br /&gt;
			v = tonumber(mw.ustring.match(v, &#039;^[1-9][0-9]*$&#039;)) or v&lt;br /&gt;
			if args[v] then tmp[v], args[v] = args[v], nil end&lt;br /&gt;
		end&lt;br /&gt;
		for k, v in pairs(args) do tmp[k], args[k] = args[k], nil end&lt;br /&gt;
		args = tmp&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	return mTemplateInvocation.invocation(name, args)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
p[&#039;&#039;] = p.main -- For backwards compatibility&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>User</name></author>
	</entry>
	<entry>
		<id>https://shreloaded.net/index.php?title=Module:Hatnote&amp;diff=64317</id>
		<title>Module:Hatnote</title>
		<link rel="alternate" type="text/html" href="https://shreloaded.net/index.php?title=Module:Hatnote&amp;diff=64317"/>
		<updated>2021-08-09T10:23:30Z</updated>

		<summary type="html">&lt;p&gt;User: 1 revision imported&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(&#039;libraryUtil&#039;)&lt;br /&gt;
local checkType = libraryUtil.checkType&lt;br /&gt;
local checkTypeForNamedArg = libraryUtil.checkTypeForNamedArg&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(&#039;Module:Arguments&#039;)&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(&#039;^:?(.*)&#039;)&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(&#039;findNamespaceId&#039;, 1, link, &#039;string&#039;)&lt;br /&gt;
	checkType(&#039;findNamespaceId&#039;, 2, removeColon, &#039;boolean&#039;, 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(&#039;^(.-):&#039;)&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{link = 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(&#039;formatPageTables&#039;, i, t, &#039;table&#039;)&lt;br /&gt;
		local link = t[1]&lt;br /&gt;
		local display = t[2]&lt;br /&gt;
		links[i] = p._formatLink{link = link, display = 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(&#039;makeWikitextError&#039;, 1, msg, &#039;string&#039;)&lt;br /&gt;
	checkType(&#039;makeWikitextError&#039;, 2, helpLink, &#039;string&#039;, true)&lt;br /&gt;
	yesno = require(&#039;Module:Yesno&#039;)&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 = &#039; ([[&#039; .. helpLink .. &#039;|help]])&#039;&lt;br /&gt;
	else&lt;br /&gt;
		helpText = &#039;&#039;&lt;br /&gt;
	end&lt;br /&gt;
	-- Make the category text.&lt;br /&gt;
	local category&lt;br /&gt;
	if not title.isTalkPage -- Don&#039;t categorise talk pages&lt;br /&gt;
		and title.namespace ~= 2 -- Don&#039;t categorise userspace&lt;br /&gt;
		and yesno(addTrackingCategory) ~= false -- Allow opting out&lt;br /&gt;
	then&lt;br /&gt;
		category = &#039;Hatnote templates with errors&#039;&lt;br /&gt;
		category = string.format(&lt;br /&gt;
			&#039;[[%s:%s]]&#039;,&lt;br /&gt;
			mw.site.namespaces[14].name,&lt;br /&gt;
			category&lt;br /&gt;
		)&lt;br /&gt;
	else&lt;br /&gt;
		category = &#039;&#039;&lt;br /&gt;
	end&lt;br /&gt;
	return string.format(&lt;br /&gt;
		&#039;&amp;lt;strong class=&amp;quot;error&amp;quot;&amp;gt;Error: %s%s.&amp;lt;/strong&amp;gt;%s&#039;,&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(&#039;disambiguate&#039;, 1, page, &#039;string&#039;)&lt;br /&gt;
	checkType(&#039;disambiguate&#039;, 2, disambiguator, &#039;string&#039;, true)&lt;br /&gt;
	disambiguator = disambiguator or &#039;disambiguation&#039;&lt;br /&gt;
	return string.format(&#039;%s (%s)&#039;, 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 link}} template.&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
function p.formatLink(frame)&lt;br /&gt;
	-- The formatLink export function, for use in templates.&lt;br /&gt;
	yesno = require(&#039;Module:Yesno&#039;)&lt;br /&gt;
	local args = getArgs(frame)&lt;br /&gt;
	local link = args[1]&lt;br /&gt;
	if not link then&lt;br /&gt;
		return p.makeWikitextError(&lt;br /&gt;
			&#039;no link specified&#039;,&lt;br /&gt;
			&#039;Template:Format link#Errors&#039;,&lt;br /&gt;
			args.category&lt;br /&gt;
		)&lt;br /&gt;
	end&lt;br /&gt;
	return p._formatLink{&lt;br /&gt;
		link = link,&lt;br /&gt;
		display = args[2],&lt;br /&gt;
		italicizePage = yesno(args.italicizepage),&lt;br /&gt;
		italicizeSection = yesno(args.italicizesection),&lt;br /&gt;
	}&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function italicize(s)&lt;br /&gt;
	-- Italicize a string.&lt;br /&gt;
	return &#039;&amp;lt;i&amp;gt;&#039; .. s .. &#039;&amp;lt;/i&amp;gt;&#039;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function maybeItalicize(s, shouldItalicize)&lt;br /&gt;
	-- italicize s if s is a string and the shouldItalicize parameter is true.&lt;br /&gt;
	if s and shouldItalicize then&lt;br /&gt;
		return italicize(s)&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 parseLink(link)&lt;br /&gt;
	-- Parse a link and return a table with the link&#039;s components.&lt;br /&gt;
	-- These components are:&lt;br /&gt;
	-- - link: the link, stripped of any initial colon (always present)&lt;br /&gt;
	-- - page: the page name (always present)&lt;br /&gt;
	-- - section: the page name (may be nil)&lt;br /&gt;
	-- - display: the display text, if manually entered after a pipe (may be nil)&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;
	local prePipe, display = link:match(&#039;^(.-)|(.*)$&#039;)&lt;br /&gt;
	link = prePipe or link&lt;br /&gt;
&lt;br /&gt;
	-- Find the page, if it exists.&lt;br /&gt;
	-- For links like [[#Bar]], the page will be nil.&lt;br /&gt;
	local preHash, postHash = link:match(&#039;^(.-)#(.*)$&#039;)&lt;br /&gt;
	local page&lt;br /&gt;
	if not preHash then&lt;br /&gt;
		-- We have a link like [[Foo]].&lt;br /&gt;
		page = link&lt;br /&gt;
	elseif preHash ~= &#039;&#039; then&lt;br /&gt;
		-- We have a link like [[Foo#Bar]].&lt;br /&gt;
		page = preHash&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Find the section, if it exists.&lt;br /&gt;
	local section&lt;br /&gt;
	if postHash and postHash ~= &#039;&#039; then&lt;br /&gt;
		section = postHash&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	return {&lt;br /&gt;
		link = link,&lt;br /&gt;
		page = page,&lt;br /&gt;
		section = section,&lt;br /&gt;
		display = display,&lt;br /&gt;
	}&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p._formatLink(options)&lt;br /&gt;
	-- The formatLink export function, for use in modules.&lt;br /&gt;
	checkType(&#039;_formatLink&#039;, 1, options, &#039;table&#039;)&lt;br /&gt;
	checkTypeForNamedArg(&#039;_formatLink&#039;, &#039;link&#039;, options.link, &#039;string&#039;, false)&lt;br /&gt;
	checkTypeForNamedArg(&lt;br /&gt;
		&#039;_formatLink&#039;,&lt;br /&gt;
		&#039;display&#039;,&lt;br /&gt;
		options.display,&lt;br /&gt;
		&#039;string&#039;,&lt;br /&gt;
		true&lt;br /&gt;
	)&lt;br /&gt;
	checkTypeForNamedArg(&lt;br /&gt;
		&#039;_formatLink&#039;,&lt;br /&gt;
		&#039;italicizePage&#039;,&lt;br /&gt;
		options.italicizePage,&lt;br /&gt;
		&#039;boolean&#039;,&lt;br /&gt;
		true&lt;br /&gt;
	)&lt;br /&gt;
	checkTypeForNamedArg(&lt;br /&gt;
		&#039;_formatLink&#039;,&lt;br /&gt;
		&#039;italicizeSection&#039;,&lt;br /&gt;
		options.italicizeSection,&lt;br /&gt;
		&#039;boolean&#039;,&lt;br /&gt;
		true&lt;br /&gt;
	)&lt;br /&gt;
&lt;br /&gt;
	local parsed = parseLink(options.link)&lt;br /&gt;
	local display = options.display or parsed.display&lt;br /&gt;
	&lt;br /&gt;
	-- Deal with the case where we don&#039;t have to pipe the link&lt;br /&gt;
	if not display and not parsed.section and not options.italicizePage then&lt;br /&gt;
		return string.format(&#039;[[:%s]]&#039;, parsed.link)&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	-- Find the display text for piped links&lt;br /&gt;
	if not display then&lt;br /&gt;
		local page = maybeItalicize(parsed.page, options.italicizePage)&lt;br /&gt;
		local section = maybeItalicize(parsed.section, options.italicizeSection)&lt;br /&gt;
		if not page then&lt;br /&gt;
			display = string.format(&#039;§&amp;amp;nbsp;%s&#039;, section)&lt;br /&gt;
		elseif section then&lt;br /&gt;
			display = string.format(&#039;%s §&amp;amp;nbsp;%s&#039;, page, section)&lt;br /&gt;
		else&lt;br /&gt;
			display = page&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	return string.format(&#039;[[:%s|%s]]&#039;, parsed.link, display)&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;
			&#039;no text specified&#039;,&lt;br /&gt;
			&#039;Template:Hatnote#Errors&#039;,&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(&#039;_hatnote&#039;, 1, s, &#039;string&#039;)&lt;br /&gt;
	checkType(&#039;_hatnote&#039;, 2, options, &#039;table&#039;, true)&lt;br /&gt;
	options = options or {}&lt;br /&gt;
	local classes = {&#039;hatnote&#039;, &#039;navigation-not-searchable&#039;}&lt;br /&gt;
	local extraclasses = options.extraclasses&lt;br /&gt;
	local selfref = options.selfref&lt;br /&gt;
	if type(extraclasses) == &#039;string&#039; then&lt;br /&gt;
		classes[#classes + 1] = extraclasses&lt;br /&gt;
	end&lt;br /&gt;
	if selfref then&lt;br /&gt;
		classes[#classes + 1] = &#039;selfref&#039;&lt;br /&gt;
	end&lt;br /&gt;
	return string.format(&lt;br /&gt;
		&#039;%s&amp;lt;div role=&amp;quot;note&amp;quot; class=&amp;quot;%s&amp;quot;&amp;gt;%s&amp;lt;/div&amp;gt;&#039;,&lt;br /&gt;
		mw.getCurrentFrame():extensionTag{&lt;br /&gt;
			name = &#039;templatestyles&#039;, args = { src = &#039;Module:Hatnote/styles.css&#039; }&lt;br /&gt;
		},&lt;br /&gt;
		table.concat(classes, &#039; &#039;),&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>User</name></author>
	</entry>
	<entry>
		<id>https://shreloaded.net/index.php?title=Module:Citation&amp;diff=64315</id>
		<title>Module:Citation</title>
		<link rel="alternate" type="text/html" href="https://shreloaded.net/index.php?title=Module:Citation&amp;diff=64315"/>
		<updated>2021-08-09T10:23:30Z</updated>

		<summary type="html">&lt;p&gt;User: 1 revision imported&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;error(&#039;This module is retained for historical and structural reasons; consider using [[Module:Citation/CS1]].&#039;)&lt;/div&gt;</summary>
		<author><name>User</name></author>
	</entry>
	<entry>
		<id>https://shreloaded.net/index.php?title=Roleplay_Safety_Systems&amp;diff=63130</id>
		<title>Roleplay Safety Systems</title>
		<link rel="alternate" type="text/html" href="https://shreloaded.net/index.php?title=Roleplay_Safety_Systems&amp;diff=63130"/>
		<updated>2021-07-06T02:47:54Z</updated>

		<summary type="html">&lt;p&gt;User: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===Introduction===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;PLEASE NOTE:  The roleplay safety tools addressed here are for use in any roleplay area on the ShadowHaven, including a GM&#039;s table and any Haven Discord Channel labeled as &#039;IC&#039;.  They are not to be used in an out of character situation.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Shadowrun is a dark setting that explores a lot of gritty themes, including sexual and violent themes, that not everyone will be comfortable with. While we want to have the freedom to explore these themes in our shared world, we do not want to exclude anyone or make them uncomfortable. For this reason, ShadowHaven is implementing a number of safety tools that can be used by GMs, players, and viewers to make sure that this is a Living Community that all of us can enjoy. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Enforcement of Safety Tools on the ShadowHaven===&lt;br /&gt;
&lt;br /&gt;
If a safety tool is played and is given no heed, please reach out to moderation so that they can help to ensure that these tools are used. In an ideal world, this would not be necessary, but it may become so. Our moderation staff is here to ensure that &#039;&#039;you&#039;&#039; are comfortable with playing here on the ShadowHaven. If at any time you are uncomfortable, then please reach out to @moderation on Discord, or @Ombuds and Advocates.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===The X-Card===&lt;br /&gt;
&lt;br /&gt;
The X-card is a simple tool that we have been using for a long time on the Haven. At any point, any person involved in the run (meaning GM, player or listener) can message or say “X” or in any way communicate “X” to the GM. The GM is then responsible for stopping the scene at that moment. A break is taken and the item being X-carded is either skipped over or edited out. No explanation need be given, but if the person playing the card wishes to share, they may. At times, it may be difficult to understand what was X-carded. If this occurs, it is up to the person that played the card if they want to share, otherwise the GM will ret-con or edit parts or the entirety of a scene.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[The X-Card: A Guide for ShadowHaven GMs|Before each run, GMs should introduce this tool using language similar to the sample script listed here, or any script that introduces all elements of the use of the X-card.]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===The Consent Flower/Streetlight System===&lt;br /&gt;
&lt;br /&gt;
This is a new one for the Haven, but will help us to run better games for everyone involved. The consent flower uses three colors: Green, Yellow and Red, which has led to the nickname “Streetlight system”. However, it is much more. On top of being a way to say “no, I don’t like that,” it is also a way to say, “I do like that,” or “I want more of that.” Each of the three colors indicates varying levels of consent:&lt;br /&gt;
&lt;br /&gt;
*Green: I am okay with the current scene and would be okay with pushing this scene farther. This does &#039;&#039;not&#039;&#039; mean a scene &#039;&#039;has&#039;&#039; to be pushed further, only that the person is okay with it and would like it to happen if everyone else at the table is comfortable with it..&lt;br /&gt;
*Yellow: I am okay with the current scene, but do not desire it to be pushed beyond where it is now.&lt;br /&gt;
*Red: The current scene is making me uncomfortable. Please pull it back a bit or skip it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
GMs should be using this at their table to ensure the comfort levels of their players, especially when topics come up that are dark or gritty in nature. A GM, Player, Thematics member, moderator, ombud or Listener can play a Consent card at any time by messaging the person they wish to address. This can be done in a whisper, on Discord, or by voice. Any person that receives one of these cards is expected to immediately follow the level of consent indicated.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
GMs who can are encouraged to have a Red, Yellow and Green deck that they or a player can play. Instructions should be given to players on how this can be done anonymously, by hovering over the deck, selecting the card that pops up and dragging that card to the table.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Lines, Background Only and Veils===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Another new tool we are bringing online is Lines, Background and Veils. Shadowhaven is a bit limited since we do not have the traditional session zero where the tone of a setting is pre-negotiated. We modify the existing line and veil system and add Background Only.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Line - A line is something that we do not wish to explore at all in our setting. For example, when we set trafficking of minors as a line, that is something that we don’t explore here and it doesn’t exist on Shadowhaven.&lt;br /&gt;
*Veil - A veil is a &amp;quot;pan away&amp;quot; or &amp;quot;fade to black&amp;quot; moment. When we veil something, we&#039;re making it a part of the story, but keeping it out of the spotlight. Think of it as a way to still deal with certain themes while avoiding having to describe them in graphic detail. For example, we can veil torture scenes and just say the event happened and have our characters react to it but we don’t need to cover the details of the torture.&lt;br /&gt;
*Background Only - Background Only content is allowed to be in character backstories and in the setup to a run, but the players should not be actively engaged with the content. For example, trafficking of adults is allowed in the context of a rescue run or a character background. However, it would indicate a wish not to directly be involved in the activity. For example, the rounding up of women in the barrens or the protecting of a truck moving metahumans would not be allowed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Players are highly encouraged to list their personal Lines, Background Only and Veils on their wikipages. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Global Lines, Background Only and Veils====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Shadowhaven sets some content as global for the whole LC.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Lines: Trafficking of Minors, in-scene instances of sexual assault&lt;br /&gt;
*Veil: Prostitution, torture, overly gruesome kill descriptions&lt;br /&gt;
*Background Only: Mass Murder, Genocide, Trafficking of Adults, Minors as combatants/child solders. &lt;br /&gt;
&lt;br /&gt;
[[Category:Player Safety]]&lt;/div&gt;</summary>
		<author><name>User</name></author>
	</entry>
	<entry>
		<id>https://shreloaded.net/index.php?title=ShadowHaven_Reloaded:Roleplay_Safety_Systems&amp;diff=63129</id>
		<title>ShadowHaven Reloaded:Roleplay Safety Systems</title>
		<link rel="alternate" type="text/html" href="https://shreloaded.net/index.php?title=ShadowHaven_Reloaded:Roleplay_Safety_Systems&amp;diff=63129"/>
		<updated>2021-07-06T02:47:10Z</updated>

		<summary type="html">&lt;p&gt;User: User moved page ShadowHaven:Roleplay Safety Systems to Roleplay Safety Systems over redirect&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Roleplay Safety Systems]]&lt;/div&gt;</summary>
		<author><name>User</name></author>
	</entry>
	<entry>
		<id>https://shreloaded.net/index.php?title=Roleplay_Safety_Systems&amp;diff=63128</id>
		<title>Roleplay Safety Systems</title>
		<link rel="alternate" type="text/html" href="https://shreloaded.net/index.php?title=Roleplay_Safety_Systems&amp;diff=63128"/>
		<updated>2021-07-06T02:47:10Z</updated>

		<summary type="html">&lt;p&gt;User: User moved page ShadowHaven:Roleplay Safety Systems to Roleplay Safety Systems over redirect&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===Introduction===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;PLEASE NOTE:  The roleplay safety tools addressed here are for use in any roleplay area on the ShadowHaven, including a GM&#039;s table and any Haven Discord Channel labeled as &#039;IC&#039;.  They are not to be used in an out of character situation.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Shadowrun is a dark setting that explores a lot of gritty themes, including sexual and violent themes, that not everyone will be comfortable with. While we want to have the freedom to explore these themes in our shared world, we do not want to exclude anyone or make them uncomfortable. For this reason, ShadowHaven is implementing a number of safety tools that can be used by GMs, players, and viewers to make sure that this is a Living Community that all of us can enjoy. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Enforcement of Safety Tools on the ShadowHaven===&lt;br /&gt;
&lt;br /&gt;
If a safety tool is played and is given no heed, please reach out to moderation so that they can help to ensure that these tools are used. In an ideal world, this would not be necessary, but it may become so. Our moderation staff is here to ensure that &#039;&#039;you&#039;&#039; are comfortable with playing here on the ShadowHaven. If at any time you are uncomfortable, then please reach out to @moderation on Discord, or @Ombuds and Advocates.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===The X-Card===&lt;br /&gt;
&lt;br /&gt;
The X-card is a simple tool that we have been using for a long time on the Haven. At any point, any person involved in the run (meaning GM, player or listener) can message or say “X” or in any way communicate “X” to the GM. The GM is then responsible for stopping the scene at that moment. A break is taken and the item being X-carded is either skipped over or edited out. No explanation need be given, but if the person playing the card wishes to share, they may. At times, it may be difficult to understand what was X-carded. If this occurs, it is up to the person that played the card if they want to share, otherwise the GM will ret-con or edit parts or the entirety of a scene.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[The X-Card: A Guide for ShadowHaven GMs|Before each run, GMs should introduce this tool using language similar to the sample script listed here, or any script that introduces all elements of the use of the X-card.]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===The Consent Flower/Streetlight System===&lt;br /&gt;
&lt;br /&gt;
This is a new one for the Haven, but will help us to run better games for everyone involved. The consent flower uses three colors: Green, Yellow and Red, which has led to the nickname “Streetlight system”. However, it is much more. On top of being a way to say “no, I don’t like that,” it is also a way to say, “I do like that,” or “I want more of that.” Each of the three colors indicates varying levels of consent:&lt;br /&gt;
&lt;br /&gt;
*Green: I am okay with the current scene and would be okay with pushing this scene farther. This does &#039;&#039;not&#039;&#039; mean a scene &#039;&#039;has&#039;&#039; to be pushed further, only that the person is okay with it and would like it to happen if everyone else at the table is comfortable with it..&lt;br /&gt;
*Yellow: I am okay with the current scene, but do not desire it to be pushed beyond where it is now.&lt;br /&gt;
*Red: The current scene is making me uncomfortable. Please pull it back a bit or skip it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
GMs should be using this at their table to ensure the comfort levels of their players, especially when topics come up that are dark or gritty in nature. A GM, Player, Thematics member, moderator, ombud or Listener can play a Consent card at any time by messaging the person they wish to address. This can be done in a whisper, on Discord, or by voice. Any person that receives one of these cards is expected to immediately follow the level of consent indicated.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
GMs who can are encouraged to have a Red, Yellow and Green deck that they or a player can play. Instructions should be given to players on how this can be done anonymously, by hovering over the deck, selecting the card that pops up and dragging that card to the table.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Lines, Background Only and Veils===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Another new tool we are bringing online is Lines, Background and Veils. Shadowhaven is a bit limited since we do not have the traditional session zero where the tone of a setting is pre-negotiated. We modify the existing line and veil system and add Background Only.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Line - A line is something that we do not wish to explore at all in our setting. For example, when we set trafficking of minors as a line, that is something that we don’t explore here and it doesn’t exist on Shadowhaven.&lt;br /&gt;
*Veil - A veil is a &amp;quot;pan away&amp;quot; or &amp;quot;fade to black&amp;quot; moment. When we veil something, we&#039;re making it a part of the story, but keeping it out of the spotlight. Think of it as a way to still deal with certain themes while avoiding having to describe them in graphic detail. For example, we can veil torture scenes and just say the event happened and have our characters react to it but we don’t need to cover the details of the torture.&lt;br /&gt;
*Background Only - Background Only content is allowed to be in character backstories and in the setup to a run, but the players should not be actively engaged with the content. For example, trafficking of adults is allowed in the context of a rescue run or a character background. However, it would indicate a wish not to directly be involved in the activity. For example, the rounding up of women in the barrens or the protecting of a truck moving metahumans would not be allowed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Players are highly encouraged to list their personal Lines, Background Only and Veils on their wikipages. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Global Lines, Background Only and Veils====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Shadowhaven sets some content as global for the whole LC.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Lines: Trafficking of Minors, in-scene instances of sexual assault&lt;br /&gt;
*Veil: Prostitution, torture, overly gruesome kill descriptions&lt;br /&gt;
*Background Only: Mass Murder, Genocide, Trafficking of Adults&lt;br /&gt;
&lt;br /&gt;
[[Category:Player Safety]]&lt;/div&gt;</summary>
		<author><name>User</name></author>
	</entry>
	<entry>
		<id>https://shreloaded.net/index.php?title=Charter&amp;diff=63126</id>
		<title>Charter</title>
		<link rel="alternate" type="text/html" href="https://shreloaded.net/index.php?title=Charter&amp;diff=63126"/>
		<updated>2021-07-06T02:45:27Z</updated>

		<summary type="html">&lt;p&gt;User: /* Duties and Methods */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This Charter has been set forth to direct the community representing the ShadowHaven living Shadowrun campaign, to facilitate a mature community of Shadowrun players playing together in an accessible manner, to provide guidelines for a welcoming community with strong moderation, and to collaboratively tell and enjoy a compelling and engaging Shadowrun story.&lt;br /&gt;
 &lt;br /&gt;
We explicitly do not seek to maximize the number of people in our group, but to focus on making the group as fun and stress-free as possible. We do not accept antisocial behavior here. We seek to create a space where every member feels free to bring up issues that they may have and can expect civil dialog on the topic. We understand that the time and energy of our members is preciously limited and aim to make time spent here as joyous as possible. We set strong boundaries on the type of gameplay and community we expect while acknowledging and accepting that some may not fit with us. However, we are more than happy to play with anyone to see if there is a fit.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Some may not fit in with us and we accept that as part of the human condition.  --&amp;gt;&lt;br /&gt;
=Article I: Guiding Principles=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. &#039;&#039;&#039;Freedom to pick&#039;&#039;&#039;: GMs being free to choose their players and players being free to choose their GMs creates accountability on the part of all people involved to play the game in good faith.&lt;br /&gt;
&lt;br /&gt;
2. &#039;&#039;&#039;Trust each other&#039;&#039;&#039;: Our players and GMs can trust each other for anyone who dares violate that trust will be removed. &lt;br /&gt;
&lt;br /&gt;
3. &#039;&#039;&#039;We’re Busy, Slot Paperwork&#039;&#039;&#039;: Our member’s time is valuable. Any paperwork we ask for should be for world building, not administrative measures that attempt to guard community integrity with record keeping. Most our time should be spent playing games. &lt;br /&gt;
&lt;br /&gt;
4. &#039;&#039;&#039;No pulled punches&#039;&#039;&#039;: We will not implement policies that encourage pulled punches and sugarcoating of game content. &lt;br /&gt;
&lt;br /&gt;
5. &#039;&#039;&#039;It&#039;s better to ban one than lose two&#039;&#039;&#039;: The integrity of the community will be guarded. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- 6. &#039;&#039;&#039;Low bureaucracy&#039;&#039;&#039;:   --&amp;gt; &lt;br /&gt;
6. &#039;&#039;&#039;Open Dialog&#039;&#039;&#039;: Provide spaces to members to community their grievances, make sure they feel comfortable enough to share them.&lt;br /&gt;
&lt;br /&gt;
7. &#039;&#039;&#039;Permissive, but not sugarcoated&#039;&#039;&#039;: While we let our players play what they want, we will not sugar coat the world to make more oddball concepts work. We aim to achieve verisimilitude. &lt;br /&gt;
&lt;br /&gt;
8. &#039;&#039;&#039;House rule philosophy&#039;&#039;&#039;: We attempt to accept as much of Shadowrun 5E&#039;s raw as possible. If ambiguity gets in the way, we attempt to create house rules that preserve a version of Shadowrun 5E that is relatable to all players, especially new ones. We address problematic areas of the game like vehicle damage, melee with spirits, and addiction rules in ways that streamline and improve the player experience for a living community setting. We ban unsalvageable parts of the game.&lt;br /&gt;
&lt;br /&gt;
=Article II: Organization Structure=&lt;br /&gt;
&lt;br /&gt;
==Senior Staff==&lt;br /&gt;
&lt;br /&gt;
#All Senior Staff may award GMP to achieve their departments goals.&lt;br /&gt;
#All Senior Staff awarded 10 GMP on the 1st of each month.&lt;br /&gt;
#All Senior Staff shall act as moderators.&lt;br /&gt;
#All Senior Staff may appoint deputies to their departments ranging in powers to normal member of their department to full powers of the senior staff member.&lt;br /&gt;
##Senior Staff members should work with the SysOp to determine deputy powers for their department and list them in the charter.&lt;br /&gt;
&lt;br /&gt;
===Pre-Made Verification Division===&lt;br /&gt;
====Head of the Pre-Made Verification Division Duties and Powers====&lt;br /&gt;
1. Acts as a member of the senior staff.&lt;br /&gt;
&lt;br /&gt;
2. Managed the [https://www.reddit.com/r/ShadowHavenPreMadeGen/ r/ShadowHavenPreMadeGen] subreddit&lt;br /&gt;
&lt;br /&gt;
3. Approve submitted Pre-mades for Community and GM use, ensuring they meet ShadowHaven chargen rules. &lt;br /&gt;
&lt;br /&gt;
4. Works with the Mechanics and Thematics Departments to rectify pre-mades with problems.&lt;br /&gt;
&lt;br /&gt;
5. Denies unsuitable pre-mades.&lt;br /&gt;
&lt;br /&gt;
6. Manages a team of minions to approve, review and deny pre-mades.&lt;br /&gt;
&lt;br /&gt;
7. Sets GMP awards for the creation of pre-mades. &lt;br /&gt;
&lt;br /&gt;
8. Sets standards of additional material to come with the pre-made beyond sheets.  &lt;br /&gt;
&lt;br /&gt;
=====Term Length=====&lt;br /&gt;
Term ends on the first day of an odd-numbered month.&lt;br /&gt;
&lt;br /&gt;
===Moderation Division===&lt;br /&gt;
====Head Moderator Duties and Powers====&lt;br /&gt;
1. Acts as a member of the senior staff.&lt;br /&gt;
&lt;br /&gt;
2. Interprets the community standards.&lt;br /&gt;
&lt;br /&gt;
3. Brings cases that need a ban length longer than what the moderators can do to the sysop.&lt;br /&gt;
&lt;br /&gt;
4. Recruits, interviews, and disciplines the moderator staff.&lt;br /&gt;
&lt;br /&gt;
5. Reviews complaints about moderator staff.&lt;br /&gt;
&lt;br /&gt;
6. Vetos moderator ban votes. &lt;br /&gt;
&lt;br /&gt;
7. Issues Formal Warnings.&lt;br /&gt;
&lt;br /&gt;
8. Modifies the [[Community Expectations]].&lt;br /&gt;
&lt;br /&gt;
=====Term Length=====&lt;br /&gt;
Term ends on the first day of an odd-numbered month.&lt;br /&gt;
&lt;br /&gt;
=====GMP Rewards=====&lt;br /&gt;
12 GMP on the 1st of every month.&lt;br /&gt;
&lt;br /&gt;
====Individual Moderators Duties and Powers====&lt;br /&gt;
&lt;br /&gt;
#At their own discretion, Informally Warn, Kick, or Mute members who are breaking community standards&lt;br /&gt;
#Mediate interpersonal conflicts&lt;br /&gt;
#Interview members when investigating cases&lt;br /&gt;
#Access to all ShadowHaven documents and chat channels when investigating cases&lt;br /&gt;
#Any moderator can issue up to a 3-day ban. Any two moderators can issue up to a two-week ban. Any 3 moderators can issue up to a one month ban. Any 4 moderators can issue up to a three-month ban. Any 5 moderators can issue up to a six-month ban. &lt;br /&gt;
##An except to this rule is in regards to raiders and trolls who join the server and immediately cause disruptive action. In these cases, a moderator may issue any actions including a permaban. This actions may be reversed by the Head of Moderation or the Sysop.&lt;br /&gt;
##Moderators should not wait to compose a thought out ban message or delay to issuing of a 3 day ban until they get a more moderators aboard to issue a longer ban.&lt;br /&gt;
#When taking any action, moderators must document their action and reasoning in the report form in order to document incidents.&lt;br /&gt;
#When issuing bans, moderators must inform the banned of their right to appeal the case to the sysop.&lt;br /&gt;
#Any 3 mods can issue a formal warning&lt;br /&gt;
&lt;br /&gt;
===Division of the Wiki===&lt;br /&gt;
====Editor-at-Large for the Wiki====&lt;br /&gt;
&lt;br /&gt;
#Maintain the wiki&lt;br /&gt;
#Help players, GMs and other members use the wiki&lt;br /&gt;
#Organize a division with members to accomplish their goals&lt;br /&gt;
#Works with the thematics division to ensure entries added to the wiki for GMP are of a high enough quality to be worth of that award. These include things like player AARs.&lt;br /&gt;
#Acts as a member of the senior staff&lt;br /&gt;
&lt;br /&gt;
=====Term Length=====&lt;br /&gt;
Term ends on the first day of an odd-numbered month.&lt;br /&gt;
&lt;br /&gt;
===Division of Publications===&lt;br /&gt;
&lt;br /&gt;
====Editor-at-Large for Publications====&lt;br /&gt;
&lt;br /&gt;
#Assist the SysOp with the development of new fan books for Shadowrun 5th edition&lt;br /&gt;
#Organize a division with members to accomplish their goals&lt;br /&gt;
&lt;br /&gt;
=====Term Length=====&lt;br /&gt;
Term ends on the first day of an odd-numbered month.&lt;br /&gt;
&lt;br /&gt;
==The Council (on Game Play)==&lt;br /&gt;
The 4 members of the council shall represent the heads of the following divisions:&lt;br /&gt;
&lt;br /&gt;
*Mechanics&lt;br /&gt;
&lt;br /&gt;
*Thematics&lt;br /&gt;
&lt;br /&gt;
*Character Generation&lt;br /&gt;
&lt;br /&gt;
*Shared Story&lt;br /&gt;
&lt;br /&gt;
===Term Length===&lt;br /&gt;
Term ends on the first day of an odd-numbered month.&lt;br /&gt;
&lt;br /&gt;
===Duties and Methods===&lt;br /&gt;
1. The Council, as a whole, shall work together to collaborate between the four divisions and their branches, facilitate open discussion and approve full house rules.&lt;br /&gt;
&lt;br /&gt;
2. The Council, as a whole, may optionally move proposed house rules and policy changes to public comment for 1 to 4 weeks. They may then take those community comments to further refine the proposed house rule or policy change. &lt;br /&gt;
&lt;br /&gt;
3. The Council, as a whole, shall work together to review and comment on issues raised by the community in the Topics for Discussion thread. The Topics for Discussion shall be pinned on the r/ShadowHavenBBS subreddit. If no action is taken, the council should comment as such. If action is taken, the action should be noted.&lt;br /&gt;
&lt;br /&gt;
4. All council members may appoint deputies to their departments ranging in powers to normal member of their department to full powers of the senior staff member.&lt;br /&gt;
&lt;br /&gt;
#Council members should work with the SysOp to determine deputy powers for their department and list them in the charter.&lt;br /&gt;
&lt;br /&gt;
5. Council members shall act as moderators.&lt;br /&gt;
&lt;br /&gt;
6. In the event of a tie, the SysOp shall have the following options. They may either 1) Modify the proposal in question to achieve a majority vote on the council. 2) Cast a tie breaking vote on the proposal in question.&lt;br /&gt;
&lt;br /&gt;
===Division Head Descriptions===&lt;br /&gt;
====Mechanics Duties====&lt;br /&gt;
1. Review new Shadowrun content for use on ShadowHaven&lt;br /&gt;
&lt;br /&gt;
2. Ban Shadowrun rules not fit for community play&lt;br /&gt;
&lt;br /&gt;
3. Maintain the ShadowHaven experience that is a refined version of the Rules as Written and provide clear documentation on any house rules should they be required.&lt;br /&gt;
&lt;br /&gt;
4. Review and approve mechanical changes proposed by Thematics in the form of State of Seattle posts and similar effects.&lt;br /&gt;
&lt;br /&gt;
5. Review and approve the mechanical aspects of contacts.&lt;br /&gt;
&lt;br /&gt;
6. Organize a department to perform the above duties.&lt;br /&gt;
&lt;br /&gt;
====Thematics Duties====&lt;br /&gt;
1. Organize a department to manage and oversee the storylines of the Game Masters on ShadowHaven, ensuring maximum GM freedom while minimizing unwanted intersection of plotlines.&lt;br /&gt;
&lt;br /&gt;
2. Resolve conflict between GMs in regards to the use of setting pieces. &lt;br /&gt;
&lt;br /&gt;
3. Oversee presentation of post-mission consequences upon the world of the ShadowHaven living campaign to members of the community.&lt;br /&gt;
&lt;br /&gt;
4. Investigate reports of GM misconduct.&lt;br /&gt;
&lt;br /&gt;
5. Interview new GMs to ShadowHaven to see if they are fit for the community.&lt;br /&gt;
&lt;br /&gt;
6. Organize the recording of run information in the form of wikipages.&lt;br /&gt;
&lt;br /&gt;
7. Oversee the thematics of contacts.&lt;br /&gt;
&lt;br /&gt;
8. Conduct investigations into GM misconduct.&lt;br /&gt;
&lt;br /&gt;
9. Works with the wiki division to ensure entries added to the wiki for GMP are of a high enough quality to be worth of that award. These include things like player AARs. &lt;br /&gt;
&lt;br /&gt;
====Character Generation Duties====&lt;br /&gt;
1. Ensure the ShadowHaven legality and adherence to rules of  player characters proposed by members of the ShadowHaven living campaign.&lt;br /&gt;
&lt;br /&gt;
2. Organize a department to offer constructive criticism of the concept and mechanicals of proposed player characters.&lt;br /&gt;
&lt;br /&gt;
====Shared Story Loremaster Duties====&lt;br /&gt;
&lt;br /&gt;
1. At the end of each month, read every AAR for that preceding month.&lt;br /&gt;
&lt;br /&gt;
2. Call upon to GMs to submit AARs for the proceeding month&lt;br /&gt;
&lt;br /&gt;
3. Seek out incomplete AARs of significant events in ShadowHaven’s lore&lt;br /&gt;
&lt;br /&gt;
4. With this knowledge, update the story so far on the wiki with bullet points for that month.&lt;br /&gt;
&lt;br /&gt;
5. Assist GMs, players, and the council with questions regarding ShadowHaven’s story&lt;br /&gt;
&lt;br /&gt;
6. Note deviations from official CGL canon and present them clearly to the community&lt;br /&gt;
&lt;br /&gt;
7. Organize a division with members to accomplish their goals&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;GMP Rewards&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
12 GMP on the 1st of every month.&lt;br /&gt;
&lt;br /&gt;
==Sysop==&lt;br /&gt;
&lt;br /&gt;
===Duties and Powers===&lt;br /&gt;
1. May modify the charter&lt;br /&gt;
&lt;br /&gt;
2. Review ban appeals and nullifies or modify ban lengths and other punishments.&lt;br /&gt;
&lt;br /&gt;
3. May arbitrarily increase the length of bans issued by moderation.&lt;br /&gt;
&lt;br /&gt;
4. May issue permanent bans.&lt;br /&gt;
&lt;br /&gt;
5. Censures players, GMs or staff. &lt;br /&gt;
&lt;br /&gt;
6. Conduct technical upkeep on the community.&lt;br /&gt;
&lt;br /&gt;
7. Resolve conflict between departments.&lt;br /&gt;
&lt;br /&gt;
8. Interviews and appoints council members and senior staff to their respective terms.&lt;br /&gt;
&lt;br /&gt;
9. May renew a council member or senior staff member to another term.&lt;br /&gt;
&lt;br /&gt;
10. May dismiss a council member or senior staff member.&lt;br /&gt;
&lt;br /&gt;
11. Modifies the [[Community Expectations]].&lt;br /&gt;
&lt;br /&gt;
=Article III: GMP=&lt;br /&gt;
[[GMP]] must be carefully balanced to avoid building a progression focused culture and instead promote a culture that focuses on storytelling, the game, the community. As such, several policies are defined in this charter.&lt;br /&gt;
&lt;br /&gt;
*Total GMP gained per member from all departments they are in is limited to 15 GMP/month.&lt;br /&gt;
&lt;br /&gt;
=Article IV: Membership Rights=&lt;br /&gt;
==1: The Right Not to be Forced to Continue and Abandon or Cease Uncomfortable Scenes (Global X-Card)==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The ability to abandon or cease games or role play which makes any ShadowHaven member uncomfortable is a fundamental and protected right granted to members by the charter.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Shadowhaven shall treat the word “X-card” as a prearranged and unambiguous signal to end their game or roleplay without delay for any reason. This can be deployed both in voice chat, freeform RP and text based games. Members shall be able to deploy this safeword without retaliation. &lt;br /&gt;
&lt;br /&gt;
Every ShadowHaven department is hereby directed to maintain policies to support any case where a player or GM uses this measure and promote the use of the “X-card” safeword across ShadowHaven, particularly among shy members. In particular, the thematics in their GM oversight role and moderation teams. &lt;br /&gt;
&lt;br /&gt;
The “X-card” safeword may be activated via text, voice or PM. It may be used in the voice chat, private PM to the game master, or by messaging a member of the council, moderation team, or Shadow Haven Staff in private to request they step in and stop the game.. A member need not have made their discomfort known prior to using the X-card. Members may feel free to disconnect from the game before deploying this safeword. Members may use this in any way they feel most comfortable. Any means a member feels most comfortable with using are acceptable. If anonymity is requested when using the X-Card, it is to be protected.&lt;br /&gt;
&lt;br /&gt;
ShadowHaven as an organization cares more about player safety than storylines. We have many tools at our disposal to ensure the storyline continues, but only after we have taken care of our priority towards player safety. This is not a tool of last resort, nor is it a replacement for other conversations around sensitive topics. However, we are exploring a dark world in a freeform fashion with complete strangers. We have complete trust in our members to explore these topics in a mature way. However, sometimes we stumble and need a safety net. This is especially true in our voice and text chat based environment where we do not have body language to detect discomfort. &lt;br /&gt;
&lt;br /&gt;
The best response to the deployment of an “X-card” is to take a break and either talk to the involved parties or have a moderation/thematics member do it for you. The involved party shall need not reveal what is happening. &lt;br /&gt;
&lt;br /&gt;
All members of the ShadowHaven community shall treat the use of the X-Card with respect and maturity. There shall be zero tolerance for hostile actions made in retaliation against someone for using the X-Card.&lt;br /&gt;
&lt;br /&gt;
==2: Have a proposed denied by council or mechanics to be reviewed by the community at large.==&lt;br /&gt;
&lt;br /&gt;
The Topics for Discussion thread, in the old days, was a place for public debate over the course of the community. With Discord, that has fallen to the way side, yet we consider this public stage for discussion the community to be vital. Thus, after going through the normal mechanics thread and council process, members may submit their proposals to the SysOp via the normal ticket process. If submitted in good faith, the sysop will make a discord channel for the public debate of that issue. 2 to 3 weeks after the start of that debate, the council will vote on the topic again with the knowledge gained from these discussions in mind. Please note, these discussions must be in good faith. Should the discussion spiral into toxicity, the sysop may cancel the public comment period.&lt;/div&gt;</summary>
		<author><name>User</name></author>
	</entry>
</feed>