Template:HistoryOfSouthAsia

From AP Worldipedia
Jump to navigation Jump to search

- <mediawiki xmlns="http://www.mediawiki.org/xml/export-0.8/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.mediawiki.org/xml/export-0.8/ http://www.mediawiki.org/xml/export-0.8.xsd" version="0.8" xml:lang="en"> - <siteinfo>

 <sitename>Wikipedia</sitename> 
 <base>http://en.wikipedia.org/wiki/Main_Page</base> 
 <generator>MediaWiki 1.22wmf13</generator> 
 <case>first-letter</case> 

- <namespaces>

 <namespace key="-2" case="first-letter">Media</namespace> 
 <namespace key="-1" case="first-letter">Special</namespace> 
 <namespace key="0" case="first-letter" /> 
 <namespace key="1" case="first-letter">Talk</namespace> 
 <namespace key="2" case="first-letter">User</namespace> 
 <namespace key="3" case="first-letter">User talk</namespace> 
 <namespace key="4" case="first-letter">Wikipedia</namespace> 
 <namespace key="5" case="first-letter">Wikipedia talk</namespace> 
 <namespace key="6" case="first-letter">File</namespace> 
 <namespace key="7" case="first-letter">File talk</namespace> 
 <namespace key="8" case="first-letter">MediaWiki</namespace> 
 <namespace key="9" case="first-letter">MediaWiki talk</namespace> 
 <namespace key="10" case="first-letter">Template</namespace> 
 <namespace key="11" case="first-letter">Template talk</namespace> 
 <namespace key="12" case="first-letter">Help</namespace> 
 <namespace key="13" case="first-letter">Help talk</namespace> 
 <namespace key="14" case="first-letter">Category</namespace> 
 <namespace key="15" case="first-letter">Category talk</namespace> 
 <namespace key="100" case="first-letter">Portal</namespace> 
 <namespace key="101" case="first-letter">Portal talk</namespace> 
 <namespace key="108" case="first-letter">Book</namespace> 
 <namespace key="109" case="first-letter">Book talk</namespace> 
 <namespace key="446" case="first-letter">Education Program</namespace> 
 <namespace key="447" case="first-letter">Education Program talk</namespace> 
 <namespace key="710" case="first-letter">TimedText</namespace> 
 <namespace key="711" case="first-letter">TimedText talk</namespace> 
 <namespace key="828" case="first-letter">Module</namespace> 
 <namespace key="829" case="first-letter">Module talk</namespace> 
 </namespaces>
 </siteinfo>

- <page>

 <title>Template:History of South Asia</title> 
 <ns>10</ns> 
 <id>672102</id> 

- <revision>

 <id>569204011</id> 
 <parentid>567956489</parentid> 
 <timestamp>2013-08-19T11:00:15Z</timestamp> 

