<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://projectunsc.org/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Bloxgate</id>
	<title>HaloStation Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://projectunsc.org/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Bloxgate"/>
	<link rel="alternate" type="text/html" href="https://projectunsc.org/wiki/index.php?title=Special:Contributions/Bloxgate"/>
	<updated>2026-04-08T02:44:53Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.35.5</generator>
	<entry>
		<id>https://projectunsc.org/wiki/index.php?title=Rules&amp;diff=2686</id>
		<title>Rules</title>
		<link rel="alternate" type="text/html" href="https://projectunsc.org/wiki/index.php?title=Rules&amp;diff=2686"/>
		<updated>2026-03-21T21:28:33Z</updated>

		<summary type="html">&lt;p&gt;Bloxgate: Changed protection level for &amp;quot;Rules&amp;quot;: High traffic page ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite)) [cascading]&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt; &lt;br /&gt;
== Server Rules ==&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
 1.1) If you are not certain about something, ahelp an admin about it. We are here to assist you.&lt;br /&gt;
&lt;br /&gt;
 1.2) If there are no admins or moderators online, and you have an issue, adminhelp anyway as it will make a log and ping admins. If you have complaints about a player for actions that occurred while no staff were available, file a complaint in the Player Complaints section on the forum.&lt;br /&gt;
&lt;br /&gt;
 1.3) If there are no staff online and a player is being excessively aggressive (i.e attacking people), you are allowed to protect yourself and others from them via lethal means. This is not an excuse to murder someone you find annoying. Make sure you establish an adminhelp even if no admins are currently online, wait 5 minutes and then feel free to execute the troublemaker and you will likely never have to expect a ping.&lt;br /&gt;
&lt;br /&gt;
 1.4) Admins have the full power to decide the harshness of a punishment, dictated by past records and their own judgement. If you feel you have been unfairly punished, file a complaint in the Office of Investigations section on the forum.&lt;br /&gt;
&lt;br /&gt;
 1.5) Admins and other staff members are not exempt from the rules whatsoever. If you feel a staff member has been breaking rules, file a complaint in the Office of Investigations section on the forum.&lt;br /&gt;
&lt;br /&gt;
 1.6) Excessive disrespect and rudeness towards staff will likely result in a ban.&lt;br /&gt;
&lt;br /&gt;
 1.7) If an admin tells you to stop a specific behavior or series of actions, you must listen and obey for that time being.&lt;br /&gt;
&lt;br /&gt;
 1.8) Ban evasion via the usage of TOR or other programs with the same end goal, or by using alt-CKEYs, will be met with a permanent ban.&lt;br /&gt;
&lt;br /&gt;
 1.9) Using another user’s account to access whitelisted features that you normally do not have access to is forbidden, and will be met with severe punishment.&lt;br /&gt;
&lt;br /&gt;
 1.10) You are allowed to handle SSD without permission. Taking ID's and other important items are often helpful and at times mandatory.&lt;br /&gt;
&lt;br /&gt;
Admins are also fully expected to follow the rules. Violations are to be posted on the [https://projectunsc.org/forum/forumdisplay.php?fid=9 admin complaint forum] . Keep in mind just because something is posted there, it is not grounds for dismissal, but merely grounds for behavior correction.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== General Gameplay Rules ==&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
 2.1) For all factions, rushing to intentionally remove, disable, destroy, or block off another faction’s spawn point within the first 10 - 20 minutes of a round is forbidden.&lt;br /&gt;
&lt;br /&gt;
 2.2) All NPCs should be treated as though they were fellow players. In other words, don’t murder them for no reason.&lt;br /&gt;
&lt;br /&gt;
 2.3) Do not respawn as the same character after death: you must either switch to a different character, or at the very least, change the name of your character for that round until they die again. (This rule does not need to be followed on game modes such as Slayer and Capture and Hold.)&lt;br /&gt;
&lt;br /&gt;
 2.4) Using information gained from any sources other than IC means is forbidden. No IC in OOC, or OOC in IC. No showing screenshots of a current round in the Discord unless a reasonable amount of time (10+ minutes) have passed, or if no sensitive information can be gleaned from the screenshot (i.e a screencap of a funny conversation).&lt;br /&gt;
&lt;br /&gt;
 2.5) You are allowed to handle SSD players, but you may not kill them, intentionally leave them in situations where they may die, or otherwise leave them in situations where they will not be able to play the game any further (i.e kidnapping them and locking them in brig for the rest of the round). You are allowed to take IDs and other important items off SSD players when necessary, unless it is forbidden by faction leaders for whatever reason ICly.&lt;br /&gt;
&lt;br /&gt;
 2.6) No end-of-round grief/EoRG.&lt;br /&gt;
&lt;br /&gt;
 2.7) When defending a point, area, or base, you must ensure that it is accessible via walking on harm intent. You may not wall off sections, doors, or other openings. Stacking barbed wire is forbidden. Tank traps require a 1x1 minimum gap between them. You cannot hide artifacts, nukes, or other important and/or mission-critical items in walls, or place them in areas that are inaccessible to certain factions.&lt;br /&gt;
&lt;br /&gt;
 2.8) All factions may use the weapons, vehicles, and technology of other factions. Note that the Covenant is usually semi-restricted by rules regarding heresy, which is handled almost exclusively IC.&lt;br /&gt;
&lt;br /&gt;
 2.9) In game modes such as Reclamation and Outer Colonies, as the Covenant, you may not use a Slipspace Core received from a Slipspace Tender ship without first attempting to use and detonate the Antimatter Bomb on the ODP/Asteroid Base. When using the Slipspace Core, you may not intentionally place it in areas that may be hard to reach or otherwise find by the UNSC; it must be inside an accessible area on the ODP.&lt;br /&gt;
&lt;br /&gt;
 2.10) Do not build solid walls, place barbed wire, or otherwise place any sort of potential obstacle that is NOT a bomb on top of bomb points on the ODP/Moon Base. Building walls and similar barricades around these sites is fine, provided that they are still accessible by foot. Any violations WILL be completely cleared by admin deletion so that there are no defenses at all for the offending bomb point.&lt;br /&gt;
&lt;br /&gt;
 2.11) Do not place gamemode-critical items, such as the Antimatter Bomb/Slipspace Cores or the Artifact, on z-levels inaccessible to one or more factions. This includes not making the Z-level in which the gamemode-critical item is in inaccessiable.&lt;br /&gt;
&lt;br /&gt;
 2.12) When defending a certain position in space, such as an ODP or another ship, you may not call in other ships and cover the position in stacks of ships to act as a bodyshield. Ships that are summoned should be called in with the intent of using them as a means to attack other ships, to retrieve certain resources, or otherwise as a means of transport.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Roleplay Rules ==&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 3.1) Erotic roleplay is forbidden. This also includes stalking, sexual harassment, or generally just making people feel sexually uncomfortable.&lt;br /&gt;
&lt;br /&gt;
 3.2) Self-antagging is generally forbidden. You value your job, your co-workers/comrades, and your life. However, instances of being a self-antag may be permitted if you have both admin permission and have a proper, roleplayed out work-up to it.&lt;br /&gt;
&lt;br /&gt;
 3.3) The name of your character cannot be the same as a canon character’s (i.e John-117, Thel ‘Vadam), cannot be the same as a notable real-life person’s (i.e Michael Jackson, Barack Obama, Adolf Hitler), cannot be a meme/immature name (i.e Chad Thundercock, Chungus), and must be appropriate for the species of that character.&lt;br /&gt;
&lt;br /&gt;
 3.4) Your character should speak in a matter that is realistic and consistent with their race/lore (to the best of your knowledge). Basically, don’t use “leet”-speak or internet slang.&lt;br /&gt;
&lt;br /&gt;
 3.5) You must roleplay according to the level of knowledge that your role and/or species would have in the setting of the universe. For example, a simple marine would not be aware that the Spartan-IIs consist of child soldiers kidnapped, conscripted, and trained from 6 years of age, while that information might be more readily known by an ONI researcher.&lt;br /&gt;
&lt;br /&gt;
 3.6) Your character may not act psychotic (i.e randomly murdering people, frying up the body parts of your enemies regardless of their species and eating them) without both admin permission and a proper, roleplayed out work-up to said psychotic actions. Ahelp about your plans if you genuinely want to do this.&lt;br /&gt;
&lt;br /&gt;
 3.7) Faction leaders and commanders are allowed to punish those that disobey orders as they see fit, which may include execution.&lt;br /&gt;
&lt;br /&gt;
=== UNSC Facing Rules ===&lt;br /&gt;
&lt;br /&gt;
 3.8) For the UNSC, they must not randomly kill civilians (including NPCs) unless they have a valid IC reason to do so; they work to protect the UEG, as well as its citizens. These reasons could be that the civilians refuse to comply with orders in an active warzone, are openly armed on a colony with an active Insurrectionist presence, or otherwise hinder the UNSC’s objectives on a colony or elsewhere. When in doubt, ahelp it!&lt;br /&gt;
&lt;br /&gt;
 3.9) For the UNSC, the UNSC strongly values the law; commanding staff must follow The Law, and enforce it as necessary on ships under their command, such as arresting marines should they break the law (provided that they broke said law under unreasonable circumstances - for example, a marine breaking down a door is acceptable when the Covenant is actively invading the colony.)&lt;br /&gt;
&lt;br /&gt;
 3.10) For the UNSC, marines are to never wear uniforms sanctioned outside normal UNSC regulations, to avoid friendly fire instances and to show the enemy that the UNSC is a professional standing army. This includes civilian gear, Insurrectionist gear, and Covenant gear. Failure to adhere to this will result in a dressing-down and potential demotion. Obviously, exceptions may be granted for espionage missions or for donor gear.&lt;br /&gt;
&lt;br /&gt;
=== Insurrectionist/URF Facing Rules ===&lt;br /&gt;
&lt;br /&gt;
 3.11) For the Insurrection/URF, the Insurrection is here on the colony to free the citizens of the outer colonies from the tyrannical grip of the UNSC by any means necessary. They should not be murdering citizens (NPC or player) without a sufficient reason, such as self-defense, or for more diabolical schemes (assuming that they are approved by an admin beforehand) such as dressing up as a marine, killing innocents, and then pinning the blame on the UNSC.&lt;br /&gt;
&lt;br /&gt;
 3.12) For the Insurrection/URF, Insurrectionists are allowed to freely disguise themselves as marines or similar roles.&lt;br /&gt;
&lt;br /&gt;
=== Civilian Facing Rules ===&lt;br /&gt;
&lt;br /&gt;
 3.13) For civilians, they are freely allowed to align themselves with the UNSC, the URF, or even the Covenant (should they somehow let you join). Once they devote themselves to a faction, they will lose their status as a “civilian”, and as such may be treated as a hostile enemy by other factions!&lt;br /&gt;
&lt;br /&gt;
=== Covenant Facing Rules ===&lt;br /&gt;
&lt;br /&gt;
 3.14) For the Covenant, the Covenant is an extremely religious group, whose hierarchs have declared humanity to be a heretical race that must be exterminated. As such, they should not seek to cooperate, team up, or otherwise be friendly to humans unless it is beneficial to the Covenant in some way (i.e stopping an infestation, tricking them to receive valuable intel/items/prisoners, etc). However, individuals may choose to be friendly to humans regardless, but they risk the consequences of being punished for heresy!&lt;br /&gt;
&lt;br /&gt;
 3.15) For the Covenant, it is the job of authority figures (Sangheili of any rank, San’shyuum, Unggoy Deacons) to enforce the rules against heresy. What exactly constitutes as “heresy” is semi-ambiguous, but generally, anything involving the handling of most human technology, positively associating with humans, or painting the Covenant and its religion in a bad light is seen as heretical. Covenant players are allowed to use human weapons and technology, but Covenant authority figures are also allowed to punish their subordinates for the usage of human tech. This should depend on the context of the situation, however; for example, a Elite picking up a human shotgun for shits and giggles would certainly count as heretical, while one that only resorted to the use of human weapons after his own weapons were lost and/or lost ammo would be spared of punishment. It should also be clarified that having human prisoners is not inherently heretical.&lt;br /&gt;
&lt;br /&gt;
 3.16) For Huragok specifically, despite spawning in as a Covenant role, they are ultimately a neutral role that can join any faction. However, they cannot join of their own free will, and must be coerced into joining this faction, such as being separated from their teammates and surrounded by the enemy.&lt;br /&gt;
&lt;br /&gt;
 3.17) For Huragok specifically, they are incredibly pacifistic and will avoid fighting back at all unless it is in an emergency (i.e being actively shot at). Otherwise, they should not act hostile or otherwise assist in directly antagonistic actions (like overdosing people), unless it is “passive” (i.e breaking down the walls of a ship’s hull).&lt;br /&gt;
&lt;br /&gt;
 3.18) For Huragok specifically, when speaking in sign language, they may only use one-word responses, and cannot chain multiple responses into something coherent unless they are asked relevant questions (i.e being asked if they’re lost and responded “HELP”, “ME”, “STRANDED”). You are allowed to be more expressive/communicative with vocalizations like chirps, whistles, and croons, or outright gesturing.&lt;br /&gt;
&lt;br /&gt;
 3.19) For the Covenant, authority figures should avoid using the Glassing Beam on the planet (in Reclamation/Outer Colonies) until the artifact has been retrieved. If the situation is deemed unwinnable, they may choose to glass the planet in order to destroy the artifact and deny the enemy access to it.&lt;br /&gt;
&lt;br /&gt;
 3.20) For the Covenant, most of the covenant live in extreme fear of their superiors at all times, whose zeal often is the cause of many beatings, if not deaths, of those who disobey. Mutiny for the covenant species is disallowed without admin permission and a sufficient IC reason (i.e their leader ordering to glass the colony despite the artifact not being retrieved). Brutes, due to their nature, are given more freedom with the reasoning but still need to ahelp.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== UEG COLONY LAWS (2550) ===&lt;br /&gt;
'''(Non-Governed Colonies are allowed to create their own guidelines)'''&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Illegal Firearm - 15 Minutes, Confiscation of Firearm&lt;br /&gt;
*Illegal Drugs - 10 Minutes, Confiscation and Destruction of Drugs.&lt;br /&gt;
*Trespass - 5 Minutes, Questioning&lt;br /&gt;
*Breaking and Entering - 5 Minutes, Questioning&lt;br /&gt;
*Assault (Non-Lethal Punches, Disarming/Pushing) - 5 Minutes&lt;br /&gt;
*Aggravated Assault (Lethal Punches, Neck Grabs, any/all wrestling 'attacks') - 15 Minutes, Questioning&lt;br /&gt;
*Aggravated Assault With A Deadly Weapon (Attacking someone with a knife/gun butt/spear/gun) - 30 Minutes, Questioning, Confiscation of Weapon&lt;br /&gt;
*Attempted Murder (Shooting someone, repeated attacks with deadly weapons. Typically paired with Aggravated Assault With A Deadly Weapon. This does not apply to marines... *typically. If the marine has broken the ROE, yes. If not, no.) - Permanent Confinement, Questioning, Confiscation of Weapon&lt;br /&gt;
*Murder - Permanent Confinement, Questioning, Execution&lt;br /&gt;
*Assault on an Officer (or Marine) - 25 Minutes, Questioning&lt;br /&gt;
*Insurrectionist Activity - Extradition to the UNSC&lt;br /&gt;
*Attempted Murder of an Officer (or Marine) - Summary Execution&lt;br /&gt;
As an aside, if a marine is acting 'rogue', give them a chance to come in, and question them thoroughly. If they refuse, subdue and question them thoroughly. Ensure you listen to both sides.&lt;/div&gt;</summary>
		<author><name>Bloxgate</name></author>
	</entry>
	<entry>
		<id>https://projectunsc.org/wiki/index.php?title=Rules&amp;diff=2680</id>
		<title>Rules</title>
		<link rel="alternate" type="text/html" href="https://projectunsc.org/wiki/index.php?title=Rules&amp;diff=2680"/>
		<updated>2026-03-21T00:53:43Z</updated>

		<summary type="html">&lt;p&gt;Bloxgate: Changed protection level for &amp;quot;Rules&amp;quot; ([Edit=Allow only autoconfirmed users] (indefinite) [Move=Allow only administrators] (indefinite))&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt; &lt;br /&gt;
'''RULE 1: LISTEN TO THE ADMINS'''&lt;br /&gt;
&lt;br /&gt;
*If you are not certain, ask in adminhelp. We are here to assist you. Doing this will prevent 99% of all bans.&lt;br /&gt;
&lt;br /&gt;
*If no admins are online, use your common sense. To make a complaint against a player when there are no admins, use player complaints on the forum for later investigation.&lt;br /&gt;
&lt;br /&gt;
*If there is someone that is excessively assaulting other players while no admins are online, you are allowed to protect yourself and others from them in lethal means. However, keep in mind you may be subject to review of your actions. This is not a golden pass to murder someone you find annoying.&lt;br /&gt;
&lt;br /&gt;
*If an admin says something, for that time being, it is law. No matter what an admin said at any other time or rule stating otherwise. If you want to lawyer it, take it to the admin complaint forum where your argument may be reviewed.&lt;br /&gt;
&lt;br /&gt;
*The admin has full right to decide the harshness of your ban, dictated by past record or their own prerogative. If you suspect this is abused, create an admin complaint for review.&lt;br /&gt;
&lt;br /&gt;
*Excessive disrespect towards admins and staff can lead to a ban.&lt;br /&gt;
Admins are fully expected to adhere to rules 2 and 3. Violations are to be posted on the admin complaint forum. Keep in mind just because something is posted there, it is not grounds for dismissal, but merely grounds for behavior correction.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''RULE 2: ROLEPLAY EXPECTATION'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*For all factions DO NOT RUSH to remove another faction spawn point with in first 10 minutes of the round.&lt;br /&gt;
&lt;br /&gt;
*During First Contact all humans have zero knowledge of the Covenant or Spartan/Orions&lt;br /&gt;
&lt;br /&gt;
*NPC Colonist/trader and or ships are to be treated as if they are another player.  &lt;br /&gt;
&lt;br /&gt;
*We expect a level of roleplay where you are not talking in internet speak of any kind. Smilies and leet are specifically banned. Phrases like ‘wtf’ and ‘omg’ may not be outwardly punished but keep in mind we want you to move on from it.&lt;br /&gt;
&lt;br /&gt;
*No erotic roleplay. This also includes stalking, sexual harassment or making people feel sexually uncomfortable.&lt;br /&gt;
&lt;br /&gt;
*Realistic names to the setting. Famous names and immature names are not allowed. Same for theming your personality around such. (note: Names with no last name is fine &amp;quot;Butch&amp;quot; or &amp;quot;Dr. John Adams is fine too)&lt;br /&gt;
&lt;br /&gt;
*No psychotic behavior. If your actions or roleplayed mental behavior go so far as to inflict murder or excessive violent behavior, expect to be met with a ban.&lt;br /&gt;
&lt;br /&gt;
*Using information from OOC or from an outside source other then IC, is not allowed. For example, using information seen from a person’s stream.&lt;br /&gt;
&lt;br /&gt;
*You are allowed to handle SSD. Taking ID’s and other important items are often helpful and at times mandatory.&lt;br /&gt;
&lt;br /&gt;
*No self-antagging. You value your job, your faction and your coworkers lives. Even in the event those three things no longer apply, you are not to be found firing alongside the insurrectionists or grunts. Vice versa.&lt;br /&gt;
&lt;br /&gt;
*You do not have the skills of every job. You are only expected to have the skills of your current job.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''RULE 3: BEHAVIOR EXPECTATION'''&lt;br /&gt;
&lt;br /&gt;
*No racism. This includes shouting “ALLAHU AKBAR” before explosions. Discriminating people based off gender/race/religion is not tolerable.&lt;br /&gt;
&lt;br /&gt;
*No talking about other servers negatively in OOC.&lt;br /&gt;
&lt;br /&gt;
*Using mechanics such as atmospherics or the chemical system to disrupt the round, may be met with a ban. Remember to contact adminhelp in such situations where you want to use these tools in such a way.&lt;br /&gt;
&lt;br /&gt;
*Nothing NSFW in OOC.&lt;br /&gt;
&lt;br /&gt;
*If there is evidence of you outwardly greifing other servers, we may decide to remove you from our own for your behavior. &lt;br /&gt;
&lt;br /&gt;
*No harassment of other players. If you have an issue you can take it to the player complaints forum. If you have nothing really to show there, then you likely have nothing of value to spout in OOC about them.&lt;br /&gt;
&lt;br /&gt;
*English is the only allowed language. We have IC languages for your secret whisper parties, use those.&lt;br /&gt;
&lt;br /&gt;
*No collaboration of activities such as skype or teamspeak to give yourself an edge in the game. This is more easily noticeable than you suspect.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''RULE 4: BAN EVASION''' &lt;br /&gt;
&lt;br /&gt;
*Ban Evasion by the use of TOR, or a program with the same endgoal, will be punished by a permanent ban.&lt;br /&gt;
&lt;br /&gt;
*Ban Evasion by the use of alt-ckeys to bypass a ban  is forbidden and will earn you a permanent ban.&lt;br /&gt;
&lt;br /&gt;
*Using another users account to access whitelisted features is forbidden and will land you severe ban.&lt;br /&gt;
&lt;br /&gt;
*If you and another person are playing this server and have the same IP ahelp letting staff know before hand.&lt;/div&gt;</summary>
		<author><name>Bloxgate</name></author>
	</entry>
	<entry>
		<id>https://projectunsc.org/wiki/index.php?title=Covenant_Species&amp;diff=1816</id>
		<title>Covenant Species</title>
		<link rel="alternate" type="text/html" href="https://projectunsc.org/wiki/index.php?title=Covenant_Species&amp;diff=1816"/>
		<updated>2022-02-10T00:40:32Z</updated>

		<summary type="html">&lt;p&gt;Bloxgate: Grammar&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;100%&amp;quot; style=&amp;quot;background-color: #f0e8f0;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;font-weight: bold; text-align: center; background-color: #bba0dd; color: white;&amp;quot;&lt;br /&gt;
| width=200 | Race&lt;br /&gt;
|           | Description&lt;br /&gt;
|-&lt;br /&gt;
! [[File: GMinor.png|50px]]&amp;lt;br/&amp;gt;[[Unggoy]]&amp;lt;br /&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
'''Difficulty:''' Easy&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
'''Description:''' The methane breathing Unggoy act as expendable troops for the covenant and are uniquely suited to carrying heavy weapons and ammo. They stick around higher ranking covenant and are generally expected to die in service to the great journey. &lt;br /&gt;
|-&lt;br /&gt;
! [[File: JMinor.png|50px]]&amp;lt;br&amp;gt;[[Kig-Yar]]''&amp;lt;br/&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
'''Difficulty:''' Easy&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
'''Description:''' Kig-Yar are a physically frail and relatively independent species that rely on their superior senses and tactics in combat. They often wield shields to compensate for their frailty and make excellent long ranged support troops. &lt;br /&gt;
|-&lt;br /&gt;
! [[File: EMinor.png|50px]]&amp;lt;br/&amp;gt;[[Sangheili]]&lt;br /&gt;
|&lt;br /&gt;
'''Difficulty:''' Medium&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
'''Description:''' Sangheili are a honor bound species expected to uphold the Covenant's religion and lead those under their command with diligence and honor. They are protected by a powerful shielding system that can soak up a limited amount of gunfire before needing to recharge.&lt;br /&gt;
|-&lt;br /&gt;
! [[File:Bchieftain.png]]&amp;lt;br/&amp;gt;[[Jiralhanae]]&lt;br /&gt;
| '''Difficulty:''' Medium&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
'''Description:''' Jiralhanae are a durable pack species capable of fighting through sustained wounds better than other species. They are generally expected to lead when no sangheili or high ranking covenant members are around. &lt;br /&gt;
|-&lt;br /&gt;
! [[File: Drone.png|50px]]&amp;lt;br/&amp;gt;[[Yanme'e]]&lt;br /&gt;
| '''Difficulty:''' Medium&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
'''Description:''' Yanme'e are a hive species of frail flying insectoids that can use their wings to flank enemies and make themselves tougher targets. Due to their natural born protections against low pressure environments and their ability to easily fly over barricades and over heights, they make excellent engineers and medics when no huragok is available.&lt;br /&gt;
|-&lt;br /&gt;
! [[File:Huragok.png|50px]]&amp;lt;br/&amp;gt;[[Huragok]]&lt;br /&gt;
| '''Difficulty:''' Hard&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
'''Description:''' Huragoks are synthetic and docile beings with a single minded goal of fixing things (or people, if they are a lifeworker) regardless of affiliation. While Huragok are not covenant aligned and will fix anything and anyone where possible, they tend to prioritize assisting the covenant to preserve their own life. They will never inflict harm except under extreme provocation and do not willingly leave the covenant.&lt;br /&gt;
|-&lt;br /&gt;
! [[File:Prophet.png|50px]]&amp;lt;br/&amp;gt;[[San'Shyuum]]&lt;br /&gt;
| '''Difficulty:''' Hard&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
'''Description:''' The San'Shyuum are the leaders of the entire covenant, dedicated entirely to the glorious crusade against the heretics. They are role-play heavy species expected to take command over the ship and its crew. They rely on their bodyguards, the high ranking Honor Guard units, for protection.&lt;br /&gt;
|-&lt;br /&gt;
! [[File: Hunter.png|50px]]&amp;lt;br/&amp;gt;[[Mgalekgolo]]&lt;br /&gt;
| &lt;br /&gt;
'''Difficulty:''' Medium&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
'''Description:''' Mgalekgolo is not a species, but a colony of worms known as the lekgolo which sit inside heavy ship-alloy grade armor. They are walking tanks capable of soaking up a lot of damage before dying and are usually deployed in pairs with their other referred to as a Bond Brother, or mate. They have a powerful fuel rod cannon and a devastating shield that they can smash their enemies with, but are incredibly vulnerable to attacks from behind.&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Bloxgate</name></author>
	</entry>
	<entry>
		<id>https://projectunsc.org/wiki/index.php?title=URF_Ranks&amp;diff=1810</id>
		<title>URF Ranks</title>
		<link rel="alternate" type="text/html" href="https://projectunsc.org/wiki/index.php?title=URF_Ranks&amp;diff=1810"/>
		<updated>2022-01-04T03:17:26Z</updated>

		<summary type="html">&lt;p&gt;Bloxgate: Fix table widths&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;center&amp;gt;&lt;br /&gt;
== '''United Rebel Front Forces''' ==&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;100%;&amp;quot;|&lt;br /&gt;
|- style=&amp;quot;font-weight: bold; text-align: center; background-color: #cf2929; color: white;&amp;quot;&lt;br /&gt;
| width=300 | Role &lt;br /&gt;
| width=800 | Description&lt;br /&gt;
| width=300 | Purpose&lt;br /&gt;
| width=300 | Difficulty&lt;br /&gt;
|-&lt;br /&gt;
! [[image:URF commander.png]]&amp;lt;br/&amp;gt;[[Insurrectionist Commander]]&lt;br /&gt;
| &amp;lt;center&amp;gt;Congratulations, you've been put incharge of a bunch of &amp;lt;s&amp;gt;underarmed, underpaid, untrained farmers.&amp;lt;/s&amp;gt; Hardened soldiers, ready to fight for freedom not matter the cost. You are the '''''big dog''''' in this sector, you and your cell, will ensure that it stays that way.. '''without getting yourself killed'''  Show the UNSC who's boss!&amp;lt;/center&amp;gt;&lt;br /&gt;
| &amp;lt;center&amp;gt;Tactical support&amp;lt;/center&amp;gt;&lt;br /&gt;
| &amp;lt;center&amp;gt;''Very Hard''&amp;lt;/center&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! [[image:URF innie.png]]&amp;lt;br/&amp;gt;[[Insurrectionist]]&lt;br /&gt;
| &amp;lt;center&amp;gt;You make up the majority of the URFs forces, always ready to fight for freedom no matter the cost! &amp;lt;s&amp;gt;''or at least you should be ready''&amp;lt;/s&amp;gt;, guerilla tactics will be your best bet at surviving a skirmish, hit the enemy with lightning speed inflicting as many casualties as possible.. ''without suffering too many of your own'' &amp;lt;/center&amp;gt;&lt;br /&gt;
| &amp;lt;center&amp;gt;Combat Operations&amp;lt;/center&amp;gt;&lt;br /&gt;
| &amp;lt;center&amp;gt;''Easy-Medium''&amp;lt;/center&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! [[image:URF engineer.png ]]&amp;lt;br/&amp;gt;[[Insurrectionist Engineer]]&lt;br /&gt;
| &amp;lt;center&amp;gt;Instead of becoming A civil engineer or A construction worker. You've decided to put your knowledge to the cause, your primary goal is to build defenses and fighting positions for your comrades! However you could also make: improvised explosives, traps, armour plating and even weapons! ''Although they aren't exactly great weapons'' you still can! Do whatever it takes Comrade! &amp;lt;/center&amp;gt;&lt;br /&gt;
| &amp;lt;center&amp;gt;Combat / Support Operations&amp;lt;/center&amp;gt;&lt;br /&gt;
| &amp;lt;center&amp;gt;''Medium''&amp;lt;/center&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! [[image:URF mg gunner.png]]&amp;lt;br/&amp;gt;[[Insurrectionist Machinegunner]]&lt;br /&gt;
| &amp;lt;center&amp;gt;Comrade! You are trained in the use of heavy machineguns! Reign hell upon the UNSC scum with a barrage of bullets. Be the vodka drinking, machinegun shooting hero the URF Propaganda posters always told you to be!&amp;lt;/center&amp;gt;&lt;br /&gt;
| &amp;lt;center&amp;gt;Combat / Support Operations&amp;lt;/center&amp;gt;&lt;br /&gt;
| &amp;lt;center&amp;gt;''Medium''&amp;lt;/center&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! [[image:URF pilot.png]]&amp;lt;br/&amp;gt;[[Insurrectionist Pilot]]&lt;br /&gt;
| &amp;lt;center&amp;gt;A ''professional'' pilot, trained in the use of flying some of the best aircraft the URF has to offer! Whilst you're mainly transporting your fellow comrades back and forth, you may be required to provide CAS support for your comrades down below!&amp;lt;/center&amp;gt;&lt;br /&gt;
| &amp;lt;center&amp;gt;Combat / Support / Transport Operations&amp;lt;/center&amp;gt;&lt;br /&gt;
| &amp;lt;center&amp;gt;''Medium''&amp;lt;/center&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! [[image:URF innie.png]]&amp;lt;br/&amp;gt;[[Insurrectionist Sharpshooter]]&lt;br /&gt;
| &amp;lt;center&amp;gt;Good ol' days of hunting with your pa' paid off, your ''exceptional'' shooting skills are now being used to protect your comrades on the battlefield! Ensure the safety of your comrades from afar by providing much needed fire support!&amp;lt;/center&amp;gt;&lt;br /&gt;
| &amp;lt;center&amp;gt;Combat / Support  Operations&amp;lt;/center&amp;gt;&lt;br /&gt;
| &amp;lt;center&amp;gt;''Medium''&amp;lt;/center&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! [[image:URF medic.png]]&amp;lt;br/&amp;gt;[[Insurrectionist Combat Medic]]&lt;br /&gt;
| &amp;lt;center&amp;gt;They never said preforming triage was easy, especially with bullets flying past your head every second. But hey! Someones gotta do it.. that someone being you. Provide medical aid and support to the your fellow comrades fighting on the frontline. Keep yourself and your patients defended with your trusty sidearm. Ensure they get back up on their feet!&amp;lt;/center&amp;gt;&lt;br /&gt;
| &amp;lt;center&amp;gt;Combat / Support  Operations&amp;lt;/center&amp;gt;&lt;br /&gt;
| &amp;lt;center&amp;gt;''Medium''&amp;lt;/center&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
== '''United Rebel Front Guerilla Navy''' ==&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;100%;&amp;quot;|&lt;br /&gt;
|- style=&amp;quot;font-weight: bold; text-align: center; background-color: #a07672; color: white;&amp;quot;&lt;br /&gt;
| width=300 | Role &lt;br /&gt;
| width=800 | Description&lt;br /&gt;
| width=300 | Purpose&lt;br /&gt;
| width=300 | Difficulty&lt;br /&gt;
|-&lt;br /&gt;
! [[image:URF.Ship_Captain.png]]&amp;lt;br/&amp;gt;[[Insurrectionist Ship Captain]]&lt;br /&gt;
| &amp;lt;center&amp;gt;Welcome abroad Captain! You've been put incharge of the URF Thorn..''yay?'' Whilst the ship isn't in.. the best condition, she does her job well, keeping the sector liberated, civilians safe  and all URF assets protected! &amp;lt;s&amp;gt; Blow up in a fireball &amp;lt;/s&amp;gt; Ensure the survival of you and your crew, the Thorn is a valuable asset, it shall not fall!&amp;lt;/center&amp;gt;&lt;br /&gt;
| &amp;lt;center&amp;gt;Tactical support / Fire support &amp;lt;/center&amp;gt;&lt;br /&gt;
| &amp;lt;center&amp;gt;''Hard''&amp;lt;/center&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! [[image:URF.Ship crew.png]]&amp;lt;br/&amp;gt;[[Insurrectionist Ship Crew]]&lt;br /&gt;
| &amp;lt;center&amp;gt;The joys of space scurvy! That may seem like an issue, but you've got an even bigger one by.. ensuring the Thorn isn't turned into a fireball by the end of the day. Man the weapon stations, keep the reactor running, even fly pelicans! .. is what the recruitment &amp;lt;s&amp;gt;propaganda&amp;lt;/s&amp;gt; posters all said! &amp;lt;/center&amp;gt;&lt;br /&gt;
| &amp;lt;center&amp;gt;Tactical support / Fire support &amp;lt;/center&amp;gt;&lt;br /&gt;
| &amp;lt;center&amp;gt;''Medium''&amp;lt;/center&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''IV Foxhunter Triarii''' ==&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; width=&amp;quot;100%;&amp;quot;|&lt;br /&gt;
|- style=&amp;quot;font-weight: bold; text-align: center; background-color: #544c4b; color: white;&amp;quot;&lt;br /&gt;
| width=300 | Role &lt;br /&gt;
| width=800 | Description&lt;br /&gt;
| width=300 | Purpose&lt;br /&gt;
| width=300 | Difficulty&lt;br /&gt;
|-&lt;br /&gt;
! [[image:Commando Commander.png]]&amp;lt;br/&amp;gt;[[Foxhunter Commander]]&lt;br /&gt;
| &amp;lt;center&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
| &amp;lt;center&amp;gt;Special Operations / Tactics&amp;lt;/center&amp;gt;&lt;br /&gt;
| &amp;lt;center&amp;gt;''Medium''&amp;lt;/center&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! [[image:Commando SL.png]]&amp;lt;br/&amp;gt;[[Foxhunter Squad Leader]]&lt;br /&gt;
| &amp;lt;center&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
| &amp;lt;center&amp;gt;Special Operations / Leadership&amp;lt;/center&amp;gt;&lt;br /&gt;
| &amp;lt;center&amp;gt;''Medium''&amp;lt;/center&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! [[image:Commando Engineer.png]]&amp;lt;br/&amp;gt;[[Foxhunter Engineer]]&lt;br /&gt;
| &amp;lt;center&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
| &amp;lt;center&amp;gt;Special Operations / Support&amp;lt;/center&amp;gt;&lt;br /&gt;
| &amp;lt;center&amp;gt;''Medium'&amp;lt;/center&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! [[image:Commando Medic.png]]&amp;lt;br/&amp;gt;[[Foxhunter Medic]]&lt;br /&gt;
| &amp;lt;center&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
| &amp;lt;center&amp;gt;Special Operations / Support&amp;lt;/center&amp;gt;&lt;br /&gt;
| &amp;lt;center&amp;gt;''Medium''&amp;lt;/center&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! [[image:Commando sniper.png]]&amp;lt;br/&amp;gt;[[Foxhunter Sniper]]&lt;br /&gt;
| &amp;lt;center&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
| &amp;lt;center&amp;gt;Special Operations&amp;lt;/center&amp;gt;&lt;br /&gt;
| &amp;lt;center&amp;gt;''Medium''&amp;lt;/center&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! [[image:Commando Rifleman.png]]&amp;lt;br/&amp;gt;[[Foxhunter Rifleman]]&lt;br /&gt;
| &amp;lt;center&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
| &amp;lt;center&amp;gt;Special Operations&amp;lt;/center&amp;gt;&lt;br /&gt;
| &amp;lt;center&amp;gt;''Medium''&amp;lt;/center&amp;gt;&lt;/div&gt;</summary>
		<author><name>Bloxgate</name></author>
	</entry>
	<entry>
		<id>https://projectunsc.org/wiki/index.php?title=File:ODP_New.png&amp;diff=1806</id>
		<title>File:ODP New.png</title>
		<link rel="alternate" type="text/html" href="https://projectunsc.org/wiki/index.php?title=File:ODP_New.png&amp;diff=1806"/>
		<updated>2022-01-04T02:05:06Z</updated>

		<summary type="html">&lt;p&gt;Bloxgate: Bloxgate uploaded a new version of File:ODP New.png&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;new ODP Cassius&lt;/div&gt;</summary>
		<author><name>Bloxgate</name></author>
	</entry>
	<entry>
		<id>https://projectunsc.org/wiki/index.php?title=UNSC&amp;diff=1746</id>
		<title>UNSC</title>
		<link rel="alternate" type="text/html" href="https://projectunsc.org/wiki/index.php?title=UNSC&amp;diff=1746"/>
		<updated>2021-08-15T04:07:42Z</updated>

		<summary type="html">&lt;p&gt;Bloxgate: Fix links to internal pages&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;box-shadow: 0 0 .3em #999; border-radius: .2em; margin: 1em 0 2em 0; padding: 5px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{| style=&amp;quot;margin:4px 0 0 0; width:100%; background:none;&amp;quot;&lt;br /&gt;
| class=&amp;quot;MainPageBG&amp;quot; style=&amp;quot;width:100%; border:5px solid #ffff; background:#ffffff; vertical-align:top; color:#000;&amp;quot; |&lt;br /&gt;
{| style=&amp;quot;vertical-align:top; background:#ffffff; color:#000; text-align: center; width:100%; font-size:2em; font-weight:bold;&amp;quot;&lt;br /&gt;
| [[Image:UNSCnavy.png‎|150px|link=UNSC Laws]]&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;[[UNSC Laws|UNSC Law]]&amp;lt;br&amp;gt;&lt;br /&gt;
| [[Image:Misriahlogo.png|150px|link=UNSC_Weapons]]&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;[[UNSC_Weapons|Equipment]]&amp;lt;br&amp;gt;&lt;br /&gt;
| [[Image:Unsclogo.jpeg|200px|link=United_Nations_Space_Command]]&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;[[United Nations Space Command|UNSC]]&amp;lt;br&amp;gt;&lt;br /&gt;
| [[Image:UNSCarmy.png|150px|link=UNSC_Roles]]&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;[[UNSC_Roles|Roles]]&amp;lt;br&amp;gt;&lt;br /&gt;
| [[Image:UNSCsword.png|150px|link=https://projectunsc.org/forum/forumdisplay.php?fid=27]]&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;[https://projectunsc.org/forum/forumdisplay.php?fid=27 Join today!]&amp;lt;br&amp;gt;&lt;br /&gt;
| [[File:UNSCNavy.png| 200px| link=UNSC_ships]]&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;[[UNSC_ships|Ships]]&amp;lt;br&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Bloxgate</name></author>
	</entry>
	<entry>
		<id>https://projectunsc.org/wiki/index.php?title=HaloStation_Wiki&amp;diff=1743</id>
		<title>HaloStation Wiki</title>
		<link rel="alternate" type="text/html" href="https://projectunsc.org/wiki/index.php?title=HaloStation_Wiki&amp;diff=1743"/>
		<updated>2021-07-27T14:46:12Z</updated>

		<summary type="html">&lt;p&gt;Bloxgate: Restore some stuff that got accidentlied in a moderation cleanup&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-bottom:50px; text-align: center;&amp;quot;&amp;gt;[[File:Title.png|link=https://projectunsc.org/forum/index.php]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery perrow=2 mode=&amp;quot;packed-hover&amp;quot;&amp;gt;&lt;br /&gt;
File:Unsclogo.png|link=UNSC|UNSC&lt;br /&gt;
File:URF.png|link=URF|URF&lt;br /&gt;
File:Covenantlogo.png|link=Covenant|Covenant&lt;br /&gt;
File:Guides.png|link=Guides|Guides&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
=== About The Server ===&lt;br /&gt;
''' Halo Station 13''' ''takes place in it's own custom line of events set up by the staff. There is a three way war brewing between the United Nations Space Command, United Rebel Front and the vast Covenant Empire. One will reign supreme above all the rest. Will your contributions make a difference on the story?''&lt;br /&gt;
&lt;br /&gt;
=== Halostation13 Community ===&lt;br /&gt;
Main website for the Halostation community is [https://projectunsc.org https://projectunsc.org]/&amp;lt;br&amp;gt;&lt;br /&gt;
You can also join the Discord, over at [https://discordapp.com/invite/v7YTVt3 https://discordapp.com/invite/v7YTVt3]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Gamemodes ===&lt;br /&gt;
Check out these gamemodes that come packaged by default in the game.&lt;br /&gt;
* [[Outer Colonies / Reclaimation / Revolution]]&lt;br /&gt;
* [[Operation Red Flag]]&lt;br /&gt;
* [[Stranded]]&lt;br /&gt;
* [[Pack War]]&lt;br /&gt;
&lt;br /&gt;
=== Maps ===&lt;br /&gt;
Here you can find some of the maps currently in use on the server:&lt;br /&gt;
* [[Geminus City]]&lt;br /&gt;
* [[KS7]]&lt;br /&gt;
* [[ODP Cassius]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:SS13]]&lt;/div&gt;</summary>
		<author><name>Bloxgate</name></author>
	</entry>
	<entry>
		<id>https://projectunsc.org/wiki/index.php?title=HaloStation_Wiki&amp;diff=1742</id>
		<title>HaloStation Wiki</title>
		<link rel="alternate" type="text/html" href="https://projectunsc.org/wiki/index.php?title=HaloStation_Wiki&amp;diff=1742"/>
		<updated>2021-07-27T14:36:31Z</updated>

		<summary type="html">&lt;p&gt;Bloxgate: Reverted edits by Joe4444 (talk) to last revision by Flapyap&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-bottom:50px; text-align: center;&amp;quot;&amp;gt;[[File:Title.png|link=https://projectunsc.org/forum/index.php]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery perrow=2 mode=&amp;quot;packed-hover&amp;quot;&amp;gt;&lt;br /&gt;
File:Unsclogo.png|link=UNSC|UNSC&lt;br /&gt;
File:URF.png|link=URF|URF&lt;br /&gt;
File:Covenantlogo.png|link=Covenant|Covenant&lt;br /&gt;
File:Guides.png|link=Guides|Guides&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
=== About The Server ===&lt;br /&gt;
''' Halo Station 13''' ''takes place in it's own custom line of events set up by the staff. There is a three way war brewing between the United Nations Space Command, United Rebel Front and the vast Covenant Empire. One will reign supreme above all the rest. Will your contributions make a difference on the story?''&lt;br /&gt;
&lt;br /&gt;
=== Halostation13 Community ===&lt;br /&gt;
Main website for the Halostation community is https://projectunsc.org/&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Gamemodes ===&lt;br /&gt;
Check out these gamemodes that come packaged by default in the game.&lt;br /&gt;
* [[Outer Colonies / Reclaimation / Revolution]]&lt;br /&gt;
* [[Operation Red Flag]]&lt;br /&gt;
* [[Stranded]]&lt;br /&gt;
* [[Pack War]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:SS13]]&lt;/div&gt;</summary>
		<author><name>Bloxgate</name></author>
	</entry>
	<entry>
		<id>https://projectunsc.org/wiki/index.php?title=Guide_to_chemistry&amp;diff=1646</id>
		<title>Guide to chemistry</title>
		<link rel="alternate" type="text/html" href="https://projectunsc.org/wiki/index.php?title=Guide_to_chemistry&amp;diff=1646"/>
		<updated>2020-07-31T22:02:12Z</updated>

		<summary type="html">&lt;p&gt;Bloxgate: Bloxgate moved page Guide to chemistry to Guide to Chemistry: Fix capitalization&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Guide to Chemistry]]&lt;/div&gt;</summary>
		<author><name>Bloxgate</name></author>
	</entry>
	<entry>
		<id>https://projectunsc.org/wiki/index.php?title=Guide_to_Chemistry&amp;diff=1645</id>
		<title>Guide to Chemistry</title>
		<link rel="alternate" type="text/html" href="https://projectunsc.org/wiki/index.php?title=Guide_to_Chemistry&amp;diff=1645"/>
		<updated>2020-07-31T22:02:12Z</updated>

		<summary type="html">&lt;p&gt;Bloxgate: Bloxgate moved page Guide to chemistry to Guide to Chemistry: Fix capitalization&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:WORK IN PROGRESS.png|100px]]&lt;br /&gt;
== Unique Chemicals ==&lt;br /&gt;
&amp;lt;span style = &amp;quot;color:#FF0010&amp;quot;&amp;gt;Any chemical marked with (C) in any of these lists is a catalyst and is not consumed during the mixing process.&amp;lt;/span&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;background-color: #add8e6;&amp;quot;&lt;br /&gt;
! style=&amp;quot;width: 150px;background-color:#86c5da;&amp;quot; | &amp;lt;center&amp;gt;&amp;lt;b&amp;gt;Chemical Name&amp;lt;/b&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
! style=&amp;quot;width: 100px;background-color:#86c5da;&amp;quot; | &amp;lt;center&amp;gt;&amp;lt;b&amp;gt;Recipe&amp;lt;/b&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
! style=&amp;quot;width: 80%;background-color:#86c5da;&amp;quot; | &amp;lt;center&amp;gt;&amp;lt;b&amp;gt;Description&amp;lt;/b&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;{{{subheader|}}}&amp;lt;/center&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|&amp;lt;center&amp;gt;  &amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;'''Biofoam'''&amp;lt;/font&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
|&amp;lt;center&amp;gt;''' FoamingAgent:Tricordrazine:Bicaridine&amp;lt;br&amp;gt; 1:1:1&amp;lt;br&amp;gt;=2u '''&amp;lt;/center&amp;gt;&lt;br /&gt;
|'''Use''': An all purpose brute healing tool with multiple unique properties such as fixing bones, pushing out shrapnel and fixing organs. Useful in most situations.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;center&amp;gt;  &amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;'''Tri-Adrenaline'''&amp;lt;/font&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
|&amp;lt;center&amp;gt;'''Inaprovaline:Dexalin:Tramadol&amp;lt;br&amp;gt; 1:1:1&amp;lt;br&amp;gt;=3u'''&amp;lt;/center&amp;gt;&lt;br /&gt;
|'''Use''': A defib in a syringe, this chemical is useful for retstarting a heart in the place of a difibulator&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;center&amp;gt;  &amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;'''Concentrated Hyperzine'''&amp;lt;/font&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
|&amp;lt;center&amp;gt;'''Hyperzine:Impedrezene&amp;lt;br&amp;gt;2:1&amp;lt;br&amp;gt;=1u'''&amp;lt;/center&amp;gt;&lt;br /&gt;
|'''Use''': a concentrated version of normal hyperzine, this one actually makes you go faster rather than just removing slowdown. Also deals lots of internal damage to organs.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;center&amp;gt;  &amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;'''Hexaline Glycol'''&amp;lt;/font&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
|&amp;lt;center&amp;gt;'''Glycerol:Ethanol&amp;lt;br&amp;gt;1:4&amp;lt;br&amp;gt;=5u'''&amp;lt;/center&amp;gt;&lt;br /&gt;
|'''Use''': The same as Cryoprethaline, but less effective.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;center&amp;gt;  &amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;'''Cryoprethaline'''&amp;lt;/font&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
|&amp;lt;center&amp;gt;'''Hexaline:Cryoxadone:Phoron&amp;lt;br&amp;gt;5:5:0.1&amp;lt;br&amp;gt;=5u'''&amp;lt;/center&amp;gt;&lt;br /&gt;
|'''Use''': Used to keep people safe during cyrostasis. A purely fluff chem, unless we actually need to spend weeks in cryostasis on the server eventually...&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;center&amp;gt;  &amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;'''Ketoprofen'''&amp;lt;/font&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
|&amp;lt;center&amp;gt;'''Tramadol:Leporazine&amp;lt;br&amp;gt;1:1&amp;lt;br&amp;gt;=2u'''&amp;lt;/center&amp;gt;&lt;br /&gt;
|'''Use''': a chemical which keeps your temprature down and is also a painkiller. Found in Combat Stablisation Autoinjectors.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Normal Bay Chemicals ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;background-color: #add8e6;&amp;quot;&lt;br /&gt;
! style=&amp;quot;width: 150px;background-color:#86c5da;&amp;quot; | &amp;lt;center&amp;gt;&amp;lt;b&amp;gt;Chemical Name&amp;lt;/b&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
! style=&amp;quot;width: 100px;background-color:#86c5da;&amp;quot; | &amp;lt;center&amp;gt;&amp;lt;b&amp;gt;Recipe&amp;lt;/b&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
! style=&amp;quot;width: 80%;background-color:#86c5da;&amp;quot; | &amp;lt;center&amp;gt;&amp;lt;b&amp;gt;Description&amp;lt;/b&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;{{{subheader|}}}&amp;lt;/center&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;center&amp;gt;  &amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;'''Bicardine'''&amp;lt;/font&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
|&amp;lt;center&amp;gt;'''Inaprovaline:Carbon &amp;lt;br&amp;gt; 1:1&amp;lt;br&amp;gt;=2'''&amp;lt;/center&amp;gt;&lt;br /&gt;
|'''Use''': Bicardine is used to brute damage and is one of the most effective chemicals at doing so. Use in the case of severe brute damage.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;center&amp;gt;  &amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;'''Kelotane'''&amp;lt;/font&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
|&amp;lt;center&amp;gt;'''Silicon:Carbon &amp;lt;br&amp;gt; 1:1&amp;lt;br&amp;gt;=2'''&amp;lt;/center&amp;gt;&lt;br /&gt;
|'''Use''': Kelotane is used to treat burn damage. Less effective than Dermaline.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;center&amp;gt;  &amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;'''Dermaline'''&amp;lt;/font&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
|&amp;lt;center&amp;gt;'''Acetone:Phosphorus:Kelotane &amp;lt;br&amp;gt; 1:1:1&amp;lt;br&amp;gt;=3'''&amp;lt;/center&amp;gt;&lt;br /&gt;
|'''Use''': An effective treatment to burn damage. &lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;center&amp;gt;  &amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;'''Dylovene'''&amp;lt;/font&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
|&amp;lt;center&amp;gt;'''Silicon:Potassium:Ammonia &amp;lt;br&amp;gt; 1:1:1&amp;lt;br&amp;gt;=3'''&amp;lt;/center&amp;gt;&lt;br /&gt;
|'''Use''': Dylovene is a broad antitoxin which is used to treat toxin damage&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;center&amp;gt;  &amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;'''Dexalin'''&amp;lt;/font&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
|&amp;lt;center&amp;gt;'''Acetone:Phoron &amp;lt;br&amp;gt; 2:0.1&amp;lt;br&amp;gt;=1'''&amp;lt;/center&amp;gt;&lt;br /&gt;
|'''Use''': Dexalin is used to treat oxygen damage. Also used in the creation of Dexalin plus.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;center&amp;gt;  &amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;'''Dexalin Plus'''&amp;lt;/font&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
|&amp;lt;center&amp;gt;'''Dexalin:Carbon:Iron &amp;lt;br&amp;gt; 1:1:1&amp;lt;br&amp;gt;=3'''&amp;lt;/center&amp;gt;&lt;br /&gt;
|'''Use''': Dexaline plus is a more effective version of Dexalin. It is also used to treat oxygen damage.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;center&amp;gt;  &amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;'''Inaprovaline'''&amp;lt;/font&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
|&amp;lt;center&amp;gt;'''Acetone:Carbon:Sugar&amp;lt;br&amp;gt;1:1:1&amp;lt;br&amp;gt;=3'''&amp;lt;/center&amp;gt;&lt;br /&gt;
|'''Use''': Inaprovaline is used to stop bleeding and to stablise downed patients.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;center&amp;gt;  &amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;'''Tricordrazine'''&amp;lt;/font&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
|&amp;lt;center&amp;gt;'''Inaprovaline:Dylovene &amp;lt;br&amp;gt; 1:1&amp;lt;br&amp;gt;=2'''&amp;lt;/center&amp;gt;&lt;br /&gt;
|'''Use''': Tricord is used to treat all sorts of minor injuries. It is a good broad range chemical with a wide range of applications.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;center&amp;gt;  &amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;'''Cryoxadone'''&amp;lt;/font&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
|&amp;lt;center&amp;gt;'''Dexalin:Water:Acetone &amp;lt;br&amp;gt; 1:1:1&amp;lt;br&amp;gt;=3'''&amp;lt;/center&amp;gt;&lt;br /&gt;
|'''Use''': A chemical mixture with almost magical healing powers. Its main limitation is that the targets body temperature must be under 170K for it to metabolise correctly.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;center&amp;gt;  &amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;'''Clonexadone'''&amp;lt;/font&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
|&amp;lt;center&amp;gt;'''Cyroxadone:Sodium:Phoron &amp;lt;br&amp;gt; 1:1:0.1&amp;lt;br&amp;gt;=2'''&amp;lt;/center&amp;gt;&lt;br /&gt;
|'''Use''': A liquid compound similar to that used in the cloning process. Can be used to 'finish' the cloning process when used in conjunction with a cryo tube.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;center&amp;gt;  &amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;'''Synaptizine'''&amp;lt;/font&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
|&amp;lt;center&amp;gt;'''Sugar:Lithium:Water &amp;lt;br&amp;gt; 1:1:1&amp;lt;br&amp;gt;=3'''&amp;lt;/center&amp;gt;&lt;br /&gt;
|'''Use''': Synaptizine is used to treat various diseases.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;center&amp;gt;  &amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;'''Alkysine'''&amp;lt;/font&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
|&amp;lt;center&amp;gt;'''HydrochloricAcid:Ammonia:Dylovene &amp;lt;br&amp;gt; 1:1:1&amp;lt;br&amp;gt;=2'''&amp;lt;/center&amp;gt;&lt;br /&gt;
|'''Use''': Alkysine is used primarily to treat brain damage. Also has the tendancy to knock people out whilst metabolising.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;center&amp;gt;  &amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;'''Imidazoline'''&amp;lt;/font&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
|&amp;lt;center&amp;gt;'''Carbon:Hydrazine:Dylovene &amp;lt;br&amp;gt; 1:1:1&amp;lt;br&amp;gt;=2'''&amp;lt;/center&amp;gt;&lt;br /&gt;
|'''Use''': Imidazoline heals eye damage&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;center&amp;gt;  &amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;'''Otomax'''&amp;lt;/font&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
|&amp;lt;center&amp;gt;'''Carbon:Hydrazine:Potassium &amp;lt;br&amp;gt; 1:1:1 &amp;lt;br&amp;gt;=2'''&amp;lt;/center&amp;gt;&lt;br /&gt;
|'''Use''': Otomax heals ear damage.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;center&amp;gt;  &amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;'''Peridaxon'''&amp;lt;/font&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
|&amp;lt;center&amp;gt;'''Bicaridine:Clonexadone:phoron(C) &amp;lt;br&amp;gt; 2:2:5&amp;lt;br&amp;gt;=2'''&amp;lt;/center&amp;gt;&lt;br /&gt;
|'''Use''': Peridaxon is used to treat organ damage inside the body.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;center&amp;gt;  &amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;'''Ryetalyn'''&amp;lt;/font&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
|&amp;lt;center&amp;gt;'''Arithrazine:Carbon &amp;lt;br&amp;gt; 1:1&amp;lt;br&amp;gt;=2'''&amp;lt;/center&amp;gt;&lt;br /&gt;
|'''Use''': Ryetalyn is used to cure genetic damage caused by radiation.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;center&amp;gt;  &amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;'''Hyperzine'''&amp;lt;/font&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
|&amp;lt;center&amp;gt;'''Sugar:Phosphorus:Sulfur &amp;lt;br&amp;gt; 1:1:1&amp;lt;br&amp;gt;=3'''&amp;lt;/center&amp;gt;&lt;br /&gt;
|'''Use''': Hyperzine is used to counteract slowdown by gear. Does not speed you up like it's concentrated version.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;center&amp;gt;  &amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;'''Ethylredoxrazine'''&amp;lt;/font&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
|&amp;lt;center&amp;gt;'''Acetone:Dylovene:Carbon &amp;lt;br&amp;gt; 1:1:1&amp;lt;br&amp;gt;=3'''&amp;lt;/center&amp;gt;&lt;br /&gt;
|'''Use''': A powerful oxidizer that reacts with ethanol&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;center&amp;gt;  &amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;'''Hyronalin'''&amp;lt;/font&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
|&amp;lt;center&amp;gt;'''Radium:Dylovene &amp;lt;br&amp;gt; 1:1&amp;lt;br&amp;gt;=2'''&amp;lt;/center&amp;gt;&lt;br /&gt;
|'''Use''': Hyronalin is used to treat radiation poisioning.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;center&amp;gt;  &amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;'''Arithrazine'''&amp;lt;/font&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
|&amp;lt;center&amp;gt;'''Hyronalin:Hydrazine &amp;lt;br&amp;gt; 1:1&amp;lt;br&amp;gt;=2'''&amp;lt;/center&amp;gt;&lt;br /&gt;
|'''Use''': Arithrazine is used to treat the most severe cases of radiation posioning.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;center&amp;gt;  &amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;'''Spaceacillin'''&amp;lt;/font&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
|&amp;lt;center&amp;gt;'''Cryptobiolin:Inaprovaline &amp;lt;br&amp;gt; 1:1&amp;lt;br&amp;gt;=2'''&amp;lt;/center&amp;gt;&lt;br /&gt;
|'''Use''': Used to treat things such as infected wounds. Sustained use may result in immune failure.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;center&amp;gt;  &amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;'''Sterilizine'''&amp;lt;/font&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
|&amp;lt;center&amp;gt;'''Ethanol:Dylovene:Hydrochloric Acid &amp;lt;br&amp;gt; 1:1:1&amp;lt;br&amp;gt;=3'''&amp;lt;/center&amp;gt;&lt;br /&gt;
|'''Use''': Sterilizes wounds in preparation for surgery and thoroughly removes blood.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;center&amp;gt;  &amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;'''Leporazine'''&amp;lt;/font&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
|&amp;lt;center&amp;gt;'''Silicon:Copper:Phoron(C) &amp;lt;br&amp;gt; 1:1:5&amp;lt;br&amp;gt;=2'''&amp;lt;/center&amp;gt;&lt;br /&gt;
|'''Use''': Leporazine can be used to stabilize an individual's body temperature.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;center&amp;gt;  &amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;'''Paracetamol'''&amp;lt;/font&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
|&amp;lt;center&amp;gt;'''Tramadol:Sugar:Water &amp;lt;br&amp;gt; 1:1:1&amp;lt;br&amp;gt;=3'''&amp;lt;/center&amp;gt;&lt;br /&gt;
|'''Use''': This chemical is a mild, simple painkiller.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;center&amp;gt;  &amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;'''Tramadol'''&amp;lt;/font&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
|&amp;lt;center&amp;gt;'''Inaprovaline:Ethanol:Acetone &amp;lt;br&amp;gt; 1:1:1&amp;lt;br&amp;gt;=3'''&amp;lt;/center&amp;gt;&lt;br /&gt;
|'''Use''': Tramadol is another simple but effective painkiller.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;center&amp;gt;  &amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;'''Oxycodone'''&amp;lt;/font&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
|&amp;lt;center&amp;gt;'''Ethanol:Tramadol:Phoron(C) &amp;lt;br&amp;gt; 1:1:5&amp;lt;br&amp;gt;=1'''&amp;lt;/center&amp;gt;&lt;br /&gt;
|'''Use''': &amp;quot;A very strong and very addictive painkiller.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;center&amp;gt;  &amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;'''Cryptobiolin'''&amp;lt;/font&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
|&amp;lt;center&amp;gt;'''Potassium:Acetone:Sugar &amp;lt;br&amp;gt;1:1:1&amp;lt;br&amp;gt;=3'''&amp;lt;/center&amp;gt;&lt;br /&gt;
|'''Use''': a chemical used to make other chemicals.&lt;br /&gt;
|-&lt;/div&gt;</summary>
		<author><name>Bloxgate</name></author>
	</entry>
	<entry>
		<id>https://projectunsc.org/wiki/index.php?title=Guide_to_Chemistry&amp;diff=1637</id>
		<title>Guide to Chemistry</title>
		<link rel="alternate" type="text/html" href="https://projectunsc.org/wiki/index.php?title=Guide_to_Chemistry&amp;diff=1637"/>
		<updated>2020-07-10T01:14:22Z</updated>

		<summary type="html">&lt;p&gt;Bloxgate: Mention Spaceacillin's severe side effects&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:WORK IN PROGRESS.png|100px]]&lt;br /&gt;
== Unique Chemicals ==&lt;br /&gt;
&amp;lt;span style = &amp;quot;color:#FF0010&amp;quot;&amp;gt;Any chemical marked with (C) in any of these lists is a catalyst and is not consumed during the mixing process.&amp;lt;/span&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;background-color: #add8e6;&amp;quot;&lt;br /&gt;
! style=&amp;quot;width: 150px;background-color:#86c5da;&amp;quot; | &amp;lt;center&amp;gt;&amp;lt;b&amp;gt;Chemical Name&amp;lt;/b&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
! style=&amp;quot;width: 100px;background-color:#86c5da;&amp;quot; | &amp;lt;center&amp;gt;&amp;lt;b&amp;gt;Recipe&amp;lt;/b&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
! style=&amp;quot;width: 80%;background-color:#86c5da;&amp;quot; | &amp;lt;center&amp;gt;&amp;lt;b&amp;gt;Description&amp;lt;/b&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;{{{subheader|}}}&amp;lt;/center&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|&amp;lt;center&amp;gt;  &amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;'''Biofoam'''&amp;lt;/font&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
|&amp;lt;center&amp;gt;''' FoamingAgent:Tricordrazine:Bicaridine&amp;lt;br&amp;gt; 1:1:1&amp;lt;br&amp;gt;=2u '''&amp;lt;/center&amp;gt;&lt;br /&gt;
|'''Use''': An all purpose brute healing tool with multiple unique properties such as fixing bones, pushing out shrapnel and fixing organs. Useful in most situations.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;center&amp;gt;  &amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;'''Tri-Adrenaline'''&amp;lt;/font&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
|&amp;lt;center&amp;gt;'''Inaprovaline:Dexalin:Tramadol&amp;lt;br&amp;gt; 1:1:1&amp;lt;br&amp;gt;=3u'''&amp;lt;/center&amp;gt;&lt;br /&gt;
|'''Use''': A defib in a syringe, this chemical is useful for retstarting a heart in the place of a difibulator&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;center&amp;gt;  &amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;'''Concentrated Hyperzine'''&amp;lt;/font&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
|&amp;lt;center&amp;gt;'''Hyperzine:Impedrezene&amp;lt;br&amp;gt;2:1&amp;lt;br&amp;gt;=1u'''&amp;lt;/center&amp;gt;&lt;br /&gt;
|'''Use''': a concentrated version of normal hyperzine, this one actually makes you go faster rather than just removing slowdown. Also deals lots of internal damage to organs.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;center&amp;gt;  &amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;'''Hexaline Glycol'''&amp;lt;/font&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
|&amp;lt;center&amp;gt;'''Glycerol:Ethanol&amp;lt;br&amp;gt;1:4&amp;lt;br&amp;gt;=5u'''&amp;lt;/center&amp;gt;&lt;br /&gt;
|'''Use''': The same as Cryoprethaline, but less effective.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;center&amp;gt;  &amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;'''Cryoprethaline'''&amp;lt;/font&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
|&amp;lt;center&amp;gt;'''Hexaline:Cryoxadone:Phoron&amp;lt;br&amp;gt;5:5:0.1&amp;lt;br&amp;gt;=5u'''&amp;lt;/center&amp;gt;&lt;br /&gt;
|'''Use''': Used to keep people safe during cyrostasis. A purely fluff chem, unless we actually need to spend weeks in cryostasis on the server eventually...&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;center&amp;gt;  &amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;'''Ketoprofen'''&amp;lt;/font&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
|&amp;lt;center&amp;gt;'''Tramadol:Leporazine&amp;lt;br&amp;gt;1:1&amp;lt;br&amp;gt;=2u'''&amp;lt;/center&amp;gt;&lt;br /&gt;
|'''Use''': a chemical which keeps your temprature down and is also a painkiller. Found in Combat Stablisation Autoinjectors.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Normal Bay Chemicals ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;background-color: #add8e6;&amp;quot;&lt;br /&gt;
! style=&amp;quot;width: 150px;background-color:#86c5da;&amp;quot; | &amp;lt;center&amp;gt;&amp;lt;b&amp;gt;Chemical Name&amp;lt;/b&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
! style=&amp;quot;width: 100px;background-color:#86c5da;&amp;quot; | &amp;lt;center&amp;gt;&amp;lt;b&amp;gt;Recipe&amp;lt;/b&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
! style=&amp;quot;width: 80%;background-color:#86c5da;&amp;quot; | &amp;lt;center&amp;gt;&amp;lt;b&amp;gt;Description&amp;lt;/b&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;{{{subheader|}}}&amp;lt;/center&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;center&amp;gt;  &amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;'''Bicardine'''&amp;lt;/font&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
|&amp;lt;center&amp;gt;'''Inaprovaline:Carbon &amp;lt;br&amp;gt; 1:1&amp;lt;br&amp;gt;=2'''&amp;lt;/center&amp;gt;&lt;br /&gt;
|'''Use''': Bicardine is used to brute damage and is one of the most effective chemicals at doing so. Use in the case of severe brute damage.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;center&amp;gt;  &amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;'''Kelotane'''&amp;lt;/font&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
|&amp;lt;center&amp;gt;'''Silicon:Carbon &amp;lt;br&amp;gt; 1:1&amp;lt;br&amp;gt;=2'''&amp;lt;/center&amp;gt;&lt;br /&gt;
|'''Use''': Kelotane is used to treat burn damage. Less effective than Dermaline.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;center&amp;gt;  &amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;'''Dermaline'''&amp;lt;/font&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
|&amp;lt;center&amp;gt;'''Acetone:Phosphorus:Kelotane &amp;lt;br&amp;gt; 1:1:1&amp;lt;br&amp;gt;=3'''&amp;lt;/center&amp;gt;&lt;br /&gt;
|'''Use''': An effective treatment to burn damage. &lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;center&amp;gt;  &amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;'''Dylovene'''&amp;lt;/font&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
|&amp;lt;center&amp;gt;'''Silicon:Potassium:Ammonia &amp;lt;br&amp;gt; 1:1:1&amp;lt;br&amp;gt;=3'''&amp;lt;/center&amp;gt;&lt;br /&gt;
|'''Use''': Dylovene is a broad antitoxin which is used to treat toxin damage&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;center&amp;gt;  &amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;'''Dexalin'''&amp;lt;/font&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
|&amp;lt;center&amp;gt;'''Acetone:Phoron &amp;lt;br&amp;gt; 2:0.1&amp;lt;br&amp;gt;=1'''&amp;lt;/center&amp;gt;&lt;br /&gt;
|'''Use''': Dexalin is used to treat oxygen damage. Also used in the creation of Dexalin plus.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;center&amp;gt;  &amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;'''Dexalin Plus'''&amp;lt;/font&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
|&amp;lt;center&amp;gt;'''Dexalin:Carbon:Iron &amp;lt;br&amp;gt; 1:1:1&amp;lt;br&amp;gt;=3'''&amp;lt;/center&amp;gt;&lt;br /&gt;
|'''Use''': Dexaline plus is a more effective version of Dexalin. It is also used to treat oxygen damage.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;center&amp;gt;  &amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;'''Inaprovaline'''&amp;lt;/font&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
|&amp;lt;center&amp;gt;'''Acetone:Carbon:Sugar&amp;lt;br&amp;gt;1:1:1&amp;lt;br&amp;gt;=3'''&amp;lt;/center&amp;gt;&lt;br /&gt;
|'''Use''': Inaprovaline is used to stop bleeding and to stablise downed patients.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;center&amp;gt;  &amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;'''Tricordrazine'''&amp;lt;/font&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
|&amp;lt;center&amp;gt;'''Inaprovaline:Dylovene &amp;lt;br&amp;gt; 1:1&amp;lt;br&amp;gt;=2'''&amp;lt;/center&amp;gt;&lt;br /&gt;
|'''Use''': Tricord is used to treat all sorts of minor injuries. It is a good broad range chemical with a wide range of applications.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;center&amp;gt;  &amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;'''Cryoxadone'''&amp;lt;/font&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
|&amp;lt;center&amp;gt;'''Dexalin:Water:Acetone &amp;lt;br&amp;gt; 1:1:1&amp;lt;br&amp;gt;=3'''&amp;lt;/center&amp;gt;&lt;br /&gt;
|'''Use''': A chemical mixture with almost magical healing powers. Its main limitation is that the targets body temperature must be under 170K for it to metabolise correctly.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;center&amp;gt;  &amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;'''Clonexadone'''&amp;lt;/font&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
|&amp;lt;center&amp;gt;'''Cyroxadone:Sodium:Phoron &amp;lt;br&amp;gt; 1:1:0.1&amp;lt;br&amp;gt;=2'''&amp;lt;/center&amp;gt;&lt;br /&gt;
|'''Use''': A liquid compound similar to that used in the cloning process. Can be used to 'finish' the cloning process when used in conjunction with a cryo tube.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;center&amp;gt;  &amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;'''Synaptizine'''&amp;lt;/font&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
|&amp;lt;center&amp;gt;'''Sugar:Lithium:Water &amp;lt;br&amp;gt; 1:1:1&amp;lt;br&amp;gt;=3'''&amp;lt;/center&amp;gt;&lt;br /&gt;
|'''Use''': Synaptizine is used to treat various diseases.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;center&amp;gt;  &amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;'''Alkysine'''&amp;lt;/font&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
|&amp;lt;center&amp;gt;'''HydrochloricAcid:Ammonia:Dylovene &amp;lt;br&amp;gt; 1:1:1&amp;lt;br&amp;gt;=2'''&amp;lt;/center&amp;gt;&lt;br /&gt;
|'''Use''': Alkysine is used primarily to treat brain damage. Also has the tendancy to knock people out whilst metabolising.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;center&amp;gt;  &amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;'''Imidazoline'''&amp;lt;/font&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
|&amp;lt;center&amp;gt;'''Carbon:Hydrazine:Dylovene &amp;lt;br&amp;gt; 1:1:1&amp;lt;br&amp;gt;=2'''&amp;lt;/center&amp;gt;&lt;br /&gt;
|'''Use''': Imidazoline heals eye damage&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;center&amp;gt;  &amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;'''Otomax'''&amp;lt;/font&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
|&amp;lt;center&amp;gt;'''Carbon:Hydrazine:Potassium &amp;lt;br&amp;gt; 1:1:1 &amp;lt;br&amp;gt;=2'''&amp;lt;/center&amp;gt;&lt;br /&gt;
|'''Use''': Otomax heals ear damage.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;center&amp;gt;  &amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;'''Peridaxon'''&amp;lt;/font&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
|&amp;lt;center&amp;gt;'''Bicaridine:Clonexadone:phoron(C) &amp;lt;br&amp;gt; 2:2:5&amp;lt;br&amp;gt;=2'''&amp;lt;/center&amp;gt;&lt;br /&gt;
|'''Use''': Peridaxon is used to treat organ damage inside the body.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;center&amp;gt;  &amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;'''Ryetalyn'''&amp;lt;/font&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
|&amp;lt;center&amp;gt;'''Arithrazine:Carbon &amp;lt;br&amp;gt; 1:1&amp;lt;br&amp;gt;=2'''&amp;lt;/center&amp;gt;&lt;br /&gt;
|'''Use''': Ryetalyn is used to cure genetic damage caused by radiation.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;center&amp;gt;  &amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;'''Hyperzine'''&amp;lt;/font&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
|&amp;lt;center&amp;gt;'''Sugar:Phosphorus:Sulfur &amp;lt;br&amp;gt; 1:1:1&amp;lt;br&amp;gt;=3'''&amp;lt;/center&amp;gt;&lt;br /&gt;
|'''Use''': Hyperzine is used to counteract slowdown by gear. Does not speed you up like it's concentrated version.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;center&amp;gt;  &amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;'''Ethylredoxrazine'''&amp;lt;/font&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
|&amp;lt;center&amp;gt;'''Acetone:Dylovene:Carbon &amp;lt;br&amp;gt; 1:1:1&amp;lt;br&amp;gt;=3'''&amp;lt;/center&amp;gt;&lt;br /&gt;
|'''Use''': A powerful oxidizer that reacts with ethanol&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;center&amp;gt;  &amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;'''Hyronalin'''&amp;lt;/font&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
|&amp;lt;center&amp;gt;'''Radium:Dylovene &amp;lt;br&amp;gt; 1:1&amp;lt;br&amp;gt;=2'''&amp;lt;/center&amp;gt;&lt;br /&gt;
|'''Use''': Hyronalin is used to treat radiation poisioning.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;center&amp;gt;  &amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;'''Arithrazine'''&amp;lt;/font&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
|&amp;lt;center&amp;gt;'''Hyronalin:Hydrazine &amp;lt;br&amp;gt; 1:1&amp;lt;br&amp;gt;=2'''&amp;lt;/center&amp;gt;&lt;br /&gt;
|'''Use''': Arithrazine is used to treat the most severe cases of radiation posioning.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;center&amp;gt;  &amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;'''Spaceacillin'''&amp;lt;/font&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
|&amp;lt;center&amp;gt;'''Cryptobiolin:Inaprovaline &amp;lt;br&amp;gt; 1:1&amp;lt;br&amp;gt;=2'''&amp;lt;/center&amp;gt;&lt;br /&gt;
|'''Use''': Used to treat things such as infected wounds. Sustained use may result in immune failure.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;center&amp;gt;  &amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;'''Sterilizine'''&amp;lt;/font&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
|&amp;lt;center&amp;gt;'''Ethanol:Dylovene:Hydrochloric Acid &amp;lt;br&amp;gt; 1:1:1&amp;lt;br&amp;gt;=3'''&amp;lt;/center&amp;gt;&lt;br /&gt;
|'''Use''': Sterilizes wounds in preparation for surgery and thoroughly removes blood.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;center&amp;gt;  &amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;'''Leporazine'''&amp;lt;/font&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
|&amp;lt;center&amp;gt;'''Silicon:Copper:Phoron(C) &amp;lt;br&amp;gt; 1:1:5&amp;lt;br&amp;gt;=2'''&amp;lt;/center&amp;gt;&lt;br /&gt;
|'''Use''': Leporazine can be used to stabilize an individual's body temperature.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;center&amp;gt;  &amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;'''Paracetamol'''&amp;lt;/font&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
|&amp;lt;center&amp;gt;'''Tramadol:Sugar:Water &amp;lt;br&amp;gt; 1:1:1&amp;lt;br&amp;gt;=3'''&amp;lt;/center&amp;gt;&lt;br /&gt;
|'''Use''': This chemical is a mild, simple painkiller.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;center&amp;gt;  &amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;'''Tramadol'''&amp;lt;/font&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
|&amp;lt;center&amp;gt;'''Inaprovaline:Ethanol:Acetone &amp;lt;br&amp;gt; 1:1:1&amp;lt;br&amp;gt;=3'''&amp;lt;/center&amp;gt;&lt;br /&gt;
|'''Use''': Tramadol is another simple but effective painkiller.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;center&amp;gt;  &amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;'''Oxycodone'''&amp;lt;/font&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
|&amp;lt;center&amp;gt;'''Ethanol:Tramadol:Phoron(C) &amp;lt;br&amp;gt; 1:1:5&amp;lt;br&amp;gt;=1'''&amp;lt;/center&amp;gt;&lt;br /&gt;
|'''Use''': &amp;quot;A very strong and very addictive painkiller.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;center&amp;gt;  &amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;'''Cryptobiolin'''&amp;lt;/font&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
|&amp;lt;center&amp;gt;'''Potassium:Acetone:Sugar &amp;lt;br&amp;gt;1:1:1&amp;lt;br&amp;gt;=3'''&amp;lt;/center&amp;gt;&lt;br /&gt;
|'''Use''': a chemical used to make other chemicals.&lt;br /&gt;
|-&lt;/div&gt;</summary>
		<author><name>Bloxgate</name></author>
	</entry>
	<entry>
		<id>https://projectunsc.org/wiki/index.php?title=Kig-Yar&amp;diff=1626</id>
		<title>Kig-Yar</title>
		<link rel="alternate" type="text/html" href="https://projectunsc.org/wiki/index.php?title=Kig-Yar&amp;diff=1626"/>
		<updated>2020-06-12T17:56:09Z</updated>

		<summary type="html">&lt;p&gt;Bloxgate: Typo fix&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;center&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: center; border: hidden; background-color: white;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| [[File:JMinor.png|50px|caption]]&lt;br /&gt;
'''Kig-Yar'''&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Biology ==&lt;br /&gt;
The Kig-Yar are an avian/reptilian species which served the Covenant as mercenaries and privateers. There are two distinct subgroups of Kig-Yar, which Humans have termed Jackals and Skirmishers. In combat, Kig-Yar typically serve as snipers, shock troopers, defensive fighters, and scouts within the Covenant due to their excellent senses of sight, smell, and hearing.&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
Kig-Yars hail from the planet Eayn. An Avian/Reptilian species, they lived as pirates on the seas of their homeworld. Originally a splinter of many different tribes, they united to advance their species towards space-technology and settled on many small asteroids. Primarily used as scouts, shock troops, or defense; Kig-yar units are a force to be reckoned with. They are usually outfitted with a point-defense energy shield gauntlet paired with a variety of one-handed weapons. They have a bitter rivalry with the Unggoys, and have attempted to poison the Infusions aboard High-Charity which would have left them sterile; in retaliation for Unggoys destroying Kig-Yar nests.&lt;br /&gt;
&lt;br /&gt;
== Ranks ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;background-color: #f0e8f0;&amp;quot;&lt;br /&gt;
! style=&amp;quot;width: 150px;background-color:#bba0dd;&amp;quot; | &amp;lt;center&amp;gt;&amp;lt;b&amp;gt;Rank&amp;lt;/b&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
! style=&amp;quot;width: 100px;background-color:#bba0dd;&amp;quot; | &amp;lt;center&amp;gt;&amp;lt;b&amp;gt;Availability&amp;lt;/b&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
! style=&amp;quot;width: 80%;background-color:#bba0dd;&amp;quot; | &amp;lt;center&amp;gt;&amp;lt;b&amp;gt;Description&amp;lt;/b&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;{{{subheader|}}}&amp;lt;/center&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;center&amp;gt; [[File:JMinor.png|50px|Kig-Yar]] &amp;lt;br /&amp;gt; &amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;'''Kig-Yar Major'''&amp;lt;/font&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
|&amp;lt;center&amp;gt;'''Unused'''&amp;lt;/center&amp;gt;&lt;br /&gt;
|'''Lore Description''': The Kig-Yar are a matriarchal-based species, or for short they are a species that holds females in higher regard to males. Majors are often Kig-Yar who are either very obedient to their Kig-Yar shipmistress, or are competent in combat with Sangheili.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Job Description''': Essentially you are just a Minor with no buffs at all except for saying you are better, which nobody can tell because no ID.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Roleplay Level''': Low&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Skill Level''': Low&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Competence''': Low-Medium&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Unique Feature''': Shield Gauntlet&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;center&amp;gt; [[File:JMinor.png|50px|Kig-Yar]] &amp;lt;br /&amp;gt; &amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;'''Kig-Yar Minor'''&amp;lt;/font&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
|&amp;lt;center&amp;gt;'''Reclamation, Outer Colonies'''&amp;lt;/center&amp;gt;&lt;br /&gt;
|'''Lore Description''': The Kig-Yar are a matriarchal-based species, or for short they are a species that holds females in higher regard to males. Minors are newer to the shipmistresses ship, haven't earned her respect or isn't experienced enough in combat to be promoted by Sangheili.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Job Description''': Your job is to hold your shield, use your secondary weapon and potentially cover your weaker lance-mates. You may also equip a sniper or carbine, in which the carbine is more of a marksmans rifle whereas the Beam Rifle is a designated sniper. Both should be used accordingly.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Roleplay Level''': Low&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Skill Level''': Low&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Competence''': Low-Medium&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Unique Feature''': Shield Gauntlet&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==T'vaoan ranks==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;background-color: #f0e8f0;&amp;quot;&lt;br /&gt;
! style=&amp;quot;width: 150px;background-color:#bba0dd;&amp;quot; | &amp;lt;center&amp;gt;&amp;lt;b&amp;gt;Rank&amp;lt;/b&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
! style=&amp;quot;width: 100px;background-color:#bba0dd;&amp;quot; | &amp;lt;center&amp;gt;&amp;lt;b&amp;gt;Availability&amp;lt;/b&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
! style=&amp;quot;width: 80%;background-color:#bba0dd;&amp;quot; | &amp;lt;center&amp;gt;&amp;lt;b&amp;gt;Description&amp;lt;/b&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;{{{subheader|}}}&amp;lt;/center&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;center&amp;gt; [[File:SMinor.png|50px|Caption]] &amp;lt;br /&amp;gt; &amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt; '''T'vaoan Minor'''&amp;lt;/font&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
|&amp;lt;center&amp;gt;'''None as of current'''&amp;lt;/center&amp;gt;&lt;br /&gt;
|'''Lore Description:'''The T'vaoans, referred to by humans as Skirmishers, are a subspecies of the Kig-Yar hailing from asteroid colony of T'vao. They served the Covenant as a specialized group in the military.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Job Description:'''act as a meat shield for the stronger members of the covenant. Die horribly when you get hit by a single bullet to the pinky.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Roleplay Level''': Medium&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Skill Level''': Medium&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Competence''': Medium&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Unique Feature''': N/A&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;center&amp;gt; [[File:SMajor.png|50px|Caption]] &amp;lt;br /&amp;gt; &amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt; '''T'vaoan Major'''&amp;lt;/font&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
|&amp;lt;center&amp;gt;'''None as of current'''&amp;lt;/center&amp;gt;&lt;br /&gt;
|'''Lore Description:'''The T'vaoans, referred to by humans as Skirmishers, are a subspecies of the Kig-Yar hailing from asteroid colony of T'vao. They served the Covenant as a specialized group in the military.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Job Description:'''You're essentially a minor with red armour. I suppose you have a higher rank, though.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Roleplay Level''': Medium&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Skill Level''': Medium&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Competence''': Medium&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Unique Feature''': N/A&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;center&amp;gt; [[File:SMurmillo.png|50px|Caption]] &amp;lt;br /&amp;gt; &amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt; '''T'vaoan Murmillo'''&amp;lt;/font&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
|&amp;lt;center&amp;gt;'''Reclamation, Outer Colonies'''&amp;lt;/center&amp;gt;&lt;br /&gt;
|'''Lore Description:'''Murmillones are selected from the best combat-rated Skirmisher Majors. Murmillones specialize in close-quarters combat. The armor of Murmillones is based off of ancient Kig-Yar gladiatorial designs. These ancient Kig-Yar would hold inter-clan physical combat competitions in the largest population centers on Eayn's biggest continent. They generally strike in packs and attempt to flank the enemy and use their shield gauntlets to cover their exposed bodies, including their heads, while strafing enemies.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Job Description:'''Use your speed and point defense gauntlets to harrass the enemy in close quarters combat or to effectively snipe.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Roleplay Level''': Medium&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Skill Level''': Medium&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Competence''': Medium&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Unique Feature''': Point Defense Gauntlets&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;center&amp;gt; [[File:SCommando.png|50px|Caption]] &amp;lt;br /&amp;gt; &amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt; '''T'vaoan Commando'''&amp;lt;/font&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
|&amp;lt;center&amp;gt;'''Reclamation, Outer Colonies'''&amp;lt;/center&amp;gt;&lt;br /&gt;
|'''Lore Description:'''Skirmisher Commandos are a part of the T'vaoan Skirmisher contingent that are deployed by the Covenant. Commandos are specifically trained and designed to form specialized combat files and infantry hunter-killer units. Commandos operate in discrete close-knit groups with extremely specific mission parameters. Other members of the Covenant military recognize Commandos on the battlefield for their incredibly proficient unit cohesion.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Job Description:'''Use your hologram to trick enemies and use it to maneuver them into positions for your allies to strike&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Roleplay Level''': Medium&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Skill Level''': Medium&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Competence''': Medium&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Unique Feature''': Point Defense Gauntlets&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;center&amp;gt; [[File:SChampion.png|50px|Caption]] &amp;lt;br /&amp;gt; &amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt; '''T'vaoan Champion'''&amp;lt;/font&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
|&amp;lt;center&amp;gt;'''None as of current'''&amp;lt;/center&amp;gt;&lt;br /&gt;
|'''Lore Description:'''Champion is the highest rank attainable by Kig-Yar T'vaoans in the Covenant military.&lt;br /&gt;
They are stronger, faster and more durable than Skirmishers of any other class. In the Covenant military, Champions hold several roles, as well as being a formidable portion of the frontline infantry combatants. Many Champions serve in leadership positions, reporting directly to Sangheili Majors on the battlefield instead of other squads in the Skirmisher contingent. This is because of the need for unilateral communication to outlying infantry forces.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Job Description:'''Lead the other Skirmishers and lesser races in battle if there is a lack of a better officer, use your enhanced gear to give your side an advantage in combat.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Roleplay Level''': Medium&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Skill Level''': Medium&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Competence''': Medium&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Unique Feature''': Point Defense Gauntlets&lt;/div&gt;</summary>
		<author><name>Bloxgate</name></author>
	</entry>
	<entry>
		<id>https://projectunsc.org/wiki/index.php?title=Guides&amp;diff=1625</id>
		<title>Guides</title>
		<link rel="alternate" type="text/html" href="https://projectunsc.org/wiki/index.php?title=Guides&amp;diff=1625"/>
		<updated>2020-06-12T17:51:11Z</updated>

		<summary type="html">&lt;p&gt;Bloxgate: Fix energy sword image size&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Halostation Specifc Guides ==&lt;br /&gt;
*[[Guide To Basic Ship Combat]]&lt;br /&gt;
*[[Moving The Ship]]&lt;br /&gt;
*[[Boarding]]&lt;br /&gt;
*[[Vehicles]]&lt;br /&gt;
*[[Quick Start Guide]]&lt;br /&gt;
== Starter Guides ==&lt;br /&gt;
Guides made to make your first steps on the station a lot easier (and to remind you older players about some things).&lt;br /&gt;
&lt;br /&gt;
*[[File:Paper.png|link=Starter guide]] [[Starter guide|Tutorial]]&lt;br /&gt;
*[[File:Lawbook.png|link=Rules]] [[Rules|The Rules]]&lt;br /&gt;
*[[File:OpCom.png|link=Keyboard Shortcuts]] [[Keyboard Shortcuts]]&lt;br /&gt;
*[[File:Pen.png|link=Job selection and assignment]] [[Job selection and assignment|Job Selection and Assignment]]&lt;br /&gt;
*[[File:Terminology.png|link=Terminology]] [[Terminology]]&lt;br /&gt;
*[[File:Paper.png|link=Frequently Asked Questions]] [[Frequently Asked Questions]]&lt;br /&gt;
*[[File:Lawbook.png|Guide to avoiding bans]] [[Guide to avoiding bans|Guide to Avoiding Bans]]&lt;br /&gt;
&lt;br /&gt;
== Medical Guides ==&lt;br /&gt;
Guides for keeping your side alive in the conflict.&lt;br /&gt;
&lt;br /&gt;
*[[File:SMed.png|link=Guide to medicine|Guide to Medicine]] [[Guide to medicine|Guide to Medicine]]&lt;br /&gt;
*[[File:Beaker.png|link=Guide to chemistry|Guide to Chemistry]] [[Guide to chemistry|Guide to Chemistry]]&lt;br /&gt;
*[[File:Flashbang.gif|link=Grenade|Guide to Grenade Construction]] [[Grenade|Guide to Grenade Construction]]&lt;br /&gt;
*[[File:Medcom.gif|link=Guide to genetics|Guide to Genetics]] [[Guide to genetics|Guide to Genetics]]&lt;br /&gt;
*[[File:OpTable.gif|link=Surgery|Guide to Surgery]] [[Surgery|Guide to Surgery]]&lt;br /&gt;
&lt;br /&gt;
== Engineering Guides ==&lt;br /&gt;
Guides for constructing, repairing and keeping your ships and bases operation.&lt;br /&gt;
&lt;br /&gt;
*[[File:Wrench.png|link=Guide to construction]] [[Guide to construction|Guide to Construction]]&lt;br /&gt;
*[[File:Machine Frame.png|link=Guide to advanced construction]] [[Guide to advanced construction|Guide to Machine Construction]]&lt;br /&gt;
*[[File:ModernAPC.png|link=APC]] [[Guide to power|Guide to Power]]&lt;br /&gt;
*[[File:O2_Canister.png|link=Atmospherics]] [[Guide to Atmospherics]]&lt;br /&gt;
*[[File:Headheadset.png|link=Guide to Telecommunications]] [[Guide to Telecommunications]]&lt;br /&gt;
&lt;br /&gt;
== Science Guides ==&lt;br /&gt;
Guides on how to SCIENCE!&lt;br /&gt;
&lt;br /&gt;
*[[File:Disk.gif|link=Guide to Research and Development]] [[Guide to Research and Development]]&lt;br /&gt;
*[[File:Generic borg.png|link=Guide to robotics]] [[Guide to robotics|Guide to Robotics]]&lt;br /&gt;
*[[File:Slimeblue.png|link=Guide to xenobiology]] [[Guide to xenobiology|Guide to Xenobiology]]&lt;br /&gt;
*[[File:Telescience.gif|link=Guide_to_Xenoarchaeology]] [[Guide_to_Xenoarchaeology|Guide to Xenoarchaeology]]&lt;br /&gt;
&lt;br /&gt;
== Security Guides ==&lt;br /&gt;
These guides will help you keep peace on the the colony. &lt;br /&gt;
&lt;br /&gt;
*[[File:lawbook.png|link=Space Law]] [[Geminus Colony Law]]&lt;br /&gt;
*[[File:Paper.png|link=Standard Operating Procedure]] [[Standard Operating Procedure]]&lt;br /&gt;
*[[File:Handcuffs.png|link=Guide To Policing]] [[Guide To Policing]]&lt;br /&gt;
&lt;br /&gt;
== Combat Guides ==&lt;br /&gt;
Here are some guides to try and help you be ready for the conflict on the server.&lt;br /&gt;
&lt;br /&gt;
*[[File:Stunprod.png|link=Makeshift weapons]] [[Makeshift weapons|Makeshift Weapons]]&lt;br /&gt;
*[[File:Wirecutters.png|link=Hacking]] [[Hacking|Guide to Hacking]]&lt;br /&gt;
*[[File:Energy_Sword.png|32px|Link=Guide to Combat]] [[Guide to Combat]]&lt;br /&gt;
&lt;br /&gt;
== Other Guides ==&lt;br /&gt;
These guides didn't fit into any other category.&lt;br /&gt;
&lt;br /&gt;
*[[File:Module.png|link=Ai Modules]] [[Ai Modules|Guide to AI Modules]]&lt;br /&gt;
*[[File:AI.gif|link=Silicon Policy]] [[Silicon Policy|Guide to Silicon Policy]]&lt;br /&gt;
*[[File:ToxinsSpecial.gif|link=Guide to food and drinks]] [[Guide to food and drinks|Guide to Food and Drinks]]&lt;br /&gt;
*[[File:Sunflower.png|link=Guide to hydroponics]] [[Guide to hydroponics|Guide to Hydroponics]]&lt;br /&gt;
*[[File:Piano.png|link=Piano]] [[Songs|Guide to Playing Music]]&lt;br /&gt;
*[[File:Paper.png|link=Guide to paperwork]] [[Guide to paperwork|Guide to Paperwork]]&lt;br /&gt;
*[[File:Metal_Barricade.png|link=Building a FoB]] [[Building a FoB]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Guides]]&lt;/div&gt;</summary>
		<author><name>Bloxgate</name></author>
	</entry>
	<entry>
		<id>https://projectunsc.org/wiki/index.php?title=Module:Str_endswith&amp;diff=436</id>
		<title>Module:Str endswith</title>
		<link rel="alternate" type="text/html" href="https://projectunsc.org/wiki/index.php?title=Module:Str_endswith&amp;diff=436"/>
		<updated>2018-08-10T04:18:32Z</updated>

		<summary type="html">&lt;p&gt;Bloxgate: 1 revision imported: Wikipedia Message Boxes Part 2&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;-- This module implements {{str endswith}}.&lt;br /&gt;
&lt;br /&gt;
local TRUE_STRING = 'yes'&lt;br /&gt;
local FALSE_STRING = ''&lt;br /&gt;
&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
local function trim(s)&lt;br /&gt;
	return s:match('^%s*(.-)%s*$')&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.main(frame)&lt;br /&gt;
	local args = frame:getParent().args&lt;br /&gt;
	local s = args[1]&lt;br /&gt;
	local pattern = args[2]&lt;br /&gt;
	if not s or not pattern then&lt;br /&gt;
		-- TRUE_STRING is not the natural choice here, but is needed for&lt;br /&gt;
		-- backwards compatibility.&lt;br /&gt;
		return TRUE_STRING&lt;br /&gt;
	end&lt;br /&gt;
	s = trim(s)&lt;br /&gt;
	pattern = trim(pattern)&lt;br /&gt;
	if pattern == '' then&lt;br /&gt;
		-- All strings end with the empty string.&lt;br /&gt;
		return TRUE_STRING&lt;br /&gt;
	end&lt;br /&gt;
	if mw.ustring.sub(s, 0 - mw.ustring.len(pattern), -1) == pattern then&lt;br /&gt;
		return TRUE_STRING&lt;br /&gt;
	else&lt;br /&gt;
		return FALSE_STRING&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>Bloxgate</name></author>
	</entry>
	<entry>
		<id>https://projectunsc.org/wiki/index.php?title=Module:Math&amp;diff=434</id>
		<title>Module:Math</title>
		<link rel="alternate" type="text/html" href="https://projectunsc.org/wiki/index.php?title=Module:Math&amp;diff=434"/>
		<updated>2018-08-10T04:18:32Z</updated>

		<summary type="html">&lt;p&gt;Bloxgate: 1 revision imported: Wikipedia Message Boxes Part 2&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;--[[&lt;br /&gt;
&lt;br /&gt;
This module provides a number of basic mathematical operations.&lt;br /&gt;
&lt;br /&gt;
]]&lt;br /&gt;
&lt;br /&gt;
local yesno, getArgs -- lazily initialized&lt;br /&gt;
&lt;br /&gt;
local p = {} -- Holds functions to be returned from #invoke, and functions to make available to other Lua modules.&lt;br /&gt;
local wrap = {} -- Holds wrapper functions that process arguments from #invoke. These act as intemediary between functions meant for #invoke and functions meant for Lua.&lt;br /&gt;
&lt;br /&gt;
--[[&lt;br /&gt;
Helper functions used to avoid redundant code.&lt;br /&gt;
]]&lt;br /&gt;
&lt;br /&gt;
local function err(msg)&lt;br /&gt;
	-- Generates wikitext error messages.&lt;br /&gt;
	return mw.ustring.format('&amp;lt;strong class=&amp;quot;error&amp;quot;&amp;gt;Formatting error: %s&amp;lt;/strong&amp;gt;', msg)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function unpackNumberArgs(args)&lt;br /&gt;
	-- Returns an unpacked list of arguments specified with numerical keys.&lt;br /&gt;
	local ret = {}&lt;br /&gt;
	for k, v in pairs(args) do&lt;br /&gt;
		if type(k) == 'number' then&lt;br /&gt;
			table.insert(ret, v)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return unpack(ret)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function makeArgArray(...)&lt;br /&gt;
	-- Makes an array of arguments from a list of arguments that might include nils.&lt;br /&gt;
	local args = {...} -- Table of arguments. It might contain nils or non-number values, so we can't use ipairs.&lt;br /&gt;
	local nums = {} -- Stores the numbers of valid numerical arguments.&lt;br /&gt;
	local ret = {}&lt;br /&gt;
	for k, v in pairs(args) do&lt;br /&gt;
		v = p._cleanNumber(v)&lt;br /&gt;
		if v then&lt;br /&gt;
			nums[#nums + 1] = k&lt;br /&gt;
			args[k] = v&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	table.sort(nums)&lt;br /&gt;
	for i, num in ipairs(nums) do&lt;br /&gt;
		ret[#ret + 1] = args[num]&lt;br /&gt;
	end&lt;br /&gt;
	return ret&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function fold(func, ...)&lt;br /&gt;
	-- Use a function on all supplied arguments, and return the result. The function must accept two numbers as parameters,&lt;br /&gt;
	-- and must return a number as an output. This number is then supplied as input to the next function call.&lt;br /&gt;
	local vals = makeArgArray(...)	&lt;br /&gt;
	local count = #vals -- The number of valid arguments&lt;br /&gt;
	if count == 0 then return&lt;br /&gt;
		-- Exit if we have no valid args, otherwise removing the first arg would cause an error.&lt;br /&gt;
		nil, 0&lt;br /&gt;
	end &lt;br /&gt;
	local ret = table.remove(vals, 1)&lt;br /&gt;
	for _, val in ipairs(vals) do&lt;br /&gt;
		ret = func(ret, val)&lt;br /&gt;
	end&lt;br /&gt;
	return ret, count&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[[&lt;br /&gt;
Fold arguments by selectively choosing values (func should return when to choose the current &amp;quot;dominant&amp;quot; value).&lt;br /&gt;
]]&lt;br /&gt;
local function binary_fold(func, ...)&lt;br /&gt;
	local value = fold((function(a, b) if func(a, b) then return a else return b end end), ...)&lt;br /&gt;
	return value&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[[&lt;br /&gt;
random&lt;br /&gt;
&lt;br /&gt;
Generate a random number&lt;br /&gt;
&lt;br /&gt;
Usage:&lt;br /&gt;
{{#invoke: Math | random }}&lt;br /&gt;
{{#invoke: Math | random | maximum value }}&lt;br /&gt;
{{#invoke: Math | random | minimum value | maximum value }}&lt;br /&gt;
]]&lt;br /&gt;
&lt;br /&gt;
function wrap.random(args)&lt;br /&gt;
	local first = p._cleanNumber(args[1])&lt;br /&gt;
	local second = p._cleanNumber(args[2])&lt;br /&gt;
	return p._random(first, second)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p._random(first, second)&lt;br /&gt;
	math.randomseed(mw.site.stats.edits + mw.site.stats.pages + os.time() + math.floor(os.clock() * 1000000000))&lt;br /&gt;
	-- math.random will throw an error if given an explicit nil parameter, so we need to use if statements to check the params.&lt;br /&gt;
	if first and second then&lt;br /&gt;
		if first &amp;lt;= second then -- math.random doesn't allow the first number to be greater than the second.&lt;br /&gt;
			return math.random(first, second)&lt;br /&gt;
		end&lt;br /&gt;
	elseif first then&lt;br /&gt;
		return math.random(first)&lt;br /&gt;
	else&lt;br /&gt;
		return math.random()&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[[&lt;br /&gt;
order&lt;br /&gt;
&lt;br /&gt;
Determine order of magnitude of a number&lt;br /&gt;
&lt;br /&gt;
Usage:&lt;br /&gt;
{{#invoke: Math | order | value }}&lt;br /&gt;
]]&lt;br /&gt;
&lt;br /&gt;
function wrap.order(args)&lt;br /&gt;
	local input_string = (args[1] or args.x or '0');&lt;br /&gt;
	local input_number = p._cleanNumber(input_string);&lt;br /&gt;
	if input_number == nil then&lt;br /&gt;
		return err('order of magnitude input appears non-numeric')&lt;br /&gt;
	else&lt;br /&gt;
		return p._order(input_number)&lt;br /&gt;
	end    &lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p._order(x)&lt;br /&gt;
	if x == 0 then return 0 end&lt;br /&gt;
	return math.floor(math.log10(math.abs(x)))&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[[&lt;br /&gt;
precision&lt;br /&gt;
&lt;br /&gt;
Detemines the precision of a number using the string representation&lt;br /&gt;
&lt;br /&gt;
Usage:&lt;br /&gt;
{{ #invoke: Math | precision | value }}&lt;br /&gt;
]]&lt;br /&gt;
&lt;br /&gt;
function wrap.precision(args)&lt;br /&gt;
	local input_string = (args[1] or args.x or '0');&lt;br /&gt;
	local trap_fraction = args.check_fraction;&lt;br /&gt;
	local input_number;&lt;br /&gt;
&lt;br /&gt;
	if not yesno then&lt;br /&gt;
		yesno = require('Module:Yesno')&lt;br /&gt;
	end&lt;br /&gt;
	if yesno(trap_fraction, true) then -- Returns true for all input except nil, false, &amp;quot;no&amp;quot;, &amp;quot;n&amp;quot;, &amp;quot;0&amp;quot; and a few others. See [[Module:Yesno]].&lt;br /&gt;
		local pos = string.find(input_string, '/', 1, true);&lt;br /&gt;
		if pos ~= nil then&lt;br /&gt;
			if string.find(input_string, '/', pos + 1, true) == nil then&lt;br /&gt;
				local denominator = string.sub(input_string, pos+1, -1);&lt;br /&gt;
				local denom_value = tonumber(denominator);&lt;br /&gt;
				if denom_value ~= nil then&lt;br /&gt;
					return math.log10(denom_value);&lt;br /&gt;
				end&lt;br /&gt;
			end                        &lt;br /&gt;
		end&lt;br /&gt;
	end    &lt;br /&gt;
&lt;br /&gt;
	input_number, input_string = p._cleanNumber(input_string);&lt;br /&gt;
	if input_string == nil then&lt;br /&gt;
		return err('precision input appears non-numeric')&lt;br /&gt;
	else&lt;br /&gt;
		return p._precision(input_string)&lt;br /&gt;
	end    &lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p._precision(x)&lt;br /&gt;
	if type(x) == 'number' then&lt;br /&gt;
		x = tostring(x)&lt;br /&gt;
	end&lt;br /&gt;
	x = string.upper(x)&lt;br /&gt;
&lt;br /&gt;
	local decimal = x:find('%.')&lt;br /&gt;
	local exponent_pos = x:find('E')&lt;br /&gt;
	local result = 0;&lt;br /&gt;
&lt;br /&gt;
	if exponent_pos ~= nil then&lt;br /&gt;
		local exponent = string.sub(x, exponent_pos + 1)&lt;br /&gt;
		x = string.sub(x, 1, exponent_pos - 1)&lt;br /&gt;
		result = result - tonumber(exponent)&lt;br /&gt;
	end    &lt;br /&gt;
&lt;br /&gt;
	if decimal ~= nil then&lt;br /&gt;
		result = result + string.len(x) - decimal&lt;br /&gt;
		return result&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local pos = string.len(x);&lt;br /&gt;
	while x:byte(pos) == string.byte('0') do&lt;br /&gt;
		pos = pos - 1&lt;br /&gt;
		result = result - 1&lt;br /&gt;
		if pos &amp;lt;= 0 then&lt;br /&gt;
			return 0&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	return result&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--[[&lt;br /&gt;
max&lt;br /&gt;
&lt;br /&gt;
Finds the maximum argument&lt;br /&gt;
&lt;br /&gt;
Usage:&lt;br /&gt;
{{#invoke:Math| max | value1 | value2 | ... }}&lt;br /&gt;
&lt;br /&gt;
Note, any values that do not evaluate to numbers are ignored.&lt;br /&gt;
]]&lt;br /&gt;
&lt;br /&gt;
function wrap.max(args)&lt;br /&gt;
	return p._max(unpackNumberArgs(args))&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p._max(...)&lt;br /&gt;
	local max_value = binary_fold((function(a, b) return a &amp;gt; b end), ...)&lt;br /&gt;
	if max_value then&lt;br /&gt;
		return max_value&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[[&lt;br /&gt;
min &lt;br /&gt;
&lt;br /&gt;
Finds the minimum argument&lt;br /&gt;
&lt;br /&gt;
Usage:&lt;br /&gt;
{{#invoke:Math| min | value1 | value2 | ... }}&lt;br /&gt;
OR&lt;br /&gt;
{{#invoke:Math| min }}&lt;br /&gt;
&lt;br /&gt;
When used with no arguments, it takes its input from the parent&lt;br /&gt;
frame.  Note, any values that do not evaluate to numbers are ignored.&lt;br /&gt;
]]&lt;br /&gt;
&lt;br /&gt;
function wrap.min(args)&lt;br /&gt;
	return p._min(unpackNumberArgs(args))&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p._min(...)&lt;br /&gt;
	local min_value = binary_fold((function(a, b) return a &amp;lt; b end), ...)&lt;br /&gt;
	if min_value then&lt;br /&gt;
		return min_value&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[[&lt;br /&gt;
average &lt;br /&gt;
&lt;br /&gt;
Finds the average&lt;br /&gt;
&lt;br /&gt;
Usage:&lt;br /&gt;
{{#invoke:Math| average | value1 | value2 | ... }}&lt;br /&gt;
OR&lt;br /&gt;
{{#invoke:Math| average }}&lt;br /&gt;
&lt;br /&gt;
Note, any values that do not evaluate to numbers are ignored.&lt;br /&gt;
]]&lt;br /&gt;
&lt;br /&gt;
function wrap.average(args)&lt;br /&gt;
	return p._average(unpackNumberArgs(args))&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p._average(...)&lt;br /&gt;
	local sum, count = fold((function(a, b) return a + b end), ...)&lt;br /&gt;
	if not sum then&lt;br /&gt;
		return 0&lt;br /&gt;
	else&lt;br /&gt;
		return sum / count&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[[&lt;br /&gt;
round&lt;br /&gt;
&lt;br /&gt;
Rounds a number to specified precision&lt;br /&gt;
&lt;br /&gt;
Usage:&lt;br /&gt;
{{#invoke:Math | round | value | precision }}&lt;br /&gt;
&lt;br /&gt;
--]]&lt;br /&gt;
&lt;br /&gt;
function wrap.round(args)&lt;br /&gt;
	local value = p._cleanNumber(args[1] or args.value or 0)&lt;br /&gt;
	local precision = p._cleanNumber(args[2] or args.precision or 0)&lt;br /&gt;
	if value == nil or precision == nil then&lt;br /&gt;
		return err('round input appears non-numeric')&lt;br /&gt;
	else&lt;br /&gt;
		return p._round(value, precision)&lt;br /&gt;
	end    &lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p._round(value, precision)&lt;br /&gt;
	local rescale = math.pow(10, precision or 0);&lt;br /&gt;
	return math.floor(value * rescale + 0.5) / rescale;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[[&lt;br /&gt;
log10&lt;br /&gt;
&lt;br /&gt;
returns the log (base 10) of a number&lt;br /&gt;
&lt;br /&gt;
Usage:&lt;br /&gt;
{{#invoke:Math | log | x }}&lt;br /&gt;
]]&lt;br /&gt;
&lt;br /&gt;
function wrap.log10(args)&lt;br /&gt;
	return math.log10(args[1])&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[[&lt;br /&gt;
mod&lt;br /&gt;
&lt;br /&gt;
Implements the modulo operator&lt;br /&gt;
&lt;br /&gt;
Usage:&lt;br /&gt;
{{#invoke:Math | mod | x | y }}&lt;br /&gt;
&lt;br /&gt;
--]]&lt;br /&gt;
&lt;br /&gt;
function wrap.mod(args)&lt;br /&gt;
	local x = p._cleanNumber(args[1])&lt;br /&gt;
	local y = p._cleanNumber(args[2])&lt;br /&gt;
	if not x then&lt;br /&gt;
		return err('first argument to mod appears non-numeric')&lt;br /&gt;
	elseif not y then&lt;br /&gt;
		return err('second argument to mod appears non-numeric')&lt;br /&gt;
	else&lt;br /&gt;
		return p._mod(x, y)&lt;br /&gt;
	end    &lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p._mod(x, y)&lt;br /&gt;
	local ret = x % y&lt;br /&gt;
	if not (0 &amp;lt;= ret and ret &amp;lt; y) then&lt;br /&gt;
		ret = 0&lt;br /&gt;
	end&lt;br /&gt;
	return ret&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[[&lt;br /&gt;
gcd&lt;br /&gt;
&lt;br /&gt;
Calculates the greatest common divisor of multiple numbers&lt;br /&gt;
&lt;br /&gt;
Usage:&lt;br /&gt;
{{#invoke:Math | gcd | value 1 | value 2 | value 3 | ... }}&lt;br /&gt;
--]]&lt;br /&gt;
&lt;br /&gt;
function wrap.gcd(args)&lt;br /&gt;
	return p._gcd(unpackNumberArgs(args))&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p._gcd(...)&lt;br /&gt;
	local function findGcd(a, b)&lt;br /&gt;
		local r = b&lt;br /&gt;
		local oldr = a&lt;br /&gt;
		while r ~= 0 do&lt;br /&gt;
			local quotient = math.floor(oldr / r)&lt;br /&gt;
			oldr, r = r, oldr - quotient * r&lt;br /&gt;
		end&lt;br /&gt;
		if oldr &amp;lt; 0 then&lt;br /&gt;
			oldr = oldr * -1&lt;br /&gt;
		end&lt;br /&gt;
		return oldr&lt;br /&gt;
	end&lt;br /&gt;
	local result, count = fold(findGcd, ...)&lt;br /&gt;
	return result&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[[&lt;br /&gt;
precision_format&lt;br /&gt;
&lt;br /&gt;
Rounds a number to the specified precision and formats according to rules &lt;br /&gt;
originally used for {{template:Rnd}}.  Output is a string.&lt;br /&gt;
&lt;br /&gt;
Usage:&lt;br /&gt;
{{#invoke: Math | precision_format | number | precision }}&lt;br /&gt;
]]&lt;br /&gt;
&lt;br /&gt;
function wrap.precision_format(args)&lt;br /&gt;
	local value_string = args[1] or 0&lt;br /&gt;
	local precision = args[2] or 0&lt;br /&gt;
	return p._precision_format(value_string, precision)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p._precision_format(value_string, precision)&lt;br /&gt;
	-- For access to Mediawiki built-in formatter.&lt;br /&gt;
	local lang = mw.getContentLanguage();&lt;br /&gt;
&lt;br /&gt;
	local value&lt;br /&gt;
	value, value_string = p._cleanNumber(value_string)&lt;br /&gt;
	precision = p._cleanNumber(precision)&lt;br /&gt;
&lt;br /&gt;
	-- Check for non-numeric input&lt;br /&gt;
	if value == nil or precision == nil then&lt;br /&gt;
		return err('invalid input when rounding')&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local current_precision = p._precision(value)&lt;br /&gt;
	local order = p._order(value)&lt;br /&gt;
&lt;br /&gt;
	-- Due to round-off effects it is neccesary to limit the returned precision under&lt;br /&gt;
	-- some circumstances because the terminal digits will be inaccurately reported.&lt;br /&gt;
	if order + precision &amp;gt;= 14 then&lt;br /&gt;
		orig_precision = p._precision(value_string)&lt;br /&gt;
		if order + orig_precision &amp;gt;= 14 then&lt;br /&gt;
			precision = 13 - order;        &lt;br /&gt;
		end        &lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- If rounding off, truncate extra digits&lt;br /&gt;
	if precision &amp;lt; current_precision then&lt;br /&gt;
		value = p._round(value, precision)&lt;br /&gt;
		current_precision = p._precision(value)&lt;br /&gt;
	end    &lt;br /&gt;
&lt;br /&gt;
	local formatted_num = lang:formatNum(math.abs(value))&lt;br /&gt;
	local sign&lt;br /&gt;
&lt;br /&gt;
	-- Use proper unary minus sign rather than ASCII default&lt;br /&gt;
	if value &amp;lt; 0 then&lt;br /&gt;
		sign = '−'&lt;br /&gt;
	else&lt;br /&gt;
		sign = ''&lt;br /&gt;
	end    &lt;br /&gt;
&lt;br /&gt;
	-- Handle cases requiring scientific notation&lt;br /&gt;
	if string.find(formatted_num, 'E', 1, true) ~= nil or math.abs(order) &amp;gt;= 9 then&lt;br /&gt;
		value = value * math.pow(10, -order)&lt;br /&gt;
		current_precision = current_precision + order&lt;br /&gt;
		precision = precision + order&lt;br /&gt;
		formatted_num = lang:formatNum(math.abs(value))&lt;br /&gt;
	else&lt;br /&gt;
		order = 0;        &lt;br /&gt;
	end&lt;br /&gt;
	formatted_num = sign .. formatted_num&lt;br /&gt;
&lt;br /&gt;
	-- Pad with zeros, if needed    &lt;br /&gt;
	if current_precision &amp;lt; precision then&lt;br /&gt;
		local padding&lt;br /&gt;
		if current_precision &amp;lt;= 0 then&lt;br /&gt;
			if precision &amp;gt; 0 then&lt;br /&gt;
				local zero_sep = lang:formatNum(1.1)&lt;br /&gt;
				formatted_num = formatted_num .. zero_sep:sub(2,2)&lt;br /&gt;
&lt;br /&gt;
				padding = precision&lt;br /&gt;
				if padding &amp;gt; 20 then&lt;br /&gt;
					padding = 20&lt;br /&gt;
				end&lt;br /&gt;
&lt;br /&gt;
				formatted_num = formatted_num .. string.rep('0', padding)&lt;br /&gt;
			end            &lt;br /&gt;
		else                   &lt;br /&gt;
			padding = precision - current_precision&lt;br /&gt;
			if padding &amp;gt; 20 then&lt;br /&gt;
				padding = 20&lt;br /&gt;
			end&lt;br /&gt;
			formatted_num = formatted_num .. string.rep('0', padding)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Add exponential notation, if necessary.&lt;br /&gt;
	if order ~= 0 then&lt;br /&gt;
		-- Use proper unary minus sign rather than ASCII default&lt;br /&gt;
		if order &amp;lt; 0 then&lt;br /&gt;
			order = '−' .. lang:formatNum(math.abs(order))&lt;br /&gt;
		else&lt;br /&gt;
			order = lang:formatNum(order)&lt;br /&gt;
		end    &lt;br /&gt;
&lt;br /&gt;
		formatted_num = formatted_num .. '&amp;lt;span style=&amp;quot;margin:0 .15em 0 .25em&amp;quot;&amp;gt;×&amp;lt;/span&amp;gt;10&amp;lt;sup&amp;gt;' .. order .. '&amp;lt;/sup&amp;gt;'&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	return formatted_num&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[[&lt;br /&gt;
Helper function that interprets the input numerically.  If the &lt;br /&gt;
input does not appear to be a number, attempts evaluating it as&lt;br /&gt;
a parser functions expression.&lt;br /&gt;
]]&lt;br /&gt;
&lt;br /&gt;
function p._cleanNumber(number_string)&lt;br /&gt;
	if type(number_string) == 'number' then&lt;br /&gt;
		-- We were passed a number, so we don't need to do any processing.&lt;br /&gt;
		return number_string, tostring(number_string)&lt;br /&gt;
	elseif type(number_string) ~= 'string' or not number_string:find('%S') then&lt;br /&gt;
		-- We were passed a non-string or a blank string, so exit.&lt;br /&gt;
		return nil, nil;&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Attempt basic conversion&lt;br /&gt;
	local number = tonumber(number_string)&lt;br /&gt;
&lt;br /&gt;
	-- If failed, attempt to evaluate input as an expression&lt;br /&gt;
	if number == nil then&lt;br /&gt;
		local success, result = pcall(mw.ext.ParserFunctions.expr, number_string)&lt;br /&gt;
		if success then&lt;br /&gt;
			number = tonumber(result)&lt;br /&gt;
			number_string = tostring(number)&lt;br /&gt;
		else&lt;br /&gt;
			number = nil&lt;br /&gt;
			number_string = nil&lt;br /&gt;
		end&lt;br /&gt;
	else&lt;br /&gt;
		number_string = number_string:match(&amp;quot;^%s*(.-)%s*$&amp;quot;) -- String is valid but may contain padding, clean it.&lt;br /&gt;
		number_string = number_string:match(&amp;quot;^%+(.*)$&amp;quot;) or number_string -- Trim any leading + signs.&lt;br /&gt;
		if number_string:find('^%-?0[xX]') then&lt;br /&gt;
			-- Number is using 0xnnn notation to indicate base 16; use the number that Lua detected instead.&lt;br /&gt;
			number_string = tostring(number)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	return number, number_string&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[[&lt;br /&gt;
Wrapper function that does basic argument processing. This ensures that all functions from #invoke can use either the current&lt;br /&gt;
frame or the parent frame, and it also trims whitespace for all arguments and removes blank arguments.&lt;br /&gt;
]]&lt;br /&gt;
&lt;br /&gt;
local mt = { __index = function(t, k)&lt;br /&gt;
	return function(frame)&lt;br /&gt;
		if not getArgs then&lt;br /&gt;
			getArgs = require('Module:Arguments').getArgs&lt;br /&gt;
		end&lt;br /&gt;
		return wrap[k](getArgs(frame))  -- Argument processing is left to Module:Arguments. Whitespace is trimmed and blank arguments are removed.&lt;br /&gt;
	end&lt;br /&gt;
end }&lt;br /&gt;
&lt;br /&gt;
return setmetatable(p, mt)&lt;/div&gt;</summary>
		<author><name>Bloxgate</name></author>
	</entry>
	<entry>
		<id>https://projectunsc.org/wiki/index.php?title=Module:InfoboxImage&amp;diff=432</id>
		<title>Module:InfoboxImage</title>
		<link rel="alternate" type="text/html" href="https://projectunsc.org/wiki/index.php?title=Module:InfoboxImage&amp;diff=432"/>
		<updated>2018-08-10T04:18:32Z</updated>

		<summary type="html">&lt;p&gt;Bloxgate: 1 revision imported: Wikipedia Message Boxes Part 2&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, 'mw.ustring.gsub(image, &amp;quot;_&amp;quot;, &amp;quot; &amp;quot;) must not return nil')&lt;br /&gt;
    -- if image starts with [[ then remove that and anything after |&lt;br /&gt;
    if mw.ustring.sub(image,1,2) == &amp;quot;[[&amp;quot; then&lt;br /&gt;
        image = mw.ustring.sub(image,3);&lt;br /&gt;
        image = mw.ustring.gsub(image, &amp;quot;([^|]*)|.*&amp;quot;, &amp;quot;%1&amp;quot;);&lt;br /&gt;
        assert(image ~= nil, 'mw.ustring.gsub(image, &amp;quot;([^|]*)|.*&amp;quot;, &amp;quot;%1&amp;quot;) must not return nil')&lt;br /&gt;
    end&lt;br /&gt;
    -- Trim spaces&lt;br /&gt;
    image = mw.ustring.gsub(image, '^[ ]*(.-)[ ]*$', '%1');&lt;br /&gt;
    assert(image ~= nil, &amp;quot;mw.ustring.gsub(image, '^[ ]*(.-)[ ]*$', '%1') must not return nil&amp;quot;)&lt;br /&gt;
    -- remove prefix if exists&lt;br /&gt;
    local allNames = mw.site.namespaces[6].aliases&lt;br /&gt;
    allNames[#allNames + 1] = mw.site.namespaces[6].name&lt;br /&gt;
    allNames[#allNames + 1] = mw.site.namespaces[6].canonicalName&lt;br /&gt;
    for i, name in ipairs(allNames) do&lt;br /&gt;
        if mw.ustring.lower(mw.ustring.sub(image, 1, mw.ustring.len(name) + 1)) == mw.ustring.lower(name .. &amp;quot;:&amp;quot;) then&lt;br /&gt;
            image = mw.ustring.sub(image, mw.ustring.len(name) + 2);&lt;br /&gt;
            break&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
    -- Trim spaces&lt;br /&gt;
    image = mw.ustring.gsub(image, '^[ ]*(.-)[ ]*$', '%1');&lt;br /&gt;
    -- capitalise first letter&lt;br /&gt;
    image = mw.ustring.upper(mw.ustring.sub(image,1,1)) .. mw.ustring.sub(image,2);&lt;br /&gt;
&lt;br /&gt;
    for i,j in pairs(placeholder_image) do&lt;br /&gt;
        if image == j then&lt;br /&gt;
            return true&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
    return false&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function i.InfoboxImage(frame)&lt;br /&gt;
    local image = frame.args[&amp;quot;image&amp;quot;];&lt;br /&gt;
    &lt;br /&gt;
    if image == &amp;quot;&amp;quot; or image == nil then&lt;br /&gt;
        return &amp;quot;&amp;quot;;&lt;br /&gt;
    end&lt;br /&gt;
    if image == &amp;quot;&amp;amp;nbsp;&amp;quot; then&lt;br /&gt;
        return image;&lt;br /&gt;
    end&lt;br /&gt;
    if frame.args[&amp;quot;suppressplaceholder&amp;quot;] ~= &amp;quot;no&amp;quot; then&lt;br /&gt;
        if i.IsPlaceholder(image) == true then&lt;br /&gt;
            return &amp;quot;&amp;quot;;&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    if mw.ustring.lower(mw.ustring.sub(image,1,5)) == &amp;quot;http:&amp;quot; then&lt;br /&gt;
        return &amp;quot;&amp;quot;;&lt;br /&gt;
    end&lt;br /&gt;
    if mw.ustring.lower(mw.ustring.sub(image,1,6)) == &amp;quot;[http:&amp;quot; then&lt;br /&gt;
        return &amp;quot;&amp;quot;;&lt;br /&gt;
    end&lt;br /&gt;
    if mw.ustring.lower(mw.ustring.sub(image,1,7)) == &amp;quot;[[http:&amp;quot; then&lt;br /&gt;
        return &amp;quot;&amp;quot;;&lt;br /&gt;
    end&lt;br /&gt;
    if mw.ustring.lower(mw.ustring.sub(image,1,6)) == &amp;quot;https:&amp;quot; then&lt;br /&gt;
        return &amp;quot;&amp;quot;;&lt;br /&gt;
    end&lt;br /&gt;
    if mw.ustring.lower(mw.ustring.sub(image,1,7)) == &amp;quot;[https:&amp;quot; then&lt;br /&gt;
        return &amp;quot;&amp;quot;;&lt;br /&gt;
    end&lt;br /&gt;
    if mw.ustring.lower(mw.ustring.sub(image,1,8)) == &amp;quot;[[https:&amp;quot; then&lt;br /&gt;
        return &amp;quot;&amp;quot;;&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    if mw.ustring.sub(image,1,2) == &amp;quot;[[&amp;quot; then&lt;br /&gt;
        -- search for thumbnail images and add to tracking cat if found&lt;br /&gt;
        if mw.title.getCurrentTitle().namespace == 0 and (mw.ustring.find(image, &amp;quot;|%s*thumb%s*[|%]]&amp;quot;) or mw.ustring.find(image, &amp;quot;|%s*thumbnail%s*[|%]]&amp;quot;)) then&lt;br /&gt;
            return image .. &amp;quot;[[Category:Pages using infoboxes with thumbnail images]]&amp;quot;;&lt;br /&gt;
        elseif mw.title.getCurrentTitle().namespace == 0 then&lt;br /&gt;
            return image .. &amp;quot;[[Category:Pages using deprecated image syntax]]&amp;quot;;&lt;br /&gt;
        else&lt;br /&gt;
            return image;&lt;br /&gt;
        end&lt;br /&gt;
    elseif mw.ustring.sub(image,1,2) == &amp;quot;{{&amp;quot; and mw.ustring.sub(image,1,3) ~= &amp;quot;{{{&amp;quot; then&lt;br /&gt;
        return image;&lt;br /&gt;
    elseif mw.ustring.sub(image,1,1) == &amp;quot;&amp;lt;&amp;quot; then&lt;br /&gt;
        return image;&lt;br /&gt;
    elseif mw.ustring.sub(image,1,5) == mw.ustring.char(127)..&amp;quot;UNIQ&amp;quot; then&lt;br /&gt;
        -- Found strip marker at begining, so pass don't process at all&lt;br /&gt;
        return image;&lt;br /&gt;
    elseif mw.ustring.sub(image,4,9) == &amp;quot;`UNIQ-&amp;quot; then&lt;br /&gt;
        -- Found strip marker at begining, so pass don't process at all&lt;br /&gt;
        return image;&lt;br /&gt;
    else&lt;br /&gt;
        local result = &amp;quot;&amp;quot;;&lt;br /&gt;
        local page = frame.args[&amp;quot;page&amp;quot;];&lt;br /&gt;
        local size = frame.args[&amp;quot;size&amp;quot;];&lt;br /&gt;
        local maxsize = frame.args[&amp;quot;maxsize&amp;quot;];&lt;br /&gt;
        local sizedefault = frame.args[&amp;quot;sizedefault&amp;quot;];&lt;br /&gt;
        local alt = frame.args[&amp;quot;alt&amp;quot;];&lt;br /&gt;
        local link = frame.args[&amp;quot;link&amp;quot;];&lt;br /&gt;
        local title = frame.args[&amp;quot;title&amp;quot;];&lt;br /&gt;
        local border = frame.args[&amp;quot;border&amp;quot;];&lt;br /&gt;
        local upright = frame.args[&amp;quot;upright&amp;quot;] or &amp;quot;&amp;quot;;&lt;br /&gt;
        local thumbtime = frame.args[&amp;quot;thumbtime&amp;quot;] or &amp;quot;&amp;quot;;&lt;br /&gt;
        local center= frame.args[&amp;quot;center&amp;quot;];&lt;br /&gt;
        &lt;br /&gt;
        -- remove prefix if exists&lt;br /&gt;
        local allNames = mw.site.namespaces[6].aliases&lt;br /&gt;
        allNames[#allNames + 1] = mw.site.namespaces[6].name&lt;br /&gt;
        allNames[#allNames + 1] = mw.site.namespaces[6].canonicalName&lt;br /&gt;
        for i, name in ipairs(allNames) do&lt;br /&gt;
            if mw.ustring.lower(mw.ustring.sub(image, 1, mw.ustring.len(name) + 1)) == mw.ustring.lower(name .. &amp;quot;:&amp;quot;) then&lt;br /&gt;
                image = mw.ustring.sub(image, mw.ustring.len(name) + 2);&lt;br /&gt;
                break&lt;br /&gt;
            end&lt;br /&gt;
        end&lt;br /&gt;
        &lt;br /&gt;
        if maxsize ~= &amp;quot;&amp;quot; and maxsize ~= nil then&lt;br /&gt;
            -- if no sizedefault then set to maxsize&lt;br /&gt;
            if sizedefault == &amp;quot;&amp;quot; or sizedefault == nil then&lt;br /&gt;
                sizedefault = maxsize&lt;br /&gt;
            end&lt;br /&gt;
            -- check to see if size bigger than maxsize&lt;br /&gt;
            if size ~= &amp;quot;&amp;quot; and size ~= nil then&lt;br /&gt;
                local sizenumber = tonumber(mw.ustring.match(size,&amp;quot;%d*&amp;quot;)) or 0;&lt;br /&gt;
                local maxsizenumber = tonumber(mw.ustring.match(maxsize,&amp;quot;%d*&amp;quot;)) or 0;&lt;br /&gt;
                if sizenumber&amp;gt;maxsizenumber and maxsizenumber&amp;gt;0 then&lt;br /&gt;
                    size = maxsize;&lt;br /&gt;
                end&lt;br /&gt;
            end&lt;br /&gt;
        end&lt;br /&gt;
        -- add px to size if just a number&lt;br /&gt;
        if (tonumber(size) or 0) &amp;gt; 0 then&lt;br /&gt;
            size = size .. &amp;quot;px&amp;quot;;&lt;br /&gt;
        end&lt;br /&gt;
        -- 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 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>Bloxgate</name></author>
	</entry>
	<entry>
		<id>https://projectunsc.org/wiki/index.php?title=Module:Shortcut/config&amp;diff=400</id>
		<title>Module:Shortcut/config</title>
		<link rel="alternate" type="text/html" href="https://projectunsc.org/wiki/index.php?title=Module:Shortcut/config&amp;diff=400"/>
		<updated>2018-08-10T04:18:27Z</updated>

		<summary type="html">&lt;p&gt;Bloxgate: 1 revision imported: Wikipedia Message Boxes Part 2&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;-- This module holds configuration data for [[Module:Shortcut]].&lt;br /&gt;
&lt;br /&gt;
return {&lt;br /&gt;
&lt;br /&gt;
-- The heading at the top of the shortcut box. It accepts the following parameter:&lt;br /&gt;
-- $1 - the total number of shortcuts. (required)&lt;br /&gt;
['shortcut-heading'] = '[[Wikipedia:Shortcut|{{PLURAL:$1|Shortcut|Shortcuts}}]]',&lt;br /&gt;
&lt;br /&gt;
-- The error message to display when a shortcut is invalid (is not a string, or&lt;br /&gt;
-- is the blank string). It accepts the following parameter:&lt;br /&gt;
-- $1 - the number of the shortcut in the argument list. (required)&lt;br /&gt;
['invalid-shortcut-error'] = 'shortcut #$1 was invalid (shortcuts must be ' ..&lt;br /&gt;
	'strings of at least one character in length)',&lt;br /&gt;
&lt;br /&gt;
-- The error message to display when no shortcuts or other displayable content&lt;br /&gt;
-- were specified. (required)&lt;br /&gt;
['no-content-error'] = 'Error: no shortcuts were specified and the ' ..&lt;br /&gt;
	mw.text.nowiki('|msg=') ..&lt;br /&gt;
	' parameter was not set.',&lt;br /&gt;
&lt;br /&gt;
-- A category to add when the no-content-error message is displayed. (optional)&lt;br /&gt;
['no-content-error-category'] = 'Shortcut templates with missing parameters',&lt;br /&gt;
}&lt;/div&gt;</summary>
		<author><name>Bloxgate</name></author>
	</entry>
	<entry>
		<id>https://projectunsc.org/wiki/index.php?title=Module:Shortcut&amp;diff=398</id>
		<title>Module:Shortcut</title>
		<link rel="alternate" type="text/html" href="https://projectunsc.org/wiki/index.php?title=Module:Shortcut&amp;diff=398"/>
		<updated>2018-08-10T04:18:27Z</updated>

		<summary type="html">&lt;p&gt;Bloxgate: 1 revision imported: Wikipedia Message Boxes Part 2&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;-- This module implements {{shortcut}}.&lt;br /&gt;
&lt;br /&gt;
-- Set constants&lt;br /&gt;
local CONFIG_MODULE = 'Module:Shortcut/config'&lt;br /&gt;
&lt;br /&gt;
-- Load required modules&lt;br /&gt;
local checkType = require('libraryUtil').checkType&lt;br /&gt;
local yesno = require('Module:Yesno')&lt;br /&gt;
&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
local function message(msg, ...)&lt;br /&gt;
	return mw.message.newRawMessage(msg, ...):plain()&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function makeCategoryLink(cat)&lt;br /&gt;
	return string.format('[[%s:%s]]', mw.site.namespaces[14].name, cat)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p._main(shortcuts, options, frame, cfg)&lt;br /&gt;
	checkType('_main', 1, shortcuts, 'table')&lt;br /&gt;
	checkType('_main', 2, options, 'table', true)&lt;br /&gt;
	options = options or {}&lt;br /&gt;
	frame = frame or mw.getCurrentFrame()&lt;br /&gt;
	cfg = cfg or mw.loadData(CONFIG_MODULE)&lt;br /&gt;
	local isCategorized = yesno(options.category) ~= false&lt;br /&gt;
&lt;br /&gt;
	-- Validate shortcuts&lt;br /&gt;
	for i, shortcut in ipairs(shortcuts) do&lt;br /&gt;
		if type(shortcut) ~= 'string' or #shortcut &amp;lt; 1 then&lt;br /&gt;
			error(message(cfg['invalid-shortcut-error'], i), 2)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Make the list items. These are the shortcuts plus any extra lines such&lt;br /&gt;
	-- as options.msg.&lt;br /&gt;
	local listItems = {}&lt;br /&gt;
	for i, shortcut in ipairs(shortcuts) do&lt;br /&gt;
		listItems[i] = frame:expandTemplate{&lt;br /&gt;
			title = 'No redirect',&lt;br /&gt;
			args = {shortcut}&lt;br /&gt;
		}&lt;br /&gt;
	end&lt;br /&gt;
	table.insert(listItems, options.msg)&lt;br /&gt;
&lt;br /&gt;
	-- Return an error if we have nothing to display&lt;br /&gt;
	if #listItems &amp;lt; 1 then&lt;br /&gt;
		local msg = cfg['no-content-error']&lt;br /&gt;
		msg = string.format('&amp;lt;strong class=&amp;quot;error&amp;quot;&amp;gt;%s&amp;lt;/strong&amp;gt;', msg)&lt;br /&gt;
		if isCategorized and cfg['no-content-error-category'] then&lt;br /&gt;
			msg = msg .. makeCategoryLink(cfg['no-content-error-category'])&lt;br /&gt;
		end&lt;br /&gt;
		return msg&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local root = mw.html.create()&lt;br /&gt;
&lt;br /&gt;
	-- Anchors&lt;br /&gt;
	local anchorDiv = root&lt;br /&gt;
		:tag('div')&lt;br /&gt;
			:css('position', 'relative')&lt;br /&gt;
			:css('top', '-3em')&lt;br /&gt;
	for i, shortcut in ipairs(shortcuts) do&lt;br /&gt;
		local anchor = mw.uri.anchorEncode(shortcut)&lt;br /&gt;
		anchorDiv:tag('span'):attr('id', anchor)&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Shortcut heading&lt;br /&gt;
	local shortcutHeading&lt;br /&gt;
	do&lt;br /&gt;
		local nShortcuts = #shortcuts&lt;br /&gt;
		if nShortcuts &amp;gt; 0 then&lt;br /&gt;
			shortcutHeading = message(cfg['shortcut-heading'], nShortcuts)&lt;br /&gt;
			shortcutHeading = frame:preprocess(shortcutHeading)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Shortcut box&lt;br /&gt;
	local shortcutList = root&lt;br /&gt;
		:tag('div')&lt;br /&gt;
			:addClass('shortcutbox plainlist noprint')&lt;br /&gt;
			:attr('role', 'note')&lt;br /&gt;
			:css('float', 'right')&lt;br /&gt;
			:css('border', '1px solid #aaa')&lt;br /&gt;
			:css('background', '#fff')&lt;br /&gt;
			:css('margin', '0em 0em 0em 1em')&lt;br /&gt;
			:css('padding', '.3em .6em .2em .6em')&lt;br /&gt;
			:css('text-align', 'center')&lt;br /&gt;
			:css('font-size', '85%')&lt;br /&gt;
			:css('font-weight', 'bold')&lt;br /&gt;
	if shortcutHeading then&lt;br /&gt;
		shortcutList&lt;br /&gt;
			:tag('div')&lt;br /&gt;
				:css('display','inline-block')&lt;br /&gt;
				:css('border-bottom','1px solid #aaa')&lt;br /&gt;
				:css('margin-bottom', '.2em')&lt;br /&gt;
				:css('font-weight', 'normal')&lt;br /&gt;
				:wikitext(shortcutHeading)&lt;br /&gt;
	end&lt;br /&gt;
	local list = shortcutList:tag('ul')&lt;br /&gt;
	for i, item in ipairs(listItems) do&lt;br /&gt;
		list:tag('li'):wikitext(item)&lt;br /&gt;
	end&lt;br /&gt;
	return tostring(root)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.main(frame)&lt;br /&gt;
	local args = require('Module:Arguments').getArgs(frame, {&lt;br /&gt;
		wrappers = 'Template:Shortcut'&lt;br /&gt;
	})&lt;br /&gt;
&lt;br /&gt;
	-- Separate shortcuts from options&lt;br /&gt;
	local shortcuts, options = {}, {}&lt;br /&gt;
	for k, v in pairs(args) do&lt;br /&gt;
		if type(k) == 'number' then&lt;br /&gt;
			shortcuts[k] = v&lt;br /&gt;
		else&lt;br /&gt;
			options[k] = v&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Compress the shortcut array, which may contain nils.&lt;br /&gt;
	local function compressArray(t)&lt;br /&gt;
		local nums, ret = {}, {}&lt;br /&gt;
		for k in pairs(t) do&lt;br /&gt;
			nums[#nums + 1] = k&lt;br /&gt;
		end&lt;br /&gt;
		table.sort(nums)&lt;br /&gt;
		for i, num in ipairs(nums) do&lt;br /&gt;
			ret[i] = t[num]&lt;br /&gt;
		end&lt;br /&gt;
		return ret&lt;br /&gt;
	end&lt;br /&gt;
	shortcuts = compressArray(shortcuts)&lt;br /&gt;
&lt;br /&gt;
	return p._main(shortcuts, options, frame)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>Bloxgate</name></author>
	</entry>
	<entry>
		<id>https://projectunsc.org/wiki/index.php?title=Module:Redirect&amp;diff=396</id>
		<title>Module:Redirect</title>
		<link rel="alternate" type="text/html" href="https://projectunsc.org/wiki/index.php?title=Module:Redirect&amp;diff=396"/>
		<updated>2018-08-10T04:18:27Z</updated>

		<summary type="html">&lt;p&gt;Bloxgate: 1 revision imported: Wikipedia Message Boxes Part 2&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;-- This module provides functions for getting the target of a redirect page.&lt;br /&gt;
&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
-- Gets a mw.title object, using pcall to avoid generating script errors if we&lt;br /&gt;
-- are over the expensive function count limit (among other possible causes).&lt;br /&gt;
local function getTitle(...)&lt;br /&gt;
	local success, titleObj = pcall(mw.title.new, ...)&lt;br /&gt;
	if success then&lt;br /&gt;
		return titleObj&lt;br /&gt;
	else&lt;br /&gt;
		return nil&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Gets the name of a page that a redirect leads to, or nil if it isn't a&lt;br /&gt;
-- redirect.&lt;br /&gt;
function p.getTargetFromText(text)&lt;br /&gt;
	return string.match(&lt;br /&gt;
		text,&lt;br /&gt;
		&amp;quot;^%s*#[Rr][Ee][Dd][Ii][Rr][Ee][Cc][Tt]%s*:?%s*%[%[([^%[%]|]-)%]%]&amp;quot;&lt;br /&gt;
	) or string.match(&lt;br /&gt;
		text,&lt;br /&gt;
		&amp;quot;^%s*#[Rr][Ee][Dd][Ii][Rr][Ee][Cc][Tt]%s*:?%s*%[%[([^%[%]|]-)|[^%[%]]-%]%]&amp;quot;&lt;br /&gt;
	)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Gets the target of a redirect. If the page specified is not a redirect,&lt;br /&gt;
-- returns nil.&lt;br /&gt;
function p.getTarget(page, fulltext)&lt;br /&gt;
	-- Get the title object. Both page names and title objects are allowed&lt;br /&gt;
	-- as input.&lt;br /&gt;
	local titleObj&lt;br /&gt;
	if type(page) == 'string' or type(page) == 'number' then&lt;br /&gt;
		titleObj = getTitle(page)&lt;br /&gt;
	elseif type(page) == 'table' and type(page.getContent) == 'function' then&lt;br /&gt;
		titleObj = page&lt;br /&gt;
	else&lt;br /&gt;
		error(string.format(&lt;br /&gt;
			&amp;quot;bad argument #1 to 'getTarget'&amp;quot;&lt;br /&gt;
				.. &amp;quot; (string, number, or title object expected, got %s)&amp;quot;,&lt;br /&gt;
			type(page)&lt;br /&gt;
		), 2)&lt;br /&gt;
	end&lt;br /&gt;
	if not titleObj or not titleObj.isRedirect then&lt;br /&gt;
		return nil&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	-- Find the target by using string matching on the page content.&lt;br /&gt;
	local target = p.getTargetFromText(titleObj:getContent() or &amp;quot;&amp;quot;)&lt;br /&gt;
	if target then&lt;br /&gt;
		local targetTitle = getTitle(target)&lt;br /&gt;
		if targetTitle then&lt;br /&gt;
			if fulltext then&lt;br /&gt;
				return targetTitle.fullText&lt;br /&gt;
			else&lt;br /&gt;
				return targetTitle.prefixedText&lt;br /&gt;
			end&lt;br /&gt;
		else&lt;br /&gt;
			return nil&lt;br /&gt;
		end&lt;br /&gt;
	else&lt;br /&gt;
		-- The page is a redirect, but matching failed. This indicates a bug in&lt;br /&gt;
		-- the redirect matching pattern, so throw an error.&lt;br /&gt;
		error(string.format(&lt;br /&gt;
			'could not parse redirect on page &amp;quot;%s&amp;quot;',&lt;br /&gt;
			fulltext and titleObj.fullText or titleObj.prefixedText&lt;br /&gt;
		))&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[[&lt;br /&gt;
-- Given a single page name determines what page it redirects to and returns the&lt;br /&gt;
-- target page name, or the passed page name when not a redirect. The passed&lt;br /&gt;
-- page name can be given as plain text or as a page link.&lt;br /&gt;
-- &lt;br /&gt;
-- Returns page name as plain text, or when the bracket parameter is given, as a&lt;br /&gt;
-- page link. Returns an error message when page does not exist or the redirect&lt;br /&gt;
-- target cannot be determined for some reason.&lt;br /&gt;
--]]&lt;br /&gt;
function p.luaMain(rname, bracket, fulltext)&lt;br /&gt;
	if type(rname) ~= &amp;quot;string&amp;quot; or not rname:find(&amp;quot;%S&amp;quot;) then&lt;br /&gt;
		return nil&lt;br /&gt;
	end&lt;br /&gt;
	bracket = bracket and &amp;quot;[[%s]]&amp;quot; or &amp;quot;%s&amp;quot;&lt;br /&gt;
	rname = rname:match(&amp;quot;%[%[(.+)%]%]&amp;quot;) or rname&lt;br /&gt;
	local target = p.getTarget(rname, fulltext)&lt;br /&gt;
	local ret = target or rname&lt;br /&gt;
	ret = getTitle(ret)&lt;br /&gt;
	if ret then&lt;br /&gt;
		if fulltext then&lt;br /&gt;
			ret = ret.fullText&lt;br /&gt;
		else&lt;br /&gt;
			ret = ret.prefixedText&lt;br /&gt;
		end&lt;br /&gt;
		return bracket:format(ret)&lt;br /&gt;
	else&lt;br /&gt;
		return nil&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Provides access to the luaMain function from wikitext.&lt;br /&gt;
function p.main(frame)&lt;br /&gt;
	local args = require('Module:Arguments').getArgs(frame, {frameOnly = true})&lt;br /&gt;
	return p.luaMain(args[1], args.bracket, args.fulltext) or ''&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Returns true if the specified page is a redirect, and false otherwise.&lt;br /&gt;
function p.luaIsRedirect(page)&lt;br /&gt;
	local titleObj = getTitle(page)&lt;br /&gt;
	if not titleObj then&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
	if titleObj.isRedirect 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;
-- Provides access to the luaIsRedirect function from wikitext, returning 'yes'&lt;br /&gt;
-- if the specified page is a redirect, and the blank string otherwise.&lt;br /&gt;
function p.isRedirect(frame)&lt;br /&gt;
	local args = require('Module:Arguments').getArgs(frame, {frameOnly = true})&lt;br /&gt;
	if p.luaIsRedirect(args[1]) then&lt;br /&gt;
		return 'yes'&lt;br /&gt;
	else&lt;br /&gt;
		return ''&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>Bloxgate</name></author>
	</entry>
	<entry>
		<id>https://projectunsc.org/wiki/index.php?title=Module:Unsubst&amp;diff=382</id>
		<title>Module:Unsubst</title>
		<link rel="alternate" type="text/html" href="https://projectunsc.org/wiki/index.php?title=Module:Unsubst&amp;diff=382"/>
		<updated>2018-08-10T04:18:19Z</updated>

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

		<summary type="html">&lt;p&gt;Bloxgate: 1 revision imported: Wikipedia Message Boxes Part 2&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;--[[  &lt;br /&gt;
&lt;br /&gt;
This module is intended to provide access to basic string functions.&lt;br /&gt;
&lt;br /&gt;
Most of the functions provided here can be invoked with named parameters, &lt;br /&gt;
unnamed parameters, or a mixture.  If named parameters are used, Mediawiki will &lt;br /&gt;
automatically remove any leading or trailing whitespace from the parameter.  &lt;br /&gt;
Depending on the intended use, it may be advantageous to either preserve or&lt;br /&gt;
remove such whitespace.&lt;br /&gt;
&lt;br /&gt;
Global options&lt;br /&gt;
    ignore_errors: If set to 'true' or 1, any error condition will result in &lt;br /&gt;
        an empty string being returned rather than an error message.  &lt;br /&gt;
        &lt;br /&gt;
    error_category: If an error occurs, specifies the name of a category to &lt;br /&gt;
        include with the error message.  The default category is  &lt;br /&gt;
        [Category:Errors reported by Module String].&lt;br /&gt;
        &lt;br /&gt;
    no_category: If set to 'true' or 1, no category will be added if an error&lt;br /&gt;
        is generated.&lt;br /&gt;
        &lt;br /&gt;
Unit tests for this module are available at Module:String/tests.&lt;br /&gt;
]]&lt;br /&gt;
&lt;br /&gt;
local str = {}&lt;br /&gt;
&lt;br /&gt;
--[[&lt;br /&gt;
len&lt;br /&gt;
&lt;br /&gt;
This function returns the length of the target string.&lt;br /&gt;
&lt;br /&gt;
Usage:&lt;br /&gt;
{{#invoke:String|len|target_string|}}&lt;br /&gt;
OR&lt;br /&gt;
{{#invoke:String|len|s=target_string}}&lt;br /&gt;
&lt;br /&gt;
Parameters&lt;br /&gt;
    s: The string whose length to report&lt;br /&gt;
&lt;br /&gt;
If invoked using named parameters, Mediawiki will automatically remove any leading or&lt;br /&gt;
trailing whitespace from the target string.  &lt;br /&gt;
]]&lt;br /&gt;
function str.len( frame )&lt;br /&gt;
    local new_args = str._getParameters( frame.args, {'s'} );&lt;br /&gt;
    local s = new_args['s'] or '';&lt;br /&gt;
    return mw.ustring.len( s )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[[&lt;br /&gt;
sub&lt;br /&gt;
&lt;br /&gt;
This function returns a substring of the target string at specified indices.&lt;br /&gt;
&lt;br /&gt;
Usage:&lt;br /&gt;
{{#invoke:String|sub|target_string|start_index|end_index}}&lt;br /&gt;
OR&lt;br /&gt;
{{#invoke:String|sub|s=target_string|i=start_index|j=end_index}}&lt;br /&gt;
&lt;br /&gt;
Parameters&lt;br /&gt;
    s: The string to return a subset of&lt;br /&gt;
    i: The fist index of the substring to return, defaults to 1.&lt;br /&gt;
    j: The last index of the string to return, defaults to the last character.&lt;br /&gt;
    &lt;br /&gt;
The first character of the string is assigned an index of 1.  If either i or j&lt;br /&gt;
is a negative value, it is interpreted the same as selecting a character by &lt;br /&gt;
counting from the end of the string.  Hence, a value of -1 is the same as &lt;br /&gt;
selecting the last character of the string.&lt;br /&gt;
&lt;br /&gt;
If the requested indices are out of range for the given string, an error is &lt;br /&gt;
reported.&lt;br /&gt;
]]&lt;br /&gt;
function str.sub( frame )&lt;br /&gt;
    local new_args = str._getParameters( frame.args, { 's', 'i', 'j' } );&lt;br /&gt;
    local s = new_args['s'] or '';&lt;br /&gt;
    local i = tonumber( new_args['i'] ) or 1;&lt;br /&gt;
    local j = tonumber( new_args['j'] ) or -1;&lt;br /&gt;
    &lt;br /&gt;
    local len = mw.ustring.len( s );&lt;br /&gt;
&lt;br /&gt;
    -- Convert negatives for range checking&lt;br /&gt;
    if i &amp;lt; 0 then&lt;br /&gt;
        i = len + i + 1;&lt;br /&gt;
    end&lt;br /&gt;
    if j &amp;lt; 0 then&lt;br /&gt;
        j = len + j + 1;&lt;br /&gt;
    end&lt;br /&gt;
    &lt;br /&gt;
    if i &amp;gt; len or j &amp;gt; len or i &amp;lt; 1 or j &amp;lt; 1 then&lt;br /&gt;
        return str._error( 'String subset index out of range' );&lt;br /&gt;
    end&lt;br /&gt;
    if j &amp;lt; i then&lt;br /&gt;
        return str._error( 'String subset indices out of order' );&lt;br /&gt;
    end&lt;br /&gt;
    &lt;br /&gt;
    return mw.ustring.sub( s, i, j )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[[&lt;br /&gt;
This function implements that features of {{str sub old}} and is kept in order&lt;br /&gt;
to maintain these older templates.&lt;br /&gt;
]]&lt;br /&gt;
function str.sublength( frame )&lt;br /&gt;
    local i = tonumber( frame.args.i ) or 0&lt;br /&gt;
    local len = tonumber( frame.args.len )&lt;br /&gt;
    return mw.ustring.sub( frame.args.s, i + 1, len and ( i + len ) )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[[&lt;br /&gt;
match&lt;br /&gt;
&lt;br /&gt;
This function returns a substring from the source string that matches a &lt;br /&gt;
specified pattern.&lt;br /&gt;
&lt;br /&gt;
Usage:&lt;br /&gt;
{{#invoke:String|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}}&lt;br /&gt;
OR&lt;br /&gt;
{{#invoke:String|pos|s=source_string|pattern=pattern_string|start=start_index&lt;br /&gt;
    |match=match_number|plain=plain_flag|nomatch=nomatch_output}}&lt;br /&gt;
&lt;br /&gt;
Parameters&lt;br /&gt;
    s: The string to search&lt;br /&gt;
    pattern: The pattern or string to find within the string&lt;br /&gt;
    start: The index within the source string to start the search.  The first&lt;br /&gt;
        character of the string has index 1.  Defaults to 1.&lt;br /&gt;
    match: In some cases it may be possible to make multiple matches on a single &lt;br /&gt;
        string.  This specifies which match to return, where the first match is &lt;br /&gt;
        match= 1.  If a negative number is specified then a match is returned &lt;br /&gt;
        counting from the last match.  Hence match = -1 is the same as requesting&lt;br /&gt;
        the last match.  Defaults to 1.&lt;br /&gt;
    plain: A flag indicating that the pattern should be understood as plain&lt;br /&gt;
        text.  Defaults to false.&lt;br /&gt;
    nomatch: If no match is found, output the &amp;quot;nomatch&amp;quot; value rather than an error.&lt;br /&gt;
&lt;br /&gt;
If invoked using named parameters, Mediawiki will automatically remove any leading or&lt;br /&gt;
trailing whitespace from each string.  In some circumstances this is desirable, in &lt;br /&gt;
other cases one may want to preserve the whitespace.&lt;br /&gt;
&lt;br /&gt;
If the match_number or start_index are out of range for the string being queried, then&lt;br /&gt;
this function generates an error.  An error is also generated if no match is found.&lt;br /&gt;
If one adds the parameter ignore_errors=true, then the error will be suppressed and &lt;br /&gt;
an empty string will be returned on any failure.&lt;br /&gt;
&lt;br /&gt;
For information on constructing Lua patterns, a form of [regular expression], see:&lt;br /&gt;
&lt;br /&gt;
* http://www.lua.org/manual/5.1/manual.html#5.4.1&lt;br /&gt;
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns&lt;br /&gt;
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns&lt;br /&gt;
&lt;br /&gt;
]]&lt;br /&gt;
function str.match( frame )&lt;br /&gt;
    local new_args = str._getParameters( frame.args, {'s', 'pattern', 'start', 'match', 'plain', 'nomatch'} );&lt;br /&gt;
    local s = new_args['s'] or '';&lt;br /&gt;
    local start = tonumber( new_args['start'] ) or 1;&lt;br /&gt;
    local plain_flag = str._getBoolean( new_args['plain'] or false );&lt;br /&gt;
    local pattern = new_args['pattern'] or '';&lt;br /&gt;
    local match_index = math.floor( tonumber(new_args['match']) or 1 );&lt;br /&gt;
    local nomatch = new_args['nomatch'];&lt;br /&gt;
    &lt;br /&gt;
    if s == '' then&lt;br /&gt;
        return str._error( 'Target string is empty' );&lt;br /&gt;
    end&lt;br /&gt;
    if pattern == '' then&lt;br /&gt;
        return str._error( 'Pattern string is empty' );&lt;br /&gt;
    end&lt;br /&gt;
    if math.abs(start) &amp;lt; 1 or math.abs(start) &amp;gt; mw.ustring.len( s ) then&lt;br /&gt;
        return str._error( 'Requested start is out of range' );&lt;br /&gt;
    end&lt;br /&gt;
    if match_index == 0 then&lt;br /&gt;
        return str._error( 'Match index is out of range' );&lt;br /&gt;
    end&lt;br /&gt;
    if plain_flag then&lt;br /&gt;
        pattern = str._escapePattern( pattern );&lt;br /&gt;
    end&lt;br /&gt;
    &lt;br /&gt;
    local result&lt;br /&gt;
    if match_index == 1 then&lt;br /&gt;
        -- Find first match is simple case&lt;br /&gt;
        result = mw.ustring.match( s, pattern, start )&lt;br /&gt;
    else&lt;br /&gt;
        if start &amp;gt; 1 then&lt;br /&gt;
            s = mw.ustring.sub( s, start );&lt;br /&gt;
        end&lt;br /&gt;
        &lt;br /&gt;
        local iterator = mw.ustring.gmatch(s, pattern);&lt;br /&gt;
        if match_index &amp;gt; 0 then&lt;br /&gt;
            -- Forward search&lt;br /&gt;
            for w in iterator do&lt;br /&gt;
                match_index = match_index - 1;&lt;br /&gt;
                if match_index == 0 then&lt;br /&gt;
                    result = w;&lt;br /&gt;
                    break;&lt;br /&gt;
                end&lt;br /&gt;
            end    &lt;br /&gt;
        else&lt;br /&gt;
            -- Reverse search&lt;br /&gt;
            local result_table = {};&lt;br /&gt;
            local count = 1;&lt;br /&gt;
            for w in iterator do&lt;br /&gt;
                result_table[count] = w;&lt;br /&gt;
                count = count + 1;&lt;br /&gt;
            end&lt;br /&gt;
            &lt;br /&gt;
            result = result_table[ count + match_index ];            &lt;br /&gt;
        end&lt;br /&gt;
    end        &lt;br /&gt;
    &lt;br /&gt;
    if result == nil then&lt;br /&gt;
        if nomatch == nil then&lt;br /&gt;
            return str._error( 'Match not found' );&lt;br /&gt;
        else&lt;br /&gt;
            return nomatch;&lt;br /&gt;
        end&lt;br /&gt;
    else&lt;br /&gt;
        return result;&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[[&lt;br /&gt;
pos&lt;br /&gt;
&lt;br /&gt;
This function returns a single character from the target string at position pos.&lt;br /&gt;
&lt;br /&gt;
Usage:&lt;br /&gt;
{{#invoke:String|pos|target_string|index_value}}&lt;br /&gt;
OR&lt;br /&gt;
{{#invoke:String|pos|target=target_string|pos=index_value}}&lt;br /&gt;
&lt;br /&gt;
Parameters&lt;br /&gt;
    target: The string to search&lt;br /&gt;
    pos: The index for the character to return&lt;br /&gt;
&lt;br /&gt;
If invoked using named parameters, Mediawiki will automatically remove any leading or&lt;br /&gt;
trailing whitespace from the target string.  In some circumstances this is desirable, in &lt;br /&gt;
other cases one may want to preserve the whitespace.&lt;br /&gt;
&lt;br /&gt;
The first character has an index value of 1.&lt;br /&gt;
&lt;br /&gt;
If one requests a negative value, this function will select a character by counting backwards &lt;br /&gt;
from the end of the string.  In other words pos = -1 is the same as asking for the last character.&lt;br /&gt;
&lt;br /&gt;
A requested value of zero, or a value greater than the length of the string returns an error.&lt;br /&gt;
]]&lt;br /&gt;
function str.pos( frame )&lt;br /&gt;
    local new_args = str._getParameters( frame.args, {'target', 'pos'} );&lt;br /&gt;
    local target_str = new_args['target'] or '';&lt;br /&gt;
    local pos = tonumber( new_args['pos'] ) or 0;&lt;br /&gt;
&lt;br /&gt;
    if pos == 0 or math.abs(pos) &amp;gt; mw.ustring.len( target_str ) then&lt;br /&gt;
        return str._error( 'String index out of range' );&lt;br /&gt;
    end    &lt;br /&gt;
    &lt;br /&gt;
    return mw.ustring.sub( target_str, pos, pos );&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[[&lt;br /&gt;
str_find&lt;br /&gt;
&lt;br /&gt;
This function duplicates the behavior of {{str_find}}, including all of its quirks.&lt;br /&gt;
This is provided in order to support existing templates, but is NOT RECOMMENDED for &lt;br /&gt;
new code and templates.  New code is recommended to use the &amp;quot;find&amp;quot; function instead.&lt;br /&gt;
&lt;br /&gt;
Returns the first index in &amp;quot;source&amp;quot; that is a match to &amp;quot;target&amp;quot;.  Indexing is 1-based,&lt;br /&gt;
and the function returns -1 if the &amp;quot;target&amp;quot; string is not present in &amp;quot;source&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Important Note: If the &amp;quot;target&amp;quot; string is empty / missing, this function returns a&lt;br /&gt;
value of &amp;quot;1&amp;quot;, which is generally unexpected behavior, and must be accounted for&lt;br /&gt;
separatetly.&lt;br /&gt;
]]&lt;br /&gt;
function str.str_find( frame )&lt;br /&gt;
    local new_args = str._getParameters( frame.args, {'source', 'target'} );&lt;br /&gt;
    local source_str = new_args['source'] or '';&lt;br /&gt;
    local target_str = new_args['target'] or '';&lt;br /&gt;
&lt;br /&gt;
    if target_str == '' then&lt;br /&gt;
        return 1;&lt;br /&gt;
    end    &lt;br /&gt;
    &lt;br /&gt;
    local start = mw.ustring.find( source_str, target_str, 1, true )&lt;br /&gt;
    if start == nil then&lt;br /&gt;
        start = -1&lt;br /&gt;
    end&lt;br /&gt;
    &lt;br /&gt;
    return start&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[[&lt;br /&gt;
find&lt;br /&gt;
&lt;br /&gt;
This function allows one to search for a target string or pattern within another&lt;br /&gt;
string.&lt;br /&gt;
&lt;br /&gt;
Usage:&lt;br /&gt;
{{#invoke:String|find|source_str|target_string|start_index|plain_flag}}&lt;br /&gt;
OR&lt;br /&gt;
{{#invoke:String|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}}&lt;br /&gt;
&lt;br /&gt;
Parameters&lt;br /&gt;
    source: The string to search&lt;br /&gt;
    target: The string or pattern to find within source&lt;br /&gt;
    start: The index within the source string to start the search, defaults to 1&lt;br /&gt;
    plain: Boolean flag indicating that target should be understood as plain&lt;br /&gt;
        text and not as a Lua style regular expression, defaults to true&lt;br /&gt;
&lt;br /&gt;
If invoked using named parameters, Mediawiki will automatically remove any leading or&lt;br /&gt;
trailing whitespace from the parameter.  In some circumstances this is desirable, in &lt;br /&gt;
other cases one may want to preserve the whitespace.&lt;br /&gt;
&lt;br /&gt;
This function returns the first index &amp;gt;= &amp;quot;start&amp;quot; where &amp;quot;target&amp;quot; can be found &lt;br /&gt;
within &amp;quot;source&amp;quot;.  Indices are 1-based.  If &amp;quot;target&amp;quot; is not found, then this &lt;br /&gt;
function returns 0.  If either &amp;quot;source&amp;quot; or &amp;quot;target&amp;quot; are missing / empty, this&lt;br /&gt;
function also returns 0.&lt;br /&gt;
&lt;br /&gt;
This function should be safe for UTF-8 strings.&lt;br /&gt;
]]&lt;br /&gt;
function str.find( frame )&lt;br /&gt;
    local new_args = str._getParameters( frame.args, {'source', 'target', 'start', 'plain' } ); &lt;br /&gt;
    local source_str = new_args['source'] or '';&lt;br /&gt;
    local pattern = new_args['target'] or '';&lt;br /&gt;
    local start_pos = tonumber(new_args['start']) or 1;&lt;br /&gt;
    local plain = new_args['plain'] or true;&lt;br /&gt;
        &lt;br /&gt;
    if source_str == '' or pattern == '' then&lt;br /&gt;
        return 0;&lt;br /&gt;
    end    &lt;br /&gt;
    &lt;br /&gt;
    plain = str._getBoolean( plain );&lt;br /&gt;
&lt;br /&gt;
    local start = mw.ustring.find( source_str, pattern, start_pos, plain )&lt;br /&gt;
    if start == nil then&lt;br /&gt;
        start = 0&lt;br /&gt;
    end&lt;br /&gt;
    &lt;br /&gt;
    return start&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[[&lt;br /&gt;
replace&lt;br /&gt;
&lt;br /&gt;
This function allows one to replace a target string or pattern within another&lt;br /&gt;
string.&lt;br /&gt;
&lt;br /&gt;
Usage:&lt;br /&gt;
{{#invoke:String|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}}&lt;br /&gt;
OR&lt;br /&gt;
{{#invoke:String|replace|source=source_string|pattern=pattern_string|replace=replace_string|&lt;br /&gt;
   count=replacement_count|plain=plain_flag}}&lt;br /&gt;
&lt;br /&gt;
Parameters&lt;br /&gt;
    source: The string to search&lt;br /&gt;
    pattern: The string or pattern to find within source&lt;br /&gt;
    replace: The replacement text&lt;br /&gt;
    count: The number of occurences to replace, defaults to all.&lt;br /&gt;
    plain: Boolean flag indicating that pattern should be understood as plain&lt;br /&gt;
        text and not as a Lua style regular expression, defaults to true &lt;br /&gt;
]]&lt;br /&gt;
function str.replace( frame )&lt;br /&gt;
    local new_args = str._getParameters( frame.args, {'source', 'pattern', 'replace', 'count', 'plain' } ); &lt;br /&gt;
    local source_str = new_args['source'] or '';&lt;br /&gt;
    local pattern = new_args['pattern'] or '';&lt;br /&gt;
    local replace = new_args['replace'] or '';&lt;br /&gt;
    local count = tonumber( new_args['count'] );&lt;br /&gt;
    local plain = new_args['plain'] or true;&lt;br /&gt;
        &lt;br /&gt;
    if source_str == '' or pattern == '' then&lt;br /&gt;
        return source_str;&lt;br /&gt;
    end    &lt;br /&gt;
    plain = str._getBoolean( plain );&lt;br /&gt;
&lt;br /&gt;
    if plain then&lt;br /&gt;
        pattern = str._escapePattern( pattern );&lt;br /&gt;
        replace = mw.ustring.gsub( replace, &amp;quot;%%&amp;quot;, &amp;quot;%%%%&amp;quot; ); --Only need to escape replacement sequences.&lt;br /&gt;
    end&lt;br /&gt;
    &lt;br /&gt;
    local result;&lt;br /&gt;
&lt;br /&gt;
    if count ~= nil then&lt;br /&gt;
        result = mw.ustring.gsub( source_str, pattern, replace, count );&lt;br /&gt;
    else&lt;br /&gt;
        result = mw.ustring.gsub( source_str, pattern, replace );&lt;br /&gt;
    end        &lt;br /&gt;
&lt;br /&gt;
    return result;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[[ &lt;br /&gt;
    simple function to pipe string.rep to templates.&lt;br /&gt;
]]&lt;br /&gt;
&lt;br /&gt;
function str.rep( frame )&lt;br /&gt;
    local repetitions = tonumber( frame.args[2] )&lt;br /&gt;
    if not repetitions then &lt;br /&gt;
        return str._error( 'function rep expects a number as second parameter, received &amp;quot;' .. ( frame.args[2] or '' ) .. '&amp;quot;' )&lt;br /&gt;
    end&lt;br /&gt;
    return string.rep( frame.args[1] or '', repetitions )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[[&lt;br /&gt;
Helper function that populates the argument list given that user may need to use a mix of&lt;br /&gt;
named and unnamed parameters.  This is relevant because named parameters are not&lt;br /&gt;
identical to unnamed parameters due to string trimming, and when dealing with strings&lt;br /&gt;
we sometimes want to either preserve or remove that whitespace depending on the application.&lt;br /&gt;
]]&lt;br /&gt;
function str._getParameters( frame_args, arg_list )&lt;br /&gt;
    local new_args = {};&lt;br /&gt;
    local index = 1;&lt;br /&gt;
    local value;&lt;br /&gt;
    &lt;br /&gt;
    for i,arg in ipairs( arg_list ) do&lt;br /&gt;
        value = frame_args[arg]&lt;br /&gt;
        if value == nil then&lt;br /&gt;
            value = frame_args[index];&lt;br /&gt;
            index = index + 1;&lt;br /&gt;
        end&lt;br /&gt;
        new_args[arg] = value;&lt;br /&gt;
    end&lt;br /&gt;
    &lt;br /&gt;
    return new_args;&lt;br /&gt;
end        &lt;br /&gt;
&lt;br /&gt;
--[[&lt;br /&gt;
Helper function to handle error messages.&lt;br /&gt;
]]&lt;br /&gt;
function str._error( error_str )&lt;br /&gt;
    local frame = mw.getCurrentFrame();&lt;br /&gt;
    local error_category = frame.args.error_category or 'Errors reported by Module String';&lt;br /&gt;
    local ignore_errors = frame.args.ignore_errors or false;&lt;br /&gt;
    local no_category = frame.args.no_category or false;&lt;br /&gt;
    &lt;br /&gt;
    if str._getBoolean(ignore_errors) then&lt;br /&gt;
        return '';&lt;br /&gt;
    end&lt;br /&gt;
    &lt;br /&gt;
    local error_str = '&amp;lt;strong class=&amp;quot;error&amp;quot;&amp;gt;String Module Error: ' .. error_str .. '&amp;lt;/strong&amp;gt;';&lt;br /&gt;
    if error_category ~= '' and not str._getBoolean( no_category ) then&lt;br /&gt;
        error_str = '[[Category:' .. error_category .. ']]' .. error_str;&lt;br /&gt;
    end        &lt;br /&gt;
    &lt;br /&gt;
    return error_str;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[[&lt;br /&gt;
Helper Function to interpret boolean strings&lt;br /&gt;
]]&lt;br /&gt;
function str._getBoolean( boolean_str )&lt;br /&gt;
    local boolean_value;&lt;br /&gt;
    &lt;br /&gt;
    if type( boolean_str ) == 'string' then&lt;br /&gt;
        boolean_str = boolean_str:lower();&lt;br /&gt;
        if boolean_str == 'false' or boolean_str == 'no' or boolean_str == '0' &lt;br /&gt;
                or boolean_str == '' then&lt;br /&gt;
            boolean_value = false;&lt;br /&gt;
        else&lt;br /&gt;
            boolean_value = true;&lt;br /&gt;
        end    &lt;br /&gt;
    elseif type( boolean_str ) == 'boolean' then&lt;br /&gt;
        boolean_value = boolean_str;&lt;br /&gt;
    else&lt;br /&gt;
        error( 'No boolean value found' );&lt;br /&gt;
    end    &lt;br /&gt;
    return boolean_value&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[[&lt;br /&gt;
Helper function that escapes all pattern characters so that they will be treated &lt;br /&gt;
as plain text.&lt;br /&gt;
]]&lt;br /&gt;
function str._escapePattern( pattern_str )&lt;br /&gt;
    return mw.ustring.gsub( pattern_str, &amp;quot;([%(%)%.%%%+%-%*%?%[%^%$%]])&amp;quot;, &amp;quot;%%%1&amp;quot; );&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return str&lt;/div&gt;</summary>
		<author><name>Bloxgate</name></author>
	</entry>
	<entry>
		<id>https://projectunsc.org/wiki/index.php?title=Module:Section_link&amp;diff=378</id>
		<title>Module:Section link</title>
		<link rel="alternate" type="text/html" href="https://projectunsc.org/wiki/index.php?title=Module:Section_link&amp;diff=378"/>
		<updated>2018-08-10T04:18:19Z</updated>

		<summary type="html">&lt;p&gt;Bloxgate: 1 revision imported: Wikipedia Message Boxes Part 2&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;-- This module implements {{section link}}.&lt;br /&gt;
&lt;br /&gt;
local checkType = require('libraryUtil').checkType&lt;br /&gt;
&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
local function makeSectionLink(page, section, display)&lt;br /&gt;
	display = display or section&lt;br /&gt;
	page = page or ''&lt;br /&gt;
	return string.format('[[%s#%s|%s]]', page, section, display)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function normalizeTitle(title)&lt;br /&gt;
	title = mw.ustring.gsub(mw.ustring.gsub(title,&amp;quot;'&amp;quot;,&amp;quot;&amp;quot;),'&amp;quot;','')&lt;br /&gt;
	return mw.title.new(mw.ustring.gsub(title,&amp;quot;%b&amp;lt;&amp;gt;&amp;quot;,&amp;quot;&amp;quot;)).prefixedText&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p._main(page, sections, options, title)&lt;br /&gt;
	-- Validate input.&lt;br /&gt;
	checkType('_main', 1, page, 'string', true)&lt;br /&gt;
	checkType('_main', 3, options, 'table', true)&lt;br /&gt;
	if sections == nil then&lt;br /&gt;
		sections = {}&lt;br /&gt;
	elseif type(sections) == 'string' then&lt;br /&gt;
		sections = {sections}&lt;br /&gt;
	elseif type(sections) ~= 'table' then&lt;br /&gt;
		error(string.format(&lt;br /&gt;
			&amp;quot;type error in argument #2 to '_main' &amp;quot; ..&lt;br /&gt;
			&amp;quot;(string, table or nil expected, got %s)&amp;quot;,&lt;br /&gt;
			type(sections)&lt;br /&gt;
		), 2)&lt;br /&gt;
	end&lt;br /&gt;
	options = options or {}&lt;br /&gt;
	title = title or mw.title.getCurrentTitle()&lt;br /&gt;
&lt;br /&gt;
	-- Deal with blank page names elegantly&lt;br /&gt;
	if page and not page:find('%S') then&lt;br /&gt;
		page = nil&lt;br /&gt;
		options.nopage = true&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Make the link(s).&lt;br /&gt;
	local isShowingPage = not options.nopage&lt;br /&gt;
	if #sections &amp;lt;= 1 then&lt;br /&gt;
		local linkPage = page or ''&lt;br /&gt;
		local section = sections[1] or 'Notes'&lt;br /&gt;
		local display = '§&amp;amp;nbsp;' .. section&lt;br /&gt;
		if isShowingPage then&lt;br /&gt;
			page = page or title.prefixedText&lt;br /&gt;
			if options.display and options.display ~= '' then&lt;br /&gt;
				if normalizeTitle(options.display) == normalizeTitle(page) then&lt;br /&gt;
					display = options.display .. ' ' .. display&lt;br /&gt;
				else&lt;br /&gt;
					error(string.format(&lt;br /&gt;
						'Display title &amp;quot;%s&amp;quot; was ignored since it is ' ..&lt;br /&gt;
						&amp;quot;not equivalent to the page's actual title&amp;quot;,&lt;br /&gt;
						options.display&lt;br /&gt;
					), 0)&lt;br /&gt;
				end&lt;br /&gt;
			else&lt;br /&gt;
				display = page .. ' ' .. display&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
		return makeSectionLink(linkPage, section, display)&lt;br /&gt;
	else&lt;br /&gt;
		-- Multiple sections. First, make a list of the links to display.&lt;br /&gt;
		local ret = {}&lt;br /&gt;
		for i, section in ipairs(sections) do&lt;br /&gt;
			ret[i] = makeSectionLink(page, section)&lt;br /&gt;
		end&lt;br /&gt;
&lt;br /&gt;
		-- Assemble the list of links into a string with mw.text.listToText.&lt;br /&gt;
		-- We use the default separator for mw.text.listToText, but a custom&lt;br /&gt;
		-- conjunction. There is also a special case conjunction if we only&lt;br /&gt;
		-- have two links.&lt;br /&gt;
		local conjunction&lt;br /&gt;
		if #sections == 2 then&lt;br /&gt;
			conjunction = '&amp;amp;#8203; and '&lt;br /&gt;
		else&lt;br /&gt;
			conjunction = ', and '&lt;br /&gt;
		end&lt;br /&gt;
		ret = mw.text.listToText(ret, nil, conjunction)&lt;br /&gt;
&lt;br /&gt;
		-- Add the intro text.&lt;br /&gt;
		local intro = '§§&amp;amp;nbsp;'&lt;br /&gt;
		if isShowingPage then&lt;br /&gt;
			intro = (page or title.prefixedText) .. ' ' .. intro&lt;br /&gt;
		end&lt;br /&gt;
		ret = intro .. ret&lt;br /&gt;
&lt;br /&gt;
		return ret&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.main(frame)&lt;br /&gt;
	local args = require('Module:Arguments').getArgs(frame, {&lt;br /&gt;
		wrappers = 'Template:Section link',&lt;br /&gt;
		valueFunc = function (key, value)&lt;br /&gt;
			value = value:match('^%s*(.-)%s*$') -- Trim whitespace&lt;br /&gt;
			-- Allow blank first parameters, as the wikitext template does this.&lt;br /&gt;
			if value ~= '' or key == 1 then&lt;br /&gt;
				return value&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	})&lt;br /&gt;
&lt;br /&gt;
	-- Sort the arguments.&lt;br /&gt;
	local page&lt;br /&gt;
	local sections, options = {}, {}&lt;br /&gt;
	for k, v in pairs(args) do&lt;br /&gt;
		if k == 1 then&lt;br /&gt;
			-- Doing this in the loop because of a bug in [[Module:Arguments]]&lt;br /&gt;
			-- when using pairs with deleted arguments.&lt;br /&gt;
			page = mw.text.decode(v, decodeNamedEntities)&lt;br /&gt;
		elseif type(k) == 'number' then&lt;br /&gt;
			sections[k] = v&lt;br /&gt;
		else&lt;br /&gt;
			options[k] = v&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	-- Extract section from page, if present&lt;br /&gt;
	if page then&lt;br /&gt;
		local p, s = page:match('^(.-)#(.*)$')&lt;br /&gt;
		if p then page, sections[1] = p, s end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Compress the sections array.&lt;br /&gt;
	local function compressArray(t)&lt;br /&gt;
		local nums, ret = {}, {}&lt;br /&gt;
		for num in pairs(t) do&lt;br /&gt;
			nums[#nums + 1] = num&lt;br /&gt;
		end&lt;br /&gt;
		table.sort(nums)&lt;br /&gt;
		for i, num in ipairs(nums) do&lt;br /&gt;
			ret[i] = t[num]&lt;br /&gt;
		end&lt;br /&gt;
		return ret&lt;br /&gt;
	end&lt;br /&gt;
	sections = compressArray(sections)&lt;br /&gt;
&lt;br /&gt;
	return p._main(page, sections, options)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>Bloxgate</name></author>
	</entry>
	<entry>
		<id>https://projectunsc.org/wiki/index.php?title=Module:Check_for_unknown_parameters&amp;diff=376</id>
		<title>Module:Check for unknown parameters</title>
		<link rel="alternate" type="text/html" href="https://projectunsc.org/wiki/index.php?title=Module:Check_for_unknown_parameters&amp;diff=376"/>
		<updated>2018-08-10T04:18:19Z</updated>

		<summary type="html">&lt;p&gt;Bloxgate: 1 revision imported: Wikipedia Message Boxes Part 2&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('^%s*(.-)%s*$')&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function isnotempty(s)&lt;br /&gt;
	return s and trim(s) ~= ''&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;
	local ignoreblank = isnotempty(frame.args['ignoreblank'])&lt;br /&gt;
	local showblankpos = isnotempty(frame.args['showblankpositional'])&lt;br /&gt;
	local knownargs = {}&lt;br /&gt;
	local unknown = frame.args['unknown'] or 'Found _VALUE_, '&lt;br /&gt;
	local preview = frame.args['preview']&lt;br /&gt;
&lt;br /&gt;
	local values = {}&lt;br /&gt;
	local res = {}&lt;br /&gt;
	local regexps = {}&lt;br /&gt;
&lt;br /&gt;
	-- create the list of known args, regular expressions, and the return string&lt;br /&gt;
	for k, v in pairs(args) do&lt;br /&gt;
		if type(k) == 'number' then&lt;br /&gt;
			v = trim(v)&lt;br /&gt;
			knownargs[v] = 1&lt;br /&gt;
		elseif k:find('^regexp[1-9][0-9]*$') then&lt;br /&gt;
			table.insert(regexps, '^' .. v .. '$')&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	if isnotempty(preview) then &lt;br /&gt;
		preview = '&amp;lt;div class=&amp;quot;hatnote&amp;quot; style=&amp;quot;color:red&amp;quot;&amp;gt;&amp;lt;strong&amp;gt;Warning:&amp;lt;/strong&amp;gt; ' .. preview .. ' (this message is shown only in preview).&amp;lt;/div&amp;gt;'&lt;br /&gt;
	elseif preview == nil then&lt;br /&gt;
		preview = unknown&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;
	for k, v in pairs(pargs) do&lt;br /&gt;
		if type(k) == 'string' and knownargs[k] == nil then&lt;br /&gt;
			local knownflag = false&lt;br /&gt;
			for i, 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;
				k = mw.ustring.gsub(k, '[^%w\-_ ]', '?')&lt;br /&gt;
				table.insert(values, k)&lt;br /&gt;
			end&lt;br /&gt;
		elseif type(k) == 'number' and &lt;br /&gt;
			knownargs[tostring(k)] == nil and&lt;br /&gt;
			( showblankpos or isnotempty(v) )&lt;br /&gt;
		then&lt;br /&gt;
			local vlen = mw.ustring.len(v)&lt;br /&gt;
			v = mw.ustring.sub(v, 1, (vlen &amp;lt; 25) and vlen or 25) &lt;br /&gt;
			v = mw.ustring.gsub(v, '[^%w\-_ ]', '?')&lt;br /&gt;
			table.insert(values, k .. ' = ' .. v .. ((vlen &amp;gt;= 25) and ' ...' or ''))&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- add resuls to the output tables&lt;br /&gt;
	if #values &amp;gt; 0 then&lt;br /&gt;
		if frame:preprocess( &amp;quot;{{REVISIONID}}&amp;quot; ) == &amp;quot;&amp;quot; then&lt;br /&gt;
			unknown = preview&lt;br /&gt;
		end&lt;br /&gt;
		for k, v in pairs(values) do&lt;br /&gt;
			if v == '' then&lt;br /&gt;
			-- Fix odd bug for | = which gets stripped to the empty string and&lt;br /&gt;
			-- breaks category links&lt;br /&gt;
			v = ' '&lt;br /&gt;
			end&lt;br /&gt;
			local r =  unknown:gsub('_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;
return p&lt;/div&gt;</summary>
		<author><name>Bloxgate</name></author>
	</entry>
	<entry>
		<id>https://projectunsc.org/wiki/index.php?title=Module:Navbar&amp;diff=348</id>
		<title>Module:Navbar</title>
		<link rel="alternate" type="text/html" href="https://projectunsc.org/wiki/index.php?title=Module:Navbar&amp;diff=348"/>
		<updated>2018-08-10T04:18:12Z</updated>

		<summary type="html">&lt;p&gt;Bloxgate: 1 revision imported: Wikipedia Message Boxes Part 2&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;local p = {}&lt;br /&gt;
&lt;br /&gt;
local getArgs&lt;br /&gt;
local ul&lt;br /&gt;
&lt;br /&gt;
function p.addItem (mini, full, link, descrip, args, url)&lt;br /&gt;
	local l&lt;br /&gt;
	if url then&lt;br /&gt;
		l = {'[', '', ']'}&lt;br /&gt;
	else&lt;br /&gt;
		l = {'[[', '|', ']]'}&lt;br /&gt;
	end&lt;br /&gt;
	ul:tag('li')&lt;br /&gt;
		:addClass('nv-'..full)&lt;br /&gt;
		:wikitext(l[1] .. link .. l[2])&lt;br /&gt;
		:tag(args.mini and 'abbr' or 'span')&lt;br /&gt;
			:attr('title', descrip..' this template')&lt;br /&gt;
			:cssText(args.fontstyle)&lt;br /&gt;
			:wikitext(args.mini and mini or full)&lt;br /&gt;
			:done()&lt;br /&gt;
		:wikitext(l[3])&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.brackets (position, c, args, div)&lt;br /&gt;
	if args.brackets then&lt;br /&gt;
		div&lt;br /&gt;
			:tag('span')&lt;br /&gt;
				:css('margin-'..position, '-0.125em')&lt;br /&gt;
				:cssText(args.fontstyle)&lt;br /&gt;
				:wikitext(c)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p._navbar(args)&lt;br /&gt;
	local show = {true, true, true, false, false, false}&lt;br /&gt;
	local titleArg = 1&lt;br /&gt;
	&lt;br /&gt;
	if args.collapsible then&lt;br /&gt;
		titleArg = 2&lt;br /&gt;
		if not args.plain then args.mini = 1 end&lt;br /&gt;
		if args.fontcolor then&lt;br /&gt;
			args.fontstyle = 'color:' .. args.fontcolor .. ';'&lt;br /&gt;
		end&lt;br /&gt;
		args.style = 'float:left; text-align:left'&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	if args.template then&lt;br /&gt;
		titleArg = 'template'&lt;br /&gt;
		show = {true, false, false, false, false, false}&lt;br /&gt;
		local index = {t = 2, d = 2, e = 3, h = 4, m = 5, w = 6, talk = 2, edit = 3, hist = 4, move = 5, watch = 6}&lt;br /&gt;
		for k,v in ipairs(require ('Module:TableTools').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;
	if args.noedit then show[3] = false end&lt;br /&gt;
	&lt;br /&gt;
	local titleText = args[titleArg] or (':' .. mw.getCurrentFrame():getParent():getTitle())&lt;br /&gt;
	local title = mw.title.new(mw.text.trim(titleText), 'Template')&lt;br /&gt;
	if not title then&lt;br /&gt;
		error('Invalid title ' .. titleText)&lt;br /&gt;
	end&lt;br /&gt;
	local talkpage = title.talkPageTitle and title.talkPageTitle.fullText or ''&lt;br /&gt;
	&lt;br /&gt;
	local div = mw.html.create():tag('div')&lt;br /&gt;
	div&lt;br /&gt;
		:addClass('plainlinks')&lt;br /&gt;
		:addClass('hlist')&lt;br /&gt;
		:addClass('navbar')&lt;br /&gt;
		:cssText(args.style)&lt;br /&gt;
&lt;br /&gt;
	if args.mini then div:addClass('mini') end&lt;br /&gt;
&lt;br /&gt;
	if not (args.mini or args.plain) then&lt;br /&gt;
		div&lt;br /&gt;
			:tag('span')&lt;br /&gt;
				:css('word-spacing', 0)&lt;br /&gt;
				:cssText(args.fontstyle)&lt;br /&gt;
				:wikitext(args.text or 'This box:')&lt;br /&gt;
				:wikitext(' ')&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	p.brackets('right', '&amp;amp;#91; ', args, div)&lt;br /&gt;
	&lt;br /&gt;
	ul = div:tag('ul')&lt;br /&gt;
	if show[1] then p.addItem('v', 'view', title.fullText, 'View', args) end&lt;br /&gt;
	if show[2] then p.addItem('t', 'talk', talkpage, 'Discuss', args) end&lt;br /&gt;
	if show[3] then p.addItem('e', 'edit', title:fullUrl('action=edit'), 'Edit', args, true) end&lt;br /&gt;
	if show[4] then p.addItem('h', 'hist', title:fullUrl('action=history'), 'History of', args, true) end&lt;br /&gt;
	if show[5] then&lt;br /&gt;
		local move = mw.title.new ('Special:Movepage')&lt;br /&gt;
		p.addItem('m', 'move', move:fullUrl('target='..title.fullText), 'Move', args, true) end&lt;br /&gt;
	if show[6] then p.addItem('w', 'watch', title:fullUrl('action=watch'), 'Watch', args, true) end&lt;br /&gt;
	&lt;br /&gt;
	p.brackets('left', ' &amp;amp;#93;', args, div)&lt;br /&gt;
	&lt;br /&gt;
	if args.collapsible then&lt;br /&gt;
		div&lt;br /&gt;
			:done()&lt;br /&gt;
		:tag('div')&lt;br /&gt;
			:css('font-size', '114%')&lt;br /&gt;
			:css('margin', args.mini and '0 4em' or '0 7em')&lt;br /&gt;
			:cssText(args.fontstyle)&lt;br /&gt;
			:wikitext(args[1])&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	return tostring(div:done())&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.navbar(frame)&lt;br /&gt;
	if not getArgs then&lt;br /&gt;
		getArgs = require('Module:Arguments').getArgs&lt;br /&gt;
	end&lt;br /&gt;
	return p._navbar(getArgs(frame))&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>Bloxgate</name></author>
	</entry>
	<entry>
		<id>https://projectunsc.org/wiki/index.php?title=Module:Lua_banner&amp;diff=346</id>
		<title>Module:Lua banner</title>
		<link rel="alternate" type="text/html" href="https://projectunsc.org/wiki/index.php?title=Module:Lua_banner&amp;diff=346"/>
		<updated>2018-08-10T04:18:11Z</updated>

		<summary type="html">&lt;p&gt;Bloxgate: 1 revision imported: Wikipedia Message Boxes Part 2&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;-- This module implements the {{lua}} template.&lt;br /&gt;
local yesno = require('Module:Yesno')&lt;br /&gt;
local mList = require('Module:List')&lt;br /&gt;
local mTableTools = require('Module:TableTools')&lt;br /&gt;
local mMessageBox = require('Module:Message box')&lt;br /&gt;
&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
function p.main(frame)&lt;br /&gt;
	local origArgs = frame:getParent().args&lt;br /&gt;
	local args = {}&lt;br /&gt;
	for k, v in pairs(origArgs) do&lt;br /&gt;
		v = v:match('^%s*(.-)%s*$')&lt;br /&gt;
		if v ~= '' then&lt;br /&gt;
			args[k] = v&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return p._main(args)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p._main(args)&lt;br /&gt;
	local modules = mTableTools.compressSparseArray(args)&lt;br /&gt;
	local box = p.renderBox(modules)&lt;br /&gt;
	local trackingCategories = p.renderTrackingCategories(args, modules)&lt;br /&gt;
	return box .. trackingCategories&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.renderBox(modules)&lt;br /&gt;
	local boxArgs = {}&lt;br /&gt;
	if #modules &amp;lt; 1 then&lt;br /&gt;
		boxArgs.text = '&amp;lt;strong class=&amp;quot;error&amp;quot;&amp;gt;Error: no modules specified&amp;lt;/strong&amp;gt;'&lt;br /&gt;
	else&lt;br /&gt;
		local moduleLinks = {}&lt;br /&gt;
		for i, module in ipairs(modules) do&lt;br /&gt;
			moduleLinks[i] = string.format('[[:%s]]', module)&lt;br /&gt;
		end&lt;br /&gt;
		local moduleList = mList.makeList('bulleted', moduleLinks)&lt;br /&gt;
		boxArgs.text = 'This ' .. &lt;br /&gt;
			(mw.title.getCurrentTitle():inNamespaces(828,829) and 'module' or 'template') ..&lt;br /&gt;
			' uses [[Wikipedia:Lua|Lua]]:\n' .. moduleList&lt;br /&gt;
	end&lt;br /&gt;
	boxArgs.type = 'notice'&lt;br /&gt;
	boxArgs.small = true&lt;br /&gt;
	boxArgs.image = '[[File:Lua-logo-nolabel.svg|30px|alt=|link=]]'&lt;br /&gt;
	return mMessageBox.main('mbox', boxArgs)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.renderTrackingCategories(args, modules, titleObj)&lt;br /&gt;
	if yesno(args.nocat) then&lt;br /&gt;
		return ''&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	local cats = {}&lt;br /&gt;
	&lt;br /&gt;
	-- Error category&lt;br /&gt;
	if #modules &amp;lt; 1 then&lt;br /&gt;
		cats[#cats + 1] = 'Lua templates with errors'&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	-- Lua templates category&lt;br /&gt;
	titleObj = titleObj or mw.title.getCurrentTitle()&lt;br /&gt;
	local subpageBlacklist = {&lt;br /&gt;
		doc = true,&lt;br /&gt;
		sandbox = true,&lt;br /&gt;
		sandbox2 = true,&lt;br /&gt;
		testcases = true&lt;br /&gt;
	}&lt;br /&gt;
	if titleObj.namespace == 10 &lt;br /&gt;
		and not subpageBlacklist[titleObj.subpageText]&lt;br /&gt;
	then&lt;br /&gt;
		local category = args.category&lt;br /&gt;
		if not category then&lt;br /&gt;
			local categories = {&lt;br /&gt;
				['Module:String'] = 'Lua String-based templates',&lt;br /&gt;
				['Module:Math'] = 'Templates based on the Math Lua module',&lt;br /&gt;
				['Module:BaseConvert'] = 'Templates based on the BaseConvert Lua module',&lt;br /&gt;
				['Module:Citation'] = 'Lua-based citation templates'&lt;br /&gt;
			}&lt;br /&gt;
			categories['Module:Citation/CS1'] = categories['Module:Citation']&lt;br /&gt;
			category = modules[1] and categories[modules[1]]&lt;br /&gt;
			category = category or 'Lua-based templates'&lt;br /&gt;
		end&lt;br /&gt;
		cats[#cats + 1] = category&lt;br /&gt;
		local protLevels = {&lt;br /&gt;
			autoconfirmed = 1,&lt;br /&gt;
			extendedconfirmed = 2,&lt;br /&gt;
			templateeditor = 3,&lt;br /&gt;
			sysop = 4&lt;br /&gt;
		}&lt;br /&gt;
		local currentProt = titleObj.protectionLevels[&amp;quot;edit&amp;quot;][1]&lt;br /&gt;
		if currentProt == nil then currentProt = 0 else currentProt = protLevels[currentProt] end&lt;br /&gt;
		for i, module in ipairs(modules) do&lt;br /&gt;
			local moduleProt = mw.title.new(module).protectionLevels[&amp;quot;edit&amp;quot;][1]&lt;br /&gt;
			if moduleProt == nil then moduleProt = 0 else moduleProt = protLevels[moduleProt] end&lt;br /&gt;
			if moduleProt &amp;lt; currentProt then&lt;br /&gt;
				cats[#cats + 1] = &amp;quot;Templates using under-protected Lua modules&amp;quot;&lt;br /&gt;
				break&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	for i, cat in ipairs(cats) do&lt;br /&gt;
		cats[i] = string.format('[[Category:%s]]', cat)&lt;br /&gt;
	end&lt;br /&gt;
	return table.concat(cats)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>Bloxgate</name></author>
	</entry>
	<entry>
		<id>https://projectunsc.org/wiki/index.php?title=Module:List&amp;diff=344</id>
		<title>Module:List</title>
		<link rel="alternate" type="text/html" href="https://projectunsc.org/wiki/index.php?title=Module:List&amp;diff=344"/>
		<updated>2018-08-10T04:18:11Z</updated>

		<summary type="html">&lt;p&gt;Bloxgate: 1 revision imported: Wikipedia Message Boxes Part 2&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;-- This module outputs different kinds of lists. At the moment, bulleted,&lt;br /&gt;
-- unbulleted, horizontal, ordered, and horizontal ordered lists are supported.&lt;br /&gt;
&lt;br /&gt;
local libUtil = require('libraryUtil')&lt;br /&gt;
local checkType = libUtil.checkType&lt;br /&gt;
local mTableTools = require('Module:TableTools')&lt;br /&gt;
&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
local listTypes = {&lt;br /&gt;
	['bulleted'] = true,&lt;br /&gt;
	['unbulleted'] = true,&lt;br /&gt;
	['horizontal'] = true,&lt;br /&gt;
	['ordered'] = true,&lt;br /&gt;
	['horizontal_ordered'] = true&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
function p.makeListData(listType, args)&lt;br /&gt;
	-- Constructs a data table to be passed to p.renderList.&lt;br /&gt;
	local data = {}&lt;br /&gt;
&lt;br /&gt;
	-- Classes&lt;br /&gt;
	data.classes = {}&lt;br /&gt;
	if listType == 'horizontal' or listType == 'horizontal_ordered' then&lt;br /&gt;
		table.insert(data.classes, 'hlist hlist-separated')&lt;br /&gt;
	elseif listType == 'unbulleted' then&lt;br /&gt;
		table.insert(data.classes, 'plainlist')&lt;br /&gt;
	end&lt;br /&gt;
	table.insert(data.classes, args.class)&lt;br /&gt;
&lt;br /&gt;
	-- Main div style&lt;br /&gt;
	data.style = args.style&lt;br /&gt;
&lt;br /&gt;
	-- Indent for horizontal lists&lt;br /&gt;
	if listType == 'horizontal' or listType == 'horizontal_ordered' then&lt;br /&gt;
		local indent = tonumber(args.indent)&lt;br /&gt;
		indent = indent and indent * 1.6 or 0&lt;br /&gt;
		if indent &amp;gt; 0 then&lt;br /&gt;
			data.marginLeft = indent .. 'em'&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	-- List style types for ordered lists&lt;br /&gt;
	-- This could be &amp;quot;1, 2, 3&amp;quot;, &amp;quot;a, b, c&amp;quot;, or a number of others. The list style&lt;br /&gt;
	-- type is either set by the &amp;quot;type&amp;quot; attribute or the &amp;quot;list-style-type&amp;quot; CSS&lt;br /&gt;
	-- property.&lt;br /&gt;
	if listType == 'ordered' or listType == 'horizontal_ordered' then &lt;br /&gt;
		data.listStyleType = args.list_style_type or args['list-style-type']&lt;br /&gt;
		data.type = args['type']&lt;br /&gt;
&lt;br /&gt;
		-- Detect invalid type attributes and attempt to convert them to&lt;br /&gt;
		-- list-style-type CSS properties.&lt;br /&gt;
		if data.type &lt;br /&gt;
			and not data.listStyleType&lt;br /&gt;
			and not tostring(data.type):find('^%s*[1AaIi]%s*$')&lt;br /&gt;
		then&lt;br /&gt;
			data.listStyleType = data.type&lt;br /&gt;
			data.type = nil&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	-- List tag type&lt;br /&gt;
	if listType == 'ordered' or listType == 'horizontal_ordered' then&lt;br /&gt;
		data.listTag = 'ol'&lt;br /&gt;
	else&lt;br /&gt;
		data.listTag = 'ul'&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Start number for ordered lists&lt;br /&gt;
	data.start = args.start&lt;br /&gt;
	if listType == 'horizontal_ordered' then&lt;br /&gt;
		-- Apply fix to get start numbers working with horizontal ordered lists.&lt;br /&gt;
		local startNum = tonumber(data.start)&lt;br /&gt;
		if startNum then&lt;br /&gt;
			data.counterReset = 'listitem ' .. tostring(startNum - 1)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- List style&lt;br /&gt;
	 -- ul_style and ol_style are included for backwards compatibility. No&lt;br /&gt;
	 -- distinction is made for ordered or unordered lists.&lt;br /&gt;
	data.listStyle = args.list_style&lt;br /&gt;
&lt;br /&gt;
	-- List items&lt;br /&gt;
	-- li_style is included for backwards compatibility. item_style was included&lt;br /&gt;
	-- to be easier to understand for non-coders.&lt;br /&gt;
	data.itemStyle = args.item_style or args.li_style&lt;br /&gt;
	data.items = {}&lt;br /&gt;
	for i, num in ipairs(mTableTools.numKeys(args)) do&lt;br /&gt;
		local item = {}&lt;br /&gt;
		item.content = args[num]&lt;br /&gt;
		item.style = args['item' .. tostring(num) .. '_style']&lt;br /&gt;
			or args['item_style' .. tostring(num)]&lt;br /&gt;
		item.value = args['item' .. tostring(num) .. '_value']&lt;br /&gt;
			or args['item_value' .. tostring(num)]&lt;br /&gt;
		table.insert(data.items, item)&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	return data&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.renderList(data)&lt;br /&gt;
	-- Renders the list HTML.&lt;br /&gt;
	&lt;br /&gt;
	-- Return the blank string if there are no list items.&lt;br /&gt;
	if type(data.items) ~= 'table' or #data.items &amp;lt; 1 then&lt;br /&gt;
		return ''&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	-- Render the main div tag.&lt;br /&gt;
	local root = mw.html.create('div')&lt;br /&gt;
	for i, class in ipairs(data.classes or {}) do&lt;br /&gt;
		root:addClass(class)&lt;br /&gt;
	end&lt;br /&gt;
	root:css{['margin-left'] = data.marginLeft}&lt;br /&gt;
	if data.style then&lt;br /&gt;
		root:cssText(data.style)&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Render the list tag.&lt;br /&gt;
	local list = root:tag(data.listTag or 'ul')&lt;br /&gt;
	list&lt;br /&gt;
		:attr{start = data.start, type = data.type}&lt;br /&gt;
		:css{&lt;br /&gt;
			['counter-reset'] = data.counterReset,&lt;br /&gt;
			['list-style-type'] = data.listStyleType&lt;br /&gt;
		}&lt;br /&gt;
	if data.listStyle then&lt;br /&gt;
		list:cssText(data.listStyle)&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Render the list items&lt;br /&gt;
	for i, t in ipairs(data.items or {}) do&lt;br /&gt;
		local item = list:tag('li')&lt;br /&gt;
		if data.itemStyle then&lt;br /&gt;
			item:cssText(data.itemStyle)&lt;br /&gt;
		end&lt;br /&gt;
		if t.style then&lt;br /&gt;
			item:cssText(t.style)&lt;br /&gt;
		end&lt;br /&gt;
		item&lt;br /&gt;
			:attr{value = t.value}&lt;br /&gt;
			:wikitext(t.content)&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	return tostring(root)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.renderTrackingCategories(args)&lt;br /&gt;
	local isDeprecated = false -- Tracks deprecated parameters.&lt;br /&gt;
	for k, v in pairs(args) do&lt;br /&gt;
		k = tostring(k)&lt;br /&gt;
		if k:find('^item_style%d+$') or k:find('^item_value%d+$') then&lt;br /&gt;
			isDeprecated = true&lt;br /&gt;
			break&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	local ret = ''&lt;br /&gt;
	if isDeprecated then&lt;br /&gt;
		ret = ret .. '[[Category:List templates with deprecated parameters]]'&lt;br /&gt;
	end&lt;br /&gt;
	return ret&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.makeList(listType, args)&lt;br /&gt;
	if not listType or not listTypes[listType] then&lt;br /&gt;
		error(string.format(&lt;br /&gt;
			&amp;quot;bad argument #1 to 'makeList' ('%s' is not a valid list type)&amp;quot;,&lt;br /&gt;
			tostring(listType)&lt;br /&gt;
		), 2)&lt;br /&gt;
	end&lt;br /&gt;
	checkType('makeList', 2, args, 'table')&lt;br /&gt;
	local data = p.makeListData(listType, args)&lt;br /&gt;
	local list = p.renderList(data)&lt;br /&gt;
	local trackingCategories = p.renderTrackingCategories(args)&lt;br /&gt;
	return list .. trackingCategories&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
for listType in pairs(listTypes) do&lt;br /&gt;
	p[listType] = function (frame)&lt;br /&gt;
		local mArguments = require('Module:Arguments')&lt;br /&gt;
		local origArgs = mArguments.getArgs(frame)&lt;br /&gt;
		-- Copy all the arguments to a new table, for faster indexing.&lt;br /&gt;
		local args = {}&lt;br /&gt;
		for k, v in pairs(origArgs) do&lt;br /&gt;
			args[k] = v&lt;br /&gt;
		end&lt;br /&gt;
		return p.makeList(listType, args)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>Bloxgate</name></author>
	</entry>
	<entry>
		<id>https://projectunsc.org/wiki/index.php?title=Module:Infobox&amp;diff=342</id>
		<title>Module:Infobox</title>
		<link rel="alternate" type="text/html" href="https://projectunsc.org/wiki/index.php?title=Module:Infobox&amp;diff=342"/>
		<updated>2018-08-10T04:18:11Z</updated>

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

		<summary type="html">&lt;p&gt;Bloxgate: 1 revision imported: Wikipedia Message Boxes Part 2&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;-- This module implements {{anchor}}.&lt;br /&gt;
&lt;br /&gt;
local getArgs = require('Module:Arguments').getArgs&lt;br /&gt;
local tableTools = require('Module:TableTools')&lt;br /&gt;
&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
function p.main(frame)&lt;br /&gt;
	-- Get the positional arguments from #invoke, remove any nil values,&lt;br /&gt;
	-- and pass them to p._main.&lt;br /&gt;
	local args = getArgs(frame)&lt;br /&gt;
	local argArray = tableTools.compressSparseArray(args)&lt;br /&gt;
	return p._main(unpack(argArray))&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p._main(...)&lt;br /&gt;
	-- Generate the list of anchors.&lt;br /&gt;
	local anchors = {...}&lt;br /&gt;
	local ret = {}&lt;br /&gt;
	for _, anchor in ipairs(anchors) do&lt;br /&gt;
		ret[#ret + 1] = '&amp;lt;span id=&amp;quot;' .. anchor .. '&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;'&lt;br /&gt;
	end&lt;br /&gt;
	return table.concat(ret)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>Bloxgate</name></author>
	</entry>
	<entry>
		<id>https://projectunsc.org/wiki/index.php?title=Module:Yesno/doc&amp;diff=280</id>
		<title>Module:Yesno/doc</title>
		<link rel="alternate" type="text/html" href="https://projectunsc.org/wiki/index.php?title=Module:Yesno/doc&amp;diff=280"/>
		<updated>2018-08-10T04:16:48Z</updated>

		<summary type="html">&lt;p&gt;Bloxgate: 1 revision imported: Wikipedia Message Boxes&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{High-risk|over 15,600,000 pages, which is {{#expr:(1560000000/{{NUMBEROFPAGES:R}}) round 0}}% of all}}&lt;br /&gt;
{{used in system}}&lt;br /&gt;
{{Module rating|protected}}&lt;br /&gt;
This module provides a consistent interface for processing boolean or boolean-style string input. While Lua allows the &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; boolean values, wikicode templates can only express boolean values through strings such as &amp;quot;yes&amp;quot;, &amp;quot;no&amp;quot;, etc. This module processes these kinds of strings and turns them into boolean input for Lua to process. It also returns &amp;lt;code&amp;gt;nil&amp;lt;/code&amp;gt; values as &amp;lt;code&amp;gt;nil&amp;lt;/code&amp;gt;, to allow for distinctions between &amp;lt;code&amp;gt;nil&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;. The module also accepts other Lua structures as input, i.e. booleans, numbers, tables, and functions. If it is passed input that it does not recognise as boolean or &amp;lt;code&amp;gt;nil&amp;lt;/code&amp;gt;, it is possible to specify a default value to return.&lt;br /&gt;
&lt;br /&gt;
== Syntax ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;yesno(value, default)&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;value&amp;lt;/code&amp;gt; is the value to be tested. Boolean input or boolean-style input (see below) always evaluates to either &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;nil&amp;lt;/code&amp;gt; always evaluates to &amp;lt;code&amp;gt;nil&amp;lt;/code&amp;gt;. Other values evaluate to &amp;lt;code&amp;gt;default&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
First, load the module. Note that it can only be loaded from other Lua modules, not from normal wiki pages. For normal wiki pages you can use {{tl|yesno}} instead.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local yesno = require('Module:Yesno')&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Some input values always return &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;, and some always return &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;. &amp;lt;code&amp;gt;nil&amp;lt;/code&amp;gt; values always return &amp;lt;code&amp;gt;nil&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- These always return true:&lt;br /&gt;
yesno('yes')&lt;br /&gt;
yesno('y')&lt;br /&gt;
yesno('true')&lt;br /&gt;
yesno('t')&lt;br /&gt;
yesno('1')&lt;br /&gt;
yesno(1)&lt;br /&gt;
yesno(true)&lt;br /&gt;
&lt;br /&gt;
-- These always return false:&lt;br /&gt;
yesno('no')&lt;br /&gt;
yesno('n')&lt;br /&gt;
yesno('false')&lt;br /&gt;
yesno('f')&lt;br /&gt;
yesno('0')&lt;br /&gt;
yesno(0)&lt;br /&gt;
yesno(false)&lt;br /&gt;
&lt;br /&gt;
-- A nil value always returns nil:&lt;br /&gt;
yesno(nil)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
String values are converted to lower case before they are matched:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- These always return true:&lt;br /&gt;
yesno('Yes')&lt;br /&gt;
yesno('YES')&lt;br /&gt;
yesno('yEs')&lt;br /&gt;
yesno('Y')&lt;br /&gt;
yesno('tRuE')&lt;br /&gt;
&lt;br /&gt;
-- These always return false:&lt;br /&gt;
yesno('No')&lt;br /&gt;
yesno('NO')&lt;br /&gt;
yesno('nO')&lt;br /&gt;
yesno('N')&lt;br /&gt;
yesno('fALsE')&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can specify a default value if yesno receives input other than that listed above. If you don't supply a default, the module will return &amp;lt;code&amp;gt;nil&amp;lt;/code&amp;gt; for these inputs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- These return nil:&lt;br /&gt;
yesno('foo')&lt;br /&gt;
yesno({})&lt;br /&gt;
yesno(5)&lt;br /&gt;
yesno(function() return 'This is a function.' end)&lt;br /&gt;
&lt;br /&gt;
-- These return true:&lt;br /&gt;
yesno('foo', true)&lt;br /&gt;
yesno({}, true)&lt;br /&gt;
yesno(5, true)&lt;br /&gt;
yesno(function() return 'This is a function.' end, true)&lt;br /&gt;
&lt;br /&gt;
-- These return &amp;quot;bar&amp;quot;:&lt;br /&gt;
yesno('foo', 'bar')&lt;br /&gt;
yesno({}, 'bar')&lt;br /&gt;
yesno(5, 'bar')&lt;br /&gt;
yesno(function() return 'This is a function.' end, 'bar')&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that the blank string also functions this way:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
yesno('')        -- Returns nil.&lt;br /&gt;
yesno('', true)  -- Returns true.&lt;br /&gt;
yesno('', 'bar') -- Returns &amp;quot;bar&amp;quot;.&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Although the blank string usually evaluates to false in wikitext, it evaluates to true in Lua. This module prefers the Lua behaviour over the wikitext behaviour. If treating the blank string as false is important for your module, you will need to remove blank arguments at an earlier stage of processing.&amp;lt;includeonly&amp;gt;{{#ifeq:{{SUBPAGENAME}}|sandbox||&lt;br /&gt;
[[Category:Lua metamodules]]&lt;br /&gt;
}}&amp;lt;/includeonly&amp;gt;&lt;/div&gt;</summary>
		<author><name>Bloxgate</name></author>
	</entry>
	<entry>
		<id>https://projectunsc.org/wiki/index.php?title=Module:TableTools&amp;diff=278</id>
		<title>Module:TableTools</title>
		<link rel="alternate" type="text/html" href="https://projectunsc.org/wiki/index.php?title=Module:TableTools&amp;diff=278"/>
		<updated>2018-08-10T04:16:47Z</updated>

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

		<summary type="html">&lt;p&gt;Bloxgate: 1 revision imported: Wikipedia Message Boxes&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;--------------------------------------------------------------------------------&lt;br /&gt;
--                          Namespace detect data                             --&lt;br /&gt;
-- This module holds data for [[Module:Namespace detect]] to be loaded per    --&lt;br /&gt;
-- page, rather than per #invoke, for performance reasons.                    --&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
local cfg = require('Module:Namespace detect/config')&lt;br /&gt;
&lt;br /&gt;
local function addKey(t, key, defaultKey)&lt;br /&gt;
	if key ~= defaultKey then&lt;br /&gt;
		t[#t + 1] = key&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Get a table of parameters to query for each default parameter name.&lt;br /&gt;
-- This allows wikis to customise parameter names in the cfg table while&lt;br /&gt;
-- ensuring that default parameter names will always work. The cfg table&lt;br /&gt;
-- values can be added as a string, or as an array of strings.&lt;br /&gt;
&lt;br /&gt;
local defaultKeys = {&lt;br /&gt;
	'main',&lt;br /&gt;
	'talk',&lt;br /&gt;
	'other',&lt;br /&gt;
	'subjectns',&lt;br /&gt;
	'demospace',&lt;br /&gt;
	'demopage'&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
local argKeys = {}&lt;br /&gt;
for i, defaultKey in ipairs(defaultKeys) do&lt;br /&gt;
	argKeys[defaultKey] = {defaultKey}&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
for defaultKey, t in pairs(argKeys) do&lt;br /&gt;
	local cfgValue = cfg[defaultKey]&lt;br /&gt;
	local cfgValueType = type(cfgValue)&lt;br /&gt;
	if cfgValueType == 'string' then&lt;br /&gt;
		addKey(t, cfgValue, defaultKey)&lt;br /&gt;
	elseif cfgValueType == 'table' then&lt;br /&gt;
		for i, key in ipairs(cfgValue) do&lt;br /&gt;
			addKey(t, key, defaultKey)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	cfg[defaultKey] = nil -- Free the cfg value as we don't need it any more.&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function getParamMappings()&lt;br /&gt;
	--[[&lt;br /&gt;
	-- Returns a table of how parameter names map to namespace names. The keys&lt;br /&gt;
	-- are the actual namespace names, in lower case, and the values are the&lt;br /&gt;
	-- possible parameter names for that namespace, also in lower case. The&lt;br /&gt;
	-- table entries are structured like this:&lt;br /&gt;
	-- {&lt;br /&gt;
	--   [''] = {'main'},&lt;br /&gt;
	--   ['wikipedia'] = {'wikipedia', 'project', 'wp'},&lt;br /&gt;
	--   ...&lt;br /&gt;
	-- }&lt;br /&gt;
	--]]&lt;br /&gt;
	local mappings = {}&lt;br /&gt;
	local mainNsName = mw.site.subjectNamespaces[0].name&lt;br /&gt;
	mainNsName = mw.ustring.lower(mainNsName)&lt;br /&gt;
	mappings[mainNsName] = mw.clone(argKeys.main)&lt;br /&gt;
	mappings['talk'] = mw.clone(argKeys.talk)&lt;br /&gt;
	for nsid, ns in pairs(mw.site.subjectNamespaces) do&lt;br /&gt;
		if nsid ~= 0 then -- Exclude main namespace.&lt;br /&gt;
			local nsname = mw.ustring.lower(ns.name)&lt;br /&gt;
			local canonicalName = mw.ustring.lower(ns.canonicalName)&lt;br /&gt;
			mappings[nsname] = {nsname}&lt;br /&gt;
			if canonicalName ~= nsname then&lt;br /&gt;
				table.insert(mappings[nsname], canonicalName)&lt;br /&gt;
			end&lt;br /&gt;
			for _, alias in ipairs(ns.aliases) do&lt;br /&gt;
				table.insert(mappings[nsname], mw.ustring.lower(alias))&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return mappings&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return {&lt;br /&gt;
	argKeys = argKeys,&lt;br /&gt;
	cfg = cfg,&lt;br /&gt;
	mappings = getParamMappings()&lt;br /&gt;
}&lt;/div&gt;</summary>
		<author><name>Bloxgate</name></author>
	</entry>
	<entry>
		<id>https://projectunsc.org/wiki/index.php?title=Module:Namespace_detect/config&amp;diff=274</id>
		<title>Module:Namespace detect/config</title>
		<link rel="alternate" type="text/html" href="https://projectunsc.org/wiki/index.php?title=Module:Namespace_detect/config&amp;diff=274"/>
		<updated>2018-08-10T04:16:47Z</updated>

		<summary type="html">&lt;p&gt;Bloxgate: 1 revision imported: Wikipedia Message Boxes&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;--------------------------------------------------------------------------------&lt;br /&gt;
--                    Namespace detect configuration data                     --&lt;br /&gt;
--                                                                            --&lt;br /&gt;
-- This module stores configuration data for Module:Namespace detect. Here    --&lt;br /&gt;
-- you can localise the module to your wiki's language.                       --&lt;br /&gt;
--                                                                            --&lt;br /&gt;
-- To activate a configuration item, you need to uncomment it. This means     --&lt;br /&gt;
-- that you need to remove the text &amp;quot;-- &amp;quot; at the start of the line.           --&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
local cfg = {} -- Don't edit this line.&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
--                              Parameter names                               --&lt;br /&gt;
-- These configuration items specify custom parameter names. Values added     --&lt;br /&gt;
-- here will work in addition to the default English parameter names.         --&lt;br /&gt;
-- To add one extra name, you can use this format:                            --&lt;br /&gt;
--                                                                            --&lt;br /&gt;
-- cfg.foo = 'parameter name'                                                 --&lt;br /&gt;
--                                                                            --&lt;br /&gt;
-- To add multiple names, you can use this format:                            --&lt;br /&gt;
--                                                                            --&lt;br /&gt;
-- cfg.foo = {'parameter name 1', 'parameter name 2', 'parameter name 3'}     --&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
---- This parameter displays content for the main namespace:&lt;br /&gt;
-- cfg.main = 'main'&lt;br /&gt;
&lt;br /&gt;
---- This parameter displays in talk namespaces:&lt;br /&gt;
-- cfg.talk = 'talk'&lt;br /&gt;
&lt;br /&gt;
---- This parameter displays content for &amp;quot;other&amp;quot; namespaces (namespaces for which&lt;br /&gt;
---- parameters have not been specified):&lt;br /&gt;
-- cfg.other = 'other'&lt;br /&gt;
&lt;br /&gt;
---- This parameter makes talk pages behave as though they are the corresponding&lt;br /&gt;
---- subject namespace. Note that this parameter is used with [[Module:Yesno]].&lt;br /&gt;
---- Edit that module to change the default values of &amp;quot;yes&amp;quot;, &amp;quot;no&amp;quot;, etc.&lt;br /&gt;
-- cfg.subjectns = 'subjectns'&lt;br /&gt;
&lt;br /&gt;
---- This parameter sets a demonstration namespace:&lt;br /&gt;
-- cfg.demospace = 'demospace'&lt;br /&gt;
&lt;br /&gt;
---- This parameter sets a specific page to compare:&lt;br /&gt;
cfg.demopage = 'page'&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
--                           Table configuration                              --&lt;br /&gt;
-- These configuration items allow customisation of the &amp;quot;table&amp;quot; function,     --&lt;br /&gt;
-- used to generate a table of possible parameters in the module              --&lt;br /&gt;
-- documentation.                                                             --&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
---- The header for the namespace column in the wikitable containing the list of&lt;br /&gt;
---- possible subject-space parameters.&lt;br /&gt;
-- cfg.wikitableNamespaceHeader = 'Namespace'&lt;br /&gt;
&lt;br /&gt;
---- The header for the wikitable containing the list of possible subject-space&lt;br /&gt;
---- parameters.&lt;br /&gt;
-- cfg.wikitableAliasesHeader = 'Aliases'&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
--                        End of configuration data                           --&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
return cfg -- Don't edit this line.&lt;/div&gt;</summary>
		<author><name>Bloxgate</name></author>
	</entry>
	<entry>
		<id>https://projectunsc.org/wiki/index.php?title=Module:Namespace_detect&amp;diff=272</id>
		<title>Module:Namespace detect</title>
		<link rel="alternate" type="text/html" href="https://projectunsc.org/wiki/index.php?title=Module:Namespace_detect&amp;diff=272"/>
		<updated>2018-08-10T04:16:47Z</updated>

		<summary type="html">&lt;p&gt;Bloxgate: 1 revision imported: Wikipedia Message Boxes&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;--[[&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
--                                                                            --&lt;br /&gt;
--                            NAMESPACE DETECT                                --&lt;br /&gt;
--                                                                            --&lt;br /&gt;
-- This module implements the {{namespace detect}} template in Lua, with a    --&lt;br /&gt;
-- few improvements: all namespaces and all namespace aliases are supported,  --&lt;br /&gt;
-- and namespace names are detected automatically for the local wiki. The     --&lt;br /&gt;
-- module can also use the corresponding subject namespace value if it is     --&lt;br /&gt;
-- used on a talk page. Parameter names can be configured for different wikis --&lt;br /&gt;
-- by altering the values in the &amp;quot;cfg&amp;quot; table in                               --&lt;br /&gt;
-- Module:Namespace detect/config.                                            --&lt;br /&gt;
--                                                                            --&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
--]]&lt;br /&gt;
&lt;br /&gt;
local data = mw.loadData('Module:Namespace detect/data')&lt;br /&gt;
local argKeys = data.argKeys&lt;br /&gt;
local cfg = data.cfg&lt;br /&gt;
local mappings = data.mappings&lt;br /&gt;
&lt;br /&gt;
local yesno = require('Module:Yesno')&lt;br /&gt;
local mArguments -- Lazily initialise Module:Arguments&lt;br /&gt;
local mTableTools -- Lazily initilalise Module:TableTools&lt;br /&gt;
local ustringLower = mw.ustring.lower&lt;br /&gt;
&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
local function fetchValue(t1, t2)&lt;br /&gt;
	-- Fetches a value from the table t1 for the first key in array t2 where&lt;br /&gt;
	-- a non-nil value of t1 exists.&lt;br /&gt;
	for i, key in ipairs(t2) do&lt;br /&gt;
		local value = t1[key]&lt;br /&gt;
		if value ~= nil then&lt;br /&gt;
			return value&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return nil&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function equalsArrayValue(t, value)&lt;br /&gt;
	-- Returns true if value equals a value in the array t. Otherwise&lt;br /&gt;
	-- returns false.&lt;br /&gt;
	for i, arrayValue in ipairs(t) do&lt;br /&gt;
		if value == arrayValue 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 p.getPageObject(page)&lt;br /&gt;
	-- Get the page object, passing the function through pcall in case of&lt;br /&gt;
	-- errors, e.g. being over the expensive function count limit.&lt;br /&gt;
	if page then&lt;br /&gt;
		local success, pageObject = pcall(mw.title.new, page)&lt;br /&gt;
		if success then&lt;br /&gt;
			return pageObject&lt;br /&gt;
		else&lt;br /&gt;
			return nil&lt;br /&gt;
		end&lt;br /&gt;
	else&lt;br /&gt;
		return mw.title.getCurrentTitle()&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Provided for backward compatibility with other modules&lt;br /&gt;
function p.getParamMappings()&lt;br /&gt;
	return mappings&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function getNamespace(args)&lt;br /&gt;
	-- This function gets the namespace name from the page object.&lt;br /&gt;
	local page = fetchValue(args, argKeys.demopage)&lt;br /&gt;
	if page == '' then&lt;br /&gt;
		page = nil&lt;br /&gt;
	end&lt;br /&gt;
	local demospace = fetchValue(args, argKeys.demospace)&lt;br /&gt;
	if demospace == '' then&lt;br /&gt;
		demospace = nil&lt;br /&gt;
	end&lt;br /&gt;
	local subjectns = fetchValue(args, argKeys.subjectns)&lt;br /&gt;
	local ret&lt;br /&gt;
	if demospace then&lt;br /&gt;
		-- Handle &amp;quot;demospace = main&amp;quot; properly.&lt;br /&gt;
		if equalsArrayValue(argKeys.main, ustringLower(demospace)) then&lt;br /&gt;
			ret = mw.site.namespaces[0].name&lt;br /&gt;
		else&lt;br /&gt;
			ret = demospace&lt;br /&gt;
		end&lt;br /&gt;
	else&lt;br /&gt;
		local pageObject = p.getPageObject(page)&lt;br /&gt;
		if pageObject then&lt;br /&gt;
			if pageObject.isTalkPage then&lt;br /&gt;
				-- Get the subject namespace if the option is set,&lt;br /&gt;
				-- otherwise use &amp;quot;talk&amp;quot;.&lt;br /&gt;
				if yesno(subjectns) then&lt;br /&gt;
					ret = mw.site.namespaces[pageObject.namespace].subject.name&lt;br /&gt;
				else&lt;br /&gt;
					ret = 'talk'&lt;br /&gt;
				end&lt;br /&gt;
			else&lt;br /&gt;
				ret = pageObject.nsText&lt;br /&gt;
			end&lt;br /&gt;
		else&lt;br /&gt;
			return nil -- return nil if the page object doesn't exist.&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	ret = ret:gsub('_', ' ')&lt;br /&gt;
	return ustringLower(ret)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p._main(args)&lt;br /&gt;
	-- Check the parameters stored in the mappings table for any matches.&lt;br /&gt;
	local namespace = getNamespace(args) or 'other' -- &amp;quot;other&amp;quot; avoids nil table keys&lt;br /&gt;
	local params = mappings[namespace] or {}&lt;br /&gt;
	local ret = fetchValue(args, params)&lt;br /&gt;
	--[[&lt;br /&gt;
	-- If there were no matches, return parameters for other namespaces.&lt;br /&gt;
	-- This happens if there was no text specified for the namespace that&lt;br /&gt;
	-- was detected or if the demospace parameter is not a valid&lt;br /&gt;
	-- namespace. Note that the parameter for the detected namespace must be&lt;br /&gt;
	-- completely absent for this to happen, not merely blank.&lt;br /&gt;
	--]]&lt;br /&gt;
	if ret == nil then&lt;br /&gt;
		ret = fetchValue(args, argKeys.other)&lt;br /&gt;
	end&lt;br /&gt;
	return ret&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.main(frame)&lt;br /&gt;
	mArguments = require('Module:Arguments')&lt;br /&gt;
	local args = mArguments.getArgs(frame, {removeBlanks = false})&lt;br /&gt;
	local ret = p._main(args)&lt;br /&gt;
	return ret or ''&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.table(frame)&lt;br /&gt;
	--[[&lt;br /&gt;
	-- Create a wikitable of all subject namespace parameters, for&lt;br /&gt;
	-- documentation purposes. The talk parameter is optional, in case it&lt;br /&gt;
	-- needs to be excluded in the documentation.&lt;br /&gt;
	--]]&lt;br /&gt;
	&lt;br /&gt;
	-- Load modules and initialise variables.&lt;br /&gt;
	mTableTools = require('Module:TableTools')&lt;br /&gt;
	local namespaces = mw.site.namespaces&lt;br /&gt;
	local cfg = data.cfg&lt;br /&gt;
	local useTalk = type(frame) == 'table' &lt;br /&gt;
		and type(frame.args) == 'table' &lt;br /&gt;
		and yesno(frame.args.talk) -- Whether to use the talk parameter.&lt;br /&gt;
	&lt;br /&gt;
	-- Get the header names.&lt;br /&gt;
	local function checkValue(value, default)&lt;br /&gt;
		if type(value) == 'string' then&lt;br /&gt;
			return value&lt;br /&gt;
		else&lt;br /&gt;
			return default&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	local nsHeader = checkValue(cfg.wikitableNamespaceHeader, 'Namespace')&lt;br /&gt;
	local aliasesHeader = checkValue(cfg.wikitableAliasesHeader, 'Aliases')&lt;br /&gt;
&lt;br /&gt;
	-- Put the namespaces in order.&lt;br /&gt;
	local mappingsOrdered = {}&lt;br /&gt;
	for nsname, params in pairs(mappings) do&lt;br /&gt;
		if useTalk or nsname ~= 'talk' then&lt;br /&gt;
			local nsid = namespaces[nsname].id&lt;br /&gt;
			-- Add 1, as the array must start with 1; nsid 0 would be lost otherwise.&lt;br /&gt;
			nsid = nsid + 1 &lt;br /&gt;
			mappingsOrdered[nsid] = params&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	mappingsOrdered = mTableTools.compressSparseArray(mappingsOrdered)&lt;br /&gt;
&lt;br /&gt;
	-- Build the table.&lt;br /&gt;
	local ret = '{| class=&amp;quot;wikitable&amp;quot;'&lt;br /&gt;
		.. '\n|-'&lt;br /&gt;
		.. '\n! ' .. nsHeader&lt;br /&gt;
		.. '\n! ' .. aliasesHeader&lt;br /&gt;
	for i, params in ipairs(mappingsOrdered) do&lt;br /&gt;
		for j, param in ipairs(params) do&lt;br /&gt;
			if j == 1 then&lt;br /&gt;
				ret = ret .. '\n|-'&lt;br /&gt;
					.. '\n| &amp;lt;code&amp;gt;' .. param .. '&amp;lt;/code&amp;gt;'&lt;br /&gt;
					.. '\n| '&lt;br /&gt;
			elseif j == 2 then&lt;br /&gt;
				ret = ret .. '&amp;lt;code&amp;gt;' .. param .. '&amp;lt;/code&amp;gt;'&lt;br /&gt;
			else&lt;br /&gt;
				ret = ret .. ', &amp;lt;code&amp;gt;' .. param .. '&amp;lt;/code&amp;gt;'&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	ret = ret .. '\n|-'&lt;br /&gt;
		.. '\n|}'&lt;br /&gt;
	return ret&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>Bloxgate</name></author>
	</entry>
	<entry>
		<id>https://projectunsc.org/wiki/index.php?title=Module:Category_handler/shared&amp;diff=270</id>
		<title>Module:Category handler/shared</title>
		<link rel="alternate" type="text/html" href="https://projectunsc.org/wiki/index.php?title=Module:Category_handler/shared&amp;diff=270"/>
		<updated>2018-08-10T04:16:47Z</updated>

		<summary type="html">&lt;p&gt;Bloxgate: 1 revision imported: Wikipedia Message Boxes&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;-- This module contains shared functions used by [[Module:Category handler]]&lt;br /&gt;
-- and its submodules.&lt;br /&gt;
&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
function p.matchesBlacklist(page, blacklist)&lt;br /&gt;
	for i, pattern in ipairs(blacklist) do&lt;br /&gt;
		local match = mw.ustring.match(page, pattern)&lt;br /&gt;
		if match 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 p.getParamMappings(useLoadData)&lt;br /&gt;
	local dataPage = 'Module:Namespace detect/data'&lt;br /&gt;
	if useLoadData then&lt;br /&gt;
		return mw.loadData(dataPage).mappings&lt;br /&gt;
	else&lt;br /&gt;
		return require(dataPage).mappings&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.getNamespaceParameters(titleObj, mappings)&lt;br /&gt;
	-- We don't use title.nsText for the namespace name because it adds&lt;br /&gt;
	-- underscores.&lt;br /&gt;
	local mappingsKey&lt;br /&gt;
	if titleObj.isTalkPage then&lt;br /&gt;
		mappingsKey = 'talk'&lt;br /&gt;
	else&lt;br /&gt;
		mappingsKey = mw.site.namespaces[titleObj.namespace].name&lt;br /&gt;
	end&lt;br /&gt;
	mappingsKey = mw.ustring.lower(mappingsKey)&lt;br /&gt;
	return mappings[mappingsKey] or {}&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>Bloxgate</name></author>
	</entry>
	<entry>
		<id>https://projectunsc.org/wiki/index.php?title=Module:Category_handler/doc&amp;diff=268</id>
		<title>Module:Category handler/doc</title>
		<link rel="alternate" type="text/html" href="https://projectunsc.org/wiki/index.php?title=Module:Category_handler/doc&amp;diff=268"/>
		<updated>2018-08-10T04:16:47Z</updated>

		<summary type="html">&lt;p&gt;Bloxgate: 1 revision imported: Wikipedia Message Boxes&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{high-risk|7607966 pages, which is {{#expr:(760796600/{{NUMBEROFPAGES:R}}) round 0}}% of all}}&lt;br /&gt;
{{Used in system}}&lt;br /&gt;
{{Module rating|p}}&lt;br /&gt;
&lt;br /&gt;
This module implements the {{tl|category handler}} template. The category handler template helps other templates to automate both categorization and [[Wikipedia:Category suppression|category suppression]]. For information about using the category handler template in other templates, please see the '''[[Template:Category handler|template documentation]]'''. Keep reading for information about using the category handler module in other Lua modules, or for information on exporting this module to other wikis.&lt;br /&gt;
&lt;br /&gt;
== Use from other Lua modules ==&lt;br /&gt;
&lt;br /&gt;
=== When not to use this module ===&lt;br /&gt;
&lt;br /&gt;
For cases where a module only needs to categorise in one of the namespaces main (articles), file (images) or category, then using this module is overkill. Instead, you can simply get a title object using [[rev:https://www.mediawiki.org/wiki/Extension:Scribunto/Lua reference manual#mw.title.getCurrentTitle#mw.title.getCurrentTitle|mw.title.getCurrentTitle]] and check the &amp;lt;code&amp;gt;nsText&amp;lt;/code&amp;gt; field. For example:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local title = mw.title.getCurrentTitle()&lt;br /&gt;
if title.nsText == 'File' then&lt;br /&gt;
    -- do something&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
However, if your module needs to categorize in any other namespace, then we recommend you use this module, since it provides proper category suppression and makes it easy to select how to categorize in the different namespaces.&lt;br /&gt;
&lt;br /&gt;
=== Namespaces ===&lt;br /&gt;
&lt;br /&gt;
This module detects and groups all the different [[Wikipedia:Namespace|namespaces]] used on Wikipedia into several types. These types are used as parameter names in this module.&lt;br /&gt;
&lt;br /&gt;
:'''main''' = Main/article space, as in normal Wikipedia articles.&lt;br /&gt;
:'''talk''' = Any talk space, such as page names that start with &amp;quot;Talk:&amp;quot;, &amp;quot;User talk:&amp;quot;, &amp;quot;File talk:&amp;quot; and so on.&lt;br /&gt;
:'''user, wikipedia, file ... = The other namespaces except the talk pages. Namespace aliases are also accepted. See the table below for the full list.&lt;br /&gt;
:'''other''' = Any namespaces that were not specified as a parameter to the template. See examples below.&lt;br /&gt;
&lt;br /&gt;
;List of possible namespace parameters&lt;br /&gt;
(excluding &amp;lt;code&amp;gt;''talk''&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;''other''&amp;lt;/code&amp;gt;)&lt;br /&gt;
{{#invoke:Namespace detect|table}}&lt;br /&gt;
&lt;br /&gt;
=== Basic usage ===&lt;br /&gt;
&lt;br /&gt;
This module takes two or more parameters. Here's an example using a hello world program:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
p = {}&lt;br /&gt;
local categoryHandler = require( 'Module:Category handler' ).main&lt;br /&gt;
 &lt;br /&gt;
function p.main( frame )&lt;br /&gt;
    local result = 'Hello world!'&lt;br /&gt;
    local category = categoryHandler{&lt;br /&gt;
        '[[Category:Somecat]]',&lt;br /&gt;
        nocat = frame.args.nocat -- So &amp;quot;nocat=true/false&amp;quot; works&lt;br /&gt;
    }&lt;br /&gt;
    category = category or '' -- Check that we don't have a nil value for the category variable.&lt;br /&gt;
    return result .. category&lt;br /&gt;
end&lt;br /&gt;
 &lt;br /&gt;
return p&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example uses the default settings for the category handler module. That means the example module will categorize on pages in the following namespaces: &lt;br /&gt;
:'''main''', '''file''', '''help''', '''category''', '''portal''' and '''book'''&lt;br /&gt;
But it will ''not'' categorize in any other namespaces, e.g.:&lt;br /&gt;
:'''talk''', '''user''', '''wikipedia''', '''mediawiki''', '''template''' ...&lt;br /&gt;
&lt;br /&gt;
And it will ''not'' categorize on blacklisted pages. (See section [[#Blacklist|blacklist]] below.)&lt;br /&gt;
&lt;br /&gt;
The reason the category handler module does not categorize in some of the namespaces is that in those namespaces most modules and templates are just demonstrated or listed, not used. Thus most modules and templates should not categorize in those namespaces. &lt;br /&gt;
&lt;br /&gt;
Any module or template that is meant for one or more of the namespaces where this module categorizes can use the basic syntax as shown above.&lt;br /&gt;
&lt;br /&gt;
=== Advanced usage ===&lt;br /&gt;
&lt;br /&gt;
This module takes one or more parameters named after the different page types as listed in section [[#Namespaces|namespaces]] above. By using those parameters you can specify exactly in which namespaces your template should categorize. Like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
p = {}&lt;br /&gt;
local categoryHandler = require( 'Module:Category handler' ).main&lt;br /&gt;
 &lt;br /&gt;
function p.main( frame )&lt;br /&gt;
    local result = 'This is a module meant for articles and talk pages.'&lt;br /&gt;
    local category = categoryHandler{&lt;br /&gt;
        main = '[[Category:Somecat1]]', -- Categorize in main (article) space&lt;br /&gt;
        talk = '[[Category:Somecat2]]', -- Categorize in talk space&lt;br /&gt;
        nocat = frame.args.nocat -- So &amp;quot;nocat=true/false&amp;quot; works&lt;br /&gt;
    }&lt;br /&gt;
    category = category or '' -- Check that we don't have a nil value for the category variable.&lt;br /&gt;
    return result .. category&lt;br /&gt;
end&lt;br /&gt;
 &lt;br /&gt;
return p&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above module will only categorize in main and talk space. But it will not categorize on /archive pages since they are blacklisted. (See section [[#Blacklist|blacklist]] below.) And if you need to demonstrate (discuss) the module on a talkpage, then you can feed &amp;quot;&amp;lt;code&amp;gt;nocat='true'&amp;lt;/code&amp;gt;&amp;quot; to prevent that template from categorizing. (See section [[#Nocat|nocat]] below.) Like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
== My new module ==&lt;br /&gt;
Hey guys, have you seen my new module?&lt;br /&gt;
{{#invoke:mymodule|main|nocat=true}}&lt;br /&gt;
Nice, isn't it?&lt;br /&gt;
--~~~~&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sometimes we want to use the same category in several namespaces, then do like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
p = {}&lt;br /&gt;
local categoryHandler = require( 'Module:Category handler' ).main&lt;br /&gt;
 &lt;br /&gt;
function p.main( frame )&lt;br /&gt;
    local result = 'This is a module used in several namespaces.'&lt;br /&gt;
    local category = categoryHandler{&lt;br /&gt;
        main = '[[Category:Somecat1]]',&lt;br /&gt;
        [ 1 ] = '[[Category:Somecat2]]', -- For help and user space&lt;br /&gt;
        help = 1,&lt;br /&gt;
        user = 1,&lt;br /&gt;
        talk = '', -- No categories on talk pages&lt;br /&gt;
        other = '[[Category:Somecat3]]', -- For all other namespaces&lt;br /&gt;
        nocat = frame.args.nocat -- So &amp;quot;nocat=true/false&amp;quot; works&lt;br /&gt;
    }&lt;br /&gt;
    category = category or '' -- Check that we don't have a nil value for the category variable.&lt;br /&gt;
    return result .. category&lt;br /&gt;
end&lt;br /&gt;
 &lt;br /&gt;
return p&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example we use a numbered parameter to feed one of the categories, and then we tell this module to use that numbered parameter for both the help and user space.&lt;br /&gt;
&lt;br /&gt;
The category handler module understands an unlimited number of numbered parameters.&lt;br /&gt;
&lt;br /&gt;
The '''other''' parameter defines what should be used in the remaining namespaces that have not explicitly been fed data.&lt;br /&gt;
&lt;br /&gt;
Note the empty but defined '''talk''' parameter. That stops this module from showing what has been fed to the '''other''' parameter, when in talk space.&lt;br /&gt;
&lt;br /&gt;
The category handler module also has a parameter called '''all'''. It works like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
p = {}&lt;br /&gt;
local categoryHandler = require( 'Module:Category handler' ).main&lt;br /&gt;
 &lt;br /&gt;
function p.main( frame )&lt;br /&gt;
    local result = 'This is a module used in all namespaces.'&lt;br /&gt;
    local category = categoryHandler{&lt;br /&gt;
        all = '[[Category:Somecat1]]', -- Categorize in all namespaces&lt;br /&gt;
        nocat = frame.args.nocat -- So &amp;quot;nocat=true/false&amp;quot; works&lt;br /&gt;
    }&lt;br /&gt;
    category = category or '' -- Check that we don't have a nil value for the category variable.&lt;br /&gt;
    return result .. category&lt;br /&gt;
end&lt;br /&gt;
 &lt;br /&gt;
return p&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above example will categorize in all namespaces, but not on blacklisted pages. If you want to demonstrate that module on a page, then use &amp;quot;&amp;lt;code&amp;gt;nocat=true&amp;lt;/code&amp;gt;&amp;quot; to prevent the template from categorizing. &lt;br /&gt;
&lt;br /&gt;
We suggest avoiding the '''all''' parameter, since modules and templates should preferably only categorize in the namespaces they need to.&lt;br /&gt;
&lt;br /&gt;
The all parameter can also be combined with the rest of the parameters. Like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
p = {}&lt;br /&gt;
local categoryHandler = require( 'Module:Category handler' ).main&lt;br /&gt;
 &lt;br /&gt;
function p.main( frame )&lt;br /&gt;
    local result = 'This is a module used in all namespaces.'&lt;br /&gt;
    local category = categoryHandler{&lt;br /&gt;
        all = '[[Category:Somecat1]]', -- Categorize in all namespaces&lt;br /&gt;
        main = '[[Category:Somecat2]]', -- And add this in main space&lt;br /&gt;
        other = '[[Category:Somecat3]]', -- And add this in all other namespaces&lt;br /&gt;
        nocat = frame.args.nocat -- So &amp;quot;nocat=true/false&amp;quot; works&lt;br /&gt;
    }&lt;br /&gt;
    category = category or '' -- Check that we don't have a nil value for the category variable.&lt;br /&gt;
    return result .. category&lt;br /&gt;
end&lt;br /&gt;
 &lt;br /&gt;
return p&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the above module is placed on an article, then it will add the categories &amp;quot;Somecat1&amp;quot; and &amp;quot;Somecat2&amp;quot;. But on all other types of pages it will instead add &amp;quot;Somecat1&amp;quot; and &amp;quot;Somecat3&amp;quot;. As the example shows, the all parameter works independently of the rest of the parameters.&lt;br /&gt;
&lt;br /&gt;
=== Subpages ===&lt;br /&gt;
&lt;br /&gt;
The category handler module understands the '''subpage''' parameter. Like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
p = {}&lt;br /&gt;
local categoryHandler = require( 'Module:Category handler' ).main&lt;br /&gt;
 &lt;br /&gt;
function p.main( frame )&lt;br /&gt;
    local result = 'This is a module used in all namespaces.'&lt;br /&gt;
    local category = categoryHandler{&lt;br /&gt;
        subpage = 'no' -- Don't categorize on subpages&lt;br /&gt;
        wikipedia = '[[Category:Somecat]]',&lt;br /&gt;
        nocat = frame.args.nocat -- So &amp;quot;nocat=true/false&amp;quot; works&lt;br /&gt;
    }&lt;br /&gt;
    category = category or '' -- Check that we don't have a nil value for the category variable.&lt;br /&gt;
    return result .. category&lt;br /&gt;
end&lt;br /&gt;
 &lt;br /&gt;
return p&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If &amp;quot;&amp;lt;code&amp;gt;subpage='no'&amp;lt;/code&amp;gt;&amp;quot; then this template will ''not'' categorize on subpages. For the rare occasion you ''only'' want to categorize on subpages, then use &amp;quot;&amp;lt;code&amp;gt;subpage='only'&amp;lt;/code&amp;gt;&amp;quot;. If '''subpage''' is empty or undefined then this template categorizes both on basepages and on subpages.&lt;br /&gt;
&lt;br /&gt;
=== Blacklist ===&lt;br /&gt;
&lt;br /&gt;
This module has a blacklist of the pages and page types where templates should not auto-categorize. Thus modules that use this meta-template will for instance not categorize on /archive pages and on the subpages of [[Wikipedia:Template messages]].&lt;br /&gt;
&lt;br /&gt;
If you want a template to categorize on a blacklisted page, then feed &amp;quot;&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;nocat = false&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&amp;quot; to the module when you place it on the page, thus skipping the blacklist check. Note that this module only categorizes if it has data for the namespace. For instance, if the basic syntax is used (see [[#Basic usage|basic usage]] above), then even if you set &amp;quot;&amp;lt;code&amp;gt;nocat = false&amp;lt;/code&amp;gt;&amp;quot; the template will not categorize on a talk page, since it has no data for talk pages. But it has data for help space, so on a blacklisted help page it will categorize.&lt;br /&gt;
&lt;br /&gt;
The blacklist is located in the configuration table &amp;lt;code&amp;gt;cfg.blacklist&amp;lt;/code&amp;gt; near the top of the module code.&lt;br /&gt;
&lt;br /&gt;
=== The &amp;quot;nocat&amp;quot; parameter ===&lt;br /&gt;
&lt;br /&gt;
This module understands the '''nocat''' parameter:&lt;br /&gt;
&lt;br /&gt;
* If &amp;quot;&amp;lt;code&amp;gt;nocat = true&amp;lt;/code&amp;gt;&amp;quot; then this template does ''not'' categorize.&lt;br /&gt;
* If '''nocat''' is &amp;lt;code&amp;gt;nil&amp;lt;/code&amp;gt; then this template categorizes as usual. &lt;br /&gt;
* If &amp;quot;&amp;lt;code&amp;gt;nocat = false&amp;lt;/code&amp;gt;&amp;quot; this template categorizes even when on blacklisted pages. (See section [[#Blacklist|blacklist]] above.)&lt;br /&gt;
* The nocat parameter also accepts aliases for &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; as defined by [[Module:Yesno]], e.g. &amp;quot;yes&amp;quot;, &amp;quot;y&amp;quot;, &amp;quot;true&amp;quot;, and 1 for &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;, and &amp;quot;no&amp;quot;, &amp;quot;n&amp;quot;, &amp;quot;false&amp;quot;, and 0 for &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Modules and templates that use {{tlf|category handler}} should forward '''nocat''', so they too understand '''nocat'''. The code &amp;quot;&amp;lt;code&amp;gt;nocat = frame.args.nocat&amp;lt;/code&amp;gt;&amp;quot; shown in the examples on this page does that.&lt;br /&gt;
&lt;br /&gt;
=== The &amp;quot;categories&amp;quot; parameter ===&lt;br /&gt;
&lt;br /&gt;
For backwards compatibility this module also understands the '''categories''' parameter. It works the same as '''nocat'''. Like this:&lt;br /&gt;
&lt;br /&gt;
* If &amp;quot;&amp;lt;code&amp;gt;categories = false&amp;lt;/code&amp;gt;&amp;quot; then this template does ''not'' categorize. &lt;br /&gt;
* If '''categories''' is empty or undefined then this template categorizes as usual. &lt;br /&gt;
* If &amp;quot;&amp;lt;code&amp;gt;categories = true&amp;lt;/code&amp;gt;&amp;quot; this template categorizes even when on blacklisted pages.&lt;br /&gt;
* The categories parameter also accepts aliases for &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; as defined by [[Module:Yesno]], e.g. &amp;quot;yes&amp;quot;, &amp;quot;y&amp;quot;, &amp;quot;true&amp;quot;, and 1 for &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;, and &amp;quot;no&amp;quot;, &amp;quot;n&amp;quot;, &amp;quot;false&amp;quot;, and 0 for &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== The &amp;quot;category2&amp;quot; parameter ===&lt;br /&gt;
&lt;br /&gt;
For backwards compatibility this template kind of supports the old &amp;quot;category =&amp;quot; parameter. But the parameter name &amp;quot;category&amp;quot; is already used in this module to feed category data for when in category space. So instead this template uses '''category2''' for the usage similar to '''nocat'''. Like this:&lt;br /&gt;
&lt;br /&gt;
* If &amp;quot;&amp;lt;code&amp;gt;category2 = ''&amp;lt;/code&amp;gt;&amp;quot; (empty but defined), or &amp;quot;&amp;lt;code&amp;gt;category2 = 'no'&amp;lt;/code&amp;gt;&amp;quot;, or if '''category2''' is fed any other data (except as described in the next two points), then this template does ''not'' categorize.&lt;br /&gt;
* If '''category2''' is undefined or if &amp;quot;&amp;lt;code&amp;gt;category2 = '¬'&amp;lt;/code&amp;gt;&amp;quot;, then this template categorizes as usual.&lt;br /&gt;
* If &amp;quot;&amp;lt;code&amp;gt;category2 = 'yes'&amp;lt;/code&amp;gt;&amp;quot; this template categorizes even when on blacklisted pages.&lt;br /&gt;
&lt;br /&gt;
=== Categories and text ===&lt;br /&gt;
&lt;br /&gt;
Besides from categories, you can feed anything else to this module, for instance some text. Like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
p = {}&lt;br /&gt;
local categoryHandler = require( 'Module:Category handler' ).main&lt;br /&gt;
&lt;br /&gt;
function p.main( frame )&lt;br /&gt;
    local result = 'This is a module used on talk pages.'&lt;br /&gt;
    local category = categoryHandler{&lt;br /&gt;
        talk = '[[Category:Somecat]]',&lt;br /&gt;
        other = '&amp;lt;p class=&amp;quot;error&amp;quot;&amp;gt;This module should only be used on talk pages.&amp;lt;/p&amp;gt;',&lt;br /&gt;
        nocat = frame.args.nocat -- So &amp;quot;nocat=true/false&amp;quot; works&lt;br /&gt;
    }&lt;br /&gt;
    category = category or '' -- Check that we don't have a nil value for the category variable.&lt;br /&gt;
    return result .. category&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When the module code above is used on anything other than a talk page, it will look like this:&lt;br /&gt;
&lt;br /&gt;
:This is a module used on talk pages.{{#invoke:category handler|main&lt;br /&gt;
| talk = [[Category:Somecat]]&lt;br /&gt;
| other = &amp;lt;p class=&amp;quot;error&amp;quot;&amp;gt;This module should only be used on talk pages.&amp;lt;/p&amp;gt;&lt;br /&gt;
| nocat = {{{nocat|}}} &amp;lt;!--So &amp;quot;nocat=true/false&amp;quot; works--&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
That text will not show on blacklisted pages, so don't use this method to show any important information. Feeding &amp;quot;&amp;lt;code&amp;gt;nocat = 'true'&amp;lt;/code&amp;gt;&amp;quot; to the template hides the text, just as it suppresses any categories.&lt;br /&gt;
&lt;br /&gt;
=== The &amp;quot;page&amp;quot; parameter ===&lt;br /&gt;
&lt;br /&gt;
For testing and demonstration purposes this module can take a parameter named '''page'''. Like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
p = {}&lt;br /&gt;
local categoryHandler = require( 'Module:Category handler' ).main&lt;br /&gt;
 &lt;br /&gt;
function p.main( frame )&lt;br /&gt;
    local category = categoryHandler{&lt;br /&gt;
        main = 'Category:Some cat',&lt;br /&gt;
        talk = 'Category:Talk cat',&lt;br /&gt;
        nocat = frame.args.nocat, -- So &amp;quot;nocat=true/false&amp;quot; works&lt;br /&gt;
        page = 'User talk:Example'&lt;br /&gt;
    }&lt;br /&gt;
    return category&lt;br /&gt;
end&lt;br /&gt;
 &lt;br /&gt;
return p&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above code we on purpose left out the brackets around the category names so we see the output on the page. No matter on what kind of page the code above is used it will return this:&lt;br /&gt;
&lt;br /&gt;
:{{#invoke:category handler|main&lt;br /&gt;
| main = Category:Some cat&lt;br /&gt;
| talk = Category:Talk cat&lt;br /&gt;
| nocat = {{{nocat|}}}   &amp;lt;!--So &amp;quot;nocat=true/false&amp;quot; works--&amp;gt;&lt;br /&gt;
| page = User talk:Example&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The '''page''' parameter makes this module behave exactly as if on that page. Even the blacklist works. The pagename doesn't have to be an existing page.&lt;br /&gt;
&lt;br /&gt;
If the '''page''' parameter is empty or undefined, the name of the current page determines the result.&lt;br /&gt;
&lt;br /&gt;
You can make it so your module also understands the '''page''' parameter. That means you can test how your template will categorize on different pages, without having to actually edit those pages. Then do like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
p = {}&lt;br /&gt;
local categoryHandler = require( 'Module:Category handler' ).main&lt;br /&gt;
&lt;br /&gt;
function p.main( frame )&lt;br /&gt;
    local category = categoryHandler{&lt;br /&gt;
        main = 'Category:Some cat',&lt;br /&gt;
        talk = 'Category:Talk cat',&lt;br /&gt;
        nocat = frame.args.nocat, -- So &amp;quot;nocat=true/false&amp;quot; works&lt;br /&gt;
        page = frame.args.page -- For testing&lt;br /&gt;
    }&lt;br /&gt;
    return category&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Parameters ===&lt;br /&gt;
&lt;br /&gt;
List of all parameters:&lt;br /&gt;
&lt;br /&gt;
* First positional parameter - for default settings&lt;br /&gt;
* subpage = 'no' / 'only'&lt;br /&gt;
* 1, 2, 3 ...&lt;br /&gt;
* all = '&amp;lt;nowiki&amp;gt;[[Category:Somecat]]&amp;lt;/nowiki&amp;gt;' / 'Text'&lt;br /&gt;
* main = 1, 2, 3 ... / '&amp;lt;nowiki&amp;gt;[[Category:Somecat]]&amp;lt;/nowiki&amp;gt;' / 'Text'&lt;br /&gt;
* ...&lt;br /&gt;
* other = 1, 2, 3 ... / '&amp;lt;nowiki&amp;gt;[[Category:Somecat]]&amp;lt;/nowiki&amp;gt;' / 'Text'&lt;br /&gt;
* nocat = frame.args.nocat / true / false / 'yes' / 'no' / 'y' / 'n' / 'true' / 'false' / 1 / 0&lt;br /&gt;
* categories = frame.args.categories / false / true / 'no' / 'yes' / 'n' / 'y' / 'false' / 'true' / 0 / 1&lt;br /&gt;
* category2 = frame.args.category or '¬' / '' / 'no' / ''not defined'' / '¬' / 'yes'&lt;br /&gt;
* page  = frame.args.page / 'User:Example'&lt;br /&gt;
&lt;br /&gt;
Note that empty values to the &amp;quot;main&amp;quot; ... &amp;quot;other&amp;quot; parameters have special meaning (see examples above). The &amp;quot;all&amp;quot; parameter doesn't understand numbered parameters, since there should never be a need for that.&lt;br /&gt;
&lt;br /&gt;
== Exporting to other wikis ==&lt;br /&gt;
&lt;br /&gt;
This module can be exported to other wikis by changing the configuration values in the &amp;lt;code&amp;gt;cfg&amp;lt;/code&amp;gt; table. All the variable values are configurable, so after the configuration values have been set there should be no need to alter the main module code. Details of each configuration value are included in the module code comments. In addition, this module requires [[Module:Namespace detect]] to be available on the local wiki.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* {{tl|Category handler}} – for using this module with templates, rather than Lua modules.&lt;br /&gt;
* [[Wikipedia:Category suppression]] – The how-to guide.&lt;br /&gt;
* [[Wikipedia:WikiProject Category Suppression]] – The WikiProject.&lt;br /&gt;
* [[Wikipedia:Namespace]] – Lists all the namespaces.&lt;/div&gt;</summary>
		<author><name>Bloxgate</name></author>
	</entry>
	<entry>
		<id>https://projectunsc.org/wiki/index.php?title=Module:Category_handler/data&amp;diff=266</id>
		<title>Module:Category handler/data</title>
		<link rel="alternate" type="text/html" href="https://projectunsc.org/wiki/index.php?title=Module:Category_handler/data&amp;diff=266"/>
		<updated>2018-08-10T04:16:46Z</updated>

		<summary type="html">&lt;p&gt;Bloxgate: 1 revision imported: Wikipedia Message Boxes&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;-- This module assembles data to be passed to [[Module:Category handler]] using&lt;br /&gt;
-- mw.loadData. This includes the configuration data and whether the current&lt;br /&gt;
-- page matches the title blacklist.&lt;br /&gt;
&lt;br /&gt;
local data = require('Module:Category handler/config')&lt;br /&gt;
local mShared = require('Module:Category handler/shared')&lt;br /&gt;
local blacklist = require('Module:Category handler/blacklist')&lt;br /&gt;
local title = mw.title.getCurrentTitle()&lt;br /&gt;
&lt;br /&gt;
data.currentTitleMatchesBlacklist = mShared.matchesBlacklist(&lt;br /&gt;
	title.prefixedText,&lt;br /&gt;
	blacklist&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
data.currentTitleNamespaceParameters = mShared.getNamespaceParameters(&lt;br /&gt;
	title,&lt;br /&gt;
	mShared.getParamMappings()&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
return data&lt;/div&gt;</summary>
		<author><name>Bloxgate</name></author>
	</entry>
	<entry>
		<id>https://projectunsc.org/wiki/index.php?title=Module:Category_handler/config&amp;diff=264</id>
		<title>Module:Category handler/config</title>
		<link rel="alternate" type="text/html" href="https://projectunsc.org/wiki/index.php?title=Module:Category_handler/config&amp;diff=264"/>
		<updated>2018-08-10T04:16:46Z</updated>

		<summary type="html">&lt;p&gt;Bloxgate: 1 revision imported: Wikipedia Message Boxes&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;--------------------------------------------------------------------------------&lt;br /&gt;
--            [[Module:Category handler]] configuration data                  --&lt;br /&gt;
--       Language-specific parameter names and values can be set here.        --&lt;br /&gt;
--       For blacklist config, see [[Module:Category handler/blacklist]].     --&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
local cfg = {} -- Don't edit this line.&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
--                       Start configuration data                             --&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
--                              Parameter names                               --&lt;br /&gt;
-- These configuration items specify custom parameter names.                  --&lt;br /&gt;
-- To add one extra name, you can use this format:                            --&lt;br /&gt;
--                                                                            --&lt;br /&gt;
-- foo = 'parameter name',                                                    --&lt;br /&gt;
--                                                                            --&lt;br /&gt;
-- To add multiple names, you can use this format:                            --&lt;br /&gt;
--                                                                            --&lt;br /&gt;
-- foo = {'parameter name 1', 'parameter name 2', 'parameter name 3'},        --&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
cfg.parameters = {&lt;br /&gt;
	&lt;br /&gt;
	-- The nocat and categories parameter suppress&lt;br /&gt;
	-- categorisation. They are used with Module:Yesno, and work as follows:&lt;br /&gt;
	--&lt;br /&gt;
	-- cfg.nocat:&lt;br /&gt;
	-- Result of yesno()                        Effect&lt;br /&gt;
	-- true                                     Categorisation is suppressed&lt;br /&gt;
	-- false                                    Categorisation is allowed, and&lt;br /&gt;
	--                                          the blacklist check is skipped&lt;br /&gt;
	-- nil                                      Categorisation is allowed&lt;br /&gt;
	--&lt;br /&gt;
	-- cfg.categories:&lt;br /&gt;
	-- Result of yesno()                        Effect&lt;br /&gt;
	-- true                                     Categorisation is allowed, and&lt;br /&gt;
	--                                          the blacklist check is skipped&lt;br /&gt;
	-- false                                    Categorisation is suppressed&lt;br /&gt;
	-- nil                                      Categorisation is allowed&lt;br /&gt;
	nocat = 'nocat',&lt;br /&gt;
	categories = 'categories',&lt;br /&gt;
	&lt;br /&gt;
	-- The parameter name for the legacy &amp;quot;category2&amp;quot; parameter. This skips the&lt;br /&gt;
	-- blacklist if set to the cfg.category2Yes value, and suppresses&lt;br /&gt;
	-- categorisation if present but equal to anything other than&lt;br /&gt;
	-- cfg.category2Yes or cfg.category2Negative.&lt;br /&gt;
	category2 = 'category2',&lt;br /&gt;
	&lt;br /&gt;
	-- cfg.subpage is the parameter name to specify how to behave on subpages.&lt;br /&gt;
	subpage = 'subpage',&lt;br /&gt;
	&lt;br /&gt;
	-- The parameter for data to return in all namespaces.&lt;br /&gt;
	all = 'all',&lt;br /&gt;
	&lt;br /&gt;
	-- The parameter name for data to return if no data is specified for the&lt;br /&gt;
	-- namespace that is detected.&lt;br /&gt;
	other = 'other',&lt;br /&gt;
	&lt;br /&gt;
	-- The parameter name used to specify a page other than the current page;&lt;br /&gt;
	-- used for testing and demonstration.&lt;br /&gt;
	demopage = 'page',&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
--                              Parameter values                              --&lt;br /&gt;
-- These are set values that can be used with certain parameters. Only one    --&lt;br /&gt;
-- value can be specified, like this:                                         --&lt;br /&gt;
--                                                                            --&lt;br /&gt;
-- cfg.foo = 'value name'                                                     --                                               --&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
-- The following settings are used with the cfg.category2 parameter. Setting&lt;br /&gt;
-- cfg.category2 to cfg.category2Yes skips the blacklist, and if cfg.category2&lt;br /&gt;
-- is present but equal to anything other than cfg.category2Yes or&lt;br /&gt;
-- cfg.category2Negative then it supresses cateogrisation.&lt;br /&gt;
cfg.category2Yes = 'yes'&lt;br /&gt;
cfg.category2Negative = '¬'&lt;br /&gt;
&lt;br /&gt;
-- The following settings are used with the cfg.subpage parameter.&lt;br /&gt;
-- cfg.subpageNo is the value to specify to not categorise on subpages;&lt;br /&gt;
-- cfg.subpageOnly is the value to specify to only categorise on subpages.&lt;br /&gt;
cfg.subpageNo = 'no'&lt;br /&gt;
cfg.subpageOnly = 'only'&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
--                           Default namespaces                               --&lt;br /&gt;
-- This is a table of namespaces to categorise by default. The keys are the   --&lt;br /&gt;
-- namespace numbers.                                                         --&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
cfg.defaultNamespaces = {&lt;br /&gt;
	[  0] = true, -- main&lt;br /&gt;
	[  6] = true, -- file&lt;br /&gt;
	[ 12] = true, -- help&lt;br /&gt;
	[ 14] = true, -- category&lt;br /&gt;
	[100] = true, -- portal&lt;br /&gt;
	[108] = true, -- book&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
--                                Wrappers                                    --&lt;br /&gt;
-- This is a wrapper template or a list of wrapper templates to be passed to  --&lt;br /&gt;
-- [[Module:Arguments]].                                                      --&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
cfg.wrappers = 'Template:Category handler'&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
--                           End configuration data                           --&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
return cfg -- Don't edit this line.&lt;/div&gt;</summary>
		<author><name>Bloxgate</name></author>
	</entry>
	<entry>
		<id>https://projectunsc.org/wiki/index.php?title=Module:Category_handler/blacklist&amp;diff=262</id>
		<title>Module:Category handler/blacklist</title>
		<link rel="alternate" type="text/html" href="https://projectunsc.org/wiki/index.php?title=Module:Category_handler/blacklist&amp;diff=262"/>
		<updated>2018-08-10T04:16:46Z</updated>

		<summary type="html">&lt;p&gt;Bloxgate: 1 revision imported: Wikipedia Message Boxes&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;-- This module contains the blacklist used by [[Module:Category handler]].&lt;br /&gt;
-- Pages that match Lua patterns in this list will not be categorised unless&lt;br /&gt;
-- categorisation is explicitly requested.&lt;br /&gt;
&lt;br /&gt;
return {&lt;br /&gt;
	'^Main Page$', -- don't categorise the main page.&lt;br /&gt;
&lt;br /&gt;
	-- Don't categorise the following pages or their subpages.&lt;br /&gt;
	-- &amp;quot;%f[/\0]&amp;quot; matches if the next character is &amp;quot;/&amp;quot; or the end of the string.&lt;br /&gt;
	'^Wikipedia:Cascade%-protected items%f[/\0]',&lt;br /&gt;
	'^User:UBX%f[/\0]', -- The userbox &amp;quot;template&amp;quot; space.&lt;br /&gt;
	'^User talk:UBX%f[/\0]',&lt;br /&gt;
&lt;br /&gt;
	-- Don't categorise subpages of these pages, but allow&lt;br /&gt;
	-- categorisation of the base page.&lt;br /&gt;
	'^Wikipedia:Template messages/.*$',&lt;br /&gt;
&lt;br /&gt;
	-- Don't categorise archives.&lt;br /&gt;
	'/[aA]rchive',&lt;br /&gt;
	&amp;quot;^Wikipedia:Administrators' noticeboard/IncidentArchive%d+$&amp;quot;,&lt;br /&gt;
}&lt;/div&gt;</summary>
		<author><name>Bloxgate</name></author>
	</entry>
	<entry>
		<id>https://projectunsc.org/wiki/index.php?title=Module:No_globals/doc&amp;diff=258</id>
		<title>Module:No globals/doc</title>
		<link rel="alternate" type="text/html" href="https://projectunsc.org/wiki/index.php?title=Module:No_globals/doc&amp;diff=258"/>
		<updated>2018-08-10T04:16:45Z</updated>

		<summary type="html">&lt;p&gt;Bloxgate: 1 revision imported: Wikipedia Message Boxes&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{high-risk|11,040,000+ pages, which is {{#expr:(1104688900/{{NUMBEROFPAGES:R}}) round 0}}% of all}}&lt;br /&gt;
{{module rating|protected}}&lt;br /&gt;
&amp;lt;!-- Categories go at the bottom of this page and interwikis go in Wikidata. --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This module causes an error if any nil global is read or if any global is written to, with the exception of &amp;lt;var&amp;gt;arg&amp;lt;/var&amp;gt;. To use, add &amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot; inline&amp;gt;require('Module:No globals')&amp;lt;/syntaxhighlight&amp;gt; to the top of the module using it. The &amp;lt;var&amp;gt;arg&amp;lt;/var&amp;gt; variable is excluded because it is necessary for Scribunto's [[mw:Extension:Scribunto/Lua reference manual#require|require]] function to work properly. (See the Scribunto source code [[phab:diffusion/ELUA/browse/master/engines/LuaCommon/lualib/package.lua;f768b950134a6a32c094be92c8c139a11f8880df$101|here]].)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;includeonly&amp;gt;{{Sandbox other||&lt;br /&gt;
&amp;lt;!-- Categories go here and interwikis go in Wikidata. --&amp;gt;&lt;br /&gt;
[[Category:Lua metamodules]]&lt;br /&gt;
}}&amp;lt;/includeonly&amp;gt;&lt;/div&gt;</summary>
		<author><name>Bloxgate</name></author>
	</entry>
	<entry>
		<id>https://projectunsc.org/wiki/index.php?title=Module:Message_box/configuration/doc&amp;diff=254</id>
		<title>Module:Message box/configuration/doc</title>
		<link rel="alternate" type="text/html" href="https://projectunsc.org/wiki/index.php?title=Module:Message_box/configuration/doc&amp;diff=254"/>
		<updated>2018-08-10T04:16:45Z</updated>

		<summary type="html">&lt;p&gt;Bloxgate: 1 revision imported: Wikipedia Message Boxes&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{high-risk}}&lt;br /&gt;
{{Used in system}}&lt;br /&gt;
{{Module rating|protected}}&lt;/div&gt;</summary>
		<author><name>Bloxgate</name></author>
	</entry>
	<entry>
		<id>https://projectunsc.org/wiki/index.php?title=Module:Protection_banner/config&amp;diff=252</id>
		<title>Module:Protection banner/config</title>
		<link rel="alternate" type="text/html" href="https://projectunsc.org/wiki/index.php?title=Module:Protection_banner/config&amp;diff=252"/>
		<updated>2018-08-10T04:16:44Z</updated>

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

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

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

		<summary type="html">&lt;p&gt;Bloxgate: 1 revision imported: Wikipedia Message Boxes&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('Module:Yesno')&lt;br /&gt;
local checkType = require('libraryUtil').checkType&lt;br /&gt;
&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
function p._main(args)&lt;br /&gt;
	checkType('_main', 1, args, 'table')&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) ~= 'string' then&lt;br /&gt;
			error(string.format(&lt;br /&gt;
				&amp;quot;type error in '%s' parameter of '_main' (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 .. '=' .. val&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Filename&lt;br /&gt;
	checkArg('file', args.file, 3)&lt;br /&gt;
	ret[#ret + 1] = 'File:' .. args.file&lt;br /&gt;
&lt;br /&gt;
	-- Format&lt;br /&gt;
	if args.format then&lt;br /&gt;
		checkArg('format', args.format)&lt;br /&gt;
		if args.formatfile then&lt;br /&gt;
			checkArg('formatfile', args.formatfile)&lt;br /&gt;
			ret[#ret + 1] = args.format .. '=' .. 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] = 'border'&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	addPositional('location')&lt;br /&gt;
	addPositional('alignment')&lt;br /&gt;
	addPositional('size')&lt;br /&gt;
	addNamed('upright')&lt;br /&gt;
	addNamed('link')&lt;br /&gt;
	addNamed('alt')&lt;br /&gt;
	addNamed('page')&lt;br /&gt;
	addNamed('class')&lt;br /&gt;
	addNamed('lang')&lt;br /&gt;
	addNamed('start')&lt;br /&gt;
	addNamed('end')&lt;br /&gt;
	addNamed('thumbtime')&lt;br /&gt;
	addPositional('caption')&lt;br /&gt;
&lt;br /&gt;
	return string.format('[[%s]]', table.concat(ret, '|'))&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.main(frame)&lt;br /&gt;
	local origArgs = require('Module:Arguments').getArgs(frame, {&lt;br /&gt;
		wrappers = 'Template:File link'&lt;br /&gt;
	})&lt;br /&gt;
	if not origArgs.file then&lt;br /&gt;
		error(&amp;quot;'file' 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 == '_BLANK' then&lt;br /&gt;
			v = ''&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>Bloxgate</name></author>
	</entry>
	<entry>
		<id>https://projectunsc.org/wiki/index.php?title=Module:Effective_protection_level&amp;diff=244</id>
		<title>Module:Effective protection level</title>
		<link rel="alternate" type="text/html" href="https://projectunsc.org/wiki/index.php?title=Module:Effective_protection_level&amp;diff=244"/>
		<updated>2018-08-10T04:16:43Z</updated>

		<summary type="html">&lt;p&gt;Bloxgate: 1 revision imported: Wikipedia Message Boxes&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) == 'table' and pagename.prefixedText then&lt;br /&gt;
		title = pagename&lt;br /&gt;
	elseif pagename then&lt;br /&gt;
		title = mw.title.new(pagename)&lt;br /&gt;
	else&lt;br /&gt;
		title = mw.title.getCurrentTitle()&lt;br /&gt;
	end&lt;br /&gt;
	pagename = title.prefixedText&lt;br /&gt;
	if action == 'autoreview' then&lt;br /&gt;
		local level = mw.ext.FlaggedRevs.getStabilitySettings(title)&lt;br /&gt;
		level = level and level.autoreview&lt;br /&gt;
		if level == 'review' then&lt;br /&gt;
			return 'reviewer'&lt;br /&gt;
		elseif level ~= '' then&lt;br /&gt;
			return level&lt;br /&gt;
		else&lt;br /&gt;
			return nil -- not '*'. a page not being PC-protected is distinct from it being PC-protected with anyone able to review. also not '', as that would mean PC-protected but nobody can review&lt;br /&gt;
		end&lt;br /&gt;
	elseif action ~= 'edit' and action ~= 'move' and action ~= 'create' and action ~= 'upload' then&lt;br /&gt;
		error( 'First parameter must be one of edit, move, create, upload, autoreview', 2 )&lt;br /&gt;
	end&lt;br /&gt;
	if title.namespace == 8 then -- MediaWiki namespace&lt;br /&gt;
		return 'sysop'&lt;br /&gt;
	elseif title.namespace == 2 and title.isSubpage and ( title.contentModel == 'javascript' or title.contentModel == 'css' or title.contentModel == 'json' ) then -- user JS, CSS or JSON page&lt;br /&gt;
		return 'sysop'&lt;br /&gt;
	end&lt;br /&gt;
	local level = title.protectionLevels[action] and title.protectionLevels[action][1]&lt;br /&gt;
	if level == 'sysop' or level == 'editprotected' then&lt;br /&gt;
		return 'sysop'&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 'sysop'&lt;br /&gt;
	elseif level == 'templateeditor' then&lt;br /&gt;
		return 'templateeditor'&lt;br /&gt;
	elseif action == 'move' then&lt;br /&gt;
		local blacklistentry = mw.ext.TitleBlacklist.test('edit', 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 'templateeditor'&lt;br /&gt;
		elseif title.namespace == 6 then&lt;br /&gt;
			return 'filemover'&lt;br /&gt;
		elseif level == 'extendedconfirmed' then&lt;br /&gt;
			return 'extendedconfirmed'&lt;br /&gt;
		else&lt;br /&gt;
			return 'autoconfirmed'&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 'templateeditor'&lt;br /&gt;
		elseif level == 'extendedconfirmed' then&lt;br /&gt;
			return 'extendedconfirmed'&lt;br /&gt;
		else&lt;br /&gt;
			return 'autoconfirmed'&lt;br /&gt;
		end&lt;br /&gt;
	elseif level == 'editsemiprotected' then -- create-semiprotected pages return this for some reason&lt;br /&gt;
		return 'autoconfirmed'&lt;br /&gt;
	elseif level then&lt;br /&gt;
		return level&lt;br /&gt;
	elseif action == 'upload' then&lt;br /&gt;
		return 'autoconfirmed'&lt;br /&gt;
	elseif action == 'create' 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 'user'&lt;br /&gt;
	else&lt;br /&gt;
		return '*'&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>Bloxgate</name></author>
	</entry>
	<entry>
		<id>https://projectunsc.org/wiki/index.php?title=Module:Effective_protection_expiry&amp;diff=242</id>
		<title>Module:Effective protection expiry</title>
		<link rel="alternate" type="text/html" href="https://projectunsc.org/wiki/index.php?title=Module:Effective_protection_expiry&amp;diff=242"/>
		<updated>2018-08-10T04:16:43Z</updated>

		<summary type="html">&lt;p&gt;Bloxgate: 1 revision imported: Wikipedia Message Boxes&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;local p = {}&lt;br /&gt;
&lt;br /&gt;
-- Returns the expiry of a restriction of an action on a given title, or unknown if it cannot be known.&lt;br /&gt;
-- If no title is specified, the title of the page being displayed is used.&lt;br /&gt;
function p._main(action, pagename)&lt;br /&gt;
	local title&lt;br /&gt;
	if type(pagename) == 'table' and pagename.prefixedText then&lt;br /&gt;
		title = pagename&lt;br /&gt;
	elseif pagename then&lt;br /&gt;
		title = mw.title.new(pagename)&lt;br /&gt;
	else&lt;br /&gt;
		title = mw.title.getCurrentTitle()&lt;br /&gt;
	end&lt;br /&gt;
	pagename = title.prefixedText&lt;br /&gt;
	if action == 'autoreview' then&lt;br /&gt;
		local stabilitySettings = mw.ext.FlaggedRevs.getStabilitySettings(title)&lt;br /&gt;
		return stabilitySettings and stabilitySettings.expiry or 'unknown'&lt;br /&gt;
	elseif action ~= 'edit' and action ~= 'move' and action ~= 'create' and action ~= 'upload' then&lt;br /&gt;
		error( 'First parameter must be one of edit, move, create, upload, autoreview', 2 )&lt;br /&gt;
	end&lt;br /&gt;
	local rawExpiry = mw.getCurrentFrame():callParserFunction('PROTECTIONEXPIRY', action, pagename)&lt;br /&gt;
	if rawExpiry == 'infinity' then&lt;br /&gt;
		return 'infinity'&lt;br /&gt;
	elseif rawExpiry == '' then&lt;br /&gt;
		return 'unknown'&lt;br /&gt;
	else&lt;br /&gt;
		local year, month, day, hour, minute, second = rawExpiry:match(&lt;br /&gt;
			'^(%d%d%d%d)(%d%d)(%d%d)(%d%d)(%d%d)(%d%d)$'&lt;br /&gt;
		)&lt;br /&gt;
		if year then&lt;br /&gt;
			return string.format(&lt;br /&gt;
				'%s-%s-%sT%s:%s:%s',&lt;br /&gt;
				year, month, day, hour, minute, second&lt;br /&gt;
			)&lt;br /&gt;
		else&lt;br /&gt;
			error('internal error in Module:Effective protection expiry; malformed expiry timestamp')&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
setmetatable(p, { __index = function(t, k)&lt;br /&gt;
	return function(frame)&lt;br /&gt;
		return t._main(k, frame.args[1])&lt;br /&gt;
	end&lt;br /&gt;
end })&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>Bloxgate</name></author>
	</entry>
	<entry>
		<id>https://projectunsc.org/wiki/index.php?title=Module:Documentation/config&amp;diff=240</id>
		<title>Module:Documentation/config</title>
		<link rel="alternate" type="text/html" href="https://projectunsc.org/wiki/index.php?title=Module:Documentation/config&amp;diff=240"/>
		<updated>2018-08-10T04:16:43Z</updated>

		<summary type="html">&lt;p&gt;Bloxgate: 1 revision imported: Wikipedia Message Boxes&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['protection-reason-edit']&lt;br /&gt;
-- The protection reason for edit-protected templates to pass to&lt;br /&gt;
-- [[Module:Protection banner]].&lt;br /&gt;
cfg['protection-reason-edit'] = 'template'&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['sandbox-subpage']. 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['sandbox-notice-image']&lt;br /&gt;
-- The image displayed in the sandbox notice.&lt;br /&gt;
cfg['sandbox-notice-image'] = '[[Image:Sandbox.svg|50px|alt=|link=]]'&lt;br /&gt;
&lt;br /&gt;
--[[&lt;br /&gt;
-- cfg['sandbox-notice-pagetype-template']&lt;br /&gt;
-- cfg['sandbox-notice-pagetype-module']&lt;br /&gt;
-- cfg['sandbox-notice-pagetype-other']&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['sandbox-notice-blurb'] or&lt;br /&gt;
-- cfg['sandbox-notice-diff-blurb'].&lt;br /&gt;
--]]&lt;br /&gt;
cfg['sandbox-notice-pagetype-template'] = '[[Wikipedia:Template test cases|template sandbox]] page'&lt;br /&gt;
cfg['sandbox-notice-pagetype-module'] = '[[Wikipedia:Template test cases|module sandbox]] page'&lt;br /&gt;
cfg['sandbox-notice-pagetype-other'] = 'sandbox page'&lt;br /&gt;
&lt;br /&gt;
--[[&lt;br /&gt;
-- cfg['sandbox-notice-blurb']&lt;br /&gt;
-- cfg['sandbox-notice-diff-blurb']&lt;br /&gt;
-- cfg['sandbox-notice-diff-display']&lt;br /&gt;
-- Either cfg['sandbox-notice-blurb'] or cfg['sandbox-notice-diff-blurb'] 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['sandbox-notice-pagetype-template'],&lt;br /&gt;
-- cfg['sandbox-notice-pagetype-module'] or cfg['sandbox-notice-pagetype-other'] 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['sandbox-notice-compare-link-display'].&lt;br /&gt;
--]]&lt;br /&gt;
cfg['sandbox-notice-blurb'] = 'This is the $1 for $2.'&lt;br /&gt;
cfg['sandbox-notice-diff-blurb'] = 'This is the $1 for $2 ($3).'&lt;br /&gt;
cfg['sandbox-notice-compare-link-display'] = 'diff'&lt;br /&gt;
&lt;br /&gt;
--[[&lt;br /&gt;
-- cfg['sandbox-notice-testcases-blurb']&lt;br /&gt;
-- cfg['sandbox-notice-testcases-link-display']&lt;br /&gt;
-- cfg['sandbox-notice-testcases-run-blurb']&lt;br /&gt;
-- cfg['sandbox-notice-testcases-run-link-display']&lt;br /&gt;
-- cfg['sandbox-notice-testcases-blurb'] 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['sandbox-notice-testcases-link-display'] is the display value for that link.&lt;br /&gt;
-- cfg['sandbox-notice-testcases-run-blurb'] 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['sandbox-notice-testcases-run-link-display'] is the display value for the link to run the test&lt;br /&gt;
-- cases.&lt;br /&gt;
--]]&lt;br /&gt;
cfg['sandbox-notice-testcases-blurb'] = 'See also the companion subpage for $1.'&lt;br /&gt;
cfg['sandbox-notice-testcases-link-display'] = 'test cases'&lt;br /&gt;
cfg['sandbox-notice-testcases-run-blurb'] = 'See also the companion subpage for $1 ($2).'&lt;br /&gt;
cfg['sandbox-notice-testcases-run-link-display'] = 'run'&lt;br /&gt;
&lt;br /&gt;
-- cfg['sandbox-category']&lt;br /&gt;
-- A category to add to all template sandboxes.&lt;br /&gt;
cfg['sandbox-category'] = 'Template sandboxes'&lt;br /&gt;
&lt;br /&gt;
----------------------------------------------------------------------------------------------------&lt;br /&gt;
-- Start box configuration&lt;br /&gt;
----------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
-- cfg['documentation-icon-wikitext']&lt;br /&gt;
-- The wikitext for the icon shown at the top of the template.&lt;br /&gt;
cfg['documentation-icon-wikitext'] = '[[File:Test Template Info-Icon - Version (2).svg|50px|link=|alt=]]'&lt;br /&gt;
&lt;br /&gt;
-- cfg['template-namespace-heading']&lt;br /&gt;
-- The heading shown in the template namespace.&lt;br /&gt;
cfg['template-namespace-heading'] = 'Template documentation'&lt;br /&gt;
&lt;br /&gt;
-- cfg['module-namespace-heading']&lt;br /&gt;
-- The heading shown in the module namespace.&lt;br /&gt;
cfg['module-namespace-heading'] = 'Module documentation'&lt;br /&gt;
&lt;br /&gt;
-- cfg['file-namespace-heading']&lt;br /&gt;
-- The heading shown in the file namespace.&lt;br /&gt;
cfg['file-namespace-heading'] = 'Summary'&lt;br /&gt;
&lt;br /&gt;
-- cfg['other-namespaces-heading']&lt;br /&gt;
-- The heading shown in other namespaces.&lt;br /&gt;
cfg['other-namespaces-heading'] = 'Documentation'&lt;br /&gt;
&lt;br /&gt;
-- cfg['view-link-display']&lt;br /&gt;
-- The text to display for &amp;quot;view&amp;quot; links.&lt;br /&gt;
cfg['view-link-display'] = 'view'&lt;br /&gt;
&lt;br /&gt;
-- cfg['edit-link-display']&lt;br /&gt;
-- The text to display for &amp;quot;edit&amp;quot; links.&lt;br /&gt;
cfg['edit-link-display'] = 'edit'&lt;br /&gt;
&lt;br /&gt;
-- cfg['history-link-display']&lt;br /&gt;
-- The text to display for &amp;quot;history&amp;quot; links.&lt;br /&gt;
cfg['history-link-display'] = 'history'&lt;br /&gt;
&lt;br /&gt;
-- cfg['purge-link-display']&lt;br /&gt;
-- The text to display for &amp;quot;purge&amp;quot; links.&lt;br /&gt;
cfg['purge-link-display'] = 'purge'&lt;br /&gt;
&lt;br /&gt;
-- cfg['create-link-display']&lt;br /&gt;
-- The text to display for &amp;quot;create&amp;quot; links.&lt;br /&gt;
cfg['create-link-display'] = 'create'&lt;br /&gt;
&lt;br /&gt;
----------------------------------------------------------------------------------------------------&lt;br /&gt;
-- Link box (end box) configuration&lt;br /&gt;
----------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
-- cfg['transcluded-from-blurb']&lt;br /&gt;
-- Notice displayed when the docs are transcluded from another page. $1 is a wikilink to that page.&lt;br /&gt;
cfg['transcluded-from-blurb'] = 'The above [[Wikipedia:Template documentation|documentation]] is [[Wikipedia:Transclusion|transcluded]] from $1.'&lt;br /&gt;
&lt;br /&gt;
--[[&lt;br /&gt;
-- cfg['create-module-doc-blurb']&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['module-preload'] and the&lt;br /&gt;
-- display cfg['create-link-display'].&lt;br /&gt;
--]]&lt;br /&gt;
cfg['create-module-doc-blurb'] = 'You might want to $1 a documentation page for this [[Wikipedia:Lua|Scribunto module]].'&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['experiment-blurb-template']&lt;br /&gt;
-- cfg['experiment-blurb-module']&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'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['experiment-blurb-template'] and cfg['experiment-blurb-module'], 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['sandbox-link-display'] (cfg['sandbox-edit-link-display'] | cfg['compare-link-display'])&lt;br /&gt;
-- &lt;br /&gt;
-- If the sandbox doesn't exist, it is in the format:&lt;br /&gt;
--&lt;br /&gt;
--     cfg['sandbox-link-display'] (cfg['sandbox-create-link-display'] | cfg['mirror-link-display'])&lt;br /&gt;
-- &lt;br /&gt;
-- The link for cfg['sandbox-create-link-display'] link preloads the page with cfg['template-sandbox-preload']&lt;br /&gt;
-- or cfg['module-sandbox-preload'], depending on the current namespace. The link for cfg['mirror-link-display']&lt;br /&gt;
-- loads a default edit summary of cfg['mirror-edit-summary'].&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['testcases-link-display'] (cfg['testcases-edit-link-display'] | cfg['testcases-run-link-display'])&lt;br /&gt;
--&lt;br /&gt;
-- If the test cases page doesn't exist, it is in the format:&lt;br /&gt;
-- &lt;br /&gt;
--     cfg['testcases-link-display'] (cfg['testcases-create-link-display'])&lt;br /&gt;
--&lt;br /&gt;
-- If the test cases page doesn't exist, the link for cfg['testcases-create-link-display'] preloads the&lt;br /&gt;
-- page with cfg['template-testcases-preload'] or cfg['module-testcases-preload'], depending on the current&lt;br /&gt;
-- namespace.&lt;br /&gt;
--]]&lt;br /&gt;
cfg['experiment-blurb-template'] = &amp;quot;Editors can experiment in this template's $1 and $2 pages.&amp;quot;&lt;br /&gt;
cfg['experiment-blurb-module'] = &amp;quot;Editors can experiment in this module'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['sandbox-subpage']&lt;br /&gt;
-- The name of the template subpage typically used for sandboxes.&lt;br /&gt;
cfg['sandbox-subpage'] = 'sandbox'&lt;br /&gt;
&lt;br /&gt;
-- cfg['template-sandbox-preload']&lt;br /&gt;
-- Preload file for template sandbox pages.&lt;br /&gt;
cfg['template-sandbox-preload'] = 'Template:Documentation/preload-sandbox'&lt;br /&gt;
&lt;br /&gt;
-- cfg['module-sandbox-preload']&lt;br /&gt;
-- Preload file for Lua module sandbox pages.&lt;br /&gt;
cfg['module-sandbox-preload'] = 'Template:Documentation/preload-module-sandbox'&lt;br /&gt;
&lt;br /&gt;
-- cfg['sandbox-link-display']&lt;br /&gt;
-- The text to display for &amp;quot;sandbox&amp;quot; links.&lt;br /&gt;
cfg['sandbox-link-display'] = 'sandbox'&lt;br /&gt;
&lt;br /&gt;
-- cfg['sandbox-edit-link-display']&lt;br /&gt;
-- The text to display for sandbox &amp;quot;edit&amp;quot; links.&lt;br /&gt;
cfg['sandbox-edit-link-display'] = 'edit'&lt;br /&gt;
&lt;br /&gt;
-- cfg['sandbox-create-link-display']&lt;br /&gt;
-- The text to display for sandbox &amp;quot;create&amp;quot; links.&lt;br /&gt;
cfg['sandbox-create-link-display'] = 'create'&lt;br /&gt;
&lt;br /&gt;
-- cfg['compare-link-display']&lt;br /&gt;
-- The text to display for &amp;quot;compare&amp;quot; links.&lt;br /&gt;
cfg['compare-link-display'] = 'diff'&lt;br /&gt;
&lt;br /&gt;
-- cfg['mirror-edit-summary']&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['mirror-edit-summary'] = 'Create sandbox version of $1'&lt;br /&gt;
&lt;br /&gt;
-- cfg['mirror-link-display']&lt;br /&gt;
-- The text to display for &amp;quot;mirror&amp;quot; links.&lt;br /&gt;
cfg['mirror-link-display'] = 'mirror'&lt;br /&gt;
&lt;br /&gt;
-- cfg['mirror-link-preload']&lt;br /&gt;
-- The page to preload when a user clicks the &amp;quot;mirror&amp;quot; link.&lt;br /&gt;
cfg['mirror-link-preload'] = 'Template:Documentation/mirror'&lt;br /&gt;
&lt;br /&gt;
----------------------------------------------------------------------------------------------------&lt;br /&gt;
-- Test cases link configuration&lt;br /&gt;
----------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
-- cfg['testcases-subpage']&lt;br /&gt;
-- The name of the template subpage typically used for test cases.&lt;br /&gt;
cfg['testcases-subpage'] = 'testcases'&lt;br /&gt;
&lt;br /&gt;
-- cfg['template-testcases-preload']&lt;br /&gt;
-- Preload file for template test cases pages.&lt;br /&gt;
cfg['template-testcases-preload'] = 'Template:Documentation/preload-testcases'&lt;br /&gt;
&lt;br /&gt;
-- cfg['module-testcases-preload']&lt;br /&gt;
-- Preload file for Lua module test cases pages.&lt;br /&gt;
cfg['module-testcases-preload'] = 'Template:Documentation/preload-module-testcases'&lt;br /&gt;
&lt;br /&gt;
-- cfg['testcases-link-display']&lt;br /&gt;
-- The text to display for &amp;quot;testcases&amp;quot; links.&lt;br /&gt;
cfg['testcases-link-display'] = 'testcases'&lt;br /&gt;
&lt;br /&gt;
-- cfg['testcases-edit-link-display']&lt;br /&gt;
-- The text to display for test cases &amp;quot;edit&amp;quot; links.&lt;br /&gt;
cfg['testcases-edit-link-display'] = 'edit'&lt;br /&gt;
&lt;br /&gt;
-- cfg['testcases-run-link-display']&lt;br /&gt;
-- The text to display for test cases &amp;quot;run&amp;quot; links.&lt;br /&gt;
cfg['testcases-run-link-display'] = 'run'&lt;br /&gt;
&lt;br /&gt;
-- cfg['testcases-create-link-display']&lt;br /&gt;
-- The text to display for test cases &amp;quot;create&amp;quot; links.&lt;br /&gt;
cfg['testcases-create-link-display'] = 'create'&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['add-categories-blurb']&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['doc-link-display'].&lt;br /&gt;
--]]&lt;br /&gt;
cfg['add-categories-blurb'] = 'Please add categories to the $1 subpage.'&lt;br /&gt;
&lt;br /&gt;
-- cfg['doc-link-display']&lt;br /&gt;
-- The text to display when linking to the /doc subpage.&lt;br /&gt;
cfg['doc-link-display'] = '/doc'&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['subpages-blurb']&lt;br /&gt;
-- The &amp;quot;Subpages of this template&amp;quot; blurb. $1 is a link to the main template's subpages with a&lt;br /&gt;
-- display value of cfg['subpages-link-display']. 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['subpages-blurb'] = '$1.'&lt;br /&gt;
&lt;br /&gt;
--[[&lt;br /&gt;
-- cfg['subpages-link-display']&lt;br /&gt;
-- The text to display for the &amp;quot;subpages of this page&amp;quot; link. $1 is cfg['template-pagetype'],&lt;br /&gt;
-- cfg['module-pagetype'] or cfg['default-pagetype'], 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['subpages-link-display'] = 'Subpages of this $1'&lt;br /&gt;
&lt;br /&gt;
-- cfg['template-pagetype']&lt;br /&gt;
-- The pagetype to display for template pages.&lt;br /&gt;
cfg['template-pagetype'] = 'template'&lt;br /&gt;
&lt;br /&gt;
-- cfg['module-pagetype']&lt;br /&gt;
-- The pagetype to display for Lua module pages.&lt;br /&gt;
cfg['module-pagetype'] = 'module'&lt;br /&gt;
&lt;br /&gt;
-- cfg['default-pagetype']&lt;br /&gt;
-- The pagetype to display for pages other than templates or Lua modules.&lt;br /&gt;
cfg['default-pagetype'] = 'page'&lt;br /&gt;
&lt;br /&gt;
----------------------------------------------------------------------------------------------------&lt;br /&gt;
-- Doc link configuration&lt;br /&gt;
----------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
-- cfg['doc-subpage']&lt;br /&gt;
-- The name of the subpage typically used for documentation pages.&lt;br /&gt;
cfg['doc-subpage'] = 'doc'&lt;br /&gt;
&lt;br /&gt;
-- cfg['file-docpage-preload']&lt;br /&gt;
-- Preload file for documentation page in the file namespace.&lt;br /&gt;
cfg['file-docpage-preload'] = 'Template:Documentation/preload-filespace'&lt;br /&gt;
&lt;br /&gt;
-- cfg['docpage-preload']&lt;br /&gt;
-- Preload file for template documentation pages in all namespaces.&lt;br /&gt;
cfg['docpage-preload'] = 'Template:Documentation/preload'&lt;br /&gt;
&lt;br /&gt;
-- cfg['module-preload']&lt;br /&gt;
-- Preload file for Lua module documentation pages.&lt;br /&gt;
cfg['module-preload'] = 'Template:Documentation/preload-module-doc'&lt;br /&gt;
&lt;br /&gt;
----------------------------------------------------------------------------------------------------&lt;br /&gt;
-- Print version configuration&lt;br /&gt;
----------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
-- cfg['print-subpage']&lt;br /&gt;
-- The name of the template subpage used for print versions.&lt;br /&gt;
cfg['print-subpage'] = 'Print'&lt;br /&gt;
&lt;br /&gt;
-- cfg['print-link-display']&lt;br /&gt;
-- The text to display when linking to the /Print subpage.&lt;br /&gt;
cfg['print-link-display'] = '/Print'&lt;br /&gt;
&lt;br /&gt;
-- cfg['print-blurb']&lt;br /&gt;
-- Text to display if a /Print subpage exists. $1 is a link to the subpage with a display value of cfg['print-link-display'].&lt;br /&gt;
cfg['print-blurb'] = 'A [[Help:Books/for experts#Improving the book layout|print version]] of this template exists at $1.'&lt;br /&gt;
	.. ' If you make a change to this template, please update the print version as well.'&lt;br /&gt;
&lt;br /&gt;
-- cfg['display-print-category']&lt;br /&gt;
-- Set to true to enable output of cfg['print-category'] if a /Print subpage exists.&lt;br /&gt;
-- This should be a boolean value (either true or false).&lt;br /&gt;
cfg['display-print-category'] = true&lt;br /&gt;
&lt;br /&gt;
-- cfg['print-category']&lt;br /&gt;
-- Category to output if cfg['display-print-category'] is set to true, and a /Print subpage exists.&lt;br /&gt;
cfg['print-category'] = 'Templates with print versions'&lt;br /&gt;
&lt;br /&gt;
----------------------------------------------------------------------------------------------------&lt;br /&gt;
-- HTML and CSS configuration&lt;br /&gt;
----------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
-- cfg['main-div-id']&lt;br /&gt;
-- The &amp;quot;id&amp;quot; attribute of the main HTML &amp;quot;div&amp;quot; tag.&lt;br /&gt;
cfg['main-div-id'] = 'template-documentation'&lt;br /&gt;
&lt;br /&gt;
-- cfg['main-div-classes']&lt;br /&gt;
-- The CSS classes added to the main HTML &amp;quot;div&amp;quot; tag.&lt;br /&gt;
cfg['main-div-classes'] = 'template-documentation iezoomfix'&lt;br /&gt;
&lt;br /&gt;
-- cfg['start-box-linkclasses']&lt;br /&gt;
-- The CSS classes used for the [view][edit][history] or [create] links in the start box.&lt;br /&gt;
cfg['start-box-linkclasses'] = 'mw-editsection-like plainlinks'&lt;br /&gt;
&lt;br /&gt;
-- cfg['start-box-link-id']&lt;br /&gt;
-- The HTML &amp;quot;id&amp;quot; attribute for the links in the start box.&lt;br /&gt;
cfg['start-box-link-id'] = 'doc_editlinks'&lt;br /&gt;
&lt;br /&gt;
----------------------------------------------------------------------------------------------------&lt;br /&gt;
-- {{fmbox}} template configuration&lt;br /&gt;
----------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
-- cfg['fmbox-id']&lt;br /&gt;
-- The id sent to the &amp;quot;id&amp;quot; parameter of the {{fmbox}} template.&lt;br /&gt;
cfg['fmbox-id'] = 'documentation-meta-data'&lt;br /&gt;
&lt;br /&gt;
-- cfg['fmbox-style']&lt;br /&gt;
-- The value sent to the style parameter of {{fmbox}}.&lt;br /&gt;
cfg['fmbox-style'] = 'background-color: #ecfcf4'&lt;br /&gt;
&lt;br /&gt;
-- cfg['fmbox-textstyle']&lt;br /&gt;
-- The value sent to the &amp;quot;textstyle parameter of {{fmbox}}.&lt;br /&gt;
cfg['fmbox-textstyle'] = 'font-style: italic'&lt;br /&gt;
&lt;br /&gt;
----------------------------------------------------------------------------------------------------&lt;br /&gt;
-- Tracking category configuration&lt;br /&gt;
----------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
-- cfg['display-strange-usage-category']&lt;br /&gt;
-- Set to true to enable output of cfg['strange-usage-category'] 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['display-strange-usage-category'] = true&lt;br /&gt;
&lt;br /&gt;
-- cfg['strange-usage-category']&lt;br /&gt;
-- Category to output if cfg['display-strange-usage-category'] is set to true and the module is used on a&lt;br /&gt;
-- /doc subpage or a /testcases subpage.&lt;br /&gt;
cfg['strange-usage-category'] = 'Wikipedia pages with strange ((documentation)) usage'&lt;br /&gt;
&lt;br /&gt;
--[[&lt;br /&gt;
----------------------------------------------------------------------------------------------------&lt;br /&gt;
-- End configuration&lt;br /&gt;
--&lt;br /&gt;
-- Don'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>Bloxgate</name></author>
	</entry>
	<entry>
		<id>https://projectunsc.org/wiki/index.php?title=Module:Documentation&amp;diff=238</id>
		<title>Module:Documentation</title>
		<link rel="alternate" type="text/html" href="https://projectunsc.org/wiki/index.php?title=Module:Documentation&amp;diff=238"/>
		<updated>2018-08-10T04:16:43Z</updated>

		<summary type="html">&lt;p&gt;Bloxgate: 1 revision imported: Wikipedia Message Boxes&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('Module:Arguments').getArgs&lt;br /&gt;
local messageBox = require('Module:Message box')&lt;br /&gt;
&lt;br /&gt;
-- Get the config table.&lt;br /&gt;
local cfg = mw.loadData('Module:Documentation/config')&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 'string'.&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 'Foo $2 bar $1.',&lt;br /&gt;
	-- message('foo-message', {'baz', 'qux'}) 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 'string'&lt;br /&gt;
	if type(msg) ~= expectType then&lt;br /&gt;
		error('message: type error in message cfg.' .. cfgKey .. ' (' .. expectType .. ' expected, got ' .. type(msg) .. ')', 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('message: no value found for key $' .. match .. ' in message cfg.' .. cfgKey, 4)&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local ret = ugsub(msg, '$([1-9][0-9]*)', getMessageVal)&lt;br /&gt;
	return ret&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('[[%s|%s]]', page, display)&lt;br /&gt;
	else&lt;br /&gt;
		return mw.ustring.format('[[%s]]', 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 .. ':' .. 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('[%s %s]', 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('#', ...)&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;
	return '&amp;lt;small style=&amp;quot;font-style: normal;&amp;quot;&amp;gt;(' .. table.concat(ret, ' &amp;amp;#124; ') .. ')&amp;lt;/small&amp;gt;'&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) == 'string' then&lt;br /&gt;
					value = value:match('^%s*(.-)%s*$') -- Remove whitespace.&lt;br /&gt;
					if key == 'heading' or value ~= '' then&lt;br /&gt;
						return value&lt;br /&gt;
					else&lt;br /&gt;
						return nil&lt;br /&gt;
					end&lt;br /&gt;
				else&lt;br /&gt;
					return value&lt;br /&gt;
				end&lt;br /&gt;
			end&lt;br /&gt;
		})&lt;br /&gt;
		return p[funcName](args)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
-- Main function&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
p.main = makeInvokeFunc('_main')&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;
	-- Messages:&lt;br /&gt;
	-- 'main-div-id' --&amp;gt; 'template-documentation'&lt;br /&gt;
	-- 'main-div-classes' --&amp;gt; 'template-documentation iezoomfix'&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.protectionTemplate(env))&lt;br /&gt;
		:wikitext(p.sandboxNotice(args, env))&lt;br /&gt;
		 -- This div tag is from {{documentation/start box}}, but moving it here&lt;br /&gt;
		 -- so that we don't have to worry about unclosed tags.&lt;br /&gt;
		:tag('div')&lt;br /&gt;
			:attr('id', message('main-div-id'))&lt;br /&gt;
			:addClass(message('main-div-classes'))&lt;br /&gt;
			:newline()&lt;br /&gt;
			:wikitext(p._startBox(args, env))&lt;br /&gt;
			:wikitext(p._content(args, env))&lt;br /&gt;
			:tag('div')&lt;br /&gt;
				:css('clear', 'both') -- So right or left floating items don't stick out of the doc box.&lt;br /&gt;
				:newline()&lt;br /&gt;
				:done()&lt;br /&gt;
			:done()&lt;br /&gt;
		:wikitext(p._endBox(args, env))&lt;br /&gt;
		:wikitext(p.addTrackingCategories(env))&lt;br /&gt;
	return 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 objects and other namespace- or&lt;br /&gt;
	-- 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;
	-- env.printTitle - the print version of the template, located at the /Print 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'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't call any of the functions&lt;br /&gt;
	-- more than once. (Nils won'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;
		-- 'sandbox-subpage' --&amp;gt; 'sandbox'&lt;br /&gt;
		-- 'testcases-subpage' --&amp;gt; 'testcases'&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('sandbox-subpage') or subpage == message('testcases-subpage') 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;
		-- 'doc-subpage' --&amp;gt; 'doc'&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 .. '/' .. message('doc-subpage')&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;
		-- 'sandbox-subpage' --&amp;gt; 'sandbox'&lt;br /&gt;
		--]]&lt;br /&gt;
		return mw.title.new(env.docpageBase .. '/' .. message('sandbox-subpage'))&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;
		-- 'testcases-subpage' --&amp;gt; 'testcases'&lt;br /&gt;
		--]]&lt;br /&gt;
		return mw.title.new(env.docpageBase .. '/' .. message('testcases-subpage'))&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	function envFuncs.printTitle()&lt;br /&gt;
		--[[&lt;br /&gt;
		-- Title object for the /Print subpage.&lt;br /&gt;
		-- Messages:&lt;br /&gt;
		-- 'print-subpage' --&amp;gt; 'Print'&lt;br /&gt;
		--]]&lt;br /&gt;
		return env.templateTitle:subPageTitle(message('print-subpage'))&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 same as the&lt;br /&gt;
		-- subject namespace. However, pages in the Article, File, MediaWiki or Category&lt;br /&gt;
		-- namespaces must have their /doc, /sandbox and /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 .. ':' .. 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;
				'Special:ComparePages',&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;
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;
	-- 'sandbox-notice-image' --&amp;gt; '[[Image:Sandbox.svg|50px|alt=|link=]]'&lt;br /&gt;
	-- 'sandbox-notice-blurb' --&amp;gt; 'This is the $1 for $2.'&lt;br /&gt;
	-- 'sandbox-notice-diff-blurb' --&amp;gt; 'This is the $1 for $2 ($3).'&lt;br /&gt;
	-- 'sandbox-notice-pagetype-template' --&amp;gt; '[[Wikipedia:Template test cases|template sandbox]] page'&lt;br /&gt;
	-- 'sandbox-notice-pagetype-module' --&amp;gt; '[[Wikipedia:Template test cases|module sandbox]] page'&lt;br /&gt;
	-- 'sandbox-notice-pagetype-other' --&amp;gt; 'sandbox page'&lt;br /&gt;
	-- 'sandbox-notice-compare-link-display' --&amp;gt; 'diff'&lt;br /&gt;
	-- 'sandbox-notice-testcases-blurb' --&amp;gt; 'See also the companion subpage for $1.'&lt;br /&gt;
	-- 'sandbox-notice-testcases-link-display' --&amp;gt; 'test cases'&lt;br /&gt;
	-- 'sandbox-category' --&amp;gt; 'Template sandboxes'&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 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('sandbox-notice-image')&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 = ''&lt;br /&gt;
	local pagetype&lt;br /&gt;
	if subjectSpace == 10 then&lt;br /&gt;
		pagetype = message('sandbox-notice-pagetype-template')&lt;br /&gt;
	elseif subjectSpace == 828 then&lt;br /&gt;
		pagetype = message('sandbox-notice-pagetype-module')&lt;br /&gt;
	else&lt;br /&gt;
		pagetype = message('sandbox-notice-pagetype-other')&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('sandbox-notice-compare-link-display')&lt;br /&gt;
		local compareLink = makeUrlLink(compareUrl, compareDisplay)&lt;br /&gt;
		text = text .. message('sandbox-notice-diff-blurb', {pagetype, templateLink, compareLink})&lt;br /&gt;
	else&lt;br /&gt;
		text = text .. message('sandbox-notice-blurb', {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.namespace == mw.site.namespaces.Module.id then&lt;br /&gt;
			local testcasesLinkDisplay = message('sandbox-notice-testcases-link-display')&lt;br /&gt;
			local testcasesRunLinkDisplay = message('sandbox-notice-testcases-run-link-display')&lt;br /&gt;
			local testcasesLink = makeWikilink(testcasesTitle.prefixedText, testcasesLinkDisplay)&lt;br /&gt;
			local testcasesRunLink = makeWikilink(testcasesTitle.talkPageTitle.prefixedText, testcasesRunLinkDisplay)&lt;br /&gt;
			text = text .. '&amp;lt;br /&amp;gt;' .. message('sandbox-notice-testcases-run-blurb', {testcasesLink, testcasesRunLink})&lt;br /&gt;
		else&lt;br /&gt;
			local testcasesLinkDisplay = message('sandbox-notice-testcases-link-display')&lt;br /&gt;
			local testcasesLink = makeWikilink(testcasesTitle.prefixedText, testcasesLinkDisplay)&lt;br /&gt;
			text = text .. '&amp;lt;br /&amp;gt;' .. message('sandbox-notice-testcases-blurb', {testcasesLink})&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	-- Add the sandbox to the sandbox category.&lt;br /&gt;
	text = text .. makeCategoryLink(message('sandbox-category'))&lt;br /&gt;
	omargs.text = text&lt;br /&gt;
	local ret = '&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;'&lt;br /&gt;
	ret = ret .. messageBox.main('ombox', omargs)&lt;br /&gt;
	return ret&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;
	-- 'protection-template' --&amp;gt; 'pp-template'&lt;br /&gt;
	-- 'protection-template-args' --&amp;gt; {docusage = 'yes'}&lt;br /&gt;
	local protectionLevels, mProtectionBanner&lt;br /&gt;
	local title = env.title&lt;br /&gt;
	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;
		mProtectionBanner = require('Module:Protection banner')&lt;br /&gt;
		local reason = message('protection-reason-edit')&lt;br /&gt;
		return mProtectionBanner._main{reason, small = true}&lt;br /&gt;
	elseif moveProt and moveProt ~= 'autoconfirmed' 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;
		mProtectionBanner = require('Module:Protection banner')&lt;br /&gt;
		return mProtectionBanner._main{action = 'move', small = true}&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('_startBox')&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 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;
	-- 'view-link-display' --&amp;gt; 'view'&lt;br /&gt;
	-- 'edit-link-display' --&amp;gt; 'edit'&lt;br /&gt;
	-- 'history-link-display' --&amp;gt; 'history'&lt;br /&gt;
	-- 'purge-link-display' --&amp;gt; 'purge'&lt;br /&gt;
	-- 'file-docpage-preload' --&amp;gt; 'Template:Documentation/preload-filespace'&lt;br /&gt;
	-- 'module-preload' --&amp;gt; 'Template:Documentation/preload-module-doc'&lt;br /&gt;
	-- 'docpage-preload' --&amp;gt; 'Template:Documentation/preload'&lt;br /&gt;
	-- 'create-link-display' --&amp;gt; 'create'&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;
&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('view-link-display')&lt;br /&gt;
	data.editLinkDisplay = message('edit-link-display')&lt;br /&gt;
	data.historyLinkDisplay = message('history-link-display')&lt;br /&gt;
	data.purgeLinkDisplay = message('purge-link-display')&lt;br /&gt;
	-- Create link if /doc doesn'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('file-docpage-preload')&lt;br /&gt;
		elseif subjectSpace == 828 then -- Module namespace&lt;br /&gt;
			preload = message('module-preload')&lt;br /&gt;
		else&lt;br /&gt;
			preload = message('docpage-preload')&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	data.preload = preload&lt;br /&gt;
	data.createLinkDisplay = message('create-link-display')&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('%[', '&amp;amp;#91;') -- Replace square brackets with HTML entities.&lt;br /&gt;
		s = s:gsub('%]', '&amp;amp;#93;')&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 = 'edit'}, data.editLinkDisplay)&lt;br /&gt;
		local historyLink = makeUrlLink(docTitle:fullUrl{action = 'history'}, data.historyLinkDisplay)&lt;br /&gt;
		local purgeLink = makeUrlLink(title:fullUrl{action = 'purge'}, data.purgeLinkDisplay)&lt;br /&gt;
		ret = '[%s] [%s] [%s] [%s]'&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 = 'edit', preload = data.preload}, data.createLinkDisplay)&lt;br /&gt;
		ret = '[%s]'&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's an error.&lt;br /&gt;
	--&lt;br /&gt;
	-- Messages:&lt;br /&gt;
	-- 'documentation-icon-wikitext' --&amp;gt; '[[File:Test Template Info-Icon - Version (2).svg|50px|link=|alt=]]'&lt;br /&gt;
	-- 'template-namespace-heading' --&amp;gt; 'Template documentation'&lt;br /&gt;
	-- 'module-namespace-heading' --&amp;gt; 'Module documentation'&lt;br /&gt;
	-- 'file-namespace-heading' --&amp;gt; 'Summary'&lt;br /&gt;
	-- 'other-namespaces-heading' --&amp;gt; 'Documentation'&lt;br /&gt;
	-- 'start-box-linkclasses' --&amp;gt; 'mw-editsection-like plainlinks'&lt;br /&gt;
	-- 'start-box-link-id' --&amp;gt; 'doc_editlinks'&lt;br /&gt;
	-- 'testcases-create-link-display' --&amp;gt; 'create'&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 == '' then&lt;br /&gt;
		-- Don'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('documentation-icon-wikitext') .. ' ' .. message('template-namespace-heading')&lt;br /&gt;
	elseif subjectSpace == 828 then -- Module namespace&lt;br /&gt;
		data.heading = message('documentation-icon-wikitext') .. ' ' .. message('module-namespace-heading')&lt;br /&gt;
	elseif subjectSpace == 6 then -- File namespace&lt;br /&gt;
		data.heading = message('file-namespace-heading')&lt;br /&gt;
	else&lt;br /&gt;
		data.heading = message('other-namespaces-heading')&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	-- Heading CSS&lt;br /&gt;
	local headingStyle = args['heading-style']&lt;br /&gt;
	if headingStyle then&lt;br /&gt;
		data.headingStyleText = headingStyle&lt;br /&gt;
	elseif subjectSpace == 10 then&lt;br /&gt;
		-- We are in the template or template talk namespaces.&lt;br /&gt;
		data.headingFontWeight = 'bold'&lt;br /&gt;
		data.headingFontSize = '125%'&lt;br /&gt;
	else&lt;br /&gt;
		data.headingFontSize = '150%'&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;
		data.linksClass = message('start-box-linkclasses')&lt;br /&gt;
		data.linksId = message('start-box-link-id')&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('div')&lt;br /&gt;
	sbox&lt;br /&gt;
		:css('padding-bottom', '3px')&lt;br /&gt;
		:css('border-bottom', '1px solid #aaa')&lt;br /&gt;
		:css('margin-bottom', '1ex')&lt;br /&gt;
		:newline()&lt;br /&gt;
		:tag('span')&lt;br /&gt;
			:cssText(data.headingStyleText)&lt;br /&gt;
			:css('font-weight', data.headingFontWeight)&lt;br /&gt;
			:css('font-size', data.headingFontSize)&lt;br /&gt;
			:wikitext(data.heading)&lt;br /&gt;
	local links = data.links&lt;br /&gt;
	if links then&lt;br /&gt;
		sbox:tag('span')&lt;br /&gt;
			:addClass(data.linksClass)&lt;br /&gt;
			:attr('id', 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('_content')&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 '\n' .. (content or '') .. '\n' &lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
p.contentTitle = makeInvokeFunc('_contentTitle')&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 ''&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('_endBox')&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;
	-- Messages:&lt;br /&gt;
	-- 'fmbox-id' --&amp;gt; 'documentation-meta-data'&lt;br /&gt;
	-- 'fmbox-style' --&amp;gt; 'background-color: #ecfcf4'&lt;br /&gt;
	-- 'fmbox-textstyle' --&amp;gt; 'font-style: italic'&lt;br /&gt;
	-- &lt;br /&gt;
	-- The HTML is generated by the {{fmbox}} template, courtesy of [[Module:Message box]].&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['link box']&lt;br /&gt;
	if linkBox == 'off'&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 arguments for {{fmbox}}.&lt;br /&gt;
	local fmargs = {}&lt;br /&gt;
	fmargs.id = message('fmbox-id') -- Sets 'documentation-meta-data'&lt;br /&gt;
	fmargs.image = 'none'&lt;br /&gt;
	fmargs.style = message('fmbox-style') -- Sets 'background-color: #ecfcf4'&lt;br /&gt;
	fmargs.textstyle = message('fmbox-textstyle') -- 'font-style: italic;'&lt;br /&gt;
&lt;br /&gt;
	-- Assemble the fmbox text field.&lt;br /&gt;
	local text = ''&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 '') -- &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's sandbox and testcases pages.&amp;quot;&lt;br /&gt;
			text = text .. (p.makeExperimentBlurb(args, env) or '')&lt;br /&gt;
			text = text .. '&amp;lt;br /&amp;gt;'&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'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 '')&lt;br /&gt;
			end&lt;br /&gt;
			text = text .. ' ' .. (p.makeSubpagesBlurb(args, env) or '') --&amp;quot;Subpages of this template&amp;quot;&lt;br /&gt;
			local printBlurb = p.makePrintBlurb(args, env) -- Two-line blurb about print versions of templates.&lt;br /&gt;
			if printBlurb then&lt;br /&gt;
				text = text .. '&amp;lt;br /&amp;gt;' .. printBlurb&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	fmargs.text = text&lt;br /&gt;
&lt;br /&gt;
	return messageBox.main('fmbox', fmargs)&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;
	-- 'edit-link-display' --&amp;gt; 'edit'&lt;br /&gt;
	-- 'history-link-display' --&amp;gt; 'history'&lt;br /&gt;
	-- 'transcluded-from-blurb' --&amp;gt; &lt;br /&gt;
	-- 'The above [[Wikipedia:Template documentation|documentation]] &lt;br /&gt;
	-- is [[Wikipedia:Transclusion|transcluded]] from $1.'&lt;br /&gt;
	-- 'module-preload' --&amp;gt; 'Template:Documentation/preload-module-doc'&lt;br /&gt;
	-- 'create-link-display' --&amp;gt; 'create'&lt;br /&gt;
	-- 'create-module-doc-blurb' --&amp;gt;&lt;br /&gt;
	-- 'You might want to $1 a documentation page for this [[Wikipedia:Lua|Scribunto module]].'&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 = 'edit'}&lt;br /&gt;
		local editDisplay = message('edit-link-display')&lt;br /&gt;
		local editLink = makeUrlLink(editUrl, editDisplay)&lt;br /&gt;
		local historyUrl = docTitle:fullUrl{action = 'history'}&lt;br /&gt;
		local historyDisplay = message('history-link-display')&lt;br /&gt;
		local historyLink = makeUrlLink(historyUrl, historyDisplay)&lt;br /&gt;
		ret = message('transcluded-from-blurb', {docLink})&lt;br /&gt;
			.. ' '&lt;br /&gt;
			.. makeToolbar(editLink, historyLink)&lt;br /&gt;
			.. '&amp;lt;br /&amp;gt;'&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 = 'edit', preload = message('module-preload')}&lt;br /&gt;
		local createDisplay = message('create-link-display')&lt;br /&gt;
		local createLink = makeUrlLink(createUrl, createDisplay)&lt;br /&gt;
		ret = message('create-module-doc-blurb', {createLink})&lt;br /&gt;
			.. '&amp;lt;br /&amp;gt;'&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'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;
	-- 'sandbox-link-display' --&amp;gt; 'sandbox'&lt;br /&gt;
	-- 'sandbox-edit-link-display' --&amp;gt; 'edit'&lt;br /&gt;
	-- 'compare-link-display' --&amp;gt; 'diff'&lt;br /&gt;
	-- 'module-sandbox-preload' --&amp;gt; 'Template:Documentation/preload-module-sandbox'&lt;br /&gt;
	-- 'template-sandbox-preload' --&amp;gt; 'Template:Documentation/preload-sandbox'&lt;br /&gt;
	-- 'sandbox-create-link-display' --&amp;gt; 'create'&lt;br /&gt;
	-- 'mirror-edit-summary' --&amp;gt; 'Create sandbox version of $1'&lt;br /&gt;
	-- 'mirror-link-display' --&amp;gt; 'mirror'&lt;br /&gt;
	-- 'mirror-link-preload' --&amp;gt; 'Template:Documentation/mirror'&lt;br /&gt;
	-- 'sandbox-link-display' --&amp;gt; 'sandbox'&lt;br /&gt;
	-- 'testcases-link-display' --&amp;gt; 'testcases'&lt;br /&gt;
	-- 'testcases-edit-link-display'--&amp;gt; 'edit'&lt;br /&gt;
	-- 'template-sandbox-preload' --&amp;gt; 'Template:Documentation/preload-sandbox'&lt;br /&gt;
	-- 'testcases-create-link-display' --&amp;gt; 'create'&lt;br /&gt;
	-- 'testcases-link-display' --&amp;gt; 'testcases'&lt;br /&gt;
	-- 'testcases-edit-link-display' --&amp;gt; 'edit'&lt;br /&gt;
	-- 'module-testcases-preload' --&amp;gt; 'Template:Documentation/preload-module-testcases'&lt;br /&gt;
	-- 'template-testcases-preload' --&amp;gt; 'Template:Documentation/preload-testcases'&lt;br /&gt;
	-- 'experiment-blurb-module' --&amp;gt; 'Editors can experiment in this module's $1 and $2 pages.'&lt;br /&gt;
	-- 'experiment-blurb-template' --&amp;gt; 'Editors can experiment in this template's $1 and $2 pages.'&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('sandbox-link-display')&lt;br /&gt;
		local sandboxLink = makeWikilink(sandboxPage, sandboxDisplay)&lt;br /&gt;
		local sandboxEditUrl = sandboxTitle:fullUrl{action = 'edit'}&lt;br /&gt;
		local sandboxEditDisplay = message('sandbox-edit-link-display')&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('compare-link-display')&lt;br /&gt;
			compareLink = makeUrlLink(compareUrl, compareDisplay)&lt;br /&gt;
		end&lt;br /&gt;
		sandboxLinks = sandboxLink .. ' ' .. makeToolbar(sandboxEditLink, compareLink)&lt;br /&gt;
	else&lt;br /&gt;
		local sandboxPreload&lt;br /&gt;
		if subjectSpace == 828 then&lt;br /&gt;
			sandboxPreload = message('module-sandbox-preload')&lt;br /&gt;
		else&lt;br /&gt;
			sandboxPreload = message('template-sandbox-preload')&lt;br /&gt;
		end&lt;br /&gt;
		local sandboxCreateUrl = sandboxTitle:fullUrl{action = 'edit', preload = sandboxPreload}&lt;br /&gt;
		local sandboxCreateDisplay = message('sandbox-create-link-display')&lt;br /&gt;
		local sandboxCreateLink = makeUrlLink(sandboxCreateUrl, sandboxCreateDisplay)&lt;br /&gt;
		local mirrorSummary = message('mirror-edit-summary', {makeWikilink(templatePage)})&lt;br /&gt;
		local mirrorPreload = message('mirror-link-preload')&lt;br /&gt;
		local mirrorUrl = sandboxTitle:fullUrl{action = 'edit', preload = mirrorPreload, summary = mirrorSummary}&lt;br /&gt;
		if subjectSpace == 828 then&lt;br /&gt;
			mirrorUrl = sandboxTitle:fullUrl{action = 'edit', preload = templateTitle.prefixedText, summary = mirrorSummary}&lt;br /&gt;
		end&lt;br /&gt;
		local mirrorDisplay = message('mirror-link-display')&lt;br /&gt;
		local mirrorLink = makeUrlLink(mirrorUrl, mirrorDisplay)&lt;br /&gt;
		sandboxLinks = message('sandbox-link-display') .. ' ' .. 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('testcases-link-display')&lt;br /&gt;
		local testcasesLink = makeWikilink(testcasesPage, testcasesDisplay)&lt;br /&gt;
		local testcasesEditUrl = testcasesTitle:fullUrl{action = 'edit'}&lt;br /&gt;
		local testcasesEditDisplay = message('testcases-edit-link-display')&lt;br /&gt;
		local testcasesEditLink = makeUrlLink(testcasesEditUrl, testcasesEditDisplay)&lt;br /&gt;
		-- for Modules, add testcases run link if exists&lt;br /&gt;
		if subjectSpace == 828 and testcasesTitle.talkPageTitle and testcasesTitle.talkPageTitle.exists then&lt;br /&gt;
			local testcasesRunLinkDisplay = message('testcases-run-link-display')&lt;br /&gt;
			local testcasesRunLink = makeWikilink(testcasesTitle.talkPageTitle.prefixedText, testcasesRunLinkDisplay)&lt;br /&gt;
			testcasesLinks = testcasesLink .. ' ' .. makeToolbar(testcasesEditLink, testcasesRunLink)&lt;br /&gt;
		else&lt;br /&gt;
			testcasesLinks = testcasesLink .. ' ' .. 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('module-testcases-preload')&lt;br /&gt;
		else&lt;br /&gt;
			testcasesPreload = message('template-testcases-preload')&lt;br /&gt;
		end&lt;br /&gt;
		local testcasesCreateUrl = testcasesTitle:fullUrl{action = 'edit', preload = testcasesPreload}&lt;br /&gt;
		local testcasesCreateDisplay = message('testcases-create-link-display')&lt;br /&gt;
		local testcasesCreateLink = makeUrlLink(testcasesCreateUrl, testcasesCreateDisplay)&lt;br /&gt;
		testcasesLinks = message('testcases-link-display') .. ' ' .. makeToolbar(testcasesCreateLink)&lt;br /&gt;
	end&lt;br /&gt;
	local messageName&lt;br /&gt;
	if subjectSpace == 828 then&lt;br /&gt;
		messageName = 'experiment-blurb-module'&lt;br /&gt;
	else&lt;br /&gt;
		messageName = 'experiment-blurb-template'&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;
	-- 'doc-link-display' --&amp;gt; '/doc'&lt;br /&gt;
	-- 'add-categories-blurb' --&amp;gt; 'Please add categories to the $1 subpage.'&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('doc-link-display'))&lt;br /&gt;
	return message('add-categories-blurb', {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;
	-- 'template-pagetype' --&amp;gt; 'template'&lt;br /&gt;
	-- 'module-pagetype' --&amp;gt; 'module'&lt;br /&gt;
	-- 'default-pagetype' --&amp;gt; 'page'&lt;br /&gt;
	-- 'subpages-link-display' --&amp;gt; 'Subpages of this $1'&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('template-pagetype')&lt;br /&gt;
	elseif subjectSpace == 828 then&lt;br /&gt;
		pagetype = message('module-pagetype')&lt;br /&gt;
	else&lt;br /&gt;
		pagetype = message('default-pagetype')&lt;br /&gt;
	end&lt;br /&gt;
	local subpagesLink = makeWikilink(&lt;br /&gt;
		'Special:PrefixIndex/' .. templateTitle.prefixedText .. '/',&lt;br /&gt;
		message('subpages-link-display', {pagetype})&lt;br /&gt;
	)&lt;br /&gt;
	return message('subpages-blurb', {subpagesLink})&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.makePrintBlurb(args, env)&lt;br /&gt;
	--[=[&lt;br /&gt;
	-- Generates the blurb displayed when there is a print version of the template available.&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;
	-- 'print-link-display' --&amp;gt; '/Print'&lt;br /&gt;
	-- 'print-blurb' --&amp;gt; 'A [[Help:Books/for experts#Improving the book layout|print version]]'&lt;br /&gt;
	--		.. ' of this template exists at $1.'&lt;br /&gt;
	--		.. ' If you make a change to this template, please update the print version as well.'&lt;br /&gt;
	-- 'display-print-category' --&amp;gt; true&lt;br /&gt;
	-- 'print-category' --&amp;gt; 'Templates with print versions'&lt;br /&gt;
	--]=]&lt;br /&gt;
	local printTitle = env.printTitle&lt;br /&gt;
	if not printTitle then&lt;br /&gt;
		return nil&lt;br /&gt;
	end&lt;br /&gt;
	local ret&lt;br /&gt;
	if printTitle.exists then&lt;br /&gt;
		local printLink = makeWikilink(printTitle.prefixedText, message('print-link-display'))&lt;br /&gt;
		ret = message('print-blurb', {printLink})&lt;br /&gt;
		local displayPrintCategory = message('display-print-category', nil, 'boolean')&lt;br /&gt;
		if displayPrintCategory then&lt;br /&gt;
			ret = ret .. makeCategoryLink(message('print-category'))&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return ret&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
----------------------------------------------------------------------------&lt;br /&gt;
-- 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;
	-- 'display-strange-usage-category' --&amp;gt; true&lt;br /&gt;
	-- 'doc-subpage' --&amp;gt; 'doc'&lt;br /&gt;
	-- 'testcases-subpage' --&amp;gt; 'testcases'&lt;br /&gt;
	-- 'strange-usage-category' --&amp;gt; 'Wikipedia pages with strange ((documentation)) usage'&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 = ''&lt;br /&gt;
	if message('display-strange-usage-category', nil, 'boolean')&lt;br /&gt;
		and (&lt;br /&gt;
			subpage == message('doc-subpage')&lt;br /&gt;
			or subjectSpace ~= 828 and subpage == message('testcases-subpage')&lt;br /&gt;
		)&lt;br /&gt;
	then&lt;br /&gt;
		ret = ret .. makeCategoryLink(message('strange-usage-category'))&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>Bloxgate</name></author>
	</entry>
	<entry>
		<id>https://projectunsc.org/wiki/index.php?title=Module:Arguments&amp;diff=236</id>
		<title>Module:Arguments</title>
		<link rel="alternate" type="text/html" href="https://projectunsc.org/wiki/index.php?title=Module:Arguments&amp;diff=236"/>
		<updated>2018-08-10T04:16:42Z</updated>

		<summary type="html">&lt;p&gt;Bloxgate: 1 revision imported: Wikipedia Message Boxes&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('libraryUtil')&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'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) == 'string' then&lt;br /&gt;
		val = val:match('^%s*(.-)%s*$')&lt;br /&gt;
		if val == '' 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) == 'string' then&lt;br /&gt;
		return val:match('^%s*(.-)%s*$')&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) == 'string' then&lt;br /&gt;
		if val:find('%S') 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 == 'string' or tp == 'number') 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('getArgs', 1, frame, 'table', true)&lt;br /&gt;
	checkType('getArgs', 2, options, 'table', 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's availability. If we weren'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) == 'table' and type(frame.getParent) == 'function' 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'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('/sandbox$', '')&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) == 'table' 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'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'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) ~= 'function' then&lt;br /&gt;
			error(&lt;br /&gt;
				&amp;quot;bad value assigned to option 'valueFunc'&amp;quot;&lt;br /&gt;
					.. '(function expected, got '&lt;br /&gt;
					.. type(tidyVal)&lt;br /&gt;
					.. ')',&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 's' (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] ~= 'h' then&lt;br /&gt;
					local tidiedVal = tidyVal(key, val)&lt;br /&gt;
					if tidiedVal == nil then&lt;br /&gt;
						nilArgs[key] = 's'&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) == 'string' 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] = 'h'&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) == 'string' 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;
				'could not write to argument table key &amp;quot;'&lt;br /&gt;
					.. tostring(key)&lt;br /&gt;
					.. '&amp;quot;; the table is read-only',&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;
				'could not write to argument table key &amp;quot;'&lt;br /&gt;
					.. tostring(key)&lt;br /&gt;
					.. '&amp;quot;; overwriting existing arguments is not permitted',&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'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] = 'h'&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) ~= 'string' 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'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>Bloxgate</name></author>
	</entry>
	<entry>
		<id>https://projectunsc.org/wiki/index.php?title=Module:Yesno&amp;diff=216</id>
		<title>Module:Yesno</title>
		<link rel="alternate" type="text/html" href="https://projectunsc.org/wiki/index.php?title=Module:Yesno&amp;diff=216"/>
		<updated>2018-08-10T04:16:41Z</updated>

		<summary type="html">&lt;p&gt;Bloxgate: 1 revision imported: Wikipedia Message Boxes&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;-- Function allowing for consistent treatment of boolean-like wikitext input.&lt;br /&gt;
-- It works similarly to the template {{yesno}}.&lt;br /&gt;
&lt;br /&gt;
return function (val, default)&lt;br /&gt;
	-- If your wiki uses non-ascii characters for any of &amp;quot;yes&amp;quot;, &amp;quot;no&amp;quot;, etc., you&lt;br /&gt;
	-- should replace &amp;quot;val:lower()&amp;quot; with &amp;quot;mw.ustring.lower(val)&amp;quot; in the&lt;br /&gt;
	-- following line.&lt;br /&gt;
	val = type(val) == 'string' and val:lower() or val&lt;br /&gt;
	if val == nil then&lt;br /&gt;
		return nil&lt;br /&gt;
	elseif val == true &lt;br /&gt;
		or val == 'yes'&lt;br /&gt;
		or val == 'y'&lt;br /&gt;
		or val == 'true'&lt;br /&gt;
		or val == 't'&lt;br /&gt;
		or val == 'on'&lt;br /&gt;
		or tonumber(val) == 1&lt;br /&gt;
	then&lt;br /&gt;
		return true&lt;br /&gt;
	elseif val == false&lt;br /&gt;
		or val == 'no'&lt;br /&gt;
		or val == 'n'&lt;br /&gt;
		or val == 'false'&lt;br /&gt;
		or val == 'f'&lt;br /&gt;
		or val == 'off'&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>Bloxgate</name></author>
	</entry>
</feed>