Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Humanipedia
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Module:Arbitration motion implementation notes/Motion/Automatic
Module
Discussion
English
Read
Edit source
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit source
View history
General
What links here
Related changes
Special pages
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
local getArgs = require('Module:Arguments').getArgs local p = {} function p.main( frame ) local args = getArgs(frame) local page = args["page"] or "" local section = args["section"] or args["anchor"] or args["name"] or "{{{name}}}" local pattern = args["pattern"] or "%c:?#[^#:]" local ret = args["ret"] or "" local escape = mw.ustring.gsub( section, "([%(%)%.%%%+%-%*%?%[%^%$%]])", "%%%1" ) for _, p in ipairs({ "Wikipedia:Arbitration/Requests/Clarification and Amendment", "Wikipedia:Arbitration/Requests/Case", "Wikipedia:Arbitration/Requests/Motions" }) do if page == "" then local text = mw.title.new(p):getContent() local _, sections = mw.ustring.gsub(text, ".*%=%= *"..escape, "") if sections ~= 0 then page = p end end end if page == "ARM" then page = "Wikipedia:Arbitration/Requests/Motions" elseif page == "ARC" then page = "Wikipedia:Arbitration/Requests/Case" elseif page == "ARCA" or page == "" then page = "Wikipedia:Arbitration/Requests/Clarification and Amendment" end local text = mw.title.new(page):getContent() local sectionText, matches = mw.ustring.gsub(text, ".*%=%= *"..escape, "") sectionText = mw.ustring.gsub(sectionText, ";Arbitrator discussion.*", "") local supportText = mw.ustring.gsub(sectionText, ".*;Support", "Support") supportText = mw.ustring.gsub(supportText, ";Oppose.*", "") local _, support = mw.ustring.gsub(supportText, pattern, "") local opposeText = mw.ustring.gsub(sectionText, ".*;Oppose", "Oppose") opposeText = mw.ustring.gsub(opposeText, ";Abstain.*", "") local _, oppose = mw.ustring.gsub(opposeText, pattern, "") local abstainText = mw.ustring.gsub(sectionText, ".*;Abstain", "Abstain") local _, abstain = mw.ustring.gsub(abstainText, pattern, "") if matches ~= 1 then support = '?</td>' ..'<td>?</td>' ..'<td>?</td>' ..'<td style="background-color: #ededfd">[[File:Symbol question.svg|20px|link=]]</td>' ..'<td>?</td>' ..'<td style="background-color: #ededfd"><span class="error">Error: Found ' ..tostring(matches) ..' sections on [[' ..tostring(page) ..']] with heading<br><code>' ..tostring(section) ..'</code></span></td></tr><tr style="display:none">' end if ret == "support" then return support elseif ret == "oppose" then return oppose elseif ret == "abstain" then return abstain elseif ret == "text" then return text elseif ret == "sectionText" then return sectionText elseif ret == "supportText" then return supportText elseif ret == "opposeText" then return opposeText elseif ret == "abstainText" then return abstainText elseif ret == "call" then local template = "Arbitration motion implementation notes/Motion" local params = {} params["anchor"] = args["anchor"] or args["name"] or "{{{name}}}" params["name"] = args["name"] or "{{{name}}}" params["support"] = support params["oppose"] = oppose params["abstain"] = abstain if args["notes"] then params["notes"] = args["notes"] end if args["pass"] then params["pass"] = args["pass"] end if args["active"] then params["active"] = args["active"] end return frame:expandTemplate{title=template, args=params} else return "" end end return p
Summary:
Please note that all contributions to Humanipedia may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Humanipedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Templates used on this page:
Template:Sandbox other
(
edit
)
Template:T
(
edit
)
Template:Template link
(
edit
)
Module:Arbitration motion implementation notes/Motion/Automatic/doc
(
edit
)
Module:String
(
edit
)