- <contributor>

 <username>Bazaan</username> 
 <id>7006431</id> 
 </contributor>
 <text xml:space="preserve" bytes="8500">{{#invoke: Sidebar | collapsible }}{{#invoke:documentation|main|_content={{ {{#invoke:documentation|contentTitle}}}}}}</text> 
 <sha1>fbska8g2gmvp04iii1o667mwgb4r0ei</sha1> 
 <model>wikitext</model> 
 <format>text/x-wiki</format> 
 </revision>
 </page>

- <page>

 <title>Template:Documentation</title> 
 <ns>10</ns> 
 <id>13529042</id> 

- <revision>

 <id>563934891</id> 
 <parentid>563933830</parentid> 
 <timestamp>2013-07-12T09:23:40Z</timestamp> 

- <contributor>

 <username>Mr. Stradivarius</username> 
 <id>4708675</id> 
 </contributor>
 <minor /> 
 <comment>undo per talk - this breaks transclusions that use both the "1" and "content" parameters</comment> 

<text xml:space="preserve" bytes="2382">

Documentation icon Template documentation[create]

</text>

 <sha1>mjkaa9gzxxkw9jtbx69ji2jqmczw0fl</sha1> 
 <model>wikitext</model> 
 <format>text/x-wiki</format> 
 </revision>
 </page>

- <page>

 <title>Template:Documentation/docspace</title> 
 <ns>10</ns> 
 <id>29587406</id> 

- <revision>

 <id>396601229</id> 
 <parentid>396598491</parentid> 
 <timestamp>2010-11-13T23:42:41Z</timestamp> 

- <contributor>

 <username>Plastikspork</username> 
 <id>5075409</id> 
 </contributor>
 <minor /> 
 <comment>Protected Template:Documentation/docspace: Highly visible template: Will be used by Template:Documentation ([edit=sysop] (indefinite) [move=sysop] (indefinite))</comment> 
 <text xml:space="preserve" bytes="302">Template {{#invoke:documentation|main|_content={{ {{#invoke:documentation|contentTitle}}}}}}</text> 
 <sha1>7f8iymss9sr4v7f4t5pza1arwjogrv3</sha1> 
 <model>wikitext</model> 
 <format>text/x-wiki</format> 
 </revision>
 </page>

- <page>

 <title>Template:Documentation/end box</title> 
 <ns>10</ns> 
 <id>29586766</id> 

- <revision>

 <id>542437204</id> 
 <parentid>521646491</parentid> 
 <timestamp>2013-03-06T20:51:38Z</timestamp> 

- <contributor>

 <username>WOSlinker</username> 
 <id>3138265</id> 
 </contributor>
 <comment>remove interwiki text</comment> 

<text xml:space="preserve" bytes="4130">

</text>

 <sha1>0ureyobwxmpfh5nk2onuwq4n0yv4iqq</sha1> 
 <model>wikitext</model> 
 <format>text/x-wiki</format> 
 </revision>
 </page>

- <page>

 <title>Template:Documentation/end box2</title> 
 <ns>10</ns> 
 <id>29587251</id> 

- <revision>

 <id>563934923</id> 
 <parentid>563933457</parentid> 
 <timestamp>2013-07-12T09:24:00Z</timestamp> 

- <contributor>

 <username>Mr. Stradivarius</username> 
 <id>4708675</id> 
 </contributor>
 <minor /> 
 <comment>undo per talk - this breaks transclusions that use both the "1" and "content" parameters</comment> 

<text xml:space="preserve" bytes="880">

</text>

 <sha1>g2ve9s20z5yve6o48sscjqe0kkaz658</sha1> 
 <model>wikitext</model> 
 <format>text/x-wiki</format> 
 </revision>
 </page>

- <page>

 <title>Template:Documentation/start box</title> 
 <ns>10</ns> 
 <id>29586753</id> 

- <revision>

 <id>560807734</id> 
 <parentid>545276199</parentid> 
 <timestamp>2013-06-20T21:31:27Z</timestamp> 

- <contributor>

 <username>WOSlinker</username> 
 <id>3138265</id> 
 </contributor>
 <comment>rearrange order and use mw-editsection class as per edit request</comment> 

<text xml:space="preserve" bytes="1960">

Documentation icon Template documentation[view] [edit] [history] [purge]

</text>

 <sha1>1nqc1wpf3zz4xx0peh0nta6vwxz79rh</sha1> 
 <model>wikitext</model> 
 <format>text/x-wiki</format> 
 </revision>
 </page>

- <page>

 <title>Template:Documentation/start box2</title> 
 <ns>10</ns> 
 <id>29587220</id> 

- <revision>

 <id>396602894</id> 
 <parentid>396600453</parentid> 
 <timestamp>2010-11-13T23:53:20Z</timestamp> 

- <contributor>

 <username>Plastikspork</username> 
 <id>5075409</id> 
 </contributor>
 <comment>trim</comment> 

<text xml:space="preserve" bytes="641">

Documentation icon Template documentation[create]
</text>
 <sha1>evvfdz38x89xmzvm8q6m4pimyhoko4m</sha1> 
 <model>wikitext</model> 
 <format>text/x-wiki</format> 
 </revision>
 </page>

- <page>

 <title>Template:Documentation/template page</title> 
 <ns>10</ns> 
 <id>29587443</id> 

- <revision>

 <id>396601081</id> 
 <parentid>396599183</parentid> 
 <timestamp>2010-11-13T23:41:37Z</timestamp> 

- <contributor>

 <username>Plastikspork</username> 
 <id>5075409</id> 
 </contributor>
 <minor /> 
 <comment>Protected Template:Documentation/template page: Highly visible template: Will be used by Template:Documentation ([edit=sysop] (indefinite) [move=sysop] (indefinite))</comment> 
 <text xml:space="preserve" bytes="232">HistoryOfSouthAsia{{#invoke:documentation|main|_content={{ {{#invoke:documentation|contentTitle}}}}}}</text> 
 <sha1>fenc3r6oe2sito28b1d8xgyo9gpq5uf</sha1> 
 <model>wikitext</model> 
 <format>text/x-wiki</format> 
 </revision>
 </page>

- <page>

 <title>Template:Fmbox</title> 
 <ns>10</ns> 
 <id>19236000</id> 

- <revision>

 <id>568639354</id> 
 <parentid>388140456</parentid> 
 <timestamp>2013-08-15T11:02:38Z</timestamp> 

- <contributor>

 <username>TheDJ</username> 
 <id>244887</id> 
 </contributor>
 <comment>add role</comment> 
<text xml:space="preserve" bytes="1364"> {{#invoke:documentation|main|_content={{ {{#invoke:documentation|contentTitle}}}}}} </text>
 <sha1>dg0y8bbs1wzbrnkdaq3i256tkh563ca</sha1> 
 <model>wikitext</model> 
 <format>text/x-wiki</format> 
 </revision>
 </page>

- <page>

 <title>Template:Sidebar with collapsible lists</title> 
 <ns>10</ns> 
 <id>19452779</id> 

- <revision>

 <id>565166385</id> 
 <parentid>546453240</parentid> 
 <timestamp>2013-07-21T09:34:52Z</timestamp> 

- <contributor>

 <username>Mr. Stradivarius</username> 
 <id>4708675</id> 
 </contributor>
 <minor /> 
 <comment>Changed protection level of Template:Sidebar with collapsible lists: Highly visible template: 32,000 transclusions ([Edit=Block all non-admin users] (indefinite) [Move=Block all non-admin users] (indefinite))</comment> 
 <text xml:space="preserve" bytes="220">{{#invoke: Sidebar | collapsible }} {{#invoke:documentation|main|_content={{ {{#invoke:documentation|contentTitle}}}}}}  </text> 
 <sha1>1y05i99gk0t8cfrvas2jsp753ji60g0</sha1> 
 <model>wikitext</model> 
 <format>text/x-wiki</format> 
 </revision>
 </page>

- <page>

 <title>Template:Spaced ndash</title> 
 <ns>10</ns> 
 <id>10708380</id> 

- <revision>

 <id>484761095</id> 
 <parentid>461147331</parentid> 
 <timestamp>2012-03-30T21:49:01Z</timestamp> 

- <contributor>

 <username>UtherSRG</username> 
 <id>33145</id> 
 </contributor>
 <minor /> 
 <comment>UtherSRG moved page Template:Ndash to Template:Spaced ndash: Per RM. So help you all if this break the world....</comment> 
 <text xml:space="preserve" bytes="131"> –  {{#invoke:documentation|main|_content={{ {{#invoke:documentation|contentTitle}}}}}}  </text> 
 <sha1>44od3v3hy3o7813hgbduh1peb2790sz</sha1> 
 <model>wikitext</model> 
 <format>text/x-wiki</format> 
 </revision>
 </page>

- <page>

 <title>Template:Template other</title> 
 <ns>10</ns> 
 <id>21418395</id> 

- <revision>

 <id>388689098</id> 
 <parentid>276896349</parentid> 
 <timestamp>2010-10-04T14:47:12Z</timestamp> 

- <contributor>

 <username>WOSlinker</username> 
 <id>3138265</id> 
 </contributor>
 <comment>remove</comment> 
 <text xml:space="preserve" bytes="435"> {{#invoke:documentation|main|_content={{ {{#invoke:documentation|contentTitle}}}}}}  </text> 
 <sha1>0tcssjmltwl7y5v3f5wj2kqciaabqly</sha1> 
 <model>wikitext</model> 
 <format>text/x-wiki</format> 
 </revision>
 </page>

- <page>

 <title>Template:Tl</title> 
 <ns>10</ns> 
 <id>1487430</id> 
 <restrictions>move=sysop:edit=sysop</restrictions> 

- <revision>

 <id>388327745</id> 
 <parentid>384906015</parentid> 
 <timestamp>2010-10-02T19:12:49Z</timestamp> 

- <contributor>

 <username>WOSlinker</username> 
 <id>3138265</id> 
 </contributor>
 <comment>remove</comment> 
 <text xml:space="preserve" bytes="76">{{[[Template:{{{1}}}|{{{1}}}]]}} {{#invoke:documentation|main|_content={{ {{#invoke:documentation|contentTitle}}}}}} </text> 
 <sha1>ol1t4p5rix3sawawisp7kolp1s26zqz</sha1> 
 <model>wikitext</model> 
 <format>text/x-wiki</format> 
 </revision>
 </page>

- <page>

 <title>Module:HtmlBuilder</title> 
 <ns>828</ns> 
 <id>38663961</id> 

- <revision>

 <id>558894130</id> 
 <parentid>558890480</parentid> 
 <timestamp>2013-06-08T11:21:32Z</timestamp> 

- <contributor>

 <username>Edokter</username> 
 <id>1624037</id> 
 </contributor>
 <comment>Space befone closing /></comment> 
 <text xml:space="preserve" bytes="4172">-- Experimental module for building complex HTML (e.g. infoboxes, navboxes) using a fluent interface local HtmlBuilder = {} local metatable = {} metatable.__index = function(t, key) local ret = rawget(t, key) if ret then return ret end ret = metatable[key] if type(ret) == 'function' then return function(...) return ret(t, ...) end else return ret end end metatable.__tostring = function(t) local ret = {} t._build(ret) return table.concat(ret, ) end metatable._build = function(t, ret) if t.tagName then table.insert(ret, '<' .. t.tagName) for i, attr in ipairs(t.attributes) do table.insert(ret, ' ' .. attr.name .. '="' .. attr.val .. '"') end if #t.styles > 0 then table.insert(ret, ' style="') for i, prop in ipairs(t.styles) do if type(prop) == 'string' then -- added with cssText() table.insert(ret, prop .. ';') else -- added with css() table.insert(ret, prop.name .. ':' .. prop.val .. ';') end end table.insert(ret, '"') end if t.selfClosing then table.insert(ret, ' /') end table.insert(ret, '>') end for i, node in ipairs(t.nodes) do if node then if type(node) == 'table' then node._build(ret) else table.insert(ret, tostring(node)) end end end if t.tagName and not t.unclosed and not t.selfClosing then table.insert(ret, '</' .. t.tagName .. '>') end end metatable.node = function(t, builder) if builder then table.insert(t.nodes, builder) end return t end metatable.wikitext = function(t, ...) local vals = {...} for i = 1, #vals do if vals[i] then table.insert(t.nodes, vals[i]) end end return t end metatable.newline = function(t) table.insert(t.nodes, '\n') return t end metatable.tag = function(t, tagName, args) args = args or {} args.parent = t local builder = HtmlBuilder.create(tagName, args) table.insert(t.nodes, builder) return builder end function getAttr(t, name) for i, attr in ipairs(t.attributes) do if attr.name == name then return attr end end end metatable.attr = function(t, name, val) -- if caller sets the style attribute explicitly, then replace all styles previously added with css() and cssText() if name == 'style' then t.styles = {val} return t end local attr = getAttr(t, name) if attr then attr.val = val else table.insert(t.attributes, {name = name, val = val}) end return t end metatable.addClass = function(t, class) if class then local attr = getAttr(t, 'class') if attr then attr.val = attr.val .. ' ' .. class else t.attr('class', class) end end return t end metatable.css = function(t, name, val) if type(val) == 'string' or type(val) == 'number' then for i, prop in ipairs(t.styles) do if prop.name == name then prop.val = val return t end end table.insert(t.styles, {name = name, val = val}) end return t end metatable.cssText = function(t, css) if css then table.insert(t.styles, css) end return t end metatable.done = function(t) return t.parent or t end metatable.allDone = function(t) while t.parent do t = t.parent end return t end function HtmlBuilder.create(tagName, args) args = args or {} local builder = {} setmetatable(builder, metatable) builder.nodes = {} builder.attributes = {} builder.styles = {} builder.tagName = tagName builder.parent = args.parent builder.unclosed = args.unclosed or false builder.selfClosing = args.selfClosing or false return builder end return HtmlBuilder</text> 
 <sha1>hc4dorx9fv0lfudrgehty7o1hfd1rq9</sha1> 
 <model>Scribunto</model> 
 <format>text/plain</format> 
 </revision>
 </page>

- <page>

 <title>Module:Navbar</title> 
 <ns>828</ns> 
 <id>38827227</id> 

- <revision>

 <id>548273773</id> 
 <parentid>548032792</parentid> 
 <timestamp>2013-04-02T05:53:01Z</timestamp> 

- <contributor>

 <username>Dragons flight</username> 
 <id>16980</id> 
 </contributor>
 <comment>also trap talk title</comment> 
 <text xml:space="preserve" bytes="4370">local p = {} local HtmlBuilder = require('Module:HtmlBuilder') function trim(s) return mw.ustring.match( s, "^%s*(.-)%s*$" ) end function error(s) local span = HtmlBuilder.create('span') span .addClass('error') .css('float', 'left') .css('white-space', 'nowrap') .wikitext('Error: ' .. s) return tostring(span) end function getTitle( pageName ) pageName = trim( pageName ); local page_title, talk_page_title; if mw.ustring.sub(pageName, 1, 1) == ':' then page_title = mw.title.new( mw.ustring.sub(pageName, 2) ); else page_title = mw.title.new( pageName, 'Template' ); end if page_title then talk_page_title = page_title.talkPageTitle; else talk_page_title = nil; end return page_title, talk_page_title; end function _navbar( args ) if not args[1] then return error('No name provided') end local good, title, talk_title; good, title, talk_title = pcall( getTitle, args[1] ); if not good then return error('Expensive parser function limit exceeded'); end if not title then return error('Page does not exist') end local mainpage = title.fullText; local talkpage = talk_title and talk_title.fullText or  local editurl = title:fullUrl( 'action=edit' ); local viewLink, talkLink, editLink = 'view', 'talk', 'edit' if args.mini then viewLink, talkLink, editLink = 'v', 't', 'e' end local div = HtmlBuilder.create( 'div' ) div .addClass( 'noprint' ) .addClass( 'plainlinks' ) .addClass( 'hlist' ) .addClass( 'navbar') .cssText( args.style ) if args.mini then div.addClass('mini') end if not (args.mini or args.plain) then div .tag( 'span' ) .css( 'word-spacing', 0 ) .cssText( args.fontstyle ) .wikitext( args.text or 'This box:' ) .wikitext( ' ' ) end if args.brackets then div .tag('span') .css('margin-right', '-0.125em') .cssText( args.fontstyle ) .wikitext( '[' ) .newline(); end local ul = div.tag('ul'); ul .tag( 'li' ) .addClass( 'nv-view' ) .wikitext( '' ) .tag( 'span ' ) .attr( 'title', 'View this template' ) .cssText( args.fontstyle or  ) .wikitext( viewLink ) .done() .wikitext( '' ) .done() .tag( 'li' ) .addClass( 'nv-talk' ) .wikitext( '' ) .tag( 'span ' ) .attr( 'title', 'Discuss this template' ) .cssText( args.fontstyle or  ) .wikitext( talkLink ) .done() .wikitext( '' ); if not args.noedit then ul .tag( 'li' ) .addClass( 'nv-edit' ) .wikitext( '[' .. editurl .. ' ' ) .tag( 'span ' ) .attr( 'title', 'Edit this template' ) .cssText( args.fontstyle or  ) .wikitext( editLink ) .done() .wikitext( ']' ); end if args.brackets then div .tag('span') .css('margin-left', '-0.125em') .cssText( args.fontstyle or  ) .wikitext( ']' ) .newline(); end return tostring(div) end function p.navbar(frame) local origArgs -- If called via #invoke, use the args passed into the invoking template. -- Otherwise, for testing purposes, assume args are being passed directly in. if frame == mw.getCurrentFrame() then origArgs = frame:getParent().args else origArgs = frame end -- ParserFunctions considers the empty string to be false, so to preserve the previous -- behavior of Template:Navbar, change any empty arguments to nil, so Lua will consider -- them false too. args = {} for k, v in pairs(origArgs) do if v ~=  then args[k] = v end end return _navbar(args) end return p</text> 
 <sha1>h390uttz2d0kwp727rhi82zswybbf85</sha1> 
 <model>Scribunto</model> 
 <format>text/plain</format> 
 </revision>
 </page>

- <page>

 <title>Module:Sidebar</title> 
 <ns>828</ns> 
 <id>38866323</id> 

- <revision>

 <id>565166474</id> 
 <parentid>546451351</parentid> 
 <timestamp>2013-07-21T09:36:03Z</timestamp> 

- <contributor>

 <username>Mr. Stradivarius</username> 
 <id>4708675</id> 
 </contributor>
 <minor /> 
 <comment>Protected Module:Sidebar: High-risk Lua module ([Edit=Block all non-admin users] (indefinite) [Move=Block all non-admin users] (indefinite))</comment> 
<text xml:space="preserve" bytes="10511">-- -- This module implements -- local p = {} local HtmlBuilder = require('Module:HtmlBuilder') local Navbar = require('Module:Navbar') local function trimAndAddAutomaticNewline(s) -- For compatibility with the original {{#invoke: Sidebar | collapsible }} -- implementation, which passed some parameters through {{#if}} to trim -- their whitespace. This also triggered the automatic newline behavior. -- (meta:Help:Newlines and spaces#Automatic newline) s = mw.ustring.gsub(s, "^%s*(.-)%s*$", "%1") if mw.ustring.find(s, '^[#*:;]') or mw.ustring.find(s, '^{|') then return '\n' .. s else return s end end local function _sidebar(args) local root = HtmlBuilder.create('table') root .addClass('vertical-navbox') .addClass(args.wraplinks ~= 'true' and 'nowraplinks') .addClass(args.bodyclass or args.class) .attr('cellspacing', args.cellspacing or 5) .attr('cellpadding', args.cellpadding or 0) .css('float', args.float or 'right') .css('clear', (args.float == 'none' and 'both') or args.float or 'right') .css('width', args.width or '22.0em') .css('margin', args.float == 'left' and '0 1.0em 1.0em 0' or '0 0 1.0em 1.0em') .css('background', '#f9f9f9') .css('border', '1px solid #aaa') .css('padding', '0.2em') .css('border-spacing', '0.4em 0') .css('text-align', 'center') .css('line-height', '1.4em') .css('font-size', '88%') .cssText(args.bodystyle or args.style) if args.outertitle then root .tag('caption') .addClass(args.outertitleclass) .css('padding-bottom', '0.2em') .css('font-size', '125%') .css('line-height', '1.2em') .css('font-weight', 'bold') .cssText(args.outertitlestyle) .wikitext(args.outertitle) end if args.topimage then local imageCell = root.tag('tr').tag('td') imageCell .addClass(args.topimageclass) .css('padding', '0.4em 0') .cssText(args.topimagestyle) .wikitext(args.topimage) if args.topcaption then imageCell .tag('div') .css('padding-top', '0.2em') .css('line-height', '1.2em') .cssText(args.topcaptionstyle) .wikitext(args.topcaption) end end if args.pretitle then root .tag('tr') .tag('td') .addClass(args.pretitleclass) .cssText(args.basestyle) .css('padding-top', args.topimage and '0.2em' or '0.4em') .css('line-height', '1.2em') .cssText(args.pretitlestyle) .wikitext(args.pretitle) end if args.title then root .tag('tr') .tag('th') .addClass(args.titleclass) .cssText(args.basestyle) .css('padding', '0.2em 0.4em 0.2em') .css('padding-top', args.pretitle and 0) .css('font-size', '145%') .css('line-height', '1.2em') .cssText(args.titlestyle) .wikitext(args.title) end if args.image then local imageCell = root.tag('tr').tag('td') imageCell .addClass(args.imageclass) .css('padding', '0.2em 0 0.4em') .cssText(args.imagestyle) .wikitext(args.image) if args.caption then imageCell .tag('div') .css('padding-top', '0.2em') .css('line-height', '1.2em') .cssText(args.captionstyle) .wikitext(args.caption) end end if args.above then root .tag('tr') .tag('td') .addClass(args.aboveclass) .css('padding', '0.3em 0.4em 0.3em') .css('font-weight', 'bold') .cssText(args.abovestyle) .newline() -- newline required for bullet-points to work .wikitext(args.above) end local rowNums = {} for k, v in pairs(args) do k = .. k local num = k:match('^heading(%d+)$') or k:match('^content(%d+)$') if num then table.insert(rowNums, tonumber(num)) end end table.sort(rowNums) -- remove duplicates from the list (e.g. 3 will be duplicated if both heading3 and content3 are specified) for i = #rowNums, 1, -1 do if rowNums[i] == rowNums[i - 1] then table.remove(rowNums, i) end end for i, num in ipairs(rowNums) do local heading = args['heading' .. num] if heading then root .tag('tr') .tag('th') .addClass(args.headingclass) .css('padding', '0.1em') .cssText(args.basestyle) .cssText(args.headingstyle) .cssText(args['heading' .. num .. 'style']) .wikitext(heading) end local content = args['content' .. num] if content then root .tag('tr') .tag('td') .addClass(args.contentclass) .css('padding', '0 0.1em 0.4em') .cssText(args.contentstyle) .cssText(args['content' .. num .. 'style']) .newline() .wikitext(content) .done() .newline() -- Without a linebreak after the , a nested list like "* Template:Hlist" doesn't parse correctly. end end if args.below then root .tag('tr') .tag('td') .addClass(args.belowclass) .css('padding', '0.3em 0.4em 0.3em') .css('font-weight', 'bold') .cssText(args.belowstyle) .newline() .wikitext(args.below) end local navbarArg = args.navbar or args.tnavbar if navbarArg ~= 'none' and navbarArg ~= 'off' then root .tag('tr') .tag('td') .css('text-align', 'right') .css('font-size', '115%') .cssText(args.navbarstyle or args.tnavbarstyle) .wikitext(Navbar.navbar({ args.name or mw.title.getCurrentTitle().fullText, mini = 1, fontstyle = args.navbarfontstyle or args.tnavbarfontstyle })) end return tostring(root) end function _collapsibleSidebar(args) args.abovestyle = 'border-top: 1px solid #aaa; border-bottom: 1px solid #aaa;' .. (args.abovestyle or ) args.belowstyle = 'border-top: 1px solid #aaa; border-bottom: 1px solid #aaa;' .. (args.belowstyle or ) args.navbarstyle = 'padding-top: 0.6em;' .. (args.navbarstyle or args.tnavbarstyle or ) local contentArgs = {} for k, v in pairs(args) do local num = ( .. k):match('^list(%d+)$') if num then local expand = args.expanded and (args.expanded == 'all' or args.expanded == args['list' .. num .. 'name']) local row = HtmlBuilder.create('div') row .addClass('NavFrame') .addClass((not expand) and 'collapsed') .css('border', 'none') .css('padding', 0) .cssText(args.listframestyle) .cssText(args['list' .. num .. 'framestyle']) .tag('div') .addClass('NavHead') .addClass(args.listtitleclass) .css('font-size', '105%') .css('background', 'transparent') .css('text-align', 'left') .cssText(args.basestyle) .cssText(args.listtitlestyle) .cssText(args['list' .. num .. 'titlestyle']) .wikitext(trimAndAddAutomaticNewline(args['list' .. num .. 'title'] or 'List')) .done() .tag('div') .addClass('NavContent') .addClass(args.listclass) .addClass(args['list' .. num .. 'class']) .css('font-size', '105%') .css('padding', '0.2em 0 0.4em') .css('text-align', 'center') .cssText(args.liststyle) .cssText(args['list' .. num .. 'style']) .wikitext(trimAndAddAutomaticNewline(args['list' .. num])) contentArgs['content' .. num] = tostring(row) end end for k, v in pairs(contentArgs) do args[k] = v end return _sidebar(args) end function makeWrapper(func) return function(frame) local origArgs if frame == mw.getCurrentFrame() then -- We're being called via #invoke. If the invoking template passed any args, use -- them. Otherwise, use the args that were passed into the template. origArgs = frame:getParent().args for k, v in pairs(frame.args) do origArgs = frame.args break end else -- We're being called from another module or from the debug console, so assume -- the args are passed in directly. origArgs = frame end -- ParserFunctions considers the empty string to be false, so to preserve the previous -- behavior of the template, change any empty arguments to nil, so Lua will consider -- them false too. local args = {} for k, v in pairs(origArgs) do if v ~= then args[k] = v end end return func(args) end end return { sidebar = makeWrapper(_sidebar), collapsible = makeWrapper(_collapsibleSidebar) }</text>
 <sha1>i0ad73upd3sw299t46ftse4x2cv18w7</sha1> 
 <model>Scribunto</model> 
 <format>text/plain</format> 
 </revision>
 </page>
 </mediawiki>