<?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%3ASandbox%2FBility%2FShortcut</id>
	<title>Module:Sandbox/Bility/Shortcut - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://stockhub.co/index.php?action=history&amp;feed=atom&amp;title=Module%3ASandbox%2FBility%2FShortcut"/>
	<link rel="alternate" type="text/html" href="https://stockhub.co/index.php?title=Module:Sandbox/Bility/Shortcut&amp;action=history"/>
	<updated>2026-04-17T18:46:29Z</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:Sandbox/Bility/Shortcut&amp;diff=145197&amp;oldid=prev</id>
		<title>imported&gt;Enterprisey: fix</title>
		<link rel="alternate" type="text/html" href="https://stockhub.co/index.php?title=Module:Sandbox/Bility/Shortcut&amp;diff=145197&amp;oldid=prev"/>
		<updated>2016-08-31T20:08:12Z</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 p = {}&lt;br /&gt;
&lt;br /&gt;
-- shortcut box code generator&lt;br /&gt;
function shortcut(sCuts, sType)&lt;br /&gt;
    local wikicode = &amp;#039;&amp;lt;div style=&amp;quot;position: relative; top: -3em;&amp;quot;&amp;gt;&amp;#039;&lt;br /&gt;
    local wikilist = &amp;#039;&amp;lt;ul&amp;gt;&amp;#039;&lt;br /&gt;
    local shortName = &amp;#039;[[Wikipedia:Shortcut|Shortcut&amp;#039;&lt;br /&gt;
    if sType == 3 then shortName = &amp;#039;[[Wikipedia:Policies and guidelines|Policy]] [[Wikipedia:Shortcut|shortcut&amp;#039; end&lt;br /&gt;
    local alignStyle = &amp;#039;float: right; &amp;#039;&lt;br /&gt;
    local alignClass = &amp;#039;&amp;#039;&lt;br /&gt;
    if sType == 4 then&lt;br /&gt;
        alignStyle = &amp;#039;float: left; &amp;#039;&lt;br /&gt;
        alignClass = &amp;#039;shortcutbox-left &amp;#039;&lt;br /&gt;
    end&lt;br /&gt;
    local linkcount = 0&lt;br /&gt;
    for i in ipairs(sCuts) do&lt;br /&gt;
        if sCuts[i] ~= &amp;#039;&amp;#039; and mw.title.new(sCuts[i]).id ~= 0 then&lt;br /&gt;
            wikicode = wikicode .. &amp;#039;&amp;lt;span id=&amp;quot;{{anchorencode:&amp;#039; .. sCuts[i] .. &amp;#039;}}&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&amp;#039;&lt;br /&gt;
            wikilist = wikilist .. &amp;#039;&amp;lt;li&amp;gt;[[&amp;#039; .. sCuts[i] .. &amp;#039;]]&amp;lt;/li&amp;gt;&amp;#039;&lt;br /&gt;
            linkcount = linkcount + 1&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
    if linkcount == 0 then&lt;br /&gt;
        return nil&lt;br /&gt;
    end&lt;br /&gt;
    if sType == 2 then wikilist = &amp;#039;&amp;lt;div class=&amp;quot;hlist&amp;quot;&amp;gt;&amp;#039; .. wikilist .. &amp;#039;&amp;lt;/div&amp;gt;&amp;#039; end&lt;br /&gt;
    wikicode = wikicode .. &amp;#039;&amp;lt;/div&amp;gt;\n&amp;#039;&lt;br /&gt;
    wikicode = wikicode .. &amp;#039;&amp;lt;table class=&amp;quot;shortcutbox &amp;#039; .. alignClass .. &amp;#039;noprint&amp;quot; style=&amp;quot;&amp;#039; .. alignStyle .. &amp;#039;border: 1px solid #aaa; background: #fff; margin: .3em .3em .3em 1em; padding: 3px; text-align: center;&amp;quot;&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;th style=&amp;quot;border: none; background: transparent;&amp;quot; class=&amp;quot;plainlist&amp;quot;&amp;gt;&amp;#039;&lt;br /&gt;
    wikicode = wikicode .. &amp;#039;&amp;lt;small&amp;gt;&amp;#039; .. shortName&lt;br /&gt;
    if linkcount &amp;gt; 1 then&lt;br /&gt;
        wikicode = wikicode .. &amp;#039;s&amp;#039;&lt;br /&gt;
    end&lt;br /&gt;
    wikicode = wikicode .. &amp;#039;]]&amp;#039; .. wikilist .. &amp;#039;&amp;lt;/ul&amp;gt;&amp;lt;/small&amp;gt;&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt;&amp;#039;&lt;br /&gt;
    &lt;br /&gt;
    return wikicode&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- normal vertical list of shortcuts&lt;br /&gt;
function p.vertical(frame)&lt;br /&gt;
    return shortcut(frame.args, 1)-- or &amp;#039;[[Category:Wikipedia shortcut box first parameter needs fixing|{{PAGENAME}}]]&amp;#039;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- horizontal list of shortcuts&lt;br /&gt;
function p.horizontal(frame)&lt;br /&gt;
    return shortcut(frame.args, 2)-- or &amp;#039;[[Category:Wikipedia shortcut box first parameter needs fixing|{{PAGENAME}}]]&amp;#039;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- list of policy shortcuts&lt;br /&gt;
function p.policy(frame)&lt;br /&gt;
    return shortcut(frame.args, 3)-- or &amp;#039;[[Category:Wikipedia shortcut box first parameter needs fixing|{{PAGENAME}}]]&amp;#039;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- left-aligned list of shortcuts&lt;br /&gt;
function p.left(frame)&lt;br /&gt;
    return shortcut(frame.args, 4)-- or &amp;#039;[[Category:Wikipedia shortcut box first parameter needs fixing|{{PAGENAME}}]]&amp;#039;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>imported&gt;Enterprisey</name></author>
	</entry>
</feed>