<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://stockhub.co/index.php?action=history&amp;feed=atom&amp;title=Module%3ASanctions%2Fsandbox2</id>
	<title>Module:Sanctions/sandbox2 - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://stockhub.co/index.php?action=history&amp;feed=atom&amp;title=Module%3ASanctions%2Fsandbox2"/>
	<link rel="alternate" type="text/html" href="https://stockhub.co/index.php?title=Module:Sanctions/sandbox2&amp;action=history"/>
	<updated>2026-05-24T01:01:18Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.5</generator>
	<entry>
		<id>https://stockhub.co/index.php?title=Module:Sanctions/sandbox2&amp;diff=144978&amp;oldid=prev</id>
		<title>imported&gt;ProcrastinatingReader: fix</title>
		<link rel="alternate" type="text/html" href="https://stockhub.co/index.php?title=Module:Sanctions/sandbox2&amp;diff=144978&amp;oldid=prev"/>
		<updated>2021-01-02T19:09:09Z</updated>

		<summary type="html">&lt;p&gt;fix&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;local getArgs = require(&amp;#039;Module:Arguments&amp;#039;).getArgs&lt;br /&gt;
local yesno = require(&amp;#039;Module:Yesno&amp;#039;)&lt;br /&gt;
&lt;br /&gt;
local rawData = mw.loadData(&amp;#039;Module:Sanctions/data&amp;#039;)&lt;br /&gt;
local data = rawData.sanctions&lt;br /&gt;
local aliasMap = rawData.aliases&lt;br /&gt;
&lt;br /&gt;
local messageBox = require(&amp;#039;Module:Message box&amp;#039;)&lt;br /&gt;
&lt;br /&gt;
local function tableContainsValue(needle, haystack)&lt;br /&gt;
	for _, v in pairs(haystack) do&lt;br /&gt;
		if v == needle 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;
local function _getTopicData(topicAlias)&lt;br /&gt;
	if data[topicAlias] then&lt;br /&gt;
		return data[topicAlias]&lt;br /&gt;
	elseif aliasMap[topicAlias] then&lt;br /&gt;
		return data[aliasMap[topicAlias]]&lt;br /&gt;
	else&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Returns an invalid topic error, with a table of acceptable topics&lt;br /&gt;
local function syntaxHelp()&lt;br /&gt;
	return [[&amp;lt;span class=&amp;quot;error&amp;quot;&amp;gt;{{para|topic}} not specified. Available options:&amp;lt;/span&amp;gt;&amp;lt;div style=&amp;quot;border-left: 5px dashed black; border-right: 5px dashed black; border-bottom: 5px dashed black; padding-left: 0.5em; padding-right: 0.5em; padding-bottom: 0.5em;&amp;quot;&amp;gt;&lt;br /&gt;
	{{Gs/topics/table}}&lt;br /&gt;
	&amp;lt;/div&amp;gt;]]&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function getTopicData(frame, topicAlias)&lt;br /&gt;
	if not topicAlias then&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local topic = _getTopicData(topicAlias)&lt;br /&gt;
	if topic then&lt;br /&gt;
		return topic&lt;br /&gt;
	else&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- This function builds a talk notice&lt;br /&gt;
-- TODO: split this up&lt;br /&gt;
--&lt;br /&gt;
-- @param frame&lt;br /&gt;
-- @param topicData data for the given topic from the /data page&lt;br /&gt;
-- @param args arguments passed to wrapper template&lt;br /&gt;
-- @returns String representation of notice&lt;br /&gt;
local function buildTalkNotice(frame, topicData, args)&lt;br /&gt;
	local restrictions = topicData.restrictions&lt;br /&gt;
	local type = args[&amp;#039;type&amp;#039;] or args[2] or &amp;#039;standard&amp;#039;&lt;br /&gt;
	local hasRestrictions = false&lt;br /&gt;
	local hasRevertRestrictions = false&lt;br /&gt;
&lt;br /&gt;
	local out = mw.html.create(&amp;#039;&amp;#039;)&lt;br /&gt;
	&lt;br /&gt;
	-- Set (and force) a long display if there are applicable restrictions&lt;br /&gt;
	if restrictions[&amp;#039;1rr&amp;#039;] or args[&amp;#039;1rr&amp;#039;] or args[&amp;#039;consensusrequired&amp;#039;] or args[&amp;#039;brd&amp;#039;] then&lt;br /&gt;
		hasRestrictions = true&lt;br /&gt;
		hasRevertRestrictions = true&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	if args[&amp;#039;restriction1&amp;#039;] then&lt;br /&gt;
		hasRestrictions = true&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if hasRestrictions then&lt;br /&gt;
		out&lt;br /&gt;
			:tag(&amp;#039;span&amp;#039;)&lt;br /&gt;
				:css(&amp;#039;font-size&amp;#039;, &amp;#039;120%&amp;#039;)&lt;br /&gt;
				:wikitext(&amp;quot;&amp;#039;&amp;#039;&amp;#039;WARNING: ACTIVE COMMUNITY SANCTIONS&amp;#039;&amp;#039;&amp;#039;&amp;quot;)&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if hasRestrictions then&lt;br /&gt;
		out&lt;br /&gt;
			:tag(&amp;#039;p&amp;#039;)&lt;br /&gt;
				:wikitext(&amp;quot;The article [[:{{SUBJECTPAGENAME}}]], along with other pages relating to &amp;quot;..topicData.scope..&amp;quot;, is currently subject to &amp;#039;&amp;#039;&amp;#039;[[WP:AC/DS|discretionary sanctions]]&amp;#039;&amp;#039;&amp;#039; authorised by the community (see: [[&amp;quot;.. topicData[&amp;#039;wikilink&amp;#039;] ..&amp;quot;]]).&amp;quot; .. ((args[&amp;#039;1rr&amp;#039;] or args[&amp;#039;consensusrequired&amp;#039;] or args[&amp;#039;brd&amp;#039;] or args[&amp;#039;restriction1&amp;#039;]) and &amp;#039; An administrator has applied the following restrictions to this article:&amp;#039; or &amp;#039;&amp;#039;) .. (restrictions[&amp;#039;1rr&amp;#039;] and &amp;#039; The current restrictions are:&amp;#039; or &amp;#039;&amp;#039;))&lt;br /&gt;
	else&lt;br /&gt;
		out&lt;br /&gt;
			:tag(&amp;#039;p&amp;#039;)&lt;br /&gt;
				:wikitext(&amp;quot;&amp;lt;strong&amp;gt;The use of [[WP:AC/DS|discretionary sanctions]] has been [[&amp;quot;.. topicData[&amp;#039;wikilink&amp;#039;] ..&amp;quot;|authorised]] by the community for pages related to &amp;quot;.. topicData[&amp;#039;scope&amp;#039;] ..&amp;quot;, including this page.&amp;lt;/strong&amp;gt;&amp;quot; .. (type == &amp;#039;mini&amp;#039; and &amp;#039; Please consult the [[Wikipedia:Arbitration_Committee/Discretionary_sanctions#Awareness|awareness criteria]] and edit carefully.&amp;#039; or &amp;#039;&amp;#039;))&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if not (type == &amp;#039;mini&amp;#039;) then&lt;br /&gt;
		local restrictionList = mw.html.create(&amp;#039;ul&amp;#039;)&lt;br /&gt;
&lt;br /&gt;
		-- General notice for revert restrictions&lt;br /&gt;
		if hasRevertRestrictions then&lt;br /&gt;
			restrictionList&lt;br /&gt;
				:tag(&amp;#039;li&amp;#039;)&lt;br /&gt;
					:wikitext(&amp;quot;&amp;#039;&amp;#039;&amp;#039;Limit of one revert in 24 hours:&amp;#039;&amp;#039;&amp;#039; This article is under [[Wikipedia:Edit warring#Other revert rules|WP:1RR]] (one [[Wikipedia:Reverting|revert]] per editor per article &amp;#039;&amp;#039;per 24-hour period&amp;#039;&amp;#039;)&amp;quot;)&lt;br /&gt;
		end&lt;br /&gt;
&lt;br /&gt;
		-- Text for boilerplate/predefined restrictions&lt;br /&gt;
		if args[&amp;#039;consensusrequired&amp;#039;] then&lt;br /&gt;
			restrictionList&lt;br /&gt;
				:tag(&amp;#039;li&amp;#039;)&lt;br /&gt;
					:wikitext(&amp;quot;&amp;#039;&amp;#039;&amp;#039;Consensus required:&amp;#039;&amp;#039;&amp;#039; All editors must obtain [[WP:Consensus|consensus]] on the talk page of this article before reinstating &amp;#039;&amp;#039;any edits that have been challenged (via reversion).&amp;#039;&amp;#039; This includes making edits similar to the ones that have been challenged. If in doubt, do not make the edit.&amp;quot;)&lt;br /&gt;
		end&lt;br /&gt;
&lt;br /&gt;
		if args[&amp;#039;brd&amp;#039;] then&lt;br /&gt;
			restrictionList&lt;br /&gt;
				:tag(&amp;#039;li&amp;#039;)&lt;br /&gt;
					:wikitext(&amp;quot;&amp;#039;&amp;#039;&amp;#039;24-hr [[Wikipedia:BOLD, revert, discuss cycle|BRD cycle]]:&amp;#039;&amp;#039;&amp;#039; If a change you make to this article is reverted, you may not reinstate that change unless you discuss the issue on the talk page and wait 24 hours (from the time of the original edit). Partial reverts/reinstatements that reasonably address objections of other editors [[Wikipedia:BOLD, revert, discuss cycle#WP:BRR|are preferable]] to wholesale reverts.&amp;quot;)&lt;br /&gt;
		end&lt;br /&gt;
&lt;br /&gt;
		local ri = 1&lt;br /&gt;
		while true do&lt;br /&gt;
			if args[&amp;#039;restriction&amp;#039;..ri] then&lt;br /&gt;
				restrictionList&lt;br /&gt;
					:tag(&amp;#039;li&amp;#039;)&lt;br /&gt;
						:wikitext(args[&amp;#039;restriction&amp;#039;..ri])&lt;br /&gt;
				ri = ri + 1&lt;br /&gt;
			else&lt;br /&gt;
				break&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
&lt;br /&gt;
		if hasRestrictions then&lt;br /&gt;
			out:node(restrictionList)&lt;br /&gt;
		end&lt;br /&gt;
&lt;br /&gt;
		out&lt;br /&gt;
			:tag(&amp;#039;p&amp;#039;)&lt;br /&gt;
				:wikitext(&amp;quot;Provided the [[Wikipedia:Arbitration_Committee/Discretionary_sanctions#Awareness|awareness criteria]] are met, discretionary sanctions may be used against editors who repeatedly or seriously fail to adhere to the [[Wikipedia:Five_pillars|purpose of Wikipedia]], any expected [[Wikipedia:Etiquette|standards of behaviour]], or any [[Wikipedia:List_of_policies|normal editorial process]].&amp;quot;)&lt;br /&gt;
			&lt;br /&gt;
		-- Further info box&lt;br /&gt;
		if hasRestrictions then&lt;br /&gt;
			local furtherInfo = mw.html.create(&amp;#039;&amp;#039;)&lt;br /&gt;
&lt;br /&gt;
			-- Enforcement procedures&lt;br /&gt;
			furtherInfo&lt;br /&gt;
				:tag(&amp;#039;p&amp;#039;)&lt;br /&gt;
					:wikitext(&amp;#039;Enforcement procedures:&amp;#039;)&lt;br /&gt;
					:done()&lt;br /&gt;
&lt;br /&gt;
			local enforcementProcedures = mw.html.create(&amp;#039;ul&amp;#039;)&lt;br /&gt;
&lt;br /&gt;
			if hasRevertRestrictions or args[&amp;#039;restriction1&amp;#039;] then&lt;br /&gt;
				enforcementProcedures&lt;br /&gt;
					:tag(&amp;#039;li&amp;#039;)&lt;br /&gt;
						:wikitext(&amp;quot;Violations of any restrictions &amp;quot; .. (hasRevertRestrictions and &amp;quot;(excluding 1RR/reverting violations) &amp;quot; or &amp;quot;&amp;quot;) .. &amp;quot;and other conduct issues should be reported to the [[Wikipedia:Administrators&amp;#039; noticeboard/Incidents|administrators&amp;#039; incidents noticeboard]].&amp;quot; .. (hasRevertRestrictions and &amp;quot; Violations of revert restrictions should be reported to the [[WP:ANEW|administrators&amp;#039; edit warring noticeboard]].&amp;quot; or &amp;quot;&amp;quot;))&lt;br /&gt;
						:done()&lt;br /&gt;
					:tag(&amp;#039;li&amp;#039;)&lt;br /&gt;
						:wikitext(&amp;quot;Editors who violate any listed restrictions may be blocked by any uninvolved administrator, even on a first offense.&amp;quot;)&lt;br /&gt;
						:done()&lt;br /&gt;
			else&lt;br /&gt;
				enforcementProcedures&lt;br /&gt;
					:tag(&amp;#039;li&amp;#039;)&lt;br /&gt;
						:wikitext(&amp;quot;Problems should be reported to the [[Wikipedia:Administrators&amp;#039; noticeboard/Incidents|administrators&amp;#039; incidents noticeboard]].&amp;quot;)&lt;br /&gt;
						:done()&lt;br /&gt;
			end&lt;br /&gt;
&lt;br /&gt;
			enforcementProcedures&lt;br /&gt;
				:tag(&amp;#039;li&amp;#039;)&lt;br /&gt;
					:wikitext(&amp;quot;An editor must be [[Wikipedia:Arbitration_Committee/Discretionary_sanctions#Awareness|aware]] before they can be sanctioned.&amp;quot;)&lt;br /&gt;
					:allDone()&lt;br /&gt;
			furtherInfo:node(enforcementProcedures)&lt;br /&gt;
&lt;br /&gt;
			if hasRevertRestrictions then&lt;br /&gt;
				furtherInfo&lt;br /&gt;
					:tag(&amp;#039;p&amp;#039;)&lt;br /&gt;
						:wikitext(&amp;quot;With respect to any reverting restrictions:&amp;quot;)&lt;br /&gt;
						:done()&lt;br /&gt;
					:tag(&amp;#039;ul&amp;#039;)&lt;br /&gt;
						:tag(&amp;#039;li&amp;#039;)&lt;br /&gt;
							:wikitext(&amp;quot;Edits made solely to enforce any clearly established consensus are exempt from all edit-warring restrictions. In order to be considered \&amp;quot;clearly established\&amp;quot; the consensus must be proven by prior talk-page discussion.&amp;quot;)&lt;br /&gt;
							:done()&lt;br /&gt;
						:tag(&amp;#039;li&amp;#039;)&lt;br /&gt;
							:wikitext(&amp;quot;Edits made which remove or otherwise change any material placed by clearly established consensus, without first obtaining consensus to do so, may be treated in the same manner as clear vandalism.&amp;quot;)&lt;br /&gt;
							:done()&lt;br /&gt;
						:tag(&amp;#039;li&amp;#039;)&lt;br /&gt;
							:wikitext(&amp;quot;Clear vandalism of any origin may be reverted without restriction.&amp;quot;)&lt;br /&gt;
							:done()&lt;br /&gt;
						:tag(&amp;#039;li&amp;#039;)&lt;br /&gt;
							:wikitext(&amp;quot;Reverts of edits made by anonymous (IP) editors that are not vandalism are exempt from the 1RR but are subject to [[Wikipedia:Edit warring|the usual rules on edit warring]]. If you are in doubt, contact an administrator for assistance.&amp;quot;)&lt;br /&gt;
							:allDone()&lt;br /&gt;
					:tag(&amp;#039;p&amp;#039;)&lt;br /&gt;
							:wikitext(&amp;quot;If you are unsure if your edit is appropriate, discuss it here on this talk page first. &amp;lt;strong&amp;gt;Remember: When in doubt, don&amp;#039;t revert!&amp;lt;/strong&amp;gt;&amp;quot;)&lt;br /&gt;
			end&lt;br /&gt;
&lt;br /&gt;
			local collapsed = frame:expandTemplate{ title = &amp;#039;collapse&amp;#039;, args = {&lt;br /&gt;
				tostring(furtherInfo),&lt;br /&gt;
				&amp;#039;&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Remedy instructions and exemptions&amp;lt;/span&amp;gt;&amp;#039;,&lt;br /&gt;
				[&amp;#039;bg&amp;#039;] = &amp;#039;#EEE8AA&amp;#039;&lt;br /&gt;
			}}&lt;br /&gt;
			&lt;br /&gt;
			out&lt;br /&gt;
				:newline()&lt;br /&gt;
				:node(collapsed)&lt;br /&gt;
		end&lt;br /&gt;
		-- End further info box&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local box = messageBox.main( &amp;#039;tmbox&amp;#039;, {&lt;br /&gt;
		type = &amp;#039;notice&amp;#039;,&lt;br /&gt;
		image = type == &amp;#039;long&amp;#039; and &amp;#039;[[File:Commons-emblem-issue.svg|50px]]&amp;#039; or &amp;#039;[[Image:Commons-emblem-hand-orange.svg|40px]]&amp;#039;,&lt;br /&gt;
		text = frame:preprocess(tostring(out))&lt;br /&gt;
    })&lt;br /&gt;
&lt;br /&gt;
    return box&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Builds an alert notice&lt;br /&gt;
--&lt;br /&gt;
-- @param frame&lt;br /&gt;
-- @param topicData data for the given topic from the /data page&lt;br /&gt;
-- @returns String representation of notice&lt;br /&gt;
local function buildAlert(frame, topicData, sig)&lt;br /&gt;
	local out = mw.html.create(&amp;#039;table&amp;#039;)&lt;br /&gt;
		:addClass(&amp;#039;messagebox&amp;#039;)&lt;br /&gt;
		:cssText(&amp;quot;border: 1px solid #AAA; background: #E5F8FF; padding: 0.5em; width: 100%;&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
	out&lt;br /&gt;
		:tag(&amp;#039;tr&amp;#039;)&lt;br /&gt;
			:tag(&amp;#039;td&amp;#039;)&lt;br /&gt;
				:cssText(&amp;quot;vertical-align:middle; padding-left:1px; padding-right:0.5em;&amp;quot;)&lt;br /&gt;
				:wikitext(&amp;quot;[[File:Commons-emblem-notice.svg|50px]]&amp;quot;)&lt;br /&gt;
				:done()&lt;br /&gt;
			:tag(&amp;#039;td&amp;#039;)&lt;br /&gt;
				:wikitext(&amp;quot;This is a standard message to notify contributors about an administrative ruling in effect. &amp;#039;&amp;#039;It does &amp;#039;&amp;#039;&amp;#039;not&amp;#039;&amp;#039;&amp;#039; imply that there are any issues with your contributions to date.&amp;#039;&amp;#039;&amp;quot;)&lt;br /&gt;
				:newline()&lt;br /&gt;
				:wikitext(&amp;quot;You have shown interest in &amp;quot;.. topicData.scope ..&amp;quot;. Due to past disruption in this topic area, the community has enacted a more stringent set of rules. Any administrator may impose [[Wikipedia:General sanctions|sanctions]] - such as [[Wikipedia:Editing restrictions#Types of restrictions|editing restrictions]], [[Wikipedia:Banning policy#Types of bans|bans]], or [[WP:Blocking policy|blocks]] - on editors who do not strictly follow [[Wikipedia:List of policies|Wikipedia&amp;#039;s policies]], or the [[Wikipedia:Arbitration_Committee/Discretionary_sanctions#Page_restrictions|page-specific restrictions]], when making edits related to the topic.&amp;quot;)&lt;br /&gt;
				:newline()&lt;br /&gt;
				:wikitext(&amp;quot;For additional information, please see the [[&amp;quot;.. topicData.wikilink ..&amp;quot;|guidance on these sanctions]]. If you have any questions, or any doubts regarding what edits are appropriate, you are welcome to discuss them with me or any other editor.&amp;quot; .. (sig and &amp;#039; &amp;#039;..sig or &amp;#039;&amp;#039;))&lt;br /&gt;
&lt;br /&gt;
	return frame:preprocess(tostring(out))&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Builds an edit notice&lt;br /&gt;
local function buildEditNotice(frame, topicData, args)&lt;br /&gt;
	local restrictions = topicData.restrictions&lt;br /&gt;
	local enHeader = mw.html.create(&amp;#039;&amp;#039;)&lt;br /&gt;
	local restrictionMsgs = {}&lt;br /&gt;
	&lt;br /&gt;
	if restrictions[&amp;#039;1rr&amp;#039;] or args[&amp;#039;1rr&amp;#039;] then&lt;br /&gt;
		table.insert(restrictionMsgs, &amp;quot;Editors must not make more than one [[Help:Reverting|revert]] per twenty-four (24) hours (subject to [[WP:3RRNO|exceptions]])&amp;quot;)&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	if args[&amp;#039;consensusrequired&amp;#039;] then&lt;br /&gt;
		table.insert(restrictionMsgs, &amp;quot;Editors must not reinstate any challenged edits (via reversion) without first obtaining [[WP:CONSENSUS|consensus]] on the talk page of this article&amp;quot;)&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local ri = 1&lt;br /&gt;
	while true do&lt;br /&gt;
		if args[&amp;#039;restriction&amp;#039;..ri] then&lt;br /&gt;
			table.insert(restrictionMsgs, args[&amp;#039;restriction&amp;#039;..ri])&lt;br /&gt;
			ri = ri + 1&lt;br /&gt;
		else&lt;br /&gt;
			break&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if #restrictionMsgs == 0 then&lt;br /&gt;
		return frame:preprocess(syntaxHelp())&lt;br /&gt;
	else&lt;br /&gt;
		local list = mw.html.create(&amp;#039;ul&amp;#039;)&lt;br /&gt;
		for _,v in ipairs(restrictionMsgs) do&lt;br /&gt;
			list&lt;br /&gt;
				:tag(&amp;#039;li&amp;#039;)&lt;br /&gt;
					:wikitext(v)&lt;br /&gt;
					:done()&lt;br /&gt;
		end&lt;br /&gt;
		enHeader:wikitext(tostring(list))&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local enText = mw.html.create(&amp;#039;&amp;#039;)&lt;br /&gt;
	enText&lt;br /&gt;
		:tag(&amp;#039;p&amp;#039;)&lt;br /&gt;
			:wikitext(&amp;quot;&amp;lt;strong&amp;gt;Breaching the restriction on this page may result in a block or other sanctions.&amp;lt;/strong&amp;gt; Please note that because this topic area has been disrupted in the past, the community has [[&amp;quot;..topicData.wikilink..&amp;quot;|authorised]] administrators to take [[WP:ACDS|appropriate steps]] to ensure the smooth running of all pages related to &amp;quot;..topicData.scope..&amp;quot;. Conduct which does not adhere to our policies and [[Wikipedia:Etiquette|standards of behaviour]] may be met with sanctions. Please edit carefully.&amp;quot;)&lt;br /&gt;
			:done()&lt;br /&gt;
&lt;br /&gt;
	local editnotice = frame:expandTemplate{ title = &amp;#039;editnotice&amp;#039;, args = {&lt;br /&gt;
		expiry = &amp;quot;indefinite&amp;quot;,&lt;br /&gt;
		headerstyle = &amp;quot;font-size: 120%;&amp;quot;,&lt;br /&gt;
		style = &amp;quot;background: ivory;&amp;quot;,&lt;br /&gt;
		image = &amp;quot;Commons-emblem-issue.svg&amp;quot;,&lt;br /&gt;
		imagesize = &amp;quot;50px&amp;quot;,&lt;br /&gt;
		header = tostring(enHeader),&lt;br /&gt;
		text = tostring(enText)&lt;br /&gt;
	}}&lt;br /&gt;
&lt;br /&gt;
	return editnotice&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--/////////--&lt;br /&gt;
-- EXPORTS&lt;br /&gt;
--/////////--&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
-- Returns a talk notice&lt;br /&gt;
-- For documentation, see [[Template:Gs/talk notice]]&lt;br /&gt;
function p.talknotice(frame)&lt;br /&gt;
	local args = getArgs(frame, {&lt;br /&gt;
		wrappers = {&lt;br /&gt;
			&amp;#039;Template:Gs/talk notice&amp;#039;,&lt;br /&gt;
			&amp;#039;Template:Gs/talk notice/sandbox&amp;#039;&lt;br /&gt;
		}&lt;br /&gt;
	})&lt;br /&gt;
&lt;br /&gt;
	local topic = getTopicData(frame, args[&amp;#039;topic&amp;#039;] or args[1])&lt;br /&gt;
&lt;br /&gt;
	if not topic then&lt;br /&gt;
		return frame:preprocess(syntaxHelp())&lt;br /&gt;
	elseif not topic.restrictions or (not topic.restrictions[&amp;#039;ds&amp;#039;] and not topic.restrictions[&amp;#039;1rr&amp;#039;]) then&lt;br /&gt;
		-- error: no relevant sanctions authorised&lt;br /&gt;
		return frame:preprocess(&amp;#039;&amp;lt;span class=&amp;quot;error&amp;quot;&amp;gt;No relevant sanctions authorised for this topic.&amp;lt;/span&amp;gt;&amp;#039;)&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	return buildTalkNotice(frame, topic, args)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Returns an alert&lt;br /&gt;
-- For documentation, see [[Template:Gs/alert]]&lt;br /&gt;
function p.alert(frame)&lt;br /&gt;
	local args = getArgs(frame, {&lt;br /&gt;
		wrappers = {&lt;br /&gt;
			&amp;#039;Template:Gs/alert&amp;#039;,&lt;br /&gt;
			&amp;#039;Template:Gs/alert/sandbox&amp;#039;,&lt;br /&gt;
		}&lt;br /&gt;
	})&lt;br /&gt;
&lt;br /&gt;
	local topic = getTopicData(frame, args[&amp;#039;topic&amp;#039;] or args[1])&lt;br /&gt;
	if not topic then&lt;br /&gt;
		return frame:preprocess(syntaxHelp())&lt;br /&gt;
	elseif not topic.restrictions or not topic.restrictions[&amp;#039;ds&amp;#039;] then&lt;br /&gt;
		-- error: DS not authorised, alert not needed&lt;br /&gt;
		return frame:preprocess(&amp;#039;&amp;lt;span class=&amp;quot;error&amp;quot;&amp;gt;Discretionary sanctions are not authorised for this topic area. Alert is not required.&amp;lt;/span&amp;gt;&amp;#039;)&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	return buildAlert(frame, topic, args[&amp;#039;sig&amp;#039;])&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Returns an edit notice&lt;br /&gt;
-- For documentation, see [[Template:Gs/editnotice]]&lt;br /&gt;
function p.editnotice(frame)&lt;br /&gt;
	local args = getArgs(frame, {&lt;br /&gt;
		wrappers = {&lt;br /&gt;
			&amp;#039;Template:Gs/editnotice&amp;#039;,&lt;br /&gt;
			&amp;#039;Template:Gs/editnotice/sandbox&amp;#039;,&lt;br /&gt;
			&amp;#039;User:ProcrastinatingReader/sandbox/ds&amp;#039;&lt;br /&gt;
		}&lt;br /&gt;
	})&lt;br /&gt;
&lt;br /&gt;
	local topic = getTopicData(frame, args[&amp;#039;topic&amp;#039;] or args[1])&lt;br /&gt;
	if not topic then&lt;br /&gt;
		return frame:preprocess(syntaxHelp())&lt;br /&gt;
	elseif not topic.restrictions or (not topic.restrictions[&amp;#039;1rr&amp;#039;] and not args[&amp;#039;1rr&amp;#039;] and not args[&amp;#039;consensusrequired&amp;#039;] and not args[&amp;#039;restriction1&amp;#039;]) then&lt;br /&gt;
		-- error: no custom restrictions authorised, alert not needed&lt;br /&gt;
		return frame:preprocess(&amp;#039;&amp;lt;span class=&amp;quot;error&amp;quot;&amp;gt;Page sanctions are not authorised for this topic area. Edit notice is not required.&amp;lt;/span&amp;gt;[[Category:Pages with sanctions errors]]&amp;#039;)&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	return buildEditNotice(frame, topic, args)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.table(frame)&lt;br /&gt;
	local args = getArgs(frame, {&lt;br /&gt;
		wrappers = {&lt;br /&gt;
			&amp;#039;Template:Gs/topics/table&amp;#039;,&lt;br /&gt;
			&amp;#039;Template:Gs/topics/table/sandbox&amp;#039;,&lt;br /&gt;
		}&lt;br /&gt;
	})&lt;br /&gt;
&lt;br /&gt;
	local tbl = mw.html.create(&amp;#039;table&amp;#039;)&lt;br /&gt;
		:addClass(&amp;#039;wikitable&amp;#039;)&lt;br /&gt;
		:css(&amp;#039;font-size&amp;#039;, &amp;#039;9pt&amp;#039;)&lt;br /&gt;
		:css(&amp;#039;background&amp;#039;, &amp;#039;transparent&amp;#039;)&lt;br /&gt;
&lt;br /&gt;
	-- Headers&lt;br /&gt;
	tbl:tag(&amp;#039;tr&amp;#039;)&lt;br /&gt;
		:tag(&amp;#039;th&amp;#039;)&lt;br /&gt;
			:wikitext(&amp;quot;Topic code&amp;quot;)&lt;br /&gt;
			:done()&lt;br /&gt;
		:tag(&amp;#039;th&amp;#039;)&lt;br /&gt;
			:wikitext(&amp;quot;Area of conflict&amp;quot;)&lt;br /&gt;
			:done()&lt;br /&gt;
		:tag(&amp;#039;th&amp;#039;)&lt;br /&gt;
			:wikitext(&amp;quot;Decision linked to&amp;quot;)&lt;br /&gt;
			:allDone()&lt;br /&gt;
	&lt;br /&gt;
	-- sort alphabetically&lt;br /&gt;
	local sortedTable = {}&lt;br /&gt;
	for n in pairs(data) do&lt;br /&gt;
		table.insert(sortedTable, n)&lt;br /&gt;
	end&lt;br /&gt;
	table.sort(sortedTable)&lt;br /&gt;
&lt;br /&gt;
	for _,v in ipairs(sortedTable) do&lt;br /&gt;
		local sanction = data[v]&lt;br /&gt;
		local title = mw.title.new(sanction.wikilink).redirectTarget			-- probably unnecessarily expensive; just add to config&lt;br /&gt;
		tbl:tag(&amp;#039;tr&amp;#039;)&lt;br /&gt;
			:tag(&amp;#039;td&amp;#039;)&lt;br /&gt;
				:wikitext(frame:preprocess(&amp;quot;{{tlx&amp;quot;..(args[&amp;#039;subst&amp;#039;] and &amp;quot;s&amp;quot; or &amp;quot;&amp;quot;)..&amp;quot;|{{#ifeq:{{BASEPAGENAME}}|Gs|{{PAGENAME}}|{{BASEPAGENAME}}}}|&amp;lt;nowiki&amp;gt;topic=&amp;lt;/nowiki&amp;gt;&amp;lt;b&amp;gt;&amp;quot;..(sanction.palias or v)..&amp;quot;&amp;lt;/b&amp;gt;}}&amp;quot;))&lt;br /&gt;
				:done()&lt;br /&gt;
			:tag(&amp;#039;td&amp;#039;)&lt;br /&gt;
				:wikitext(sanction.scope)&lt;br /&gt;
				:done()&lt;br /&gt;
			:tag(&amp;#039;td&amp;#039;)&lt;br /&gt;
				:wikitext(&amp;quot;[[&amp;quot;..title.fullText..&amp;quot;]]&amp;quot;)&lt;br /&gt;
				:allDone()&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	return tostring(tbl)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.topicsHelper(frame)&lt;br /&gt;
	local args = getArgs(frame, {&lt;br /&gt;
		wrappers = {&lt;br /&gt;
			&amp;#039;Template:Gs/topics&amp;#039;,&lt;br /&gt;
			&amp;#039;Template:Gs/topics/sandbox&amp;#039;&lt;br /&gt;
		}&lt;br /&gt;
	})&lt;br /&gt;
&lt;br /&gt;
	if args[&amp;#039;sanctions scope&amp;#039;] and data[args[&amp;#039;sanctions scope&amp;#039;]] then&lt;br /&gt;
		return _getTopicData(args[&amp;#039;sanctions scope&amp;#039;]).scope&lt;br /&gt;
	elseif args[&amp;#039;sanctions link&amp;#039;] and data[args[&amp;#039;sanctions link&amp;#039;]] then&lt;br /&gt;
		return mw.title.new(_getTopicData(args[&amp;#039;sanctions link&amp;#039;]).wikilink).redirectTarget&lt;br /&gt;
	else&lt;br /&gt;
		return &amp;quot;&amp;quot; -- ?&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>imported&gt;ProcrastinatingReader</name></author>
	</entry>
</feed>