https://en.wikipedia.org/w/index.php?action=history&feed=atom&title=Module%3AAfC%2Fsandbox
Module:AfC/sandbox - Revision history
2025-06-04T02:55:41Z
Revision history for this page on the wiki
MediaWiki 1.45.0-wmf.3
https://en.wikipedia.org/w/index.php?title=Module:AfC/sandbox&diff=1138279019&oldid=prev
Uzume: sync from active
2023-02-08T21:33:47Z
<p>sync from active</p>
<a href="//en.wikipedia.org/w/index.php?title=Module:AfC/sandbox&diff=1138279019&oldid=848868842">Show changes</a>
Uzume
https://en.wikipedia.org/w/index.php?title=Module:AfC/sandbox&diff=848868842&oldid=prev
Oshwah: Oshwah moved page Module:AfC statistics row/sandbox to Module:AfC/sandbox without leaving a redirect: Undoing move (see Module talk:AfC) - the move broke a ton of template pages for AFC.
2018-07-04T22:31:57Z
<p>Oshwah moved page <a href="/w/index.php?title=Module:AfC_statistics_row/sandbox&action=edit&redlink=1" class="new" title="Module:AfC statistics row/sandbox (page does not exist)">Module:AfC statistics row/sandbox</a> to <a href="/wiki/Module:AfC/sandbox" title="Module:AfC/sandbox">Module:AfC/sandbox</a> without leaving a redirect: Undoing move (see <a href="/wiki/Module_talk:AfC" class="mw-redirect" title="Module talk:AfC">Module talk:AfC</a>) - the move broke a ton of template pages for AFC.</p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<tr class="diff-title" lang="en">
<td colspan="1" style="background-color: #fff; color: #202122; text-align: center;">← Previous revision</td>
<td colspan="1" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 22:31, 4 July 2018</td>
</tr><tr><td colspan="2" class="diff-notice" lang="en"><div class="mw-diff-empty">(No difference)</div>
</td></tr></table>
Oshwah
https://en.wikipedia.org/w/index.php?title=Module:AfC/sandbox&diff=848790962&oldid=prev
Stormy Chamber: Mahveotm moved page Module:AfC/sandbox to Module:AfC statistics row/sandbox without leaving a redirect: discussion closed as PM
2018-07-04T09:54:16Z
<p>Mahveotm moved page <a href="/wiki/Module:AfC/sandbox" title="Module:AfC/sandbox">Module:AfC/sandbox</a> to <a href="/w/index.php?title=Module:AfC_statistics_row/sandbox&action=edit&redlink=1" class="new" title="Module:AfC statistics row/sandbox (page does not exist)">Module:AfC statistics row/sandbox</a> without leaving a redirect: discussion closed as PM</p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<tr class="diff-title" lang="en">
<td colspan="1" style="background-color: #fff; color: #202122; text-align: center;">← Previous revision</td>
<td colspan="1" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 09:54, 4 July 2018</td>
</tr><tr><td colspan="2" class="diff-notice" lang="en"><div class="mw-diff-empty">(No difference)</div>
</td></tr></table>
Stormy Chamber
https://en.wikipedia.org/w/index.php?title=Module:AfC/sandbox&diff=577505159&oldid=prev
The Earwig: update size with a sortkey
2013-10-17T00:36:58Z
<p>update size with a sortkey</p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Previous revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 00:36, 17 October 2013</td>
</tr><tr>
<td colspan="2" class="diff-lineno">Line 1:</td>
<td colspan="2" class="diff-lineno">Line 1:</td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>local p = {}</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>local p = {}</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>revlib = require("Module:Revision");</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>revlib = require("Module:Revision");</div></td>
</tr>
<tr>
<td class="diff-marker" data-marker="−"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>-- current call example: {{AFC statistics/row|s=p|t=Confidential Incident Reporting & Analysis System (CIRAS)|h=Submissions/Confidential Incident Reporting & A...|z=6.7 kB|sr=CIRAS|sd=15:19, 22 Jan 2009|si=265715189|mr=SBaker43|md=04:45, 15 Mar 2013|mi=544281825}}</div></td>
<td colspan="2" class="diff-empty diff-side-added"></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>function p.row(frame)</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>function p.row(frame)</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> local status = frame.args["s"]</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> local status = frame.args["s"]</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> local title = frame.args["t"]</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> local title = frame.args["t"]</div></td>
</tr>
<tr>
<td class="diff-marker" data-marker="−"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> local short = p.shorttitle(title, 40)<del style="font-weight: bold; text-decoration: none;">;</del></div></td>
<td class="diff-marker" data-marker="+"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> local short = p.shorttitle(title, 40)</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> local size = frame.args["z"]</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> local size = frame.args["z"]</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> local modified_by = frame.args["mr"]</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> local modified_by = frame.args["mr"]</div></td>
</tr>
<tr>
<td colspan="2" class="diff-lineno">Line 18:</td>
<td colspan="2" class="diff-lineno">Line 17:</td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> local cols = {}</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> local cols = {}</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> cols[1] = string.format("[[:%s|%s]]", title, short)</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> cols[1] = string.format("[[:%s|%s]]", title, short)</div></td>
</tr>
<tr>
<td colspan="2" class="diff-empty diff-side-deleted"></td>
<td class="diff-marker" data-marker="+"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> cols[2] = string.format('<span style="display:none" class="sortkey">%d</span>%.1f kB', size, size / 1000)</div></td>
</tr>
<tr>
<td class="diff-marker" data-marker="−"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> cols[2] = size</div></td>
<td colspan="2" class="diff-empty diff-side-added"></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> </div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> </div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> local is_userspace = string.sub(frame.args["t"], 1, 4) == "User"</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> local is_userspace = string.sub(frame.args["t"], 1, 4) == "User"</div></td>
</tr>
</table>
The Earwig
https://en.wikipedia.org/w/index.php?title=Module:AfC/sandbox&diff=577504473&oldid=prev
The Earwig: create
2013-10-17T00:29:41Z
<p>create</p>
<p><b>New page</b></p><div>local p = {}<br />
revlib = require("Module:Revision");<br />
-- current call example: {{AFC statistics/row|s=p|t=Confidential Incident Reporting & Analysis System (CIRAS)|h=Submissions/Confidential Incident Reporting & A...|z=6.7 kB|sr=CIRAS|sd=15:19, 22 Jan 2009|si=265715189|mr=SBaker43|md=04:45, 15 Mar 2013|mi=544281825}}<br />
function p.row(frame)<br />
local status = frame.args["s"]<br />
local title = frame.args["t"]<br />
local short = p.shorttitle(title, 40);<br />
local size = frame.args["z"]<br />
local modified_by = frame.args["mr"]<br />
local modified_at = frame.args["md"]<br />
local old_id = frame.args["mi"]<br />
local special_user = frame.args["sr"]<br />
local special_time = frame.args["sd"]<br />
local special_id = tonumber(frame.args["si"])<br />
local display_notes = tonumber(frame.args["n"])<br />
local rowtemplate = "<tr style=\"background-color:%s\"> %s </tr>"<br />
local colorthing = p.color(status, false)<br />
local cols = {}<br />
cols[1] = string.format("[[:%s|%s]]", title, short)<br />
cols[2] = size<br />
<br />
local is_userspace = string.sub(frame.args["t"], 1, 4) == "User"<br />
if is_userspace then display_notes = 1 end<br />
<br />
if display_notes then cols[3] = p.notes(frame) else cols[3] = "" end<br />
<br />
if special_id then<br />
cols[4] = p.printuser(special_user)<br />
cols[5] = string.format('<span style="display:none" class="sortkey">%s</span>%s', special_id, p.invoke("Module:Revision", "diff", frame, title, "prev", special_id, special_time))<br />
else<br />
cols[4] = "Unknown"<br />
cols[5] = "Unknown"<br />
end<br />
<br />
cols[6] = p.printuser(modified_by)<br />
cols[7] = string.format('<span style="display:none" class="sortkey">%s</span>%s', old_id, p.invoke("Module:Revision", "diff", frame, title, "prev", old_id, modified_at))<br />
local colstring = ""<br />
for i=1, 7 do colstring = colstring .. string.format("<td>%s</td>", cols[i]) end<br />
return string.format(rowtemplate, colorthing, colstring)<br />
end<br />
<br />
function p.notes(frame)<br />
local result = ""<br />
local is_suspected_copyvio = tonumber(frame.args["nc"])<br />
local is_unsourced = tonumber(frame.args["nu"])<br />
local no_inline = tonumber(frame.args["ni"])<br />
local is_short = tonumber(frame.args["ns"])<br />
local is_resubmit = tonumber(frame.args["nr"])<br />
local is_old = tonumber(frame.args["no"])<br />
local submitter_is_blocked = tonumber(frame.args["nb"])<br />
local is_userspace = string.sub(frame.args["t"], 1, 4) == "User"<br />
<br />
if is_suspected_copyvio then result = result .. "<abbr title=\"Submission is a suspected copyright violation\">copyvio</abbr>&#32;&#32;" end<br />
if is_unsourced then result = result .. "<abbr title=\"Submission lacks references completely\">unsourced</abbr>&#32;&#32;" end<br />
if no_inline then result = result .. "<abbr title=\"Submission has no inline citations\">no-inline</abbr>&#32;&#32;" end<br />
if is_short then result = result .."<abbr title=\"Submission is less than a kilobyte in length\">short</abbr>&#32;&#32;" end<br />
if is_resubmit then result = result .. "<abbr title=\"Submission was resubmitted after a previous decline\">resubmit</abbr>&#32;&#32;" end<br />
if is_old then result = result .. "<abbr title=\"Submission has not been touched in over four days\">old</abbr>&#32;&#32;" end<br />
if submitter_is_blocked then result = result .. "<abbr title=\"Submitter is currently blocked\">blocked</abbr>&#32;&#32;" end<br />
if is_userspace then result = result .. "<abbr title=\"Submission is located in the User or User Talk space\">userspace</abbr>&#32;&#32;" end<br />
<br />
return result<br />
end<br />
<br />
function p.color(status, dark)<br />
local result<br />
local dark_colors = {<br />
p = "#979158",<br />
d = "#a07980",<br />
r = "#708a92",<br />
a = "#5f9e5f"<br />
}<br />
local normal_colors = {<br />
p = "#f3eba3",<br />
d = "#ffcdd5",<br />
r = "#b1dae8",<br />
a = "#adfcad"<br />
}<br />
if dark then<br />
return dark_colors[status] or "#7e7f7a"<br />
else<br />
return normal_colors[status] or "#d2d3cc"<br />
end<br />
end<br />
<br />
function p.printuser(user)<br />
return string.format("[[User:%s|%s]] ([[User talk:%s|t]])", user, user, user)<br />
end<br />
<br />
function p.shorttitle(fulltitle, maxlength)<br />
--strip off namespace:basepage/ if it exists and anything is left<br />
--if not, strip off namespace<br />
--truncate to maxlength<br />
local startindex, size, namespace, basetitle, subtitle = mw.ustring.find(fulltitle, "([^:]*):([^\/]*)\/?(.*)")<br />
local effective_title = subtitle or basetitle<br />
if (effective_title == nil or string.len(effective_title) == 0) then effective_title = fulltitle end<br />
effective_title = string.gsub(effective_title, "^Submissions/", "")<br />
-- return mw.text.truncate( effective_title, maxlength ) (mw.text is not yet deployed!)<br />
if (mw.ustring.len(effective_title) > maxlength) then<br />
return mw.ustring.sub(effective_title, 1, maxlength - 3) .. "..."<br />
else<br />
return effective_title<br />
end<br />
<br />
<br />
end<br />
<br />
--equivalent of {{#Invoke:module|function|arg1|arg2|namedarg=arg3|namedarg2=arg4}} becomes<br />
--p.invoke("module", "function", frame, arg1, arg2, {namedarg=arg3}, {namedarg2=arg4})<br />
function p.invoke(modname, call, frame, ...)<br />
local mymod = require(modname)<br />
local nargs = {}<br />
for i,v in ipairs(arg) do<br />
if type(v) == "table" then<br />
local argname, argv = ipairs(v)<br />
nargs[argname] = tostring(argv)<br />
else<br />
nargs[i] = tostring(v)<br />
end<br />
end<br />
local childframe = frame:newChild{title = nil, args = nargs}<br />
return mymod[call](childframe)<br />
end<br />
<br />
<br />
<br />
return p</div>
The Earwig