Template:Infobox: Difference between revisions

From HPCwiki
Jump to navigation Jump to search
No edit summary
(Blanked the page)
 
Line 1: Line 1:
<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.23wmf4</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:Infobox</title>
    <ns>10</ns>
    <id>891845</id>
    <restrictions>edit=sysop:move=sysop</restrictions>
    <revision>
      <id>558417008</id>
      <parentid>558281256</parentid>
      <timestamp>2013-06-05T09:16:23Z</timestamp>
      <contributor>
        <username>Mr. Stradivarius</username>
        <id>4708675</id>
      </contributor>
      <comment>switch back to Lua implementation - issues with [[Template:Infobox airline]] have now been addressed</comment>
      <text xml:space="preserve" bytes="145">{{#invoke:Infobox|infobox}}&lt;noinclude&gt;


{{documentation}}
&lt;!-- Categories go in the /doc subpage, and interwikis go in Wikidata. --&gt;
&lt;/noinclude&gt;</text>
      <sha1>kavlqnbr7pew8bhy59a3n9jmoau5jt4</sha1>
      <model>wikitext</model>
      <format>text/x-wiki</format>
    </revision>
  </page>
  <page>
    <title>Template:Clear</title>
    <ns>10</ns>
    <id>1239772</id>
    <revision>
      <id>579832146</id>
      <parentid>557892365</parentid>
      <timestamp>2013-11-02T04:54:10Z</timestamp>
      <contributor>
        <username>Fuhghettaboutit</username>
        <id>665998</id>
      </contributor>
      <minor/>
      <comment>Changed protection level of Template:Clear: Enable access by template editors ([Edit=Allow only template editors and admins] (indefinite) [Move=Allow only template editors and admins] (indefinite))</comment>
      <text xml:space="preserve" bytes="81">&lt;div style=&quot;clear:{{{1|both}}};&quot;&gt;&lt;/div&gt;&lt;noinclude&gt;
{{documentation}}
&lt;/noinclude&gt;</text>
      <sha1>6mk3e4afot6hzu6tzbljxxk83e14xv6</sha1>
      <model>wikitext</model>
      <format>text/x-wiki</format>
    </revision>
  </page>
  <page>
    <title>Template:Distinguish</title>
    <ns>10</ns>
    <id>3406012</id>
    <restrictions>edit=sysop:move=sysop</restrictions>
    <revision>
      <id>523631744</id>
      <parentid>523631583</parentid>
      <timestamp>2012-11-18T07:30:44Z</timestamp>
      <contributor>
        <username>Dinoguy1000</username>
        <id>2412089</id>
      </contributor>
      <comment>right, I'm still an idiot =P&amp;nbsp;</comment>
      <text xml:space="preserve" bytes="505">{{Hatnote|Not to be confused with [[:{{{1}}}]]{{
    #if: {{{3|}}}{{{4|}}}
    | , [[:{{{2}}}]], {{
      #if: {{{4|}}}
      | [[:{{{3}}}]], or [[:{{{4}}}]]
      | or [[:{{{3}}}]]
    }}
    | {{
      #if: {{{2|}}}
      | &amp;nbsp;or [[:{{{2}}}]]
    }}
  }}.}}&lt;noinclude&gt;&lt;!-- splitting these lines causes {{Documentation}} template to terminate green shading when Distinguish is used in /doc pages. --&gt;
{{Documentation}}
&lt;!-- Add categories and interwikis to the /doc subpage, not here! --&gt;
&lt;/noinclude&gt;</text>
      <sha1>g7o4yc5l5v9lkjviygvr0ex3dq1ulgr</sha1>
      <model>wikitext</model>
      <format>text/x-wiki</format>
    </revision>
  </page>
  <page>
    <title>Template:Documentation</title>
    <ns>10</ns>
    <id>13529042</id>
    <revision>
      <id>577591885</id>
      <parentid>563934891</parentid>
      <timestamp>2013-10-17T16:26:00Z</timestamp>
      <contributor>
        <username>Mark Arsten</username>
        <id>15020596</id>
      </contributor>
      <minor/>
      <comment>Changed protection level of Template:Documentation: Allowing Protected Template editors ([Edit=Protected template] (indefinite) [Move=Protected template] (indefinite))</comment>
      <text xml:space="preserve" bytes="2382">&lt;!--
  Automatically add {{template sandbox notice}} when on a /sandbox page.
--&gt;{{#ifeq: {{SUBPAGENAME}} | sandbox
| &lt;div style=&quot;clear: both;&quot;&gt;&lt;/div&gt;{{template sandbox notice|{{{livepage|}}}}}
}}&lt;!--
  Automatically add {{pp-template}} to protected templates.
--&gt;{{template other
| {{#ifeq: {{PROTECTIONLEVEL:move}} | sysop
  | {{pp-template|docusage=yes}}
  | {{#if: {{PROTECTIONLEVEL:edit}}
    | {{pp-template|docusage=yes}}
    | &lt;!--Not protected, or only semi-move-protected--&gt;
    }}
  }}
}}&lt;!--
  Start of green doc box.
--&gt;{{documentation/start box2
| preload = {{{preload|}}}  &lt;!--Allow custom preloads--&gt;
| heading = {{{heading|¬}}}  &lt;!--Empty but defined means no header--&gt;
| heading-style = {{{heading-style|}}}
| content = {{{content|}}}
&lt;!--Some namespaces must have the /doc, /sandbox and /testcases
    in talk space--&gt;
| docspace = {{documentation/docspace}}
| 1 = {{{1|}}}  &lt;!--Other docname, if fed--&gt;
&lt;!--The namespace is added in /start box2--&gt;
| template page = {{documentation/template page}}
}}&lt;!-- Start content --&gt;&lt;!--
  Start load the /doc content:
  Note: The line breaks between this comment and the next line are necessary
  so  &quot;=== Headings ===&quot; at the start and end of docs are interpreted.
--&gt;
{{#switch: {{#if:{{{content|}}}|1|0}}{{#if:{{{1|}}}|1|0}}{{#ifexist:{{{1|}}}|1|0}}{{#ifexist:{{documentation/docspace}}:{{documentation/template page}}/doc|1|0}}
| 1000 | 1001 | 1010 | 1011 | 1100 | 1101 | 1110
| 1111 = {{{content|}}}
| 0110 | 0111 = {{ {{{1}}} }}
| 0001 | 0011 = {{ {{documentation/docspace}}:{{documentation/template page}}/doc }}
| 0000 | 0100 | 0010 | 0101 =
}}
&lt;!--
  End load the /doc content:
  Note: The line breaks between this comment and the previous line are necessary
  so  &quot;=== Headings ===&quot; at the start and end of docs are interpreted.
--&gt;{{documentation/end box2
| preload = {{{preload|}}}  &lt;!--Allow custom preloads--&gt;
| content = {{{content|}}}
| link box = {{{link box|}}}  &lt;!--So &quot;link box=off&quot; works--&gt;
&lt;!--Some namespaces must have the /doc, /sandbox and /testcases
    in talk space--&gt;
| docspace = {{documentation/docspace}}
| 1 = {{{1|}}}  &lt;!--Other docname, if fed--&gt;
&lt;!--The namespace is added in /end box2--&gt;
| template page = {{documentation/template page}}
}}&lt;!--
  End of green doc box
--&gt;&lt;noinclude&gt;
&lt;!-- Add categories and interwikis to the /doc subpage, not here! --&gt;
&lt;/noinclude&gt;</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: [[WP:HRT|Highly visible template]]: Will be used by [[Template:Documentation]] ([edit=sysop] (indefinite) [move=sysop] (indefinite))</comment>
      <text xml:space="preserve" bytes="302">{{#switch: {{SUBJECTSPACE}}
  | {{ns:0}}
  | {{ns:File}}
  | {{ns:MediaWiki}}
  | {{ns:Category}} = {{TALKSPACE}}
  | #default = {{SUBJECTSPACE}}
}}&lt;noinclude&gt;
{{documentation|content=
This subtemplate of {{tl|documentation}} is used to determine the namespace of the documentation page.
}}&lt;/noinclude&gt;</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">&lt;noinclude&gt;&lt;div&gt;&lt;/noinclude&gt;&lt;div style=&quot;clear: both;&quot;&gt;&lt;/div&gt;&lt;!--So right or left floating items don't stick out of the doc box.--&gt;
&lt;/div&gt;&lt;!--End of green doc box--&gt;&lt;!--
  Link box below for the doc meta-data:
--&gt;{{#if:
  &lt;!--Check if we should show the link box--&gt;
  {{#ifeq: {{{link box|}}} | off
  |
  | {{{doc exist|yes}}}{{
    #switch: {{SUBJECTSPACE}}
    | {{ns:User}}
    | {{ns:Template}} = yes
    }}
  }}
| {{fmbox
  | id = documentation-meta-data
  | image = none
  | style = background-color: #ecfcf4;
  | textstyle = font-style: italic;
  | text =
    {{#if: {{{link box|}}}
    | {{{link box}}}  &lt;!--Use custom link box content--&gt;
    | {{#if: {{{doc exist|yes}}}
      | &lt;!--/doc exists, link to it--&gt;
        The above [[Wikipedia:Template documentation|documentation]] is [[Wikipedia:Transclusion|transcluded]] from [[{{{docpage|{{FULLPAGENAME}}/doc}}}]]. &lt;small style=&quot;font-style: normal&quot;&gt;([{{fullurl:{{{docpage|{{FULLPAGENAME}}/doc}}}|action=edit}} edit] &amp;#124; [{{fullurl:{{{docpage|{{FULLPAGENAME}}/doc}}}|action=history}} history])&lt;/small&gt; &lt;br /&gt;
      }}&lt;!--
        Add links to /sandbox and /testcases when appropriate:
  --&gt;{{#switch: {{SUBJECTSPACE}}
      | {{ns:User}}
      | {{ns:Template}} =
        Editors can experiment in this template's {{
        #ifexist: {{{sandbox| {{FULLPAGENAME}}/sandbox }}}
        | [[{{{sandbox| {{FULLPAGENAME}}/sandbox }}}|sandbox]] &lt;small style=&quot;font-style: normal&quot;&gt;([{{fullurl: {{{sandbox| {{FULLPAGENAME}}/sandbox }}} | action=edit }} edit] &lt;nowiki&gt;|&lt;/nowiki&gt; [{{fullurl:Special:ComparePages | page1={{urlencode:{{{template page|{{FULLPAGENAME}}}}}}}&amp;page2={{urlencode:{{{sandbox|{{FULLPAGENAME}}/sandbox}}}}}}} diff])&lt;/small&gt;
        | sandbox &lt;small style=&quot;font-style: normal&quot;&gt;([{{fullurl: {{{sandbox| {{FULLPAGENAME}}/sandbox }}} | action=edit&amp;preload=Template:Documentation/preload-sandbox }} create] &lt;nowiki&gt;|&lt;/nowiki&gt; [{{fullurl: {{{sandbox| {{FULLPAGENAME}}/sandbox }}} | action=edit&amp;preload={{urlencode:{{{template page|{{FULLPAGENAME}}}}}}}&amp;summary={{urlencode:Create sandbox version of [[{{{template page|{{FULLPAGENAME}}}}}]]}} }} mirror])&lt;/small&gt;
        }} and {{
        #ifexist: {{{testcases| {{FULLPAGENAME}}/testcases }}}
        | [[{{{testcases| {{FULLPAGENAME}}/testcases }}}|testcases]] &lt;small style=&quot;font-style: normal&quot;&gt;([{{fullurl: {{{testcases| {{FULLPAGENAME}}/testcases }}} | action=edit }} edit])&lt;/small&gt;
        | testcases &lt;small style=&quot;font-style: normal&quot;&gt;([{{fullurl: {{{testcases| {{FULLPAGENAME}}/testcases }}} | action=edit&amp;preload=Template:Documentation/preload-testcases }} create])&lt;/small&gt;
        }} pages. &lt;br /&gt;
      }}&lt;!--
        Show the cats text, but not
        if &quot;content&quot; fed or &quot;docname fed&quot; since then it is
        unclear where to add the cats.
  --&gt;{{#if: {{{content|}}} {{{docname fed|}}}
      |
      | Please add categories to the [[{{{docpage|{{FULLPAGENAME}}/doc}}}|/doc]] subpage.
      }}&lt;!--
        Show the &quot;Subpages&quot; link:
  --&gt;{{#switch: {{SUBJECTSPACE}}
      | {{ns:File}} =  &lt;!--Don't show it--&gt;
      | {{ns:Template}} = &amp;#32;[[Special:PrefixIndex/{{{template page|{{FULLPAGENAME}}}}}/|Subpages of this template]].
      | #default = &amp;#32;[[Special:PrefixIndex/{{{template page|{{FULLPAGENAME}}}}}/|Subpages of this page]].
      }}
    }}{{#ifexist:{{FULLPAGENAME}}/Print
    |&lt;br /&gt;A [[Help:Books/for experts#Improving the book layout|print version]] of this template exists at [[/Print]]. If you make a change to this template, please update the print version as well.[[Category:Templates with print versions]]
    }}
  }}
}}&lt;!--End link box--&gt;&lt;!--
  Detect and report strange usage:
--&gt;{{#if:
  &lt;!--Check if {{documentation}} is transcluded
      on a /doc or /testcases page--&gt;
  {{#switch: {{SUBPAGENAME}}
  | doc
  | testcases = strange
  }}
  &lt;!--More checks can be added here, just return anything
      to make the surrounding if-case trigger--&gt;
| &lt;includeonly&gt;[[Category:Wikipedia pages with strange ((documentation)) usage|{{main other|Main:}}{{FULLPAGENAME}}]]&lt;!-- Sort on namespace --&gt;&lt;/includeonly&gt;
}}&lt;noinclude&gt;
{{pp-template|small=yes}}
&lt;/noinclude&gt;</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 &quot;1&quot; and &quot;content&quot; parameters</comment>
      <text xml:space="preserve" bytes="880">{{documentation/end box
| preload = {{{preload|}}}  &lt;!--Allow custom preloads--&gt;
| content = {{{content|}}}
| link box = {{{link box|}}}  &lt;!--So &quot;link box=off&quot; works--&gt;
| docpage =
  {{#if: {{{1|}}}
  | {{{1|}}}
  | {{{docspace|{{NAMESPACE}}}}}:{{{template page|{{PAGENAME}}}}}/doc
  }}
| doc exist =
  {{#ifexist:
    {{#if: {{{1|}}}
    | {{{1|}}}  &lt;!--Other docname fed--&gt;
    | {{{docspace|{{NAMESPACE}}}}}:{{{template page|{{PAGENAME}}}}}/doc
    }}
  | yes
  }}
| docname fed =
  {{#if: {{{1|}}}
  | yes
  }}
| sandbox =
  {{{docspace|{{NAMESPACE}}}}}:{{{template page|{{PAGENAME}}}}}/sandbox
| testcases =
  {{{docspace|{{NAMESPACE}}}}}:{{{template page|{{PAGENAME}}}}}/testcases
| template page =
  {{NAMESPACE}}:{{{template page|{{PAGENAME}}}}}
}}&lt;noinclude&gt;
{{pp-template}}
&lt;!-- Add categories and interwikis to the /doc subpage, not here! --&gt;
&lt;/noinclude&gt;</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">&lt;!--
  Start of green doc box
--&gt;&lt;div id=&quot;template-documentation&quot; class=&quot;template-documentation iezoomfix&quot;&gt;&lt;!--
  Add the heading at the top of the doc box:
--&gt;{{#ifeq: {{{heading|¬}}} | &lt;!--Defined but empty--&gt;
| &lt;!--&quot;heading=&quot;, do nothing--&gt;
| &lt;div style=&quot;padding-bottom: 3px; border-bottom: 1px solid #aaa; margin-bottom: 1ex;&quot;&gt;&lt;span style=&quot;{{#if: {{{heading-style|}}}
  | {{{heading-style|}}}
  | {{#ifeq: {{SUBJECTSPACE}} | {{ns:Template}}
    | font-weight: bold; font-size: 125%
    | font-size: 150%
    }}
  }}&quot;&gt;{{#switch: {{{heading|¬}}}
  | ¬ = 
    &lt;!--&quot;heading&quot; not defined in this or previous level--&gt;
    {{#switch: {{SUBJECTSPACE}}
    | {{ns:Template}} = [[File:Template-info.png|50px|link=|alt=Documentation icon]] Template documentation
    | {{ns:Module}} = [[File:Template-info.png|50px|link=|alt=Documentation icon]] Module documentation
    | {{ns:File}} = Summary
    | #default = Documentation
    }}
  | #default =
    &lt;!--&quot;heading&quot; has data or is empty but defined--&gt;
    {{{heading|}}}
  }}&lt;/span&gt;{{
  #if: {{{content|}}}
  |
  | &lt;!--Add the [view][edit][history][purge] or [create] links--&gt;
    &lt;span class=&quot;mw-editsection plainlinks&quot; id=&quot;doc_editlinks&quot;&gt;{{
    #if: {{{doc exist|yes}}}
    | &amp;#91;[[{{{docpage|{{FULLPAGENAME}}/doc}}}|view]]&amp;#93; [[{{fullurl:{{{docpage|{{FULLPAGENAME}}/doc}}}|action=edit}} edit]] [[{{fullurl:{{{docpage|{{FULLPAGENAME}}/doc}}}|action=history}} history]] [{{purge|purge}}]
    | &lt;!--/doc doesn't exist--&gt;
      [[{{fullurl:{{{docpage|{{FULLPAGENAME}}/doc}}}| action=edit&amp;preload={{
        #if: {{{preload|}}}
        | {{urlencode:{{{preload}}}}}
        | {{#ifeq: {{SUBJECTSPACE}} | {{ns:File}}
          | Template:Documentation/preload-filespace
          | Template:Documentation/preload
          }} }} }} create]]
    }}&lt;/span&gt;
  }}&lt;/div&gt;
}}&lt;noinclude&gt;&lt;!-- close the div --&gt;&lt;/div&gt;
{{pp-template}}
&lt;!-- Add categories and interwikis to the /doc subpage, not here! --&gt;
&lt;/noinclude&gt;</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/start box
| preload = {{{preload|}}}  &lt;!--Allow custom preloads--&gt;
| heading = {{{heading|¬}}}  &lt;!--Empty but defined means no header--&gt;
| heading-style = {{{heading-style|}}}
| content = {{{content|}}}
| docpage =
  {{#if: {{{1|}}}
  | {{{1|}}}
  | {{{docspace|{{NAMESPACE}}}}}:{{{template page|{{PAGENAME}}}}}/doc
  }}
| doc exist =
  {{#ifexist:
    {{#if: {{{1|}}}
    | {{{1|}}}  &lt;!--Other docname fed--&gt;
    | {{{docspace|{{NAMESPACE}}}}}:{{{template page|{{PAGENAME}}}}}/doc
    }}
  | yes
  }}
}}&lt;noinclude&gt;
{{pp-template}}
&lt;!-- Add categories and interwikis to the /doc subpage, not here! --&gt;
&lt;/noinclude&gt;</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: [[WP:HRT|Highly visible template]]: Will be used by [[Template:Documentation]] ([edit=sysop] (indefinite) [move=sysop] (indefinite))</comment>
      <text xml:space="preserve" bytes="232">{{#switch: {{SUBPAGENAME}}
| sandbox
| testcases = {{BASEPAGENAME}}
| #default = {{PAGENAME}}
}}&lt;noinclude&gt;{{documentation|content=
This subtemplate of {{tl|documentation}} is used to determine the template page name.
}}&lt;/noinclude&gt;</text>
      <sha1>fenc3r6oe2sito28b1d8xgyo9gpq5uf</sha1>
      <model>wikitext</model>
      <format>text/x-wiki</format>
    </revision>
  </page>
  <page>
    <title>Template:Documentation subpage</title>
    <ns>10</ns>
    <id>7890381</id>
    <revision>
      <id>545980635</id>
      <parentid>544486970</parentid>
      <timestamp>2013-03-21T13:14:54Z</timestamp>
      <contributor>
        <username>TheDJ</username>
        <id>244887</id>
      </contributor>
      <comment>add support for module categories</comment>
      <text xml:space="preserve" bytes="1365">&lt;includeonly&gt;{{#ifeq: {{lc:{{SUBPAGENAME}}}} | {{{override|doc}}}
  | &lt;!-- doc page --&gt;
&lt;/includeonly&gt;{{
    #ifeq: {{{doc-notice|show}}} | show
    | {{mbox
      | type = notice
      | image = [[File:Edit-copy green.svg|40px]]
      | text =
'''This is a [[Wikipedia:Template documentation|documentation]] [[Wikipedia:Subpages|subpage]] for {{{1|[[:{{SUBJECTSPACE}}:{{BASEPAGENAME}}]]}}}'''.&lt;br /&gt;It contains usage information, [[Wikipedia:Categorization|categories]] and other content that is not part of the original {{ #if: {{{text2|}}} | {{{text2}}} | {{ #if: {{{text1|}}} | {{{text1}}} | {{ #ifeq: {{SUBJECTSPACE}} | {{ns:User}} | {{lc:{{SUBJECTSPACE}}}} template page | {{ #if: {{SUBJECTSPACE}} |{{lc:{{SUBJECTSPACE}}}} page|article}}}}}}}}.
      }}
    }}{{DEFAULTSORT:{{{defaultsort|{{PAGENAME}}}}}}}{{
    #if: {{{inhibit|}}}
    | &lt;!-- skip --&gt;
    | &lt;includeonly&gt;{{#ifexist:{{NAMESPACE}}:{{BASEPAGENAME}}|[[Category:{{
      #switch: {{SUBJECTSPACE}}
      | Template  = Template
      | Module  = Module
      | User      = User
      | #default  = Wikipedia
    }} documentation pages]]|[[Category:Documentation subpages without corresponding pages]]}}&lt;/includeonly&gt;
  }}&lt;includeonly&gt;
| &lt;!-- if not on a /doc subpage, do nothing --&gt;
}}&lt;/includeonly&gt;&lt;noinclude&gt;
{{documentation}}
&lt;!-- Add categories to the /doc subpage, not here! --&gt;
&lt;/noinclude&gt;</text>
      <sha1>1kwmofdrn3aug3p16515jgyl1dtolpd</sha1>
      <model>wikitext</model>
      <format>text/x-wiki</format>
    </revision>
  </page>
  <page>
    <title>Template:Fmbox</title>
    <ns>10</ns>
    <id>19236000</id>
    <revision>
      <id>577983257</id>
      <parentid>577968772</parentid>
      <timestamp>2013-10-20T15:03:32Z</timestamp>
      <contributor>
        <username>Mr. Stradivarius</username>
        <id>4708675</id>
      </contributor>
      <comment>it should be [[Module:Message box]], not [[Module:Fmbox]] - the former has deprecated the latter</comment>
      <text xml:space="preserve" bytes="141">{{#invoke:Message box|fmbox}}&lt;noinclude&gt;
{{documentation}}
&lt;!-- Add categories and interwikis to the /doc subpage, not here! --&gt;
&lt;/noinclude&gt;</text>
      <sha1>q4qfnrd9je1n71bknyj9gdhs02g2rws</sha1>
      <model>wikitext</model>
      <format>text/x-wiki</format>
    </revision>
  </page>
  <page>
    <title>Template:Hatnote</title>
    <ns>10</ns>
    <id>945764</id>
    <restrictions>move=sysop:edit=sysop</restrictions>
    <revision>
      <id>565053566</id>
      <parentid>565053264</parentid>
      <timestamp>2013-07-20T13:31:47Z</timestamp>
      <contributor>
        <username>Ceyockey</username>
        <id>150564</id>
      </contributor>
      <minor/>
      <comment>[[Help:Reverting|Reverted]] edits by [[Special:Contributions/Ceyockey|Ceyockey]] ([[User talk:Ceyockey|talk]]) to last version by GTBacchus</comment>
      <text xml:space="preserve" bytes="76">&lt;div class=&quot;dablink&quot;&gt;{{{1}}}&lt;/div&gt;&lt;noinclude&gt;
{{documentation}}
&lt;/noinclude&gt;</text>
      <sha1>2h3hxi42jzxp1m2r8ytjvbz2kzdy88q</sha1>
      <model>wikitext</model>
      <format>text/x-wiki</format>
    </revision>
  </page>
  <page>
    <title>Template:High-risk</title>
    <ns>10</ns>
    <id>11453893</id>
    <revision>
      <id>545694711</id>
      <parentid>522386810</parentid>
      <timestamp>2013-03-20T14:36:58Z</timestamp>
      <contributor>
        <username>Dragons flight</username>
        <id>16980</id>
      </contributor>
      <comment>add support for Lua modules</comment>
      <text xml:space="preserve" bytes="1169">{{ombox
| type = content
| text =
'''This {{
#switch:{{NAMESPACE}}
|Module=Lua module
|#default=template
}} is used on [[Wikipedia:Database reports/Templates transcluded on the most pages|{{#if:{{{1|}}}|{{{1}}}|a very large number of}} pages]].'''&lt;br /&gt;To avoid large-scale disruption and unnecessary server load, any changes to this {{
#switch:{{NAMESPACE}}
|Module=module
|#default=template
}} should first be tested in its [[{{#ifeq:{{SUBPAGENAME}}|doc| {{SUBJECTSPACE}}:{{BASEPAGENAME}} | {{SUBJECTPAGENAME}} }}/sandbox|/sandbox]] or [[{{#ifeq:{{SUBPAGENAME}}|doc| {{SUBJECTSPACE}}:{{BASEPAGENAME}} | {{SUBJECTPAGENAME}} }}/testcases|/testcases]] subpages{{
#switch:{{NAMESPACE}}
|Module=.
|#default=, or in your own [[Wikipedia:Subpages#How to create user subpages|user space]].
}} The tested changes can then be added to this page in one single edit. Please consider discussing any changes on {{#if:{{{2|}}}|[[{{{2}}}]]|the [[{{#ifeq:{{SUBPAGENAME}}|doc| {{TALKSPACE}}:{{BASEPAGENAME}} | {{TALKPAGENAME}} }}|talk page]]}} before implementing them.
}}&lt;noinclude&gt;
{{Documentation}}
&lt;!-- Add categories and interwikis to the /doc subpage, not here! --&gt;
&lt;/noinclude&gt;</text>
      <sha1>dd7f6f268jagvpcyas1p686ketbojhr</sha1>
      <model>wikitext</model>
      <format>text/x-wiki</format>
    </revision>
  </page>
  <page>
    <title>Template:Infobox/doc</title>
    <ns>10</ns>
    <id>15383540</id>
    <revision>
      <id>576307982</id>
      <parentid>575468680</parentid>
      <timestamp>2013-10-08T16:20:28Z</timestamp>
      <contributor>
        <username>Underlying lk</username>
        <id>10755432</id>
      </contributor>
      <comment>rem pointless spaces before every parameter</comment>
      <text xml:space="preserve" bytes="32223">{{documentation subpage}}
&lt;!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE. --&gt;
{{distinguish|Template:Userbox}}
&lt;includeonly&gt;{{#ifeq: {{#titleparts: {{PAGENAME}} | 1 | 2 }} | old | &lt;!-- null --&gt; | {{high-risk|1,700,000+}}{{lua|Module:Infobox}} }}&lt;/includeonly&gt;
This template is intended as a meta-template: a template used for constructing other templates. It is not meant for use directly in an article, but can be used on a one-off basis if required. See [[Help:Infobox]] for an introduction to infoboxes and information on how to design them. See [[:Category:Infobox templates]] for specific infobox templates.
=== Usage ===
Usage is similar to {{tl|navbox}}, but with an additional distinction. Each row on the table can contain either a header, or a label/data pair, or just a data cell. These are mutually exclusive states so if you define a row with both a header and a label/data pair, the label/data pair is ignored.
To insert an image somewhere other than at the top of the infobox, or to insert freeform data, use a row with only a data field.
=== Optional control parameters ===
; name : If this parameter is present, &quot;view/discuss/edit&quot; links will be added to the bottom of the infobox, pointing to the named page. You may use the value &lt;nowiki&gt;Infobox&lt;/nowiki&gt;; however this is rarely what you want, because it will send users clicking these links in an infobox in an article to the template code rather than the data in the infobox that they probably want to change.
; child :  See the [[#Embedding|Embedding]] section for details. If this is set to &quot;yes&quot;, this child infobox should be titled but have no name parameter. This parameter is empty by default, set it to &quot;yes&quot; to activate it.
; subbox :  See the [[#Subboxes|Subboxes]] section for details. If this is set to &quot;yes&quot;, this subbox should be titled but have no name parameter. This parameter is empty by default, set to &quot;yes&quot; to activate it. It has no effect if the '''child''' parameter is also set to &quot;yes&quot;.
; decat : If this is set to &quot;yes&quot;, the current page will not be autocategorized in a maintenance category when the generated infobox has some problems or no visible data section. Leave empty by default or set to &quot;yes&quot; to activate it.
=== Content parameters ===
==== Title ====
There are two different ways to put a title on an infobox. One contains the title inside the infobox's border in the uppermost cell of the table, the other puts as a caption it on top of the table. You can use both of them together if you like, or just one or the other, or even neither (though this is not recommended):
; title : Text to put in the caption over top of the table (or as as section header before the whole content of this table, if this is a child infobox).
; above : Text to put within the uppermost cell of the table.
; subheader(n) : additional title fields which fit below {{{title}}} and {{{above}}}, but before images. Subheader parameters should not be spaced more than 10 apart.
Examples:
{{Infobox
| name = Infobox/doc
| title      = Text in caption over infobox
| subheader  = Subheader of the infobox
| header = (the rest of the infobox goes here)
}}
&lt;pre style=&quot;overflow:auto&quot;&gt;
{{Infobox
| name = Infobox
| title      = Text in caption over infobox
| subheader  = Subheader of the infobox
| header = (the rest of the infobox goes here)
}}
&lt;/pre&gt;{{clear}}
{{Infobox
| name = Infobox/doc
| above      = Text in uppermost cell of infobox
| subheader  = Subheader of the infobox
| subheader2 = Second subheader of the infobox
| header = (the rest of the infobox goes here)
}}
&lt;pre style=&quot;overflow:auto&quot;&gt;
{{Infobox
| name = Infobox
| above      = Text in uppermost cell of infobox
| subheader  = Subheader of the infobox
| subheader2 = Second subheader of the infobox
| header = (the rest of the infobox goes here)
}}
&lt;/pre&gt;{{clear}}
==== Illustration images ====
; image(n) : images to display at the top of the template. Use full image syntax, for example &lt;nowiki&gt;[[File:example.png|200px|alt=Example alt text]]&lt;/nowiki&gt;. Image is centered by default. See [[WP:ALT]] for more on alt text. Image parameters should not be spaced more than 10 apart.
; caption(n) : Text to put underneath the images.
==== Main data ====
; header(n) : Text to use as a header in row n. Header and data parameters should not be spaced more than 50 apart.
; label(n) : Text to use as a label in row n.
; data(n) : Text to display as data in row n. Header and data parameters should not be spaced more than 50 apart.
Note: for any given value for (n), not all combinations of parameters are permitted. The presence of a {{para|header''(n)''}} will cause the corresponding {{para|data''(n)''}} (and {{para|rowclass''(n)''}} {{para|label''(n)''}}, see below) to be ignored; the absence of a {{para|data''(n)''}} will cause the corresponding {{para|label''(n)''}} to be ignored. Valid combinations for any single row are:
* {{para|class''(n)''}} {{para|header''(n)''}}
* {{para|rowclass''(n)''}} {{para|class''(n)''}} {{para|data''(n)''}}
* {{para|rowclass''(n)''}} {{para|label''(n)''}} {{para|class''(n)''}} {{para|data''(n)''}}
See the rendering of header4, label4, and data4 in the [[#Examples|Examples]] section below.
===== Number ranges =====
To allow flexibility when the layout of an infobox is changed, it may be helpful when developing an infobox to use non-contiguous numbers for header and label/data rows. Parameters for new rows can then be inserted in future without having to renumber existing parameters. For example:
&lt;pre style=&quot;overflow:auto&quot;&gt;
| header3  = Section 1
|  label5  = Label A
|  data5  = Data A
|  label7  = Label C
|  data7  = Data C
| header10 = Section 2
|  label12 = Label D
|  data12 = Data D
&lt;/pre&gt;{{clear}}
It is also possible to automatically renumber parameter names by using [[Module:IncrementParams]].
Note that although there is no limitation on the number of rows available, row parameters should not be numbered more than 50 apart. See the [[#Limitations]] section below for more details.
===== Making data fields optional =====
A row with a label but no data is not displayed. This allows for the easy creation of optional infobox content rows. To make a row optional use a parameter that defaults to an empty string, like so:
&lt;pre style=&quot;overflow:auto&quot;&gt;
|  label5 = Population
|  data5 = {{{population|}}}
&lt;/pre&gt;{{clear}}
This way if an article doesn't define the population parameter in its infobox the row won't be displayed.
For more complex fields with pre-formatted contents that would still be present even if the parameter wasn't set, you can wrap it all in an &quot;#if&quot; statement to make the whole thing vanish when the parameter is not used. For instance, the &quot;#if&quot; statement in the following example reads &quot;#if:the parameter ''mass'' has been supplied |then display it, followed by 'kg'&quot;:
&lt;pre style=&quot;overflow:auto&quot;&gt;
|  label6 = Mass
|  data6 = {{ #if: {{{mass|}}} | {{{mass}}} kg }}
&lt;/pre&gt;{{clear}}
For more on #if, see [[meta:ParserFunctions##if:|here]].
===== Hiding headers when all data fields are hidden =====
You can also make headers optional in a similar way. Consider this example:
{{Infobox
| title  = Example of an undesirable header
| header1 = Undesirable header
|  label2 = Item 1      |  data2 =
|  label3 = Item 2      |  data3 =
|  label4 = Item 3      |  data4 =
| header5 = Static header
|  label6 = Static item |  data6 = Static value
}}
&lt;pre style=&quot;overflow:auto&quot;&gt;
{{Infobox
| title  = Example of an undesirable header
| header1 = Undesirable header
|  label2 = Item 1      |  data2 =
|  label3 = Item 2      |  data3 =
|  label4 = Item 3      |  data4 =
| header5 = Static header
|  label6 = Static item |  data6 = Static value
}}
&lt;/pre&gt;{{clear}}
If you want the first header to appear only if one or more of the data fields that fall under it are filled, one could use the following pattern as an example of how to do it:
{{Infobox
| title  = Example of an optional header
| header1 = {{ #if: {{{item1|}}}{{{item2|}}}{{{item3|}}} | Optional header }}
|  label2 = Item 1      |  data2 = {{{item1|}}}
|  label3 = Item 2      |  data3 = {{{item2|}}}
|  label4 = Item 3      |  data4 = {{{item3|}}}
| header5 = Static header
|  label6 = Static item |  data6 = Static value
}}
&lt;pre style=&quot;overflow:auto&quot;&gt;
{{Infobox
| title  = Example of an optional header
| header1 = {{ #if: {{{item1|}}}{{{item2|}}}{{{item3|}}} | Optional header }}
|  label2 = Item 1      |  data2 = {{{item1|}}}
|  label3 = Item 2      |  data3 = {{{item2|}}}
|  label4 = Item 3      |  data4 = {{{item3|}}}
| header5 = Static header
|  label6 = Static item |  data6 = Static value
}}
&lt;/pre&gt;{{clear}}
header1 will be shown if any of item1, item2, or item3 is defined. If none of the three parameters are defined the header won't be shown and no emty row appears before the next static content. The trick to this is that the &quot;#if&quot; returns false only if there is nothing whatsoever in the conditional section, so only if all three of item1, item2 and item3 are undefined will the if statement fail.
Note that such trick may be sometimes very complex to test if there are many data items whose value depends on complex tests (or when a data row is generated by a recursive invokation of this template as a [[#Subboxes|subbox]]). Ideally, the Lua module supporting this template should now support a new way to make each header row autohideable by detecting if there is at least one non-empty data row after that header row (a parameter like &quot;autohide header1 = yes&quot;, for example, would remove the need to perform the &quot;#if&quot; test so that we can just to define &quot;header1 = Optional header&quot;),
==== Footer ====
; below : Text to put in the bottom cell. The bottom cell is intended for footnotes, see-also, and other such information.
=== Presentation parameters ===
==== Italic titles ====
Titles of articles with infoboxes may be made italic, in line with [[WP:ITALICTITLE]], by passing the &lt;code&gt;italic title&lt;/code&gt; parameter.
* Turn on italic titles by passing {{para|italic title|&lt;nowiki&gt;{{{italic title|}}}&lt;/nowiki&gt;}} from the infobox.
* Turn off by default (notably because only Latin script may be safely rendered in this style and italic may be needed to distinguish foreign language from local English language only in that script, but would be difficult to read for other scripts) but allow some instances to be made italic by passing {{para|italic title|&lt;nowiki&gt;{{{italic title|no}}}&lt;/nowiki&gt;}}
* Do not make any titles italic by not passing the parameter at all.
==== CSS styling ====
; bodystyle : Applies to the infobox table as a whole
; titlestyle : Applies only to the title caption. Adding a background color is usually inadvisable since the text is rendered &quot;outside&quot; the infobox.
; abovestyle : Applies only to the &quot;above&quot; cell at the top. The default style has font-size:125%; since this cell is usually used for a title, if you want to use the above cell for regular-sized text include &quot;font-size:100%;&quot; in the abovestyle.
; imagestyle : Applies to the cell the image is in. This includes the text of the image caption, but you should set text properties with captionstyle instead of imagestyle in case the caption is moved out of this cell in the future.
; captionstyle : Applies to the text of the image caption.
; headerstyle : Applies to all header cells
; labelstyle : Applies to all label cells
; datastyle : Applies to all data cells
; belowstyle : Applies only to the below cell
==== HTML classes and microformats ====
; bodyclass : This parameter is inserted into the &lt;code&gt;class&lt;code&gt; attribute for the infobox as a whole.
; titleclass : This parameter is inserted into the &lt;code&gt;class&lt;code&gt; attribute for the infobox's '''title''' caption.
&lt;!-- currently not implemented in Lua module
; aboverowclass : This parameter is inserted into the &lt;code&gt;class&lt;code&gt; attribute for the complete table row the '''above''' cell is on.
--&gt;
; aboveclass : This parameter is inserted into the &lt;code&gt;class&lt;code&gt; attribute for the infobox's '''above''' cell.
; subheaderrowclass(n) : This parameter is inserted into the &lt;code&gt;class&lt;code&gt; attribute for the complete table row the '''subheader''' is on.
; subheaderclass(n) : This parameter is inserted into the &lt;code&gt;class&lt;code&gt; attribute for the infobox's '''subheader'''.
; imagerowclass(n) : These parameters are inserted into the &lt;code&gt;class&lt;code&gt; attribute for the complete table row their respective '''image''' is on.
; imageclass : This parameter is inserted into the &lt;code&gt;class&lt;code&gt; attribute for the '''image'''.
; rowclass(n) : This parameter is inserted into the &lt;code&gt;class&lt;code&gt; attribute for the specified row including the '''label''' and '''data''' cells.
; class(n) : This parameter is inserted into the &lt;code&gt;class&lt;code&gt; attribute for the '''data''' cell of the specified row. If there's no '''data''' cell it has no effect.
&lt;!-- currently not implemented in Lua module
; belowrowclass : This parameter is inserted into the &lt;code&gt;class&lt;code&gt; attribute for the complete table row the '''below''' cell is on.
--&gt;
; belowclass : This parameter is inserted into the &lt;code&gt;class&lt;code&gt; attribute for the infobox's '''below''' cell.
This template supports the addition of microformat information. This is done by adding &quot;class&quot; attributes to various data cells, indicating what kind of information is contained within. Multiple class names may be specified, separated by spaces, some of them being used as selectors for custom styling according to a project policy or to the skin selected in user preferences, others beig used for microformats.
To flag an infobox as containing [[hCard]] information, for example, add the following parameter:
&lt;pre style=&quot;overflow:auto&quot;&gt;
| bodyclass = vcard
&lt;/pre&gt;{{clear}}
And for each row containing a data cell that's part of the vcard, add a corresponding class parameter:
&lt;pre style=&quot;overflow:auto&quot;&gt;
| class1 = fn
| class2 = org
| class3 = tel
&lt;/pre&gt;{{clear}}
...and so forth. &quot;above&quot; and &quot;title&quot; can also be given classes, since these are usually used to display the name of the subject of the infobox.
See [[Wikipedia:WikiProject Microformats]] for more information on adding microformat information to Wikipedia, and [[microformat]] for more information on microformats in general.
=== Examples ===
Notice how the row doesn't appear in the displayed infobox when a '''label''' is defined without an accompanying '''data''' cell , and how all of them are displayed when a '''header''' is defined on the same row as a '''data''' cell. Also notice that '''subheaders''' are not bold by default like the '''headers''' used to split the main data section, because this role is meant to be for the '''above''' cell :
{{Infobox
|name        = Infobox/doc
|bodystyle    =
|titlestyle  =
|abovestyle = background:#cfc;
|subheaderstyle =
|title        = Test Infobox
|above        = Above text
|subheader    = Subheader above image
|subheader2  = Second subheader
|imagestyle  =
|captionstyle =
|image        = [[File:example.png|200px|alt=Example alt text]]
|caption      = Caption displayed below example.png
|headerstyle  = background:#ccf;
|labelstyle  = background:#ddf;
|datastyle    =
|header1 = Header defined alone
| label1 =
|  data1 =
|header2 =
| label2 = Label defined alone does not display (needs data, or is suppressed)
|  data2 =
|header3 =
| label3 =
|  data3 = Data defined alone
|header4 = All three defined (header, label, data, all with same number)
| label4 = does not display (same number as a header)
|  data4 = does not display (same number as a header)
|header5 =
| label5 = Label and data defined (label)
|  data5 = Label and data defined (data)
|belowstyle = background:#ddf;
|below      = Below text
}}
&lt;pre style=&quot;overflow:auto&quot;&gt;
{{Infobox
|name        = Infobox
|bodystyle    =
|titlestyle  =
|abovestyle = background:#cfc;
|subheaderstyle =
|title        = Test Infobox
|above        = Above text
|subheader    = Subheader above image
|subheader2  = Second subheader
|imagestyle  =
|captionstyle =
|  image      = [[File:example.png|200px|alt=Example alt text]]
|caption      = Caption displayed below example.png
|headerstyle  = background:#ccf;
|labelstyle  = background:#ddf;
|datastyle    =
|header1 = Header defined alone
| label1 =
|  data1 =
|header2 =
| label2 = Label defined alone does not display (needs data, or is suppressed)
|  data2 =
|header3 =
| label3 =
|  data3 = Data defined alone
|header4 = All three defined (header, label, data, all with same number)
| label4 = does not display (same number as a header)
|  data4 = does not display (same number as a header)
|header5 =
| label5 = Label and data defined (label)
|  data5 = Label and data defined (data)
|belowstyle = background:#ddf;
|below      = Below text
}}
&lt;/pre&gt;{{clear}}
For this example, the '''bodystyle''' and '''labelstyle''' parameters are used to adjust the infobox width and define a default width for the column of labels:
{{Infobox
|name        = Infobox/doc
|bodystyle  = width:20em
|titlestyle  =
|title      = Test Infobox
|headerstyle =
|labelstyle  = width:33%
|datastyle  =
|header1 =
| label1 = Label 1
|  data1 = Data 1
|header2 =
| label2 = Label 2
|  data2 = Data 2
|header3 =
| label3 = Label 3
|  data3 = Data 3
|header4 = Header 4
| label4 =
|  data4 =
|header5 =
| label5 = Label 5
|  data5 = Data 5: Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
|belowstyle =
|below = Below text
}}
&lt;pre style=&quot;overflow: auto&quot;&gt;
{{Infobox
|name        = Infobox
|bodystyle  = width:20em
|titlestyle  =
|title      = Test Infobox
|headerstyle =
|labelstyle  = width:33%
|datastyle  =
|header1 =
| label1 = Label 1
|  data1 = Data 1
|header2 =
| label2 = Label 2
|  data2 = Data 2
|header3 =
| label3 = Label 3
|  data3 = Data 3
|header4 = Header 4
| label4 =
|  data4 =
|header5 =
| label5 = Label 5
|  data5 = Data 5: Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
|belowstyle =
|below = Below text
}}
&lt;/pre&gt;{{clear}}
=== Embedding ===
One infobox template can be embedded into another using the {{para|child}} parameter.  This feature can be used to create a modular infobox, or to create more well defined logical sections. Previously, it was necessary to use embedding in order to create infoboxes with more than 99 rows, but there is now no limit to the number of rows that can be defined in a single instance of &lt;code&gt;&lt;nowiki&gt;{{infobox}}&lt;/nowiki&gt;&lt;/code&gt;.
{{Infobox
| title = Top level title
| data1 = {{Infobox | decat = yes | child = yes
    | title = First subsection
    | label1= Label 1.1
    | data1 = Data 1.1
  }}
| data2 = {{Infobox | decat = yes | child = yes
  |title = Second subsection
  | label1= Label 2.1
  | data1 = Data 2.1
  }}
| belowstyle =
| below = Below text
}}
&lt;pre style=&quot;overflow:auto&quot;&gt;
{{Infobox
| title = Top level title
| data1 = {{Infobox | decat = yes | child = yes
    | title = First subsection
    | label1= Label 1.1
    | data1 = Data 1.1
  }}
| data2 = {{Infobox | decat = yes | child = yes
  |title = Second subsection
  | label1= Label 2.1
  | data1 = Data 2.1
  }}
| belowstyle =
| below = Below text
}}
&lt;/pre&gt;{{clear}}
Note, in the examples above, the child infobox is placed in a &lt;code&gt;data&lt;/code&gt; field, not a &lt;code&gt;header&lt;/code&gt; field.  Notice that the section subheadings are not in bold font if bolding is not explicitly specified. To obtain bold section headings, place the child infobox in a '''header''' field (but not in a '''label''' field because it would not be displayed!), either using
{{Infobox
| title = Top level title
| header1 = {{Infobox | decat = yes | child = yes
    | title = First subsection
    | label1= Label 1.1
    | data1 = Data 1.1
  }}
| header2 = {{Infobox | decat = yes | child = yes
    | title = Second subsection
    | label1= Label 2.1
    | data1 = Data 2.1
  }}
| belowstyle =
| below = Below text
}}
&lt;pre style=&quot;overflow:auto&quot;&gt;
{{Infobox
| title = Top level title
| header1 = {{Infobox | decat = yes | child = yes
    | title = First subsection
    | label1= Label 1.1
    | data1 = Data 1.1
  }}
| header2 = {{Infobox | decat = yes | child = yes
    | title = Second subsection
    | label1= Label 2.1
    | data1 = Data 2.1
  }}
| belowstyle =
| below = Below text
}}
&lt;/pre&gt;{{clear}}
or,
{{Infobox
| title = Top level title
| header1 = First subsection
  {{Infobox | decat = yes | child = yes
    | label1 = Label 1.1
    |  data1 = Data 1.1
  }}
| header2 = Second subsection
  {{Infobox | decat = yes | child = yes
    | label1 = Label 2.1
    |  data1 = Data 2.1
  }}
| belowstyle =
| below = Below text
}}
&lt;pre style=&quot;overflow:auto&quot;&gt;
{{Infobox
| title = Top level title
| header1 = First subsection
  {{Infobox | decat = yes | child = yes
    | label1 = Label 1.1
    |  data1 = Data 1.1
  }}
| header2 = Second subsection
  {{Infobox | decat = yes | child = yes
    | label1 = Label 2.1
    |  data1 = Data 2.1
  }}
| belowstyle =
| below = Below text
}}
&lt;/pre&gt;{{clear}}
Note that omitting the {{para|title}} parameter, and not including any text preceding the embedded infobox, may result in spurious blank table rows, creating gaps in the visual presentation.
=== Subboxes ===
An alternative method for embedding is to use {{para|subbox|yes}}, which removes the outer border from the infobox, but preserves the interior structure.  One feature of this approach is that the parent and child boxes need not have the same structure, and the label and data fields are not aligned between the parent and child boxes because they are not in the same parent table.
{{Infobox
| headerstyle = background-color:#eee;
| labelstyle  = background-color:#eee;
| header1 = Main 1
| header2 = Main 2
|  data3 = {{Infobox | subbox = yes
    | headerstyle = background-color:#ccc;
    | labelstyle  = background-color:#ddd;
    | header1 = Sub 3-1
    | header2 = Sub 3-2
    |  label3 = Label 3-3    |  data3 = Data 3-3
  }}
|  data4 = {{Infobox | subbox = yes
    | labelstyle  = background-color:#ccc;
    |  label1 = Label 4-1    |  data1 = Data 4-1
  }}
|  label5 = Label 5 |  data5 = Data 5
| header6 = Main 6
}}
&lt;pre style=&quot;overflow:auto&quot;&gt;
{{Infobox
| headerstyle = background-color:#eee;
| labelstyle  = background-color:#eee;
| header1 = Main 1
| header2 = Main 2
|  data3 = {{Infobox | subbox = yes
    | headerstyle = background-color:#ccc;
    | labelstyle  = background-color:#ddd;
    | header1 = Sub 3-1
    | header2 = Sub 3-2
    |  label3 = Label 3-3    |  data3 = Data 3-3
  }}
|  data4 = {{Infobox | subbox = yes
    | labelstyle  = background-color:#ccc;
    |  label1 = Label 4-1    |  data1 = Data 4-1
  }}
|  label5 = Label 5 |  data5 = Data 5
| header6 = Main 6
}}
&lt;/pre&gt;{{clear}}
Similar embedding technics may be used within content parameters of some other templates generating tables (such as [[:Template:Sidebar|Sidebar]]) :
{{Sidebar
| navbar = off
| headingstyle = background-color:#eee;
| heading1 = Heading 1
| heading2 = Heading 2
| content3 = {{Infobox | subbox = yes
    | headerstyle = background-color:#ccc;
    | labelstyle = background-color:#ddd;
    | header1 = Sub 3-1
    | header2 = Sub 3-2
    |  label3 = Label 3-3 |  data3 = Data 3-3
  }}
| content4 = {{Infobox | subbox = yes
    | labelstyle = background-color:#ccc;
    |  label1 = Label 4-1 |  data1 = Data 4-1
  }}
| heading5 = Heading 5
}}
&lt;pre style=&quot;overflow:auto&quot;&gt;
{{Sidebar
| navbar = off
| headingstyle = background-color:#eee;
| heading1 = Heading 1
| heading2 = Heading 2
| content3 = {{Infobox | subbox = yes
    | headerstyle = background-color:#ccc;
    | labelstyle = background-color:#ddd;
    | header1 = Sub 3-1
    | header2 = Sub 3-2
    |  label3 = Label 3-3 |  data3 = Data 3-3
  }}
| content4 = {{Infobox | subbox = yes
    | labelstyle = background-color:#ccc;
    |  label1 = Label 4-1 |  data1 = Data 4-1
  }}
| heading5 = Heading 5
}}
&lt;/pre&gt;{{clear}}
Note that the default padding of the parent data cell containing each subbox is still visible, so the subboxes are slightly narrower than the parent box and there's an higher vertical spacing between standard cells of the parent box than between cells of distinct subboxes.
=== Full blank syntax ===
(Note: there is no limit to the number of possible rows; only 20 are given below since infoboxes larger than that will be relatively rare. Just extend the numbering as needed. The microformat &quot;class&quot; parameters are also omitted as they are not commonly used.)
&lt;pre style=&quot;overflow:auto&quot;&gt;
{{Infobox
| name          = Infobox
| child          = {{{child|}}}
| subbox        = {{{subbox|}}}
| italic title  = {{{italic title|no}}}
| bodystyle      =
| titlestyle    =
| abovestyle    =
| subheaderstyle =
| title          =
| above          =
| subheader      =
|  imagestyle  =
| captionstyle  =
|  image        =
| caption        =
|  image2      =
| caption2      =
| headerstyle    =
|  labelstyle    =
|  datastyle    =
| header1  =
|  label1  =
|  data1  =
| header2  =
|  label2  =
|  data2  =
| header3  =
|  label3  =
|  data3  =
| header4  =
|  label4  =
|  data4  =
| header5  =
|  label5  =
|  data5  =
| header6  =
|  label6  =
|  data6  =
| header7  =
|  label7  =
|  data7  =
| header8  =
|  label8  =
|  data8  =
| header9  =
|  label9  =
|  data9  =
| header10 =
|  label10 =
|  data10 =
| header11 =
|  label11 =
|  data11 =
| header12 =
|  label12 =
|  data12 =
| header13 =
|  label13 =
|  data13 =
| header14 =
|  label14 =
|  data14 =
| header15 =
|  label15 =
|  data15 =
| header16 =
|  label16 =
|  data16 =
| header17 =
|  label17 =
|  data17 =
| header18 =
|  label18 =
|  data18 =
| header19 =
|  label19 =
|  data19 =
| header20 =
|  label20 =
|  data20 =
| belowstyle    =
| below          =
}}
&lt;/pre&gt;{{clear}}
=== Limitations ===
Previously, the number of rows available to this template was limited to 99. This restriction has been lifted now that the template has been ported to a [[WP:Lua|Lua module]], but to maintain backwards compatibility there is now a limit on the number of rows apart by which parameters will be detected. If parameters are numbered more than 50 apart, the later parameters may be ignored (depending on the exact numbers involved), and if parameters are numbered more than 100 apart, the later parameters will definitely be ignored.
For example, this code will display properly:
{{Infobox
| header3  = Section 1
|  label48  = Label A
|  data48  = Data A
|  data92  = Data B
|  label136 = Label C
|  data136 = Data C
| header177 = Section 2
|  label215 = Label D
|  data215 = Data D
}}
&lt;div style=&quot;overflow:auto&quot;&gt;
&lt;nowiki&gt;{{&lt;/nowiki&gt;Infobox
  | header&lt;b style=&quot;color:black;background:#AFA&quot;&gt;3&lt;/b&gt;  = Section 1
  |  label&lt;b style=&quot;color:black;background:#AFA&quot;&gt;48&lt;/b&gt;  = Label A
  |  data&lt;b style=&quot;color:black;background:#AFA&quot;&gt;48&lt;/b&gt;  = Data A
  |  data&lt;b style=&quot;color:black;background:#AFA&quot;&gt;92&lt;/b&gt;  = Data B
  |  label&lt;b style=&quot;color:black;background:#AFA&quot;&gt;136&lt;/b&gt; = Label C
  |  data&lt;b style=&quot;color:black;background:#AFA&quot;&gt;136&lt;/b&gt; = Data C
  | header&lt;b style=&quot;color:black;background:#AFA&quot;&gt;177&lt;/b&gt; = Section 2
  |  label&lt;b style=&quot;color:black;background:#AFA&quot;&gt;215&lt;/b&gt; = Label D
  |  data&lt;b style=&quot;color:black;background:#AFA&quot;&gt;215&lt;/b&gt; = Data D
&lt;nowiki&gt;}}&lt;/nowiki&gt;
&lt;/div&gt;{{clear}}
But in this code, only Section 1, Label A and Data A will be displayed, because Data B is numbered too far away from Data A (and then all the rest is ignored):
{{Infobox
| header3  = Section 1
|  label48  = Label A
|  data48  = Data A
|  data102 = Data B
|  label103 = Label C
|  data103 = Data C
| header115 = Section 2
|  label120 = Label D |data120 = Data D
}}
&lt;div style=&quot;overflow:auto&quot;&gt;
&lt;nowiki&gt;{{&lt;/nowiki&gt;Infobox
  | header&lt;b style=&quot;color:black;background:#AFA&quot;&gt;3&lt;/b&gt;  = Section 1
  |  label&lt;b style=&quot;color:black;background:#AFA&quot;&gt;48&lt;/b&gt;  = Label A
  |  data&lt;b style=&quot;color:black;background:#AFA&quot;&gt;48&lt;/b&gt;  = Data A
  |  data&lt;b style=&quot;color:black;background:#FAA&quot;&gt;102&lt;/b&gt; = Data B
  |  label&lt;b style=&quot;color:black;background:#AFA&quot;&gt;103&lt;/b&gt; = Label C
  |  data&lt;b style=&quot;color:black;background:#AFA&quot;&gt;103&lt;/b&gt; = Data C
  | header&lt;b style=&quot;color:black;background:#AFA&quot;&gt;115&lt;/b&gt; = Section 2
  |  label&lt;b style=&quot;color:black;background:#AFA&quot;&gt;120&lt;/b&gt; = Label D
  |  data&lt;b style=&quot;color:black;background:#AFA&quot;&gt;120&lt;/b&gt; = Data D
&lt;nowiki&gt;}}&lt;/nowiki&gt;
&lt;/div&gt;{{clear}}
Note that parameter values may be blank - parameters are counted unless they are completely absent, in header() and data(n), from the template invocation:
{{Infobox
| header3  = Section 1
|  label48  = Label A
|  data48  = Data A
|  data70  =
|  data102 = Data B
|  label103 = Label C
|  data103 = Data C
| header115 = Section 2
|  label120 = Label D |data120 = Data D
}}
&lt;div style=&quot;overflow:auto&quot;&gt;
&lt;nowiki&gt;{{&lt;/nowiki&gt;Infobox
  | header&lt;b style=&quot;color:black;background:#AFA&quot;&gt;3&lt;/b&gt;  = Section 1
  |  label&lt;b style=&quot;color:black;background:#AFA&quot;&gt;48&lt;/b&gt;  = Label A
  |  data&lt;b style=&quot;color:black;background:#AFA&quot;&gt;48&lt;/b&gt;  = Data A
  |  data&lt;b style=&quot;color:black;background:#AFA&quot;&gt;70&lt;/b&gt;  =
  |  data&lt;b style=&quot;color:black;background:#AFA&quot;&gt;102&lt;/b&gt; = Data B
  |  label&lt;b style=&quot;color:black;background:#AFA&quot;&gt;103&lt;/b&gt; = Label C
  |  data&lt;b style=&quot;color:black;background:#AFA&quot;&gt;103&lt;/b&gt; = Data C
  | header&lt;b style=&quot;color:black;background:#AFA&quot;&gt;115&lt;/b&gt; = Section 2
  |  label&lt;b style=&quot;color:black;background:#AFA&quot;&gt;120&lt;/b&gt; = Label D
  |  data&lt;b style=&quot;color:black;background:#AFA&quot;&gt;120&lt;/b&gt; = Data D
&lt;nowiki&gt;}}&lt;/nowiki&gt;
&lt;/div&gt;{{clear}}
If only '''label(n)''' is specified (even with a non-empty value) but neither '''header(n)''' nor '''data(n)''', the parameter is ignored and considered as if it was missing:
{{Infobox
| header3  = Section 1
|  label48  = Label A
|  data48  = Data A
|  label70  = Dummy label
|  data102 = Data B
|  label103 = Label C
|  data103 = Data C
| header115 = Section 2
|  label120 = Label D |data120 = Data D
}}
&lt;div style=&quot;overflow:auto&quot;&gt;
&lt;nowiki&gt;{{&lt;/nowiki&gt;Infobox
  | header&lt;b style=&quot;color:black;background:#AFA&quot;&gt;3&lt;/b&gt;  = Section 1
  |  label&lt;b style=&quot;color:black;background:#AFA&quot;&gt;48&lt;/b&gt;  = Label A
  |  data&lt;b style=&quot;color:black;background:#AFA&quot;&gt;48&lt;/b&gt;  = Data A
  |  &lt;b style=&quot;color:black;background:#FAA&quot;&gt;label70&lt;/b&gt;  = Dummy label
  |  data&lt;b style=&quot;color:black;background:#AFA&quot;&gt;102&lt;/b&gt; = Data B
  |  label&lt;b style=&quot;color:black;background:#AFA&quot;&gt;103&lt;/b&gt; = Label C
  |  data&lt;b style=&quot;color:black;background:#AFA&quot;&gt;103&lt;/b&gt; = Data C
  | header&lt;b style=&quot;color:black;background:#AFA&quot;&gt;115&lt;/b&gt; = Section 2
  |  label&lt;b style=&quot;color:black;background:#AFA&quot;&gt;120&lt;/b&gt; = Label D
  |  data&lt;b style=&quot;color:black;background:#AFA&quot;&gt;120&lt;/b&gt; = Data D
&lt;nowiki&gt;}}&lt;/nowiki&gt;
&lt;/div&gt;{{clear}}
There are also similar limitations for '''image(n)''' and '''subheader(n)''' parameters: in those cases, parameters should not be numbered more than 10 apart.
=== Porting to other MediaWikis ===
The infobox template requires the [[:mw:Extension:Scribunto|Scribunto]] extension and [[mw:Manual:Using content from Wikipedia#HTMLTidy|HTMLTidy]] to be installed. It may not work with other MediaWikis. [[Wikipedia:WikiProject Transwiki|WikiProject Transwiki]] has a version of this template that has been modified to work on other MediaWikis.
=== See also ===
* [[Module:Infobox]] - the [[WP:LUA|Lua]] module on which this template is based
* [[Template:Infobox/old]] - the old ParserFunctions implementation
* {{tl|infobox3cols}}
* {{tl|Navbox}}
* [[Wikipedia:List of infoboxes|List of infoboxes]]
&lt;includeonly&gt;{{#ifeq:{{SUBPAGENAME}}|sandbox||
[[Category:Infobox templates| ]]
[[Category:Templates generating microformats]]
[[Category:Wikipedia metatemplates|Infobox]]
}}&lt;/includeonly&gt;</text>
      <sha1>kqj90n1lp0qqe8l8ve6yjr02w2dyvki</sha1>
      <model>wikitext</model>
      <format>text/x-wiki</format>
    </revision>
  </page>
  <page>
    <title>Template:Lua</title>
    <ns>10</ns>
    <id>38752725</id>
    <revision>
      <id>581550772</id>
      <parentid>581152676</parentid>
      <timestamp>2013-11-13T23:37:05Z</timestamp>
      <contributor>
        <username>Mr. Stradivarius</username>
        <id>4708675</id>
      </contributor>
      <comment>switch back to type=notice per Johnuniq's comment on the talk page</comment>
      <text xml:space="preserve" bytes="1225">{{mbox
| type = notice
| image = [[File:Gnome-utilities-terminal.svg|42px]]
| text  = This template uses {{#if: {{{1|}}} | '''[[{{{1}}}]]''', a script written in }} the [[Lua (programming language)|Lua programming language]]. Please see [[Wikipedia:Lua]] if you want to learn more about Lua or help convert other templates. {{{2|}}}
}}&lt;includeonly&gt;{{#ifeq: {{{nocat|}}} | true
|
| {{template other
    | {{#switch: {{SUBPAGENAME}}
      | doc | sandbox | sandbox2 | testcases =
      | #default = [[Category:{{#if: {{{category|}}}
          | {{{category}}}
          | {{#switch: {{{1|}}}
            | Module:String                        = Lua String-based templates
            | Module:Math                          = Templates based on the Math Lua module
            | Module:BaseConvert                    = Templates based on the BaseConvert Lua module
            | Module:Citation | Module:Citation/CS1 = Lua-based citation templates
            | #default                              = Lua-based templates
            }}
        }}|{{PAGENAME}}]]
      }}
  }}
}}&lt;/includeonly&gt;&lt;noinclude&gt;
{{documentation}}
&lt;!-- Categories go on the /doc subpage, and interwikis go in Wikidata --&gt;
&lt;/noinclude&gt;</text>
      <sha1>f1sell7c1a7al6vu05h9kz29qcjg4q5</sha1>
      <model>wikitext</model>
      <format>text/x-wiki</format>
    </revision>
  </page>
  <page>
    <title>Template:Mbox</title>
    <ns>10</ns>
    <id>13319244</id>
    <revision>
      <id>577968069</id>
      <parentid>498386332</parentid>
      <timestamp>2013-10-20T12:33:38Z</timestamp>
      <contributor>
        <username>Mr. Stradivarius</username>
        <id>4708675</id>
      </contributor>
      <comment>switch to Lua version</comment>
      <text xml:space="preserve" bytes="145">{{#invoke:Message box|mbox}}&lt;noinclude&gt;
{{documentation}}
&lt;!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --&gt;
&lt;/noinclude&gt;</text>
      <sha1>mpflpb6s8l8gaoxaeypyuqyu2w7vc7i</sha1>
      <model>wikitext</model>
      <format>text/x-wiki</format>
    </revision>
  </page>
  <page>
    <title>Template:Navbar</title>
    <ns>10</ns>
    <id>5277509</id>
    <revision>
      <id>579315044</id>
      <parentid>579312941</parentid>
      <timestamp>2013-10-29T17:48:00Z</timestamp>
      <contributor>
        <username>Redrose64</username>
        <id>9612106</id>
      </contributor>
      <comment>Undid revision 579312941 by [[Special:Contributions/GraemeL|GraemeL]] ([[User talk:GraemeL|talk]]) {{pp-template}} is never necessary on a template that has {{documentation}}</comment>
      <text xml:space="preserve" bytes="1111">&lt;includeonly&gt;&lt;div class=&quot;noprint plainlinks hlist navbar {{#if:{{{mini|}}}|mini}}&quot; style=&quot;{{{style|}}}&quot;&gt;&lt;!--
--&gt;{{#if:{{{mini|}}}{{{plain|}}}|&lt;!--nothing--&gt;|&lt;!--else:
--&gt;&lt;span style=&quot;word-spacing:0;{{{fontstyle|}}}&quot;&gt;{{{text|This box:}}} &lt;/span&gt;}}&lt;!--
--&gt;{{#if:{{{brackets|}}}|&lt;span style=&quot;margin-right:-0.125em;{{{fontstyle|}}}&quot;&gt;&amp;#91;&lt;/span&gt;}}&lt;!--
--&gt;&lt;ul&gt;&lt;!--
--&gt;&lt;li class=&quot;nv-view&quot;&gt;[[{{transclude|{{{1}}}}}|&lt;span title=&quot;View this template&quot; &lt;!--
--&gt;style=&quot;{{{fontstyle|}}}&quot;&gt;{{#if:{{{mini|}}}|v|view}}&lt;/span&gt;]]&lt;/li&gt;&lt;!--
--&gt;&lt;li class=&quot;nv-talk&quot;&gt;[[{{TALKPAGENAME:{{transclude|{{{1}}}}}}}|&lt;span title=&quot;Discuss this template&quot; &lt;!--
--&gt;style=&quot;{{{fontstyle|}}}&quot;&gt;{{#if:{{{mini|}}}|t|talk}}&lt;/span&gt;]]&lt;/li&gt;&lt;!--
--&gt;{{#if:{{{noedit|}}}|&lt;!--nothing--&gt;|&lt;!--else:
--&gt;&lt;li class=&quot;nv-edit&quot;&gt;[{{fullurl:{{transclude|{{{1}}}}}|action=edit}} &lt;span title=&quot;Edit this template&quot; &lt;!--
--&gt;style=&quot;{{{fontstyle|}}}&quot;&gt;{{#if:{{{mini|}}}|e|edit}}&lt;/span&gt;]&lt;/li&gt;}}&lt;!--
--&gt;&lt;/ul&gt;&lt;!--
--&gt;{{#if:{{{brackets|}}}|&lt;span style=&quot;margin-left:-0.125em;{{{fontstyle|}}}&quot;&gt;&amp;#93;&lt;/span&gt;}}&lt;!--
--&gt;&lt;/div&gt;&lt;/includeonly&gt;&lt;noinclude&gt;
{{documentation}}
&lt;/noinclude&gt;</text>
      <sha1>l8vtirhspr68sezcde8873k75m5b4u4</sha1>
      <model>wikitext</model>
      <format>text/x-wiki</format>
    </revision>
  </page>
  <page>
    <title>Template:Ombox</title>
    <ns>10</ns>
    <id>17522403</id>
    <revision>
      <id>577969039</id>
      <parentid>463278061</parentid>
      <timestamp>2013-10-20T12:45:08Z</timestamp>
      <contributor>
        <username>Mr. Stradivarius</username>
        <id>4708675</id>
      </contributor>
      <comment>switch to Lua version</comment>
      <text xml:space="preserve" bytes="146">{{#invoke:Message box|ombox}}&lt;noinclude&gt;
{{documentation}}
&lt;!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --&gt;
&lt;/noinclude&gt;</text>
      <sha1>1o93yrjvq6v2ylug2k0uaaltljurje2</sha1>
      <model>wikitext</model>
      <format>text/x-wiki</format>
    </revision>
  </page>
  <page>
    <title>Template:Para</title>
    <ns>10</ns>
    <id>16639086</id>
    <revision>
      <id>538878986</id>
      <parentid>417329083</parentid>
      <timestamp>2013-02-18T14:11:52Z</timestamp>
      <contributor>
        <username>Redrose64</username>
        <id>9612106</id>
      </contributor>
      <comment>move the style=&quot;white-space:nowrap;&quot; to outermost level, per [[Template talk:Para#Suggested changes]]</comment>
      <text xml:space="preserve" bytes="224">&lt;code style=&quot;white-space:nowrap;&quot;&gt;&lt;nowiki&gt;|&lt;/nowiki&gt;{{#if:{{{1|}}}|{{{1}}}&lt;nowiki&gt;=&lt;/nowiki&gt;}}{{{2|}}}&lt;/code&gt;&lt;noinclude&gt;
{{Documentation}}
&lt;!--Categories and interwikis go near the bottom of the /doc subpage.--&gt;
&lt;/noinclude&gt;</text>
      <sha1>qp4vv1v7gixzt5qqvjj03q2t15p1wgj</sha1>
      <model>wikitext</model>
      <format>text/x-wiki</format>
    </revision>
  </page>
  <page>
    <title>Template:Pp-meta</title>
    <ns>10</ns>
    <id>13371038</id>
    <revision>
      <id>581284096</id>
      <parentid>581280097</parentid>
      <timestamp>2013-11-12T04:00:54Z</timestamp>
      <contributor>
        <username>Mlpearc</username>
        <id>8356162</id>
      </contributor>
      <comment>Define trgts</comment>
      <text xml:space="preserve" bytes="10995">{{#ifeq:{{#switch:{{lc:{{{type}}}}}
  |move=&lt;!--
--&gt;{{#ifeq:
      {{#switch:{{lc:{{{demolevel|undefined}}}}}
        |semi |autoconfirmed          = autoconfirmed
        |administrator |full |sysop    = sysop
        |undefined                    = {{PROTECTIONLEVEL:move}}
        |#default                      = &lt;!--fallback value: null
  --&gt;}}
      |sysop|yes|no
    }}
  |create=&lt;!--
--&gt;{{#if:
      {{#switch:{{lc:{{{demolevel|undefined}}}}}
        |semi |autoconfirmed          = autoconfirmed
        |administrator |full |sysop    = sysop
        |undefined                    = {{PROTECTIONLEVEL:create}}
        |#default                      = &lt;!--fallback value: null
  --&gt;}}
      |yes|no
    }}
  |template=&lt;!--
--&gt;{{#if:
      {{#switch:{{lc:{{{demolevel|undefined}}}}}
        |templateeditor |template      = templateeditor
        |administrator |full |sysop    = sysop
        |undefined                    = {{PROTECTIONLEVEL:edit}}
        |#default                      = &lt;!--fallback value: null
  --&gt;}}
      |yes|no
    }}
  |pc1 =&lt;!--
--&gt;{{#ifeq:
      {{#switch:{{lc:{{{demolevel|undefined}}}}}
        |pc1                          = autoconfirmed &lt;!-- this is the value that the PENDINGCHANGELEVEL magic word returns for pc1 --&gt;
        |undefined                    = {{PENDINGCHANGELEVEL}}
        |#default                      = &lt;!--fallback value: null
  --&gt;}}
      |autoconfirmed
      |yes|no
    }}
  |pc2 =&lt;!--
--&gt;{{#ifeq:
      {{#switch:{{lc:{{{demolevel|undefined}}}}}
        |pc2                          = review &lt;!-- this is the value that the PENDINGCHANGELEVEL magic word returns for pc2 --&gt;
        |undefined                    = {{PENDINGCHANGELEVEL}}
        |#default                      = &lt;!--fallback value: null
  --&gt;}}
      |review
      |yes|no
    }}
|#default&lt;!--includes all other types--&gt;=&lt;!--
--&gt;{{#if:
      {{#switch:{{lc:{{{demolevel|undefined}}}}}
        |semi |autoconfirmed          = autoconfirmed
        |administrator |full |sysop    = sysop
        |undefined                    = {{PROTECTIONLEVEL:edit}}
        |#default                      = &lt;!--fallback value: null
  --&gt;}}
      |{{#ifeq:{{#switch:{{lc:{{{disallowlevel|}}}}}
                |semi |autoconfirmed          = autoconfirmed
                |administrator |full |sysop    = sysop
                |#default                      = &lt;!--fallback value: null--&gt;}}
        |{{#switch:{{lc:{{{demolevel|undefined}}}}}
            |semi |autoconfirmed          = autoconfirmed
            |administrator |full |sysop    = sysop
            |undefined                    = {{PROTECTIONLEVEL:edit}}
            |#default                      = &lt;!--fallback value: null
      --&gt;}}
        |no|yes
      }}
  |no}}
}}|yes|{{#ifeq:{{lc:{{{small|}}}}}|yes|
&lt;div class=&quot;metadata topicon nopopups&quot; id=&quot;protected-icon&quot; style=&quot;display:none; right:{{#if:{{{right|}}}|{{{right}}}|55px}};&quot;&gt;[[Image:{{{image|{{#switch:{{lc:{{{type}}}}}
|full=Padlock.svg
|semi=Padlock-silver.svg
|template=Padlock-pink.svg
|pc1=Padlock-silver-light.svg
|pc2=Padlock-orange.svg
|move=Padlock-olive.svg
|indef=Padlock-red.svg
|office=Padlock-black.svg
|create=Padlock-skyblue.svg
|#default=Transparent.gif
}}}}}|20px|link={{{icon-link|Wikipedia:Protection policy#{{lc:{{{type}}}}}}}}|{{{icon-text|{{#switch:{{lc:{{{type}}}}}
|pc1 = All edits by unregistered and new users are subject to review
|pc2 = All edits by users who are not reviewers or administrators are subject to review
|template = This is a permanently protected {{pp-meta/pagetype}}
|#default = This {{pp-meta/pagetype}} is {{#switch:{{lc:{{{type}}}}}
  |semi=semi-
  |move=move-
  |indef=permanently&lt;nowiki&gt; &lt;/nowiki&gt;
  |create=creation-
  |office=&lt;!--null, but should this have a special tag?--&gt;
  |full
  |#default=&lt;!--null--&gt;
  }}protected
}}{{#ifeq:{{lc:{{{type}}}}}|indef||{{#if:{{{expiry|}}}|&lt;nowiki&gt; &lt;/nowiki&gt;until {{#time:F j, Y|{{{expiry}}}}}{{#if:{{{icon-reason|}}}|,}}}}}}{{#if:{{{icon-reason|}}}|&lt;nowiki&gt; &lt;/nowiki&gt;{{{icon-reason}}}}}.}}}|alt={{#ifeq:{{lc:{{{type}}}}}|template
|{{#switch:{{NAMESPACENUMBER}}
  |10|828=Permanently protected {{pp-meta/pagetype}}
  |#default=Page permanently protected
  }}
|Page {{#switch:{{lc:{{{type}}}}}
          |pc1=protected with pending changes level 1
          |pc2=protected with pending changes level 2
          |semi=semi-protected
          |move=move-protected
          |indef=permanently protected
          |create=creation-protected
          |office=&lt;!--null, but should this have a special tag?--&gt;
          |full
          |#default=protected
      }}
}}]]&lt;/div&gt;
|&lt;!-- else, not small --&gt;
{{mbox
| name = {{{name|Pp-meta}}}
| subst = {{{subst|}}}
| demospace = {{{demospace|}}}
| type = protection
| image = [[Image:{{{image|{{#switch:{{lc:{{{type}}}}}
|full=Padlock.svg
|semi=Padlock-silver.svg
|pc1=Padlock-silver-light.svg
|pc2=Padlock-orange.svg
|move=Padlock-olive.svg
|template=Padlock-pink.svg
|indef=Padlock-red.svg
|office=Padlock-black.svg
|create=Padlock-skyblue.svg
|#default=Transparent.gif
}}}}}|40px|{{{icon-text|{{#ifeq:{{lc:{{{type}}}}}|template
                        |{{#switch:{{NAMESPACENUMBER}}
                          |10|828=This is a permanently protected {{pp-meta/pagetype}}
                          |#default=This page is permanently protected
                          }}
                        |This page is {{#switch:{{lc:{{{type}}}}}
                                        |pc1=protected with pending changes level 1
                                        |pc2=protected with pending changes level 2
                                        |semi=semi-protected
                                        |move=move-protected
                                        |indef=permanently protected
                                        |create=creation-protected
                                        |office=protected&lt;!--should this have a special tag?--&gt;
                                        |full
                                        |#default=protected
                                      }}
                        }}.}}}]]
| text = '''{{{reason-text|{{#switch:{{lc:{{{type}}}}}
|full=This page is currently [[Help:Protection|protected]] from editing
|semi=Editing of this {{pp-meta/pagetype}} by [[Wikipedia:User access levels#Autoconfirmed_users|new]] or [[Wikipedia:User access levels#Anonymous_users|unregistered]] users is currently [[Wikipedia:Protection policy|disabled]]
|pc1=All edits made to this {{pp-meta/pagetype}} by [[Wikipedia:User access levels#Autoconfirmed_users|new]] or [[Wikipedia:User access levels#Anonymous_users|unregistered]] users are currently [[Wikipedia:Pending changes|subject to review]]
|pc2=All edits made to this {{pp-meta/pagetype}} by users who are not [[Wikipedia:Reviewing|reviewers]] or [[Wikipedia:Administrators|administrators]] are currently [[Wikipedia:Pending changes|subject to review]]
|move=This {{pp-meta/pagetype}} is currently [[Help:Protection|protected]] from [[Help:Moving a page|page moves]]
|template=This is a permanently [[Help:Protection|protected]] {{pp-meta/pagetype}}, as it is [[Wikipedia:High-risk templates|high-risk]]
|indef=This page is [[Help:Protection|protected]] from editing ''indefinitely''
|office=This {{pp-meta/pagetype}} is currently [[Help:Protection|protected]] from editing
|create=[[Help:Starting a new page|Recreation]] of this {{pp-meta/pagetype}} [[Help:Protection|has been disabled]]
}}{{#ifeq:{{lc:{{{type}}}}}|indef||{{#if:{{{expiry|}}}|&amp;#32;until {{#time:F j, Y|{{{expiry}}}}}{{#if:{{{reason|}}}|,}}}}}}{{{reason&lt;includeonly&gt;|&lt;/includeonly&gt;}}}.}}}'''&lt;br /&gt; {{{explanation-text|{{#ifeq:{{lc:{{{dispute}}}}}|yes|This protection is '''not''' an endorsement of the {{#ifeq:{{{type}}}|move|[{{fullurl:Special:Log|type=move&amp;page={{FULLPAGENAMEE}}}} current title]|[{{fullurl:{{FULLPAGENAMEE}}|action=history}} current version]}}.}} See the [[Wikipedia:Protection policy|protection policy]] and [{{fullurl:Special:Log|type={{#switch:{{lc:{{{type}}}}} | pc1 | pc2 = stable | #default = protect }}&amp;page={{FULLPAGENAMEE}}}} {{#switch:{{lc:{{{type}}}}} | pc1 | pc2 = pending changes | #default = protection }} log] for more details. {{#switch:{{lc:{{{type}}}}}
|full|indef=Please discuss any changes on the [[{{TALKPAGENAME}}#{{#if:{{{section|}}}|{{{section}}}|top}}|talk page]]; you may use the {{tlx|edit protected}} template to ask an [[Wikipedia:Administrators|administrator]] to make an edit if it is supported by [[Wikipedia:Consensus|consensus]]. {{#ifeq:{{NAMESPACE}}|{{ns:8}}&lt;!--MediaWiki--&gt;||You may also [[Wikipedia:Requests for page protection|request]] that this page be unprotected.}}
|semi=If you cannot edit this {{pp-meta/pagetype}} and you wish to make a change, you can {{#ifeq:{{NAMESPACE}}|{{TALKSPACE}}||[[Template:Editsemiprotected|request an edit]], [[{{TALKPAGENAME}}|discuss changes on the talk page]],}} [[Wikipedia:Requests for page protection#Current requests for unprotection|request unprotection]], [[Special:Userlogin|log in]], or [[Special:UserLogin/signup|create an account]].
|move=The page may still be edited but cannot be moved until unprotected. Please discuss any suggested moves on the [[{{TALKPAGENAME}}|talk page]] or at [[Wikipedia:Requested moves]].  You can also [[Wikipedia:Requests for page protection|request]] that the page be unprotected. 
|template=Please discuss any changes on the [[{{TALKPAGENAME}}#{{#if:{{{section|}}}|{{{section}}}|top}}|talk page]]; you may use the {{tlx|edit protected}} template to ask an [[Wikipedia:Administrators|administrator]] or [[Wikipedia:Template editor|template editor]] to make an edit if it is supported by [[Wikipedia:Consensus|consensus]]. {{#ifeq:{{NAMESPACE}}|{{ns:8}}&lt;!--MediaWiki--&gt;||You may also [[Wikipedia:Requests for page protection|request]] that this page be unprotected.}}
|office=If you can edit this page, please discuss all changes and additions on the [[{{TALKPAGENAME}}|talk page]] first. '''Do not remove protection from this page unless you are authorized by the Wikimedia Foundation to do so.'''
|create=Please see the {{#if:{{{xfd|}}}|'''[[{{{xfd}}}|deletion discussion]]''' or the}} [{{fullurl:Special:Log|type=delete&amp;page={{FULLPAGENAMEE}}}} deletion log] for details of why this page was deleted. If you would like to create a page at this title, you must first [[Wikipedia:Requests for page protection|request]] for it to be unprotected, or contact the administrator who deleted the page for the deleted material to be restored. If unsuccessful, you can use [[Wikipedia:Deletion review|deletion review]].
}}}}}
}}
}}|&lt;includeonly&gt;[[Category:Wikipedia pages with incorrect protection templates]]&lt;/includeonly&gt;}}&lt;!--End if small--&gt;&lt;includeonly&gt;{{#ifeq:{{lc:{{{categories|no}}}}}|no||{{{categories|}}}}}&lt;/includeonly&gt;&lt;noinclude&gt;
{{documentation}}
&lt;!-- Add categories and interwikis to the /doc subpage, not here! --&gt;
&lt;/noinclude&gt;</text>
      <sha1>51m7no5gxhcuqo906m2zsmzlt5zdreh</sha1>
      <model>wikitext</model>
      <format>text/x-wiki</format>
    </revision>
  </page>
  <page>
    <title>Template:Pp-meta/pagetype</title>
    <ns>10</ns>
    <id>30446275</id>
    <revision>
      <id>579192830</id>
      <parentid>577799251</parentid>
      <timestamp>2013-10-29T00:01:09Z</timestamp>
      <contributor>
        <username>Mr. Stradivarius</username>
        <id>4708675</id>
      </contributor>
      <minor/>
      <comment>Changed protection level of Template:Pp-meta/pagetype: allow template editors ([Edit=Allow only template editors and admins] (indefinite) [Move=Allow only template editors and admins] (indefinite))</comment>
      <text xml:space="preserve" bytes="267">{{#ifeq:{{TALKSPACE}}|{{NAMESPACE}}|talk page|
{{#switch:{{NAMESPACE}}
|{{ns:}}              = article
|{{ns:File}}          = file
|{{ns:Template}}      = template
|{{ns:Category}}      = category
|{{ns:Module}}        = module
|#default            = page}}}}</text>
      <sha1>cb262v7tiv3i3v1x375mqdd5pur1d8q</sha1>
      <model>wikitext</model>
      <format>text/x-wiki</format>
    </revision>
  </page>
  <page>
    <title>Template:Pp-template</title>
    <ns>10</ns>
    <id>10225116</id>
    <revision>
      <id>578340995</id>
      <parentid>578337775</parentid>
      <timestamp>2013-10-23T00:53:07Z</timestamp>
      <contributor>
        <username>Equazcion</username>
        <id>2813350</id>
      </contributor>
      <comment>corrected icon rollover text</comment>
      <text xml:space="preserve" bytes="3563">&lt;includeonly&gt;{{pp-meta
|type={{#switch:{{{demolevel|{{#ifeq:{{PROTECTIONLEVEL:edit}}-{{PROTECTIONLEVEL:move}}|-sysop|move|{{PROTECTIONLEVEL:edit}}}}}}}
  |semi
  |autoconfirmed=semi
  |administrator
  |full
  |sysop=indef
  |move=move
  |templateeditor=template
  |#default=template&lt;!--fallback value--&gt;}}
|small={{{small|yes}}}
|right={{{right|}}}
|demospace={{{demospace|}}}
|demolevel={{#ifeq:{{PAGENAME}}/{{NAMESPACE}}|{{SUBPAGENAME}}/{{ns:Template}}|{{{demolevel|undefined}}}|{{#ifeq:{{lc:{{SUBPAGENAME}}}}|sandbox|sysop|{{{demolevel|undefined}}}}}}}
|expiry=&lt;!--not applicable--&gt;
|dispute=no
|icon-text=This {{#ifeq:{{NAMESPACE}}|{{ns:6}}|image, included in a high-risk template or message,|high-risk {{pp-meta/pagetype}} }} is permanently {{#switch:{{{demolevel|{{#ifeq:{{PROTECTIONLEVEL:edit}}-{{PROTECTIONLEVEL:move}}|-sysop|move|{{PROTECTIONLEVEL:edit}}}}}}}
  |semi
  |autoconfirmed=semi-protected from editing
  |move=move-protected
  |administrator
  |full
  |sysop
  |templateeditor
  |#default=&lt;!--fallback value--&gt; protected from editing}} to prevent vandalism.
|reason-text=This {{#switch:{{NAMESPACE}}
  |{{ns:image}}=image, used in one or more [[Wikipedia:High-risk templates|high-risk templates]]{{#switch:{{{demolevel|{{PROTECTIONLEVEL:edit}}}}}
  |semi
  |autoconfirmed=
  |administrator
  |full
  |sysop=&lt;nowiki&gt; &lt;/nowiki&gt;and/or [[Special:Allmessages|system messages]],
  |templateeditor=&lt;nowiki&gt; &lt;/nowiki&gt;and/or [[Special:Allmessages|system messages]],
  |#default=&lt;!--fallback value--&gt;}}
  |#default=[[Wikipedia:High-risk templates|high-risk {{pp-meta/pagetype}}]]
}} has been [[Wikipedia:This page is protected|{{#switch:{{{demolevel|{{#ifeq:{{PROTECTIONLEVEL:edit}}-{{PROTECTIONLEVEL:move}}|-sysop|move|{{PROTECTIONLEVEL:edit}}}}}}}
  |semi
  |autoconfirmed=semi-
  |move=move-
  |administrator
  |full
  |sysop
  |templateeditor&lt;!--uses default--&gt;
  |#default=&lt;!--fallback value--&gt;permanently&lt;nowiki&gt; &lt;/nowiki&gt;}}protected]]{{#ifeq:{{PROTECTIONLEVEL:edit}}-{{PROTECTIONLEVEL:move}}|-sysop||&lt;nowiki&gt; &lt;/nowiki&gt;from editing}} to prevent [[Wikipedia:Vandalism|vandalism]]. {{#switch:{{{demolevel|{{PROTECTIONLEVEL:edit}}}}}
  |semi
  |autoconfirmed=
  |administrator
  |full
  |sysop
  |templateeditor&lt;!--uses default--&gt;
  |#default={{#switch:{{NAMESPACE}}|{{ns:image}}=&lt;br /&gt;&lt;small&gt;'''Do not move this image''' to [[commons:|Wikimedia Commons]].&lt;/small&gt;}}}}
|categories={{{categories|{{#ifeq:{{NAMESPACE}}|{{ns:10}}|{{#switch:{{{demolevel|{{#ifeq:{{PROTECTIONLEVEL:edit}}-{{PROTECTIONLEVEL:move}}|-sysop|move|{{PROTECTIONLEVEL:edit}}}}}}}
  |semi
  |autoconfirmed=[[Category:Wikipedia semi-protected templates|{{PAGENAME}}]]{{#ifeq:{{PROTECTIONLEVEL:move}}|sysop|[[Category:Wikipedia move-protected templates|{{PAGENAME}}]]}}
  |move=[[Category:Wikipedia move-protected templates|{{PAGENAME}}]]
  |administrator
  |full
  |sysop
  |templateeditor&lt;!--uses default--&gt;
  |#default=[[Category:Wikipedia protected templates|{{PAGENAME}}]]&lt;!--fallback value--&gt;}}}}{{#ifeq:{{NAMESPACE}}|{{ns:6}}|[[Category:{{#switch:{{{demolevel|{{PROTECTIONLEVEL:edit}}}}}
  |semi
  |autoconfirmed=Semi-protected
  |administrator
  |full
  |sysop
  |templateeditor&lt;!--uses default--&gt;
  |#default=Protected&lt;!--fallback value--&gt;}} images|{{PAGENAME}}]]}}}}}}}&lt;/includeonly&gt;&lt;noinclude&gt;
{{pp-template|categories=no}}  &lt;!-- Show the small version --&gt;
{{pp-template|small=no}}      &lt;!-- Show the large version --&gt;
{{Documentation}}
&lt;!-- Add categories and interwikis to the /doc subpage, not here! --&gt;
&lt;/noinclude&gt;</text>
      <sha1>0f32k8jn0m1rwbfgys15odtk95eusit</sha1>
      <model>wikitext</model>
      <format>text/x-wiki</format>
    </revision>
  </page>
  <page>
    <title>Template:Purge</title>
    <ns>10</ns>
    <id>1188537</id>
    <restrictions>edit=sysop:move=sysop</restrictions>
    <revision>
      <id>567592458</id>
      <parentid>567590087</parentid>
      <timestamp>2013-08-07T20:57:58Z</timestamp>
      <contributor>
        <username>Waldir</username>
        <id>182472</id>
      </contributor>
      <comment>format anchor automatically. couldn't find a way to keep the hash symbol inside the #if:, but it does no harm outside anyway.</comment>
      <text xml:space="preserve" bytes="252">&lt;span class=&quot;noprint plainlinks purgelink&quot;&gt;[{{fullurl:{{{page|{{FULLPAGENAME}}}}}|action=purge}}#{{#if:{{{anchor|}}}|{{urlencode:{{{anchor|}}}|WIKI}}}} &lt;span title=&quot;Purge this page&quot;&gt;{{{1|Purge}}}&lt;/span&gt;]&lt;/span&gt;&lt;noinclude&gt;
{{documentation}}
&lt;/noinclude&gt;</text>
      <sha1>fg3egkc705ekna03dpzyrmnxz4qtz9t</sha1>
      <model>wikitext</model>
      <format>text/x-wiki</format>
    </revision>
  </page>
  <page>
    <title>Template:Sidebar</title>
    <ns>10</ns>
    <id>1960394</id>
    <revision>
      <id>557080250</id>
      <parentid>553354786</parentid>
      <timestamp>2013-05-27T22:15:40Z</timestamp>
      <contributor>
        <username>Plastikspork</username>
        <id>5075409</id>
      </contributor>
      <comment>Adding child = yes parameter per edit request</comment>
      <text xml:space="preserve" bytes="14945">{{#ifeq:{{{child|}}}|yes||&lt;table class=&quot;vertical-navbox {{#ifeq:{{{wraplinks|}}}|true||nowraplinks}} {{{bodyclass|{{{class|}}}}}}&quot; &lt;!--
    --&gt;cellspacing=&quot;{{#if:{{{cellspacing|}}} |{{{cellspacing}}} |5}}&quot; &lt;!--
    --&gt;cellpadding=&quot;{{#if:{{{cellpadding|}}} |{{{cellpadding}}} |0}}&quot; &lt;!--
    --&gt;style=&quot;float:{{#if:{{{float|}}} |{{{float}}} |right}};&lt;!--
          --&gt;clear:{{#ifeq:{{{float|}}}|none |both |{{#if:{{{float|}}} |{{{float}}} |right}}}};&lt;!--
          --&gt;width:{{#if:{{{width|}}} |{{{width}}} |22.0em}};&lt;!--
            (margins:)--&gt;{{#switch:{{{float|}}} |left=margin:0 1.0em 1.0em 0; |none|right|#default=margin:0 0 1.0em 1.0em;}}&lt;!--
          --&gt;background:#f9f9f9;border:1px solid #aaa;padding:0.2em;border-spacing:0.4em 0;text-align:center;line-height:1.4em;font-size:88%;{{{bodystyle|{{{style|}}}}}}&quot;&gt;}}&lt;!--
--&gt;{{#ifeq:{{{child|}}}|yes||{{#if:{{{outertitle|}}}
    |&lt;caption class=&quot;{{{outertitleclass|}}}&quot; style=&quot;padding-bottom:0.2em;font-size:125%;line-height:1.2em;font-weight:bold;{{{outertitlestyle|}}}&quot;&gt;{{{outertitle}}}&lt;/caption&gt;&lt;!--
--&gt;}}}}&lt;!--
--&gt;{{#ifeq:{{{child|}}}|yes||{{#if:{{{topimage|}}}
    |&lt;tr&gt;&lt;td class=&quot;{{{topimageclass|}}}&quot; style=&quot;padding:0.4em 0;{{{topimagestyle|}}}&quot;&gt;{{{topimage}}}&lt;!--
          --&gt;{{#if:{{{topcaption|}}} |&lt;div style=&quot;padding-top:0.2em;line-height:1.2em;{{{topcaptionstyle|}}}&quot;&gt;{{{topcaption}}}&lt;/div&gt;}}&lt;/td&gt;
      &lt;/tr&gt;
    }}}}&lt;!--
--&gt;{{#ifeq:{{{child|}}}|yes||{{#if:{{{pretitle|}}}
    |&lt;tr&gt;&lt;td class=&quot;{{{pretitleclass|}}}&quot; style=&quot;{{{basestyle|}}};{{#if:{{{topimage|}}} |padding-top:0.2em |padding-top:0.4em}};line-height:1.2em;{{{pretitlestyle|}}}&quot;&gt;{{{pretitle}}}&lt;/td&gt;
      &lt;/tr&gt;
    }}}}&lt;!--
--&gt;{{#if:{{{title|}}}
    |{{#ifeq:{{{child|}}}|yes||&lt;tr&gt;&lt;th class=&quot;{{{titleclass|}}}&quot; style=&quot;{{{basestyle|}}};padding:0.2em 0.4em 0.2em;{{#if:{{{pretitle|}}} |padding-top:0}};font-size:145%;line-height:1.2em;{{{titlestyle|}}}&quot;&gt;}}{{{title}}}&lt;/th&gt;
      &lt;/tr&gt;
    }}&lt;!--
--&gt;{{#if:{{{image|}}}
    |&lt;tr&gt;&lt;td class=&quot;{{{imageclass|}}}&quot; style=&quot;padding:0.2em 0 0.4em;{{{imagestyle|}}}&quot;&gt;{{{image}}}&lt;!--
          --&gt;{{#if:{{{caption|}}} |&lt;div style=&quot;padding-top:0.2em;line-height:1.2em;{{{captionstyle|}}}&quot;&gt;{{{caption}}}&lt;/div&gt;}}&lt;/td&gt;
      &lt;/tr&gt;
    }}&lt;!--
--&gt;{{#if:{{{above|}}}
    |&lt;tr&gt;&lt;td class=&quot;{{{aboveclass|}}}&quot; style=&quot;padding:0.3em 0.4em 0.3em;font-weight:bold;{{{abovestyle|}}}&quot;&gt;&lt;!--newline required for bullet-points to work:--&gt;
{{{above}}}&lt;/td&gt;
      &lt;/tr&gt;
    }}&lt;!--
heading#/content# starts here:
--&gt;{{#if: {{{heading1|}}}|
&lt;tr&gt;
&lt;th class=&quot;{{{headingclass|}}}&quot; style=&quot;padding:0.1em;{{{basestyle|}}};{{{headingstyle|}}};{{{heading1style|}}}&quot;&gt;
{{{heading1}}}&lt;/th&gt;
&lt;/tr&gt;
}}{{#if:
{{{content1|}}}|
&lt;tr&gt;
&lt;td class=&quot;{{{contentclass|}}}&quot; style=&quot;padding:0 0.1em 0.4em;{{{contentstyle|}}};{{{content1style|}}}&quot;&gt;&lt;!-- newline required before contents# for bullets to work --&gt;
{{{content1}}}&lt;/td&gt;
&lt;/tr&gt;
}}{{#if: {{{heading2|}}}|
&lt;tr&gt;
&lt;th class=&quot;{{{headingclass|}}}&quot; style=&quot;padding:0.1em;{{{basestyle|}}};{{{headingstyle|}}};{{{heading2style|}}}&quot;&gt;
{{{heading2}}}&lt;/th&gt;
&lt;/tr&gt;
}}{{#if:
{{{content2|}}}|
&lt;tr&gt;
&lt;td class=&quot;{{{contentclass|}}}&quot; style=&quot;padding:0 0.1em 0.4em;{{{contentstyle|}}};{{{content2style|}}}&quot;&gt;
{{{content2}}}&lt;/td&gt;
&lt;/tr&gt;
}}{{#if: {{{heading3|}}}|
&lt;tr&gt;
&lt;th class=&quot;{{{headingclass|}}}&quot; style=&quot;padding:0.1em;{{{basestyle|}}};{{{headingstyle|}}};{{{heading3style|}}}&quot;&gt;
{{{heading3}}}&lt;/th&gt;
&lt;/tr&gt;
}}{{#if:
{{{content3|}}}|
&lt;tr&gt;
&lt;td class=&quot;{{{contentclass|}}}&quot; style=&quot;padding:0 0.1em 0.4em;{{{contentstyle|}}};{{{content3style|}}}&quot;&gt;
{{{content3}}}&lt;/td&gt;
&lt;/tr&gt;
}}{{#if: {{{heading4|}}}|
&lt;tr&gt;
&lt;th class=&quot;{{{headingclass|}}}&quot; style=&quot;padding:0.1em;{{{basestyle|}}};{{{headingstyle|}}};{{{heading4style|}}}&quot;&gt;
{{{heading4}}}&lt;/th&gt;
&lt;/tr&gt;
}}{{#if:
{{{content4|}}}|
&lt;tr&gt;
&lt;td class=&quot;{{{contentclass|}}}&quot; style=&quot;padding:0 0.1em 0.4em;{{{contentstyle|}}};{{{content4style|}}}&quot;&gt;
{{{content4|}}}&lt;/td&gt;
&lt;/tr&gt;
}}{{#if: {{{heading5|}}}|
&lt;tr&gt;
&lt;th class=&quot;{{{headingclass|}}}&quot; style=&quot;padding:0.1em;{{{basestyle|}}};{{{headingstyle|}}};{{{heading5style|}}}&quot;&gt;
{{{heading5}}}&lt;/th&gt;
&lt;/tr&gt;
}}{{#if:
{{{content5|}}}|
&lt;tr&gt;
&lt;td class=&quot;{{{contentclass|}}}&quot; style=&quot;padding:0 0.1em 0.4em;{{{contentstyle|}}};{{{content5style|}}}&quot;&gt;
{{{content5}}}&lt;/td&gt;
&lt;/tr&gt;
}}{{#if: {{{heading6|}}}|
&lt;tr&gt;
&lt;th class=&quot;{{{headingclass|}}}&quot; style=&quot;padding:0.1em;{{{basestyle|}}};{{{headingstyle|}}};{{{heading6style|}}}&quot;&gt;
{{{heading6}}}&lt;/th&gt;
&lt;/tr&gt;
}}{{#if:
{{{content6|}}}|
&lt;tr&gt;
&lt;td class=&quot;{{{contentclass|}}}&quot; style=&quot;padding:0 0.1em 0.4em;{{{contentstyle|}}};{{{content6style|}}}&quot;&gt;
{{{content6}}}&lt;/td&gt;
&lt;/tr&gt;
}}{{#if: {{{heading7|}}}|
&lt;tr&gt;
&lt;th class=&quot;{{{headingclass|}}}&quot; style=&quot;padding:0.1em;{{{basestyle|}}};{{{headingstyle|}}};{{{heading7style|}}}&quot;&gt;
{{{heading7}}}&lt;/th&gt;
&lt;/tr&gt;
}}{{#if:
{{{content7|}}}|
&lt;tr&gt;
&lt;td class=&quot;{{{contentclass|}}}&quot; style=&quot;padding:0 0.1em 0.4em;{{{contentstyle|}}};{{{content7style|}}}&quot;&gt;
{{{content7}}}&lt;/td&gt;
&lt;/tr&gt;
}}{{#if: {{{heading8|}}}|
&lt;tr&gt;
&lt;th class=&quot;{{{headingclass|}}}&quot; style=&quot;padding:0.1em;{{{basestyle|}}};{{{headingstyle|}}};{{{heading8style|}}}&quot;&gt;
{{{heading8}}}&lt;/th&gt;
&lt;/tr&gt;
}}{{#if:
{{{content8|}}}|
&lt;tr&gt;
&lt;td class=&quot;{{{contentclass|}}}&quot; style=&quot;padding:0 0.1em 0.4em;{{{contentstyle|}}};{{{content8style|}}}&quot;&gt;
{{{content8}}}&lt;/td&gt;
&lt;/tr&gt;
}}{{#if: {{{heading9|}}}|
&lt;tr&gt;
&lt;th class=&quot;{{{headingclass|}}}&quot; style=&quot;padding:0.1em;{{{basestyle|}}};{{{headingstyle|}}};{{{heading9style|}}}&quot;&gt;
{{{heading9}}}&lt;/th&gt;
&lt;/tr&gt;
}}{{#if:
{{{content9|}}}|
&lt;tr&gt;
&lt;td class=&quot;{{{contentclass|}}}&quot; style=&quot;padding:0 0.1em 0.4em;{{{contentstyle|}}};{{{content9style|}}}&quot;&gt;
{{{content9}}}&lt;/td&gt;
&lt;/tr&gt;
}}{{#if: {{{heading10|}}}|
&lt;tr&gt;
&lt;th class=&quot;{{{headingclass|}}}&quot; style=&quot;padding:0.1em;{{{basestyle|}}};{{{headingstyle|}}};{{{heading10style|}}}&quot;&gt;
{{{heading10}}}&lt;/th&gt;
&lt;/tr&gt;
}}{{#if:
{{{content10|}}}|
&lt;tr&gt;
&lt;td class=&quot;{{{contentclass|}}}&quot; style=&quot;padding:0 0.1em 0.4em;{{{contentstyle|}}};{{{content10style|}}}&quot;&gt;
{{{content10}}}&lt;/td&gt;
&lt;/tr&gt;
}}{{#if: {{{heading11|}}}|
&lt;tr&gt;
&lt;th class=&quot;{{{headingclass|}}}&quot; style=&quot;padding:0.1em;{{{basestyle|}}};{{{headingstyle|}}};{{{heading11style|}}}&quot;&gt;
{{{heading11}}}&lt;/th&gt;
&lt;/tr&gt;
}}{{#if:
{{{content11|}}}|
&lt;tr&gt;
&lt;td class=&quot;{{{contentclass|}}}&quot; style=&quot;padding:0 0.1em 0.4em;{{{contentstyle|}}};{{{content11style|}}}&quot;&gt;
{{{content11}}}&lt;/td&gt;
&lt;/tr&gt;
}}{{#if: {{{heading12|}}}|
&lt;tr&gt;
&lt;th class=&quot;{{{headingclass|}}}&quot; style=&quot;padding:0.1em;{{{basestyle|}}};{{{headingstyle|}}};{{{heading12style|}}}&quot;&gt;
{{{heading12}}}&lt;/th&gt;
&lt;/tr&gt;
}}{{#if:
{{{content12|}}}|
&lt;tr&gt;
&lt;td class=&quot;{{{contentclass|}}}&quot; style=&quot;padding:0 0.1em 0.4em;{{{contentstyle|}}};{{{content12style|}}}&quot;&gt;
{{{content12}}}&lt;/td&gt;
&lt;/tr&gt;
}}{{#if: {{{heading13|}}}|
&lt;tr&gt;
&lt;th class=&quot;{{{headingclass|}}}&quot; style=&quot;padding:0.1em;{{{basestyle|}}};{{{headingstyle|}}};{{{heading13style|}}}&quot;&gt;
{{{heading13}}}&lt;/th&gt;
&lt;/tr&gt;
}}{{#if:
{{{content13|}}}|
&lt;tr&gt;
&lt;td class=&quot;{{{contentclass|}}}&quot; style=&quot;padding:0 0.1em 0.4em;{{{contentstyle|}}};{{{content13style|}}}&quot;&gt;
{{{content13}}}&lt;/td&gt;
&lt;/tr&gt;
}}{{#if: {{{heading14|}}}|
&lt;tr&gt;
&lt;th class=&quot;{{{headingclass|}}}&quot; style=&quot;padding:0.1em;{{{basestyle|}}};{{{headingstyle|}}};{{{heading14style|}}}&quot;&gt;
{{{heading14}}}&lt;/th&gt;
&lt;/tr&gt;
}}{{#if:
{{{content14|}}}|
&lt;tr&gt;
&lt;td class=&quot;{{{contentclass|}}}&quot; style=&quot;padding:0 0.1em 0.4em;{{{contentstyle|}}};{{{content14style|}}}&quot;&gt;
{{{content14}}}&lt;/td&gt;
&lt;/tr&gt;
}}{{#if: {{{heading15|}}}|
&lt;tr&gt;
&lt;th class=&quot;{{{headingclass|}}}&quot; style=&quot;padding:0.1em;{{{basestyle|}}};{{{headingstyle|}}};{{{heading15style|}}}&quot;&gt;
{{{heading15}}}&lt;/th&gt;
&lt;/tr&gt;
}}{{#if:
{{{content15|}}}|
&lt;tr&gt;
&lt;td class=&quot;{{{contentclass|}}}&quot; style=&quot;padding:0 0.1em 0.4em;{{{contentstyle|}}};{{{content15style|}}}&quot;&gt;
{{{content15}}}&lt;/td&gt;
&lt;/tr&gt;
}}{{#if: {{{heading16|}}}|
&lt;tr&gt;
&lt;th class=&quot;{{{headingclass|}}}&quot; style=&quot;padding:0.1em;{{{basestyle|}}};{{{headingstyle|}}};{{{heading16style|}}}&quot;&gt;
{{{heading16}}}&lt;/th&gt;
&lt;/tr&gt;
}}{{#if:
{{{content16|}}}|
&lt;tr&gt;
&lt;td class=&quot;{{{contentclass|}}}&quot; style=&quot;padding:0 0.1em 0.4em;{{{contentstyle|}}};{{{content16style|}}}&quot;&gt;
{{{content16}}}&lt;/td&gt;
&lt;/tr&gt;
}}{{#if: {{{heading17|}}}|
&lt;tr&gt;
&lt;th class=&quot;{{{headingclass|}}}&quot; style=&quot;padding:0.1em;{{{basestyle|}}};{{{headingstyle|}}};{{{heading17style|}}}&quot;&gt;
{{{heading17}}}&lt;/th&gt;
&lt;/tr&gt;
}}{{#if:
{{{content17|}}}|
&lt;tr&gt;
&lt;td class=&quot;{{{contentclass|}}}&quot; style=&quot;padding:0 0.1em 0.4em;{{{contentstyle|}}};{{{content17style|}}}&quot;&gt;
{{{content17}}}&lt;/td&gt;
&lt;/tr&gt;
}}{{#if: {{{heading18|}}}|
&lt;tr&gt;
&lt;th class=&quot;{{{headingclass|}}}&quot; style=&quot;padding:0.1em;{{{basestyle|}}};{{{headingstyle|}}};{{{heading18style|}}}&quot;&gt;
{{{heading18}}}&lt;/th&gt;
&lt;/tr&gt;
}}{{#if:
{{{content18|}}}|
&lt;tr&gt;
&lt;td class=&quot;{{{contentclass|}}}&quot; style=&quot;padding:0 0.1em 0.4em;{{{contentstyle|}}};{{{content18style|}}}&quot;&gt;
{{{content18}}}&lt;/td&gt;
&lt;/tr&gt;
}}{{#if: {{{heading19|}}}|
&lt;tr&gt;
&lt;th class=&quot;{{{headingclass|}}}&quot; style=&quot;padding:0.1em;{{{basestyle|}}};{{{headingstyle|}}};{{{heading19style|}}}&quot;&gt;
{{{heading19}}}&lt;/th&gt;
&lt;/tr&gt;
}}{{#if:
{{{content19|}}}|
&lt;tr&gt;
&lt;td class=&quot;{{{contentclass|}}}&quot; style=&quot;padding:0 0.1em 0.4em;{{{contentstyle|}}};{{{content19style|}}}&quot;&gt;
{{{content19}}}&lt;/td&gt;
&lt;/tr&gt;
}}{{#if: {{{heading20|}}}|
&lt;tr&gt;
&lt;th class=&quot;{{{headingclass|}}}&quot; style=&quot;padding:0.1em;{{{basestyle|}}};{{{headingstyle|}}};{{{heading20style|}}}&quot;&gt;
{{{heading20}}}&lt;/th&gt;
&lt;/tr&gt;
}}{{#if:
{{{content20|}}}|
&lt;tr&gt;
&lt;td class=&quot;{{{contentclass|}}}&quot; style=&quot;padding:0 0.1em 0.4em;{{{contentstyle|}}};{{{content20style|}}}&quot;&gt;
{{{content20}}}&lt;/td&gt;
&lt;/tr&gt;
}}{{#if: {{{heading21|}}}|
&lt;tr&gt;
&lt;th class=&quot;{{{headingclass|}}}&quot; style=&quot;padding:0.1em;{{{basestyle|}}};{{{headingstyle|}}};{{{heading21style|}}}&quot;&gt;
{{{heading21}}}&lt;/th&gt;
&lt;/tr&gt;
}}{{#if:
{{{content21|}}}|
&lt;tr&gt;
&lt;td class=&quot;{{{contentclass|}}}&quot; style=&quot;padding:0 0.1em 0.4em;{{{contentstyle|}}};{{{content21style|}}}&quot;&gt;
{{{content21}}}&lt;/td&gt;
&lt;/tr&gt;
}}{{#if: {{{heading22|}}}|
&lt;tr&gt;
&lt;th class=&quot;{{{headingclass|}}}&quot; style=&quot;padding:0.1em;{{{basestyle|}}};{{{headingstyle|}}};{{{heading22style|}}}&quot;&gt;
{{{heading22}}}&lt;/th&gt;
&lt;/tr&gt;
}}{{#if:
{{{content22|}}}|
&lt;tr&gt;
&lt;td class=&quot;{{{contentclass|}}}&quot; style=&quot;padding:0 0.1em 0.4em;{{{contentstyle|}}};{{{content22style|}}}&quot;&gt;
{{{content22}}}&lt;/td&gt;
&lt;/tr&gt;
}}{{#if: {{{heading23|}}}|
&lt;tr&gt;
&lt;th class=&quot;{{{headingclass|}}}&quot; style=&quot;padding:0.1em;{{{basestyle|}}};{{{headingstyle|}}};{{{heading23style|}}}&quot;&gt;
{{{heading23}}}&lt;/th&gt;
&lt;/tr&gt;
}}{{#if:
{{{content23|}}}|
&lt;tr&gt;
&lt;td class=&quot;{{{contentclass|}}}&quot; style=&quot;padding:0 0.1em 0.4em;{{{contentstyle|}}};{{{content23style|}}}&quot;&gt;
{{{content23}}}&lt;/td&gt;
&lt;/tr&gt;
}}{{#if: {{{heading24|}}}|
&lt;tr&gt;
&lt;th class=&quot;{{{headingclass|}}}&quot; style=&quot;padding:0.1em;{{{basestyle|}}};{{{headingstyle|}}};{{{heading24style|}}}&quot;&gt;
{{{heading24}}}&lt;/th&gt;
&lt;/tr&gt;
}}{{#if:
{{{content24|}}}|
&lt;tr&gt;
&lt;td class=&quot;{{{contentclass|}}}&quot; style=&quot;padding:0 0.1em 0.4em;{{{contentstyle|}}};{{{content24style|}}}&quot;&gt;
{{{content24}}}&lt;/td&gt;
&lt;/tr&gt;
}}{{#if: {{{heading25|}}}|
&lt;tr&gt;
&lt;th class=&quot;{{{headingclass|}}}&quot; style=&quot;padding:0.1em;{{{basestyle|}}};{{{headingstyle|}}};{{{heading25style|}}}&quot;&gt;
{{{heading25}}}&lt;/th&gt;
&lt;/tr&gt;
}}{{#if:
{{{content25|}}}|
&lt;tr&gt;
&lt;td class=&quot;{{{contentclass|}}}&quot; style=&quot;padding:0 0.1em 0.4em;{{{contentstyle|}}};{{{content25style|}}}&quot;&gt;
{{{content25}}}&lt;/td&gt;
&lt;/tr&gt;
}}{{#if: {{{heading26|}}}|
&lt;tr&gt;
&lt;th class=&quot;{{{headingclass|}}}&quot; style=&quot;padding:0.1em;{{{basestyle|}}};{{{headingstyle|}}};{{{heading26style|}}}&quot;&gt;
{{{heading26}}}&lt;/th&gt;
&lt;/tr&gt;
}}{{#if:
{{{content26|}}}|
&lt;tr&gt;
&lt;td class=&quot;{{{contentclass|}}}&quot; style=&quot;padding:0 0.1em 0.4em;{{{contentstyle|}}};{{{content26style|}}}&quot;&gt;
{{{content26}}}&lt;/td&gt;
&lt;/tr&gt;
}}{{#if: {{{heading27|}}}|
&lt;tr&gt;
&lt;th class=&quot;{{{headingclass|}}}&quot; style=&quot;padding:0.1em;{{{basestyle|}}};{{{headingstyle|}}};{{{heading27style|}}}&quot;&gt;
{{{heading27}}}&lt;/th&gt;
&lt;/tr&gt;
}}{{#if:
{{{content27|}}}|
&lt;tr&gt;
&lt;td class=&quot;{{{contentclass|}}}&quot; style=&quot;padding:0 0.1em 0.4em;{{{contentstyle|}}};{{{content27style|}}}&quot;&gt;
{{{content27}}}&lt;/td&gt;
&lt;/tr&gt;
}}{{#if: {{{heading28|}}}|
&lt;tr&gt;
&lt;th class=&quot;{{{headingclass|}}}&quot; style=&quot;padding:0.1em;{{{basestyle|}}};{{{headingstyle|}}};{{{heading28style|}}}&quot;&gt;
{{{heading28}}}&lt;/th&gt;
&lt;/tr&gt;
}}{{#if:
{{{content28|}}}|
&lt;tr&gt;
&lt;td class=&quot;{{{contentclass|}}}&quot; style=&quot;padding:0 0.1em 0.4em;{{{contentstyle|}}};{{{content28style|}}}&quot;&gt;
{{{content28}}}&lt;/td&gt;
&lt;/tr&gt;
}}{{#if: {{{heading29|}}}|
&lt;tr&gt;
&lt;th class=&quot;{{{headingclass|}}}&quot; style=&quot;padding:0.1em;{{{basestyle|}}};{{{headingstyle|}}};{{{heading29style|}}}&quot;&gt;
{{{heading29}}}&lt;/th&gt;
&lt;/tr&gt;
}}{{#if:
{{{content29|}}}|
&lt;tr&gt;
&lt;td class=&quot;{{{contentclass|}}}&quot; style=&quot;padding:0 0.1em 0.4em;{{{contentstyle|}}};{{{content29style|}}}&quot;&gt;
{{{content29}}}&lt;/td&gt;
&lt;/tr&gt;
}}{{#if: {{{heading30|}}}|
&lt;tr&gt;
&lt;th class=&quot;{{{headingclass|}}}&quot; style=&quot;padding:0.1em;{{{basestyle|}}};{{{headingstyle|}}};{{{heading30style|}}}&quot;&gt;
{{{heading30}}}&lt;/th&gt;
&lt;/tr&gt;
}}{{#if:
{{{content30|}}}|
&lt;tr&gt;
&lt;td class=&quot;{{{contentclass|}}}&quot; style=&quot;padding:0 0.1em 0.4em;{{{contentstyle|}}};{{{content30style|}}}&quot;&gt;
{{{content30}}}&lt;/td&gt;
&lt;/tr&gt;
}}{{#if: {{{heading31|}}}|
&lt;tr&gt;
&lt;th class=&quot;{{{headingclass|}}}&quot; style=&quot;padding:0.1em;{{{basestyle|}}};{{{headingstyle|}}};{{{heading31style|}}}&quot;&gt;
{{{heading31}}}&lt;/th&gt;
&lt;/tr&gt;
}}{{#if:
{{{content31|}}}|
&lt;tr&gt;
&lt;td class=&quot;{{{contentclass|}}}&quot; style=&quot;padding:0 0.1em 0.4em;{{{contentstyle|}}};{{{content31style|}}}&quot;&gt;
{{{content31}}}&lt;/td&gt;
&lt;/tr&gt;
}}{{#if: {{{heading32|}}}|
&lt;tr&gt;
&lt;th class=&quot;{{{headingclass|}}}&quot; style=&quot;padding:0.1em;{{{basestyle|}}};{{{headingstyle|}}};{{{heading32style|}}}&quot;&gt;
{{{heading32}}}&lt;/th&gt;
&lt;/tr&gt;
}}{{#if:
{{{content32|}}}|
&lt;tr&gt;
&lt;td class=&quot;{{{contentclass|}}}&quot; style=&quot;padding:0 0.1em 0.4em;{{{contentstyle|}}};{{{content32style|}}}&quot;&gt;
{{{content32}}}&lt;/td&gt;
&lt;/tr&gt;
}}{{#if: {{{heading33|}}}|
&lt;tr&gt;
&lt;th class=&quot;{{{headingclass|}}}&quot; style=&quot;padding:0.1em;{{{basestyle|}}};{{{headingstyle|}}};{{{heading33style|}}}&quot;&gt;
{{{heading33}}}&lt;/th&gt;
&lt;/tr&gt;
}}{{#if:
{{{content33|}}}|
&lt;tr&gt;
&lt;td class=&quot;{{{contentclass|}}}&quot; style=&quot;padding:0 0.1em 0.4em;{{{contentstyle|}}};{{{content33style|}}}&quot;&gt;
{{{content33}}}&lt;/td&gt;
&lt;/tr&gt;
}}{{#if: {{{heading34|}}}|
&lt;tr&gt;
&lt;th class=&quot;{{{headingclass|}}}&quot; style=&quot;padding:0.1em;{{{basestyle|}}};{{{headingstyle|}}};{{{heading34style|}}}&quot;&gt;
{{{heading34}}}&lt;/th&gt;
&lt;/tr&gt;
}}{{#if:
{{{content34|}}}|
&lt;tr&gt;
&lt;td class=&quot;{{{contentclass|}}}&quot; style=&quot;padding:0 0.1em 0.4em;{{{contentstyle|}}};{{{content34style|}}}&quot;&gt;
{{{content34}}}&lt;/td&gt;
&lt;/tr&gt;
}}{{#if: {{{heading35|}}}|
&lt;tr&gt;
&lt;th class=&quot;{{{headingclass|}}}&quot; style=&quot;padding:0.1em;{{{basestyle|}}};{{{headingstyle|}}};{{{heading35style|}}}&quot;&gt;
{{{heading35}}}&lt;/th&gt;
&lt;/tr&gt;
}}{{#if:
{{{content35|}}}|
&lt;tr&gt;
&lt;td class=&quot;{{{contentclass|}}}&quot; style=&quot;padding:0 0.1em 0.4em;{{{contentstyle|}}};{{{content35style|}}}&quot;&gt;
{{{content35}}}&lt;/td&gt;
&lt;/tr&gt;
}}&lt;!--
--&gt;{{#if: {{{below|}}}
    |&lt;tr&gt;&lt;td class=&quot;{{{belowclass|}}}&quot; style=&quot;padding:0.3em 0.4em 0.3em;font-weight:bold;{{{belowstyle|}}}&quot;&gt;
{{{below}}}&lt;/td&gt;
    &lt;/tr&gt;
    }}&lt;!--
--&gt;{{#ifeq:{{{child|}}}|yes||{{#switch:{{{navbar|{{{tnavbar|&lt;noinclude&gt;off&lt;/noinclude&gt;}}}}}}
    |none |off=
    |#default=&lt;tr&gt;&lt;td style=&quot;text-align:right;font-size:115%;{{{navbarstyle|{{{tnavbarstyle|}}}}}}&quot;&gt;{{navbar|{{{name|{{PAGENAME}}}}}|mini=1|fontstyle={{{navbarfontstyle|{{{tnavbarfontstyle|}}}}}}}}&lt;/td&gt;&lt;/tr&gt;&lt;!--
--&gt;}}
&lt;/table&gt;}}&lt;noinclude&gt;{{documentation}}&lt;!-- Please add categories and interwikis to the bottom of Template:Sidebar/doc, not here --&gt;&lt;/noinclude&gt;</text>
      <sha1>5cyaygqh4p70kjblqvvmfcpllj0jwkq</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 {{pp-template}}</comment>
      <text xml:space="preserve" bytes="435">{{#switch:
  &lt;!--If no or empty &quot;demospace&quot; parameter then detect namespace--&gt;
  {{#if:{{{demospace|}}}
  | {{lc: {{{demospace}}} }}    &lt;!--Use lower case &quot;demospace&quot;--&gt;
  | {{#ifeq:{{NAMESPACE}}|{{ns:Template}}
    | template
    | other
    }}
  }}
| template = {{{1|}}}
| other
| #default = {{{2|}}}
}}&lt;!--End switch--&gt;&lt;noinclude&gt;
{{documentation}}
&lt;!-- Add categories and interwikis to the /doc subpage, not here! --&gt;
&lt;/noinclude&gt;</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 {{pp-template}}</comment>
      <text xml:space="preserve" bytes="76">{{[[Template:{{{1}}}|{{{1}}}]]}}&lt;noinclude&gt;
{{Documentation}}
&lt;/noinclude&gt;</text>
      <sha1>ol1t4p5rix3sawawisp7kolp1s26zqz</sha1>
      <model>wikitext</model>
      <format>text/x-wiki</format>
    </revision>
  </page>
  <page>
    <title>Template:Transclude</title>
    <ns>10</ns>
    <id>21843384</id>
    <revision>
      <id>275377931</id>
      <parentid>275377779</parentid>
      <timestamp>2009-03-06T12:09:04Z</timestamp>
      <contributor>
        <username>Happy-melon</username>
        <id>994084</id>
      </contributor>
      <minor/>
      <comment>Protected Template:Transclude: [[WP:HRT|Highly visible template]] ([edit=sysop] (indefinite) [move=sysop] (indefinite))</comment>
      <text xml:space="preserve" bytes="400">{{#switch: {{NAMESPACE: {{{1}}} }}
|#default = {{FULLPAGENAME: {{{1}}} }} &lt;!-- eg &quot;User:Foo&quot; --&gt;
|{{ns:0}} =
    {{#ifeq: {{NAMESPACE: {{{1}}} }} | {{NAMESPACE: Template{{{1}}} }}
      | Template:{{{1}}}            &lt;!-- no leading colon, eg &quot;Foo&quot; --&gt;
      | {{PAGENAME: {{{1}}} }}      &lt;!-- leading colon, eg &quot;:Foo&quot;, so we want the article --&gt;
    }}
}}&lt;noinclude&gt;
{{documentation}}
&lt;/noinclude&gt;</text>
      <sha1>ob9m2b913drxlie5tgekieudupfrl9n</sha1>
      <model>wikitext</model>
      <format>text/x-wiki</format>
    </revision>
  </page>
  <page>
    <title>Module:Category handler</title>
    <ns>828</ns>
    <id>39772274</id>
    <revision>
      <id>577959141</id>
      <parentid>577958700</parentid>
      <timestamp>2013-10-20T10:48:14Z</timestamp>
      <contributor>
        <username>Mr. Stradivarius</username>
        <id>4708675</id>
      </contributor>
      <minor/>
      <comment>Protected Module:Category handler: [[Wikipedia:Lua/Modules|High-risk Lua module]] ([Edit=Protected template] (indefinite) [Move=Protected template] (indefinite))</comment>
      <text xml:space="preserve" bytes="13065">----------------------------------------------------------------------------------------------------------
--                                                                                                      --
--                                          CATEGORY HANDLER                                            --
--                                                                                                      --
--      This module implements the {{category handler}} template in Lua, with a few improvements: all  --
--      namespaces and all namespace aliases are supported, and namespace names are detected            --
--      automatically for the local wiki. This module requires [[Module:Namespace detect]] and          --
--      [[Module:Yesno]] to be available on the local wiki. It can be configured for different wikis    --
--      by altering the values in the &quot;cfg&quot; table.                                                      --
--                                                                                                      --
----------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------
--                                          Configuration data                                          --
--                      Language-specific parameter names and values can be set here.                  --
----------------------------------------------------------------------------------------------------------
local cfg = {}
-- The following config values set the names of parameters that suppress categorisation. They are used
-- with Module:Yesno, and work as follows:
--
-- cfg.nocat:
-- Result of yesno(args[cfg.nocat])        Effect
-- true                                    Categorisation is suppressed
-- false                                    Categorisation is allowed, and the blacklist check is skipped
-- nil                                      Categorisation is allowed
--
-- cfg.categories:
-- Result of yesno(args[cfg.categories])    Effect
-- true                                    Categorisation is allowed, and the blacklist check is skipped
-- false                                    Categorisation is suppressed
-- nil                                      Categorisation is allowed
cfg.nocat = 'nocat'   
cfg.categories = 'categories'
-- The parameter name for the legacy &quot;category2&quot; parameter. This skips the blacklist if set to the
-- cfg.category2Yes value, and suppresses categorisation if present but equal to anything other than
-- cfg.category2Yes or cfg.category2Negative.
cfg.category2 = 'category2'
cfg.category2Yes = 'yes'
cfg.category2Negative = '¬'
-- cfg.subpage is the parameter name to specify how to behave on subpages. cfg.subpageNo is the value to
-- specify to not categorise on subpages; cfg.only is the value to specify to only categorise on subpages.
cfg.subpage = 'subpage'
cfg.subpageNo = 'no'
cfg.subpageOnly = 'only'
-- The parameter for data to return in all namespaces.
cfg.all = 'all'
-- The parameter name for data to return if no data is specified for the namespace that is detected. This
-- must be the same as the cfg.other parameter in [[Module:Namespace detect]].
cfg.other = 'other'
-- The parameter name used to specify a page other than the current page; used for testing and
-- demonstration. This must be the same as the cfg.page parameter in [[Module:Namespace detect]].
cfg.page = 'page'
-- The categorisation blacklist. Pages that match Lua patterns in this list will not be categorised.
-- (However, see the explanation of cfg.nocat, cfg.categories and cfg.category2 for some exceptions.)
-- If the namespace name has a space in, it must be written with an underscore, e.g. &quot;Wikipedia_talk&quot;.
-- Other parts of the title can have either underscores or spaces.
cfg.blacklist = {
    '^Main Page$', -- don't categorise the main page.
   
    -- Don't categorise the following pages or their subpages.
    '^Wikipedia:Cascade%-protected items$',
    '^Wikipedia:Cascade%-protected items/.*$',
    '^User:UBX$', -- The userbox &quot;template&quot; space.
    '^User:UBX/.*$',
    '^User_talk:UBX$',
    '^User_talk:UBX/.*$',
   
    -- Don't categorise subpages of these pages, but allow
    -- categorisation of the base page.
    '^Wikipedia:Template messages/.+$',
   
    '/[aA]rchive' -- Don't categorise archives.
}
-- This is a table of namespaces to categorise by default. They should be in the format of parameter
-- names accepted by [[Module:Namespace detect]].
cfg.defaultNamespaces = {
    'main',
    'file',
    'help',
    'category'
}
----------------------------------------------------------------------------------------------------------
--                                          End configuration data                                      --
----------------------------------------------------------------------------------------------------------
-- Get dependent modules
local nsDetect = require('Module:Namespace detect')
local yesno = require('Module:Yesno')
----------------------------------------------------------------------------------------------------------
--                                          Local functions                                            --
--      The following are internal functions, which we do not want to be accessible from other modules. --
----------------------------------------------------------------------------------------------------------
-- Find whether we need to return a category or not.
local function needsCategory(pageObject, args)
    -- Don't categorise if the relevant options are set.
    if yesno(args[cfg.nocat])
        or yesno(args[cfg.categories]) == false
        or (
            args[cfg.category2]
            and args[cfg.category2] ~= cfg.category2Yes
            and args[cfg.category2] ~= cfg.category2Negative
        )
    then
        return false
    end
    -- If there is no pageObject available, then that either means that we are over
    -- the expensive function limit or that the title specified was invalid. Invalid
    -- titles will probably only be a problem during testing, so we choose the best
    -- fallback for being over the expensive function limit. The fallback behaviour
    -- of the old template was to assume the page was not a subpage, so we will do
    -- the same here.
    if args[cfg.subpage] == cfg.subpageNo and pageObject and pageObject.isSubpage then
        return false
    end
    if args[cfg.subpage] == cfg.subpageOnly
        and (not pageObject or (pageObject and not pageObject.isSubpage))
    then
        return false
    end
    return true
end
-- Find whether we need to check the blacklist or not.
local function needsBlacklistCheck(args)
    if yesno(args[cfg.nocat]) == false
        or yesno(args[cfg.categories]) == true
        or args[cfg.category2] == cfg.category2Yes
    then
        return false
    else
        return true
    end
end
-- Find whether any namespace parameters have been specified.
-- Mappings is the table of parameter mappings taken from
-- [[Module:Namespace detect]].
local function nsParamsExist(mappings, args)
    if args[cfg.all] or args[cfg.other] then
        return true
    end
    for ns, params in pairs(mappings) do
        for i, param in ipairs(params) do
            if args[param] then
                return true
            end
        end
    end
    return false
end
----------------------------------------------------------------------------------------------------------
--                                          Global functions                                            --
--      The following functions are global, because we want them to be accessible from #invoke and      --
--      from other Lua modules.                                                                        --
----------------------------------------------------------------------------------------------------------
local p = {}
-- Find if a string matches the blacklist. Returns the match if one is found, or nil otherwise.
-- Input should be a page title with a namespace prefix, e.g. &quot;Wikipedia talk:Articles for deletion&quot;.
function p.matchesBlacklist(page)
    if type(page) ~= 'string' then return end
    for i, pattern in ipairs(cfg.blacklist) do
        local match = mw.ustring.match(page, pattern)
        if match then
            return match
        end
    end
end
-- The main structure of the module. Checks whether we need to categorise,
-- and then passes the relevant arguments to [[Module:Namespace detect]].
function p._main(args)
    -- Get the page object and argument mappings from
    -- [[Module:Namespace detect]], to save us from having to rewrite the
    -- code.
    local pageObject = nsDetect.getPageObject(args[cfg.page])
    local mappings = nsDetect.getParamMappings()
   
    if not needsCategory(pageObject, args) then return end
   
    local ret = ''
    -- Check blacklist if necessary.
    if not needsBlacklistCheck(args) or not p.matchesBlacklist(pageObject.prefixedText) then
        if not nsParamsExist(mappings, args) then
            -- No namespace parameters exist; basic usage. Pass args[1] to
            -- [[Module:Namespace detect]] using the default namespace
            -- parameters, and return the result.
            local ndargs = {}
            for _, ndarg in ipairs(cfg.defaultNamespaces) do
                ndargs[ndarg] = args[1]
            end
            ndargs.page = args.page
            ndargs.demospace = args.demospace
            local ndresult = nsDetect._main(ndargs)
            if ndresult then
                ret = ret .. ndresult
            end
        else
            -- Namespace parameters exist; advanced usage.
            -- If the all parameter is specified, return it.
            local all = args.all
            if type(all) == 'string' then
                ret = ret .. all
            end
           
            -- Get the arguments to pass to [[Module:Namespace detect]].
            local ndargs = {}
            for ns, params in pairs(mappings) do
                for _, param in ipairs(params) do
                    ndargs[param] = args[param] or args[cfg.other] or nil
                end
            end
            ndargs.other = args.other
            ndargs.page = args.page
            ndargs.demospace = args.demospace
           
            local data = nsDetect._main(ndargs)
           
            -- Work out what to return based on the result of the namespace detect call.
            local datanum = tonumber(data)
            if type(datanum) == 'number' then
                -- &quot;data&quot; is a number, so return that positional parameter.
                -- Remove non-positive integer values, as only positive integers
                -- from 1-10 were used with the old template.
                if datanum &gt; 0 and math.floor(datanum) == datanum then
                    local dataArg = args[datanum]
                    if type(dataArg) == 'string' then
                        ret = ret .. dataArg
                    end
                end
            else
                -- &quot;data&quot; is not a number, so return it as it is.
                if type(data) == 'string' then
                    ret = ret .. data
                end
            end
        end
    end
    return ret
end
function p.main(frame)
    -- If called via #invoke, use the args passed into the invoking
    -- template, or the args passed to #invoke if any exist. Otherwise
    -- assume args are being passed directly in.
    local origArgs
    if frame == mw.getCurrentFrame() then
        origArgs = frame:getParent().args
        for k, v in pairs(frame.args) do
            origArgs = frame.args
            break
        end
    else
        origArgs = frame
    end
    -- Trim whitespace and remove blank arguments for the following args:
    -- 1, 2, 3 etc., &quot;nocat&quot;, &quot;categories&quot;, &quot;subpage&quot;, and &quot;page&quot;.
    local args = {}
    for k, v in pairs(origArgs) do
        if type(v) == 'string' then
            v = mw.text.trim(v) -- Trim whitespace.
        end
        if type(k) == 'number'
            or k == cfg.nocat
            or k == cfg.categories
            or k == cfg.subpage
            or k == cfg.page
        then
            if v ~= '' then
                args[k] = v
            end
        else
            args[k] = v
        end
    end
   
    -- Lower-case &quot;nocat&quot;, &quot;categories&quot;, &quot;category2&quot;, and &quot;subpage&quot;. These
    -- parameters are put in lower case whenever they appear in the old
    -- template, so we can just do it once here and save ourselves some work.
    local lowercase = {cfg.nocat, cfg.categories, cfg.category2, cfg.subpage}
    for _, v in ipairs(lowercase) do
        local argVal = args[v]
        if type(argVal) == 'string' then
            args[v] = mw.ustring.lower(argVal)
        end
    end
   
    return p._main(args)
end
return p</text>
      <sha1>i2ez8nejriv7clde6mvnuwl3ypo3qj6</sha1>
      <model>Scribunto</model>
      <format>text/plain</format>
    </revision>
  </page>
  <page>
    <title>Module:HtmlBuilder</title>
    <ns>828</ns>
    <id>38663961</id>
    <revision>
      <id>573509786</id>
      <parentid>558894130</parentid>
      <timestamp>2013-09-18T15:22:39Z</timestamp>
      <contributor>
        <username>Mr. Stradivarius</username>
        <id>4708675</id>
      </contributor>
      <comment>don't add attributes with no values, plus a couple of minor tweaks</comment>
      <text xml:space="preserve" bytes="4278">-- 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, '&lt;' .. t.tagName)
        for i, attr in ipairs(t.attributes) do
            table.insert(ret, ' ' .. attr.name .. '=&quot;' .. attr.val .. '&quot;')
        end
        if #t.styles &gt; 0 then
            table.insert(ret, ' style=&quot;')
            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, '&quot;')
        end
        if t.selfClosing then
            table.insert(ret, ' /')
        end
        table.insert(ret, '&gt;')
    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, '&lt;/' .. t.tagName .. '&gt;')
    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
local 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 type(val) == 'string' or type(val) == 'number' then
        -- 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
    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>ait58gp3hn4i3oyevj1ucebrzvyok1o</sha1>
      <model>Scribunto</model>
      <format>text/plain</format>
    </revision>
  </page>
  <page>
    <title>Module:Infobox</title>
    <ns>828</ns>
    <id>38808424</id>
    <revision>
      <id>568027852</id>
      <parentid>563819331</parentid>
      <timestamp>2013-08-11T03:32:04Z</timestamp>
      <contributor>
        <username>Mr. Stradivarius</username>
        <id>4708675</id>
      </contributor>
      <comment>make rowclass apply to headers as well as data cells, per protected edit request</comment>
      <text xml:space="preserve" bytes="12914">--
-- This module implements {{Infobox}}
--
local p = {}
local HtmlBuilder = require('Module:HtmlBuilder')
local args = {}
local origArgs
local root
function union(t1, t2)
    -- Returns the union of the values of two tables, as a sequence.
    local vals = {}
    for k, v in pairs(t1) do
        vals[v] = true
    end
    for k, v in pairs(t2) do
        vals[v] = true
    end
    local ret = {}
    for k, v in pairs(vals) do
        table.insert(ret, k)
    end
    return ret
end
local function getArgNums(prefix)
    -- Returns a table containing the numbers of the arguments that exist
    -- for the specified prefix. For example, if the prefix was 'data', and
    -- 'data1', 'data2', and 'data5' exist, it would return {1, 2, 5}.
    local nums = {}
    for k, v in pairs(args) do
        local num = tostring(k):match('^' .. prefix .. '([1-9]%d*)$')
        if num then table.insert(nums, tonumber(num)) end
    end
    table.sort(nums)
    return nums
end
local function addRow(rowArgs)
    -- Adds a row to the infobox, with either a header cell
    -- or a label/data cell combination.
    if rowArgs.header then
        root
            .tag('tr')
                .addClass(rowArgs.rowclass)
                .tag('th')
                    .attr('colspan', 2)
                    .addClass(rowArgs.class)
                    .css('text-align', 'center')
                    .cssText(args.headerstyle)
                    .wikitext(rowArgs.header)
    elseif rowArgs.data then
        local row = root.tag('tr')
        row.addClass(rowArgs.rowclass)
        if rowArgs.label then
            row
                .tag('th')
                    .attr('scope', 'row')
                    .css('text-align', 'left')
                    .cssText(args.labelstyle)
                    .wikitext(rowArgs.label)
                    .done()
        end
       
        local dataCell = row.tag('td')
        if not rowArgs.label then
            dataCell
                .attr('colspan', 2)
                .css('text-align', 'center')
        end
        dataCell
            .addClass(rowArgs.class)
            .cssText(rowArgs.datastyle)
            .newline()
            .wikitext(rowArgs.data)
    end
end
local function renderTitle()
    if not args.title then return end
    root
        .tag('caption')
            .addClass(args.titleclass)
            .cssText(args.titlestyle)
            .wikitext(args.title)
end
local function renderAboveRow()
    if not args.above then return end
   
    root
        .tag('tr')
            .tag('th')
                .attr('colspan', 2)
                .addClass(args.aboveclass)
                .css('text-align', 'center')
                .css('font-size', '125%')
                .css('font-weight', 'bold')
                .cssText(args.abovestyle)
                .wikitext(args.above)
end
local function renderBelowRow()
    if not args.below then return end
   
    root
        .tag('tr')
            .tag('td')
                .attr('colspan', '2')
                .addClass(args.belowclass)
                .css('text-align', 'center')
                .cssText(args.belowstyle)
                .newline()
                .wikitext(args.below)
end
local function renderSubheaders()
    if args.subheader then
        args.subheader1 = args.subheader
    end
    if args.subheaderrowclass then
        args.subheaderrowclass1 = args.subheaderrowclass
    end
    local subheadernums = getArgNums('subheader')
    for k, num in ipairs(subheadernums) do
        addRow({
            data = args['subheader' .. tostring(num)],
            datastyle = args.subheaderstyle or args['subheaderstyle' .. tostring(num)],
            class = args.subheaderclass,
            rowclass = args['subheaderrowclass' .. tostring(num)]
        })
    end
end
local function renderImages()
    if args.image then
        args.image1 = args.image
    end
    if args.caption then
        args.caption1 = args.caption
    end
    local imagenums = getArgNums('image')
    for k, num in ipairs(imagenums) do
        local caption = args['caption' .. tostring(num)]
        local data = HtmlBuilder.create().wikitext(args['image' .. tostring(num)])
        if caption then
            data
                .tag('br', {selfClosing = true})
                    .done()
                .tag('div')
                    .cssText(args.captionstyle)
                    .wikitext(caption)
        end
        addRow({
            data = tostring(data),
            datastyle = args.imagestyle,
            class = args.imageclass,
            rowclass = args['imagerowclass' .. tostring(num)]
        })
    end
end
local function renderRows()
    -- Gets the union of the header and data argument numbers,
    -- and renders them all in order using addRow.
    local rownums = union(getArgNums('header'), getArgNums('data'))
    table.sort(rownums)
    for k, num in ipairs(rownums) do
        addRow({
            header = args['header' .. tostring(num)],
            label = args['label' .. tostring(num)],
            data = args['data' .. tostring(num)],
            datastyle = args.datastyle,
            class = args['class' .. tostring(num)],
            rowclass = args['rowclass' .. tostring(num)]
        })
    end
end
local function renderNavBar()
    if not args.name then return end
   
    root
        .tag('tr')
            .tag('td')
                .attr('colspan', '2')
                .css('text-align', 'right')
                .wikitext(mw.getCurrentFrame():expandTemplate({
                    title = 'navbar',
                    args = { args.name, mini = 1 }
                }))
end
local function renderItalicTitle()
    local italicTitle = args['italic title'] and mw.ustring.lower(args['italic title'])
    if italicTitle == '' or italicTitle == 'force' or italicTitle == 'yes' then
        root.wikitext(mw.getCurrentFrame():expandTemplate({title = 'italic title'}))
    end
end
local function renderTrackingCategories()
    if args.decat ~= 'yes' then
        if #(getArgNums('data')) == 0 and mw.title.getCurrentTitle().namespace == 0 then
            root.wikitext('[[Category:Articles which use infobox templates with no data rows]]')
        end
        if args.child == 'yes' and args.title then
            root.wikitext('[[Category:Articles which use embedded infobox templates with the title parameter]]')
        end
    end
end
local function _infobox()
    -- Specify the overall layout of the infobox, with special settings
    -- if the infobox is used as a 'child' inside another infobox.
    if args.child ~= 'yes' then
        root = HtmlBuilder.create('table')
       
        root
            .addClass('infobox')
            .addClass(args.bodyclass)
            .attr('cellspacing', 3)
            .css('border-spacing', '3px')
           
            if args.subbox == 'yes' then
                root
                    .css('padding', '0')
                    .css('border', 'none')
                    .css('margin', '-3px')
                    .css('width', 'auto')
                    .css('min-width', '100%')
                    .css('font-size', '100%')
                    .css('clear', 'none')
                    .css('float', 'none')
                    .css('background-color', 'transparent')
            else
                root
                    .css('width', '22em')
            end
        root
            .cssText(args.bodystyle)
   
        renderTitle()
        renderAboveRow()
    else
        root = HtmlBuilder.create()
       
        root
            .wikitext(args.title)
    end
    renderSubheaders()
    renderImages()
    renderRows()
    renderBelowRow() 
    renderNavBar()
    renderItalicTitle()
    renderTrackingCategories()
   
    return tostring(root)
end
local function preprocessSingleArg(argName)
    -- If the argument exists and isn't blank, add it to the argument table.
    -- Blank arguments are treated as nil to match the behaviour of ParserFunctions.
    if origArgs[argName] and origArgs[argName] ~= '' then
        args[argName] = origArgs[argName]
    end
end
local function preprocessArgs(prefixTable, step)
    -- Assign the parameters with the given prefixes to the args table, in order, in batches
    -- of the step size specified. This is to prevent references etc. from appearing in the
    -- wrong order. The prefixTable should be an array containing tables, each of which has
    -- two possible fields, a &quot;prefix&quot; string and a &quot;depend&quot; table. The function always parses
    -- parameters containing the &quot;prefix&quot; string, but only parses parameters in the &quot;depend&quot;
    -- table if the prefix parameter is present and non-blank.
    if type(prefixTable) ~= 'table' then
        error(&quot;Non-table value detected for the prefix table&quot;, 2)
    end
    if type(step) ~= 'number' then
        error(&quot;Invalid step value detected&quot;, 2)
    end
   
    -- Get arguments without a number suffix, and check for bad input.
    for i,v in ipairs(prefixTable) do
        if type(v) ~= 'table' or type(v.prefix) ~= &quot;string&quot; or (v.depend and type(v.depend) ~= 'table') then
            error('Invalid input detected to preprocessArgs prefix table', 2)
        end
        preprocessSingleArg(v.prefix)
        -- Only parse the depend parameter if the prefix parameter is present and not blank.
        if args[v.prefix] and v.depend then
            for j, dependValue in ipairs(v.depend) do
                if type(dependValue) ~= 'string' then
                    error('Invalid &quot;depend&quot; parameter value detected in preprocessArgs')
                end
                preprocessSingleArg(dependValue)
            end
        end
    end
    -- Get arguments with number suffixes.
    local a = 1 -- Counter variable.
    local moreArgumentsExist = true
    while moreArgumentsExist == true do
        moreArgumentsExist = false
        for i = a, a + step - 1 do
            for j,v in ipairs(prefixTable) do
                local prefixArgName = v.prefix .. tostring(i)
                if origArgs[prefixArgName] then
                    moreArgumentsExist = true -- Do another loop if any arguments are found, even blank ones.
                    preprocessSingleArg(prefixArgName)
                end
                -- Process the depend table if the prefix argument is present and not blank, or
                -- we are processing &quot;prefix1&quot; and &quot;prefix&quot; is present and not blank, and
                -- if the depend table is present.
                if v.depend and (args[prefixArgName] or (i == 1 and args[v.prefix])) then
                    for j,dependValue in ipairs(v.depend) do
                        local dependArgName = dependValue .. tostring(i)
                        preprocessSingleArg(dependArgName)
                    end
                end
            end
        end
        a = a + step
    end
end
function p.infobox(frame)
    -- 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
   
    -- Parse the data parameters in the same order that the old {{infobox}} did, so that
    -- references etc. will display in the expected places. Parameters that depend on
    -- another parameter are only processed if that parameter is present, to avoid
    -- phantom references appearing in article reference lists.
    preprocessSingleArg('child')
    preprocessSingleArg('bodyclass')
    preprocessSingleArg('subbox')
    preprocessSingleArg('bodystyle')
    preprocessSingleArg('title')
    preprocessSingleArg('titleclass')
    preprocessSingleArg('titlestyle')
    preprocessSingleArg('above')
    preprocessSingleArg('aboveclass')
    preprocessSingleArg('abovestyle')
    preprocessArgs({
        {prefix = 'subheader', depend = {'subheaderstyle', 'subheaderrowclass'}}
    }, 10)
    preprocessSingleArg('subheaderstyle')
    preprocessSingleArg('subheaderclass')
    preprocessArgs({
        {prefix = 'image', depend = {'caption', 'imagerowclass'}}
    }, 10)
    preprocessSingleArg('captionstyle')
    preprocessSingleArg('imagestyle')
    preprocessSingleArg('imageclass')
    preprocessArgs({
        {prefix = 'header'},
        {prefix = 'data', depend = {'label'}},
        {prefix = 'rowclass'},
        {prefix = 'class'}
    }, 50)
    preprocessSingleArg('headerstyle')
    preprocessSingleArg('labelstyle')
    preprocessSingleArg('datastyle')
    preprocessSingleArg('below')
    preprocessSingleArg('belowclass')
    preprocessSingleArg('belowstyle')
    preprocessSingleArg('name')
    args['italic title'] = origArgs['italic title'] -- different behaviour if blank or absent
    preprocessSingleArg('decat')
    return _infobox()
end
return p</text>
      <sha1>73uuwy7s5v8l308m56yz8kalse7svrp</sha1>
      <model>Scribunto</model>
      <format>text/plain</format>
    </revision>
  </page>
  <page>
    <title>Module:Message box</title>
    <ns>828</ns>
    <id>40574910</id>
    <revision>
      <id>578398677</id>
      <parentid>577968334</parentid>
      <timestamp>2013-10-23T12:51:42Z</timestamp>
      <contributor>
        <username>Mr. Stradivarius</username>
        <id>4708675</id>
      </contributor>
      <comment>fix talk page links, and fix bug producing spurious WhatLinksHere links (however note that a link will appear for [[Foo]] if the code &quot;talk=Foo&quot; is used)</comment>
      <text xml:space="preserve" bytes="17329">-- This is a meta-module for producing message box templates, including {{mbox}}, {{ambox}}, {{imbox}}, {{tmbox}}, {{ombox}}, {{cmbox}} and {{fmbox}}.
-- Require necessary modules.
local htmlBuilder = require('Module:HtmlBuilder')
local categoryHandler = require('Module:Category handler').main
local yesno = require('Module:Yesno')
-- Load the configuration page.
local cfgTables = mw.loadData('Module:Message box/configuration')
-- Get a language object for formatDate and ucfirst.
local lang = mw.language.getContentLanguage()
-- Set aliases for often-used functions to reduce table lookups.
local format = mw.ustring.format
local tinsert = table.insert
local tconcat = table.concat
local trim = mw.text.trim
local box = {}
local function getTitleObject(page, ...)
if type(page) == 'string' then
-- Get the title object, passing the function through pcall
-- in case we are over the expensive function count limit.
local success, title = pcall(mw.title.new, page, ...)
if success then
return title
end
end
end
local function union(t1, t2)
-- Returns the union of two arrays.
local vals = {}
for i, v in ipairs(t1) do
vals[v] = true
end
for i, v in ipairs(t2) do
vals[v] = true
end
local ret = {}
for k in pairs(vals) do
tinsert(ret, k)
end
table.sort(ret)
return ret
end
local function getArgNums(args, prefix)
local nums = {}
for k, v in pairs(args) do
local num = mw.ustring.match(tostring(k), '^' .. prefix .. '([1-9]%d*)$')
if num then
tinsert(nums, tonumber(num))
end
end
table.sort(nums)
return nums
end
function box.getNamespaceId(ns)
if not ns then return end
if type(ns) == 'string' then
ns = lang:ucfirst(mw.ustring.lower(ns))
if ns == 'Main' then
ns = 0
end
end
local nsTable = mw.site.namespaces[ns]
if nsTable then
return nsTable.id
end
end
function box.getMboxType(nsid)
-- Gets the mbox type from a namespace number.
if nsid == 0 then
return 'ambox' -- main namespace
elseif nsid == 6 then
return 'imbox' -- file namespace
elseif nsid == 14 then
return 'cmbox' -- category namespace
else
local nsTable = mw.site.namespaces[nsid]
if nsTable and nsTable.isTalk then
return 'tmbox' -- any talk namespace
else
return 'ombox' -- other namespaces or invalid input
end
end
end
function box:addCat(ns, cat, sort)
if type(cat) ~= 'string' then return end
local nsVals = {'main', 'template', 'all'}
local tname
for i, val in ipairs(nsVals) do
if ns == val then
tname = ns .. 'Cats'
end
end
if not tname then
for i, val in ipairs(nsVals) do
nsVals[i] = format('&quot;%s&quot;', val)
end
error('invalid ns parameter passed to box:addCat; valid values are ' .. mw.text.listToText(nsVals, nil, ' or '))
end
self[tname] = self[tname] or {}
if type(sort) == 'string' then
tinsert(self[tname], format('[[Category:%s|%s]]', cat, sort))
else
tinsert(self[tname], format('[[Category:%s]]', cat))
end
end
function box:addClass(class)
if type(class) ~= 'string' then return end
self.classes = self.classes or {}
tinsert(self.classes, class)
end
function box:setTitle(args)
-- Get the title object and the namespace.
self.pageTitle = getTitleObject(args.page ~= '' and args.page)
self.title = self.pageTitle or mw.title.getCurrentTitle()
self.demospace = args.demospace ~= '' and args.demospace or nil
self.nsid = box.getNamespaceId(self.demospace) or self.title.namespace
end
function box:getConfig(boxType)
-- Get the box config data from the data page.
if boxType == 'mbox' then
boxType = box.getMboxType(self.nsid)
end
local cfg = cfgTables[boxType]
if not cfg then
local boxTypes = {}
for k, v in pairs(dataTables) do
tinsert(boxTypes, format('&quot;%s&quot;', k))
end
tinsert(boxTypes, '&quot;mbox&quot;')
error(format('invalid message box type &quot;%s&quot;; valid types are %s', tostring(boxType), mw.text.listToText(boxTypes)), 2)
end
return cfg
end
function box:removeBlankArgs(cfg, args)
-- Only allow blank arguments for the parameter names listed in cfg.allowBlankParams.
local newArgs = {}
for k, v in pairs(args) do
if v ~= '' then
newArgs[k] = v
end
end
for i, param in ipairs(cfg.allowBlankParams or {}) do
newArgs[param] = args[param]
end
return newArgs
end
function box:setBoxParameters(cfg, args)
-- Get type data.
self.type = args.type
local typeData = cfg.types[self.type]
self.invalidTypeError = cfg.showInvalidTypeError and self.type and not typeData and true or false
typeData = typeData or cfg.types[cfg.default]
self.typeClass = typeData.class
self.typeImage = typeData.image
-- Find if the box has been wrongly substituted.
if cfg.substCheck and args.subst == 'SUBST' then
self.isSubstituted = true
end
-- Find whether we are using a small message box.
if cfg.allowSmall and (
cfg.smallParam and args.small == cfg.smallParam
or not cfg.smallParam and yesno(args.small)
)
then
self.isSmall = true
else
self.isSmall = false
end
-- Add attributes, classes and styles.
if cfg.allowId then
self.id = args.id
end
self:addClass(cfg.usePlainlinksParam and yesno(args.plainlinks or true) and 'plainlinks')
for _, class in ipairs(cfg.classes or {}) do
self:addClass(class)
end
if self.isSmall then
self:addClass(cfg.smallClass or 'mbox-small')
end
self:addClass(self.typeClass)
self:addClass(args.class)
self.style = args.style
-- Set text style.
self.textstyle = args.textstyle
-- Find if we are on the template page or not. This functionality is only used if useCollapsibleTextFields is set,
-- or if both cfg.templateCategory and cfg.templateCategoryRequireName are set.
self.useCollapsibleTextFields = cfg.useCollapsibleTextFields
if self.useCollapsibleTextFields or cfg.templateCategory and cfg.templateCategoryRequireName then
self.name = args.name
if self.name then
local templateName = mw.ustring.match(self.name, '^[tT][eE][mM][pP][lL][aA][tT][eE][%s_]*:[%s_]*(.*)$') or self.name
templateName = 'Template:' .. templateName
self.templateTitle = getTitleObject(templateName)
end
self.isTemplatePage = self.templateTitle and mw.title.equals(self.title, self.templateTitle) or false
end
-- Process data for collapsible text fields. At the moment these are only used in {{ambox}}.
if self.useCollapsibleTextFields then
-- Get the self.issue value.
if self.isSmall and args.smalltext then
self.issue = args.smalltext
else
local sect
if args.sect == '' then
sect = 'This ' .. (cfg.sectionDefault or 'page')
elseif type(args.sect) == 'string' then
sect = 'This ' .. args.sect
end
local issue = args.issue
issue = type(issue) == 'string' and issue ~= '' and issue or nil
local text = args.text
text = type(text) == 'string' and text or nil
local issues = {}
tinsert(issues, sect)
tinsert(issues, issue)
tinsert(issues, text)
self.issue = tconcat(issues, ' ')
end
-- Get the self.talk value.
local talk = args.talk
if talk == '' -- Show talk links on the template page or template subpages if the talk parameter is blank.
and self.templateTitle
and (mw.title.equals(self.templateTitle, self.title) or self.title:isSubpageOf(self.templateTitle))
then
talk = '#'
elseif talk == '' then
talk = nil
end
if talk then
-- If the talk value is a talk page, make a link to that page. Else assume that it's a section heading,
-- and make a link to the talk page of the current page with that section heading.
local talkTitle = getTitleObject(talk)
local talkArgIsTalkPage = true
if not talkTitle or not talkTitle.isTalkPage then
talkArgIsTalkPage = false
talkTitle = getTitleObject(self.title.text, mw.site.namespaces[self.title.namespace].talk.id)
end
if talkTitle and talkTitle.exists then
local talkText = 'Relevant discussion may be found on'
if talkArgIsTalkPage then
talkText = format('%s [[%s|%s]].', talkText, talk, talkTitle.prefixedText)
else
talkText = format('%s the [[%s#%s|talk page]].', talkText, talkTitle.prefixedText, talk)
end
self.talk = talkText
end
end
-- Get other values.
self.fix = args.fix ~= '' and args.fix or nil
local date
if args.date and args.date ~= '' then
date = args.date
elseif args.date == '' and self.isTemplatePage then
date = lang:formatDate('F Y')
end
if date then
self.date = format(&quot; &lt;small&gt;''(%s)''&lt;/small&gt;&quot;, date)
end
self.info = args.info
end
-- Set the non-collapsible text field. At the moment this is used by all box types other than ambox,
-- and also by ambox when small=yes.
if self.isSmall then
self.text = args.smalltext or args.text
else
self.text = args.text
end
-- Set the below row.
self.below = cfg.below and args.below
-- General image settings.
self.imageCellDiv = not self.isSmall and cfg.imageCellDiv and true or false
self.imageEmptyCell = cfg.imageEmptyCell
if cfg.imageEmptyCellStyle then
self.imageEmptyCellStyle = 'border:none;padding:0px;width:1px'
end
-- Left image settings.
local imageLeft = self.isSmall and args.smallimage or args.image
if cfg.imageCheckBlank and imageLeft ~= 'blank' and imageLeft ~= 'none'
or not cfg.imageCheckBlank and imageLeft ~= 'none'
then
self.imageLeft = imageLeft
if not imageLeft then
local imageSize = self.isSmall and (cfg.imageSmallSize or '30x30px') or '40x40px'
self.imageLeft = format('[[File:%s|%s|link=|alt=]]', self.typeImage or 'Imbox notice.png', imageSize)
end
end
-- Right image settings.
local imageRight = self.isSmall and args.smallimageright or args.imageright
if not (cfg.imageRightNone and imageRight == 'none') then
self.imageRight = imageRight
end
-- Add mainspace categories. At the moment these are only used in {{ambox}}.
if cfg.allowMainspaceCategories then
if args.cat then
args.cat1 = args.cat
end
self.catNums = getArgNums(args, 'cat')
if args.category then
args.category1 = args.category
end
self.categoryNums = getArgNums(args, 'category')
if args.all then
args.all1 = args.all
end
self.allNums = getArgNums(args, 'all')
self.categoryParamNums = union(self.catNums, self.categoryNums)
self.categoryParamNums = union(self.categoryParamNums, self.allNums)
-- The following is roughly equivalent to the old {{Ambox/category}}.
local date = args.date
date = type(date) == 'string' and date
local preposition = 'from'
for _, num in ipairs(self.categoryParamNums) do
local mainCat = args['cat' .. tostring(num)] or args['category' .. tostring(num)]
local allCat = args['all' .. tostring(num)]
mainCat = type(mainCat) == 'string' and mainCat
allCat = type(allCat) == 'string' and allCat
if mainCat and date and date ~= '' then
local catTitle = format('%s %s %s', mainCat, preposition, date)
self:addCat('main', catTitle)
catTitle = getTitleObject('Category:' .. catTitle)
if not catTitle or not catTitle.exists then
self:addCat('main', 'Articles with invalid date parameter in template')
end
elseif mainCat and (not date or date == '') then
self:addCat('main', mainCat)
end
if allCat then
self:addCat('main', allCat)
end
end
end
-- Add template-namespace categories.
if cfg.templateCategory then
if cfg.templateCategoryRequireName then
if self.isTemplatePage then
self:addCat('template', cfg.templateCategory)
end
elseif not self.title.isSubpage then
self:addCat('template', cfg.templateCategory)
end
end
-- Add template error category.
if cfg.templateErrorCategory then
local templateErrorCategory = cfg.templateErrorCategory
local templateCat, templateSort
if not self.name and not self.title.isSubpage then
templateCat = templateErrorCategory
elseif self.isTemplatePage then
local paramsToCheck = cfg.templateErrorParamsToCheck or {}
local count = 0
for i, param in ipairs(paramsToCheck) do
if not args[param] then
count = count + 1
end
end
if count &gt; 0 then
templateCat = templateErrorCategory
templateSort = tostring(count)
end
if self.categoryNums and #self.categoryNums &gt; 0 then
templateCat = templateErrorCategory
templateSort = 'C'
end
end
self:addCat('template', templateCat, templateSort)
end
-- Categories for all namespaces.
if self.invalidTypeError then
local allSort = (self.nsid == 0 and 'Main:' or '') .. self.title.prefixedText
self:addCat('all', 'Wikipedia message box parameter needs fixing', allSort)
end
if self.isSubstituted then
self:addCat('all', 'Pages with incorrectly substituted templates')
end
-- Convert category tables to strings and pass them through [[Module:Category handler]].
self.categories = categoryHandler{
main = tconcat(self.mainCats or {}),
template = tconcat(self.templateCats or {}),
all = tconcat(self.allCats or {}),
nocat = args.nocat,
demospace = self.demospace,
page = self.pageTitle and self.pageTitle.prefixedText or nil
}
end
function box:export()
local root = htmlBuilder.create()
-- Add the subst check error.
if self.isSubstituted and self.name then
root
.tag('b')
.addClass('error')
.wikitext(format(
'Template &lt;code&gt;%s[[Template:%s|%s]]%s&lt;/code&gt; has been incorrectly substituted.',
mw.text.nowiki('{{'), self.name, self.name, mw.text.nowiki('}}')
))
end
-- Create the box table.
local boxTable = root.tag('table')
boxTable
.attr('id', self.id)
for i, class in ipairs(self.classes or {}) do
boxTable
.addClass(class)
end
boxTable
.cssText(self.style)
.attr('role', 'presentation')
-- Add the left-hand image.
local row = boxTable.tag('tr')
if self.imageLeft then
local imageLeftCell = row.tag('td').addClass('mbox-image')
if self.imageCellDiv then
-- If we are using a div, redefine imageLeftCell so that the image is inside it.
-- Divs use style=&quot;width: 52px;&quot;, which limits the image width to 52px. If any
-- images in a div are wider than that, they may overlap with the text or cause
-- other display problems.
imageLeftCell = imageLeftCell.tag('div').css('width', '52px')
end
imageLeftCell
.wikitext(self.imageLeft)
elseif self.imageEmptyCell then
-- Some message boxes define an empty cell if no image is specified, and some don't.
-- The old template code in templates where empty cells are specified gives the following hint:
-- &quot;No image. Cell with some width or padding necessary for text cell to have 100% width.&quot;
row.tag('td')
.addClass('mbox-empty-cell')
.cssText(self.imageEmptyCellStyle)
end
-- Add the text.
local textCell = row.tag('td').addClass('mbox-text')
if self.useCollapsibleTextFields then
-- The message box uses advanced text parameters that allow things to be collapsible. At the
-- moment, only ambox uses this.
textCell
.cssText(self.textstyle)
local textCellSpan = textCell.tag('span')
textCellSpan
.addClass('mbox-text-span')
.wikitext(self.issue)
if not self.isSmall then
textCellSpan
.tag('span')
.addClass('hide-when-compact')
.wikitext(self.talk and ' ' .. self.talk)
.wikitext(self.fix and ' ' .. self.fix)
end
textCellSpan
.wikitext(self.date and ' ' .. self.date)
if not self.isSmall then
textCellSpan
.tag('span')
.addClass('hide-when-compact')
.wikitext(self.info and ' ' .. self.info)
end
else
-- Default text formatting - anything goes.
textCell
.cssText(self.textstyle)
.wikitext(self.text)
end
-- Add the right-hand image.
if self.imageRight then
local imageRightCell = row.tag('td').addClass('mbox-imageright')
if self.imageCellDiv then
imageRightCell = imageRightCell.tag('div').css('width', '52px') -- If we are using a div, redefine imageRightCell so that the image is inside it.
end
imageRightCell
.wikitext(self.imageRight)
end
-- Add the below row.
if self.below then
boxTable.tag('tr')
.tag('td')
.attr('colspan', self.imageRight and '3' or '2')
.addClass('mbox-text')
.cssText(self.textstyle)
.wikitext(self.below)
end
-- Add error message for invalid type parameters.
if self.invalidTypeError then
root
.tag('div')
.css('text-align', 'center')
.wikitext(format('This message box is using an invalid &quot;type=%s&quot; parameter and needs fixing.', self.type or ''))
end
-- Add categories.
root
.wikitext(self.categories)
return tostring(root)
end
local function main(boxType, args)
box:setTitle(args)
local cfg = box:getConfig(boxType)
args = box:removeBlankArgs(cfg, args)
box:setBoxParameters(cfg, args)
return box:export()
end
local function makeWrapper(boxType)
return function (frame)
-- If called via #invoke, use the args passed into the invoking
-- template, or the args passed to #invoke if any exist. Otherwise
-- assume args are being passed directly in from the debug console
-- or from another Lua module.
local origArgs
if frame == mw.getCurrentFrame() then
origArgs = frame:getParent().args
for k, v in pairs(frame.args) do
origArgs = frame.args
break
end
else
origArgs = frame
end
-- Trim whitespace.
local args = {}
for k, v in pairs(origArgs) do
if type(v) == 'string' then
v = trim(v)
end
args[k] = v
end
return main(boxType, args)
end
end
local p = {
main = main,
mbox = makeWrapper('mbox')
}
for boxType in pairs(cfgTables) do
p[boxType] = makeWrapper(boxType)
end
return p</text>
      <sha1>kqc9a9z2sp9egltcr2uq8vjbrmzjnw0</sha1>
      <model>Scribunto</model>
      <format>text/plain</format>
    </revision>
  </page>
  <page>
    <title>Module:Message box/configuration</title>
    <ns>828</ns>
    <id>40627038</id>
    <revision>
      <id>577968366</id>
      <parentid>577967964</parentid>
      <timestamp>2013-10-20T12:37:04Z</timestamp>
      <contributor>
        <username>Mr. Stradivarius</username>
        <id>4708675</id>
      </contributor>
      <minor/>
      <comment>Changed protection level of Module:Message box/configuration: used in system messages ([Edit=Block all non-admin users] (indefinite) [Move=Block all non-admin users] (indefinite))</comment>
      <text xml:space="preserve" bytes="5365">local ambox = {
types = {
speedy = {
class = 'ambox-speedy',
image = 'Ambox speedy deletion.png'
},
delete = {
class = 'ambox-delete',
image = 'Ambox deletion.png'
},
content = {
class = 'ambox-content',
image = 'Ambox content.png'
},
style = {
class = 'ambox-style',
image = 'Edit-clear.svg'
},
move = {
class = 'ambox-move',
image = 'Ambox move.png'
},
protection = {
class = 'ambox-protection',
image = 'Ambox protection.png'
},
notice = {
class = 'ambox-notice',
image = 'Ambox notice.png'
}
},
default                    = 'notice',
allowBlankParams            = {'talk', 'sect', 'date', 'issue', 'fix', 'subst'},
allowSmall                  = true,
smallParam                  = 'left',
smallClass                  = 'mbox-small-left',
substCheck                  = true,
classes                    = {'metadata', 'plainlinks', 'ambox'},
imageEmptyCell              = true,
imageCheckBlank            = true,
imageSmallSize              = '20x20px',
imageCellDiv                = true,
useCollapsibleTextFields    = true,
imageRightNone              = true,
sectionDefault              = 'article',
allowMainspaceCategories    = true,
templateCategory            = 'Article message templates',
        templateCategoryRequireName = true,
templateErrorCategory      = 'Article message templates with missing parameters',
templateErrorParamsToCheck  = {'issue', 'fix', 'subst'}
}
local cmbox = {
types = {
speedy = {
class = 'cmbox-speedy',
image = 'Cmbox deletion.png'
},
delete = {
class = 'cmbox-delete',
image = 'Cmbox deletion.png'
},
content = {
class = 'cmbox-content',
image = 'Cmbox content.png'
},
style = {
class = 'cmbox-style',
image = 'Edit-clear.svg'
},
move = {
class = 'cmbox-move',
image = 'Cmbox move.png'
},
protection = {
class = 'cmbox-protection',
image = 'Cmbox protection.png'
},
notice = {
class = 'cmbox-notice',
image = 'Cmbox notice.png'
}
},
default              = 'notice',
showInvalidTypeError = true,
classes              = {'plainlinks', 'cmbox'},
imageEmptyCell      = true
}
local fmbox = {
types = {
warning = {
class = 'fmbox-warning',
image = 'Cmbox deletion.png'
},
editnotice = {
class = 'fmbox-editnotice',
image = 'Imbox notice.png'
},
system = {
class = 'fmbox-system',
image = 'Imbox notice.png'
}
},
default              = 'system',
showInvalidTypeError = true,
allowId                = true,
classes              = {'plainlinks', 'fmbox'},
imageEmptyCell      = false,
imageRightNone      = false
}
local imbox = {
types = {
speedy = {
class = 'imbox-speedy',
image = 'Imbox speedy deletion.png'
},
delete = {
class = 'imbox-delete',
image = 'Imbox deletion.png'
},
content = {
class = 'imbox-content',
image = 'Imbox content.png'
},
style = {
class = 'imbox-style',
image = 'Edit-clear.svg'
},
move = {
class = 'imbox-move',
image = 'Imbox move.png'
},
protection = {
class = 'imbox-protection',
image = 'Imbox protection.png'
},
license = {
class = 'imbox-license',
image = 'Imbox license.png'
},
featured = {
class = 'imbox-featured',
image = 'Imbox featured.png'
},
notice = {
class = 'imbox-notice',
image = 'Imbox notice.png'
}
},
default              = 'notice',
showInvalidTypeError = true,
classes              = {'imbox'},
usePlainlinksParam  = true,
imageEmptyCell      = true,
below                = true,
templateCategory    = 'File message boxes'
}
local ombox = {
types = {
speedy = {
class = 'ombox-speedy',
image = 'Imbox speedy deletion.png'
},
delete = {
class = 'ombox-delete',
image = 'Imbox deletion.png'
},
content = {
class = 'ombox-content',
image = 'Imbox content.png'
},
style = {
class = 'ombox-style',
image = 'Edit-clear.svg'
},
move = {
class = 'ombox-move',
image = 'Imbox move.png'
},
protection = {
class = 'ombox-protection',
image = 'Imbox protection.png'
},
notice = {
class = 'ombox-notice',
image = 'Imbox notice.png'
}
},
default              = 'notice',
showInvalidTypeError = true,
classes              = {'plainlinks', 'ombox'},
allowSmall          = true,
imageEmptyCell      = true,
imageRightNone      = true
}
local tmbox = {
types = {
speedy = {
class = 'tmbox-speedy',
image = 'Imbox speedy deletion.png'
},
delete = {
class = 'tmbox-delete',
image = 'Imbox deletion.png'
},
content = {
class = 'tmbox-content',
image = 'Imbox content.png'
},
style = {
class = 'tmbox-style',
image = 'Edit-clear.svg '
},
move = {
class = 'tmbox-move',
image = 'Imbox move.png'
},
protection = {
class = 'tmbox-protection',
image = 'Imbox protection.png'
},
notice = {
class = 'tmbox-notice',
image = 'Imbox notice.png'
}
},
default              = 'notice',
showInvalidTypeError = true,
classes              = {'plainlinks', 'tmbox'},
allowSmall          = true,
imageRightNone      = true,
imageEmptyCell      = true,
imageEmptyCellStyle  = true,
templateCategory    = 'Talk message boxes'
}
return {
ambox = ambox,
cmbox = cmbox,
fmbox = fmbox,
imbox = imbox,
ombox = ombox,
tmbox = tmbox
}</text>
      <sha1>i6itxl4iu80rev2mzkihz2g67e08e3d</sha1>
      <model>Scribunto</model>
      <format>text/plain</format>
    </revision>
  </page>
  <page>
    <title>Module:Namespace detect</title>
    <ns>828</ns>
    <id>39762919</id>
    <revision>
      <id>579071375</id>
      <parentid>578798945</parentid>
      <timestamp>2013-10-28T07:47:48Z</timestamp>
      <contributor>
        <username>Mr. Stradivarius</username>
        <id>4708675</id>
      </contributor>
      <comment>fix the education program namespace bug by replacing underscores with spaces in the getNamespace function</comment>
      <text xml:space="preserve" bytes="8303">----------------------------------------------------------------------------------------------------
--                                                                                                --
--                                          NAMESPACE DETECT                                    --
--                                                                                                --
--      This module implements the {{namespace detect}} template in Lua, with a few              --
--      improvements: all namespaces and all namespace aliases are supported, and namespace      --
--      names are detected automatically for the local wiki. The module can also use the          --
--      corresponding subject namespace value if it is used on a talk page. Parameter names      --
--      can be configured for different wikis by altering the values in the &quot;cfg&quot; table.          --
--                                                                                                --
----------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------
--                                          Configuration data                                    --
--      Language-specific parameter names can be set here.                                        --
----------------------------------------------------------------------------------------------------
local cfg = {}
-- This parameter displays content for the main namespace:
cfg.main = 'main'
-- This parameter displays in talk namespaces:
cfg.talk = 'talk'
-- This parameter displays content for &quot;other&quot; namespaces (namespaces for which
-- parameters have not been specified, or for when cfg.demospace is set to cfg.other):
cfg.other = 'other'
-- This parameter makes talk pages behave as though they are the corresponding subject namespace.
-- Note that this parameter is used with [[Module:Yesno]]. Edit that module to change
-- the default values of &quot;yes&quot;, &quot;no&quot;, etc.
cfg.subjectns = 'subjectns'
-- This parameter sets a demonstration namespace:
cfg.demospace = 'demospace'
-- This parameter sets a specific page to compare:
cfg.page = 'page'
-- The header for the namespace column in the wikitable containing the list of possible subject-space parameters.
cfg.wikitableNamespaceHeader = 'Namespace'
-- The header for the wikitable containing the list of possible subject-space parameters.
cfg.wikitableAliasesHeader = 'Aliases'
----------------------------------------------------------------------------------------------------
--                                      End configuration data                                  --
----------------------------------------------------------------------------------------------------
local yesno = require('Module:Yesno')
local p = {}
function p.getPageObject(page)
-- Get the page object, passing the function through pcall in case we are over the expensive function count limit.
if page then
local noError, pageObject = pcall(mw.title.new, page)
if not noError then
return nil
else
return pageObject
end
else
return mw.title.getCurrentTitle()
end
end
function p.getParamMappings()
--[[ Returns a table of how parameter names map to namespace names. The keys are the actual namespace
  names, in lower case, and the values are the possible parameter names for that namespace, also in
  lower case. The table entries are structured like this:
{
[''] = {'main'},
['wikipedia'] = {'wikipedia', 'project', 'wp'},
...
}
]]
local mappings = {}
mappings[mw.ustring.lower(mw.site.namespaces[0].name)] = {cfg.main}
mappings[cfg.talk] = {cfg.talk}
for nsid, ns in pairs(mw.site.subjectNamespaces) do
if nsid ~= 0 then -- Exclude main namespace.
local nsname = mw.ustring.lower(ns.name)
local canonicalName = mw.ustring.lower(ns.canonicalName)
mappings[nsname] = {nsname}
if canonicalName ~= nsname then
table.insert(mappings[nsname], canonicalName)
end
for _, alias in ipairs(ns.aliases) do
table.insert(mappings[nsname], mw.ustring.lower(alias))
end
end
end
return mappings
end
local function getNamespace(args)
-- Gets the namespace name from the page object.
local page = args[cfg.page]
local demospace = args[cfg.demospace]
local subjectns = args[cfg.subjectns]
local ret
if demospace then
-- Handle &quot;demospace = main&quot; properly.
if mw.ustring.lower(demospace) == cfg.main then
ret = mw.site.namespaces[0].name
else
ret = demospace
end
else
local pageObject = p.getPageObject(page)
if pageObject then
if pageObject.isTalkPage then
-- If cfg.subjectns is set, get the subject namespace, otherwise use cfg.talk.
if yesno(subjectns) then
ret = mw.site.namespaces[pageObject.namespace].subject.name
else
ret = cfg.talk
end
else
ret = pageObject.nsText
end
else
return nil -- return nil if the page object doesn't exist.
end
end
ret = mw.ustring.gsub(ret, '_', ' ')
return mw.ustring.lower(ret)
end
function p._main(args)
-- Get the namespace to compare the parameters to, and the parameter mapping table.
local namespace = getNamespace(args)
local mappings = p.getParamMappings()
-- Check for any matches in the namespace arguments. The order we check them doesn't matter,
-- as there can only be one match.
for ns, params in pairs(mappings) do
if ns == namespace then
-- Check all aliases for matches. The default local namespace is checked first, as
-- {{namespace detect}} checked these before alias names.
for _, param in ipairs(params) do
if args[param] ~= nil then
return args[param]
end
end
end
end
-- If there were no matches, return parameters for other namespaces. This happens if there
-- was no text specified for the namespace that was detected or if the demospace parameter
-- is not a valid namespace. Note that the parameter for the detected namespace must be
-- completely absent for this to happen, not merely blank.
if args[cfg.other] ~= nil then
return args[cfg.other]
end
end
function p.main(frame)
-- If called via #invoke, use the args passed into the invoking template, or the args
-- passed to #invoke if any exist. Otherwise assume args are being passed directly in.
local origArgs
if frame == mw.getCurrentFrame() then
origArgs = frame:getParent().args
for k, v in pairs(frame.args) do
origArgs = frame.args
break
end
else
origArgs = frame
end
-- Trim whitespace and remove blank arguments for demospace and page parameters.
local args = {}
for k, v in pairs(origArgs) do
if type(v) == 'string' then
v = mw.text.trim(v) -- Trim whitespace.
end
if k == cfg.demospace or k == cfg.page then
if v ~= '' then
args[k] = v
end
else
args[k] = v
end
end
return p._main(args)
end
function p.table(frame)
--[[ Create a wikitable of all subject namespace parameters, for documentation purposes. The talk
  parameter is optional, in case it needs to be excluded in the documentation.
]]
local useTalk = type(frame) == 'table' and type(frame.args) == 'table' and frame.args.talk == 'yes' -- Whether to use the talk parameter.
local mappings = p.getParamMappings()
-- Start the wikitable.
local ret = '{| class=&quot;wikitable&quot;'
.. '\n|-'
.. '\n! ' .. cfg.wikitableNamespaceHeader
.. '\n! ' .. cfg.wikitableAliasesHeader
-- Generate the row for the main namespace, as we want this to be first in the list.
ret = ret .. '\n|-'
.. '\n| &lt;code&gt;' .. cfg.main .. '&lt;/code&gt;'
.. '\n|'
if useTalk then
ret = ret .. '\n|-'
.. '\n| &lt;code&gt;' .. cfg.talk .. '&lt;/code&gt;'
.. '\n|'
end
-- Enclose all parameter names in &lt;code&gt; tags.
for ns, params in pairs(mappings) do
if ns ~= mw.site.namespaces[0].name then
for i, param in ipairs(params) do
mappings[ns][i] = '&lt;code&gt;' .. param .. '&lt;/code&gt;'
end
end
end
-- Generate the other wikitable rows.
for ns, params in pairs(mappings) do
if ns ~= mw.site.namespaces[0].name then -- Ignore the main namespace.
ret = ret .. '\n|-'
.. '\n| ' .. params[1]
.. '\n| ' .. table.concat(params, ', ', 2)
end
end
-- End the wikitable.
ret = ret .. '\n|-'
.. '\n|}'
return ret
end
return p</text>
      <sha1>8nite8fbarsnt5gq7agygh1b77hbaao</sha1>
      <model>Scribunto</model>
      <format>text/plain</format>
    </revision>
  </page>
  <page>
    <title>Module:Yesno</title>
    <ns>828</ns>
    <id>38665046</id>
    <revision>
      <id>582180209</id>
      <parentid>577959316</parentid>
      <timestamp>2013-11-18T09:30:00Z</timestamp>
      <contributor>
        <username>Mr. Stradivarius</username>
        <id>4708675</id>
      </contributor>
      <minor/>
      <comment>Changed protection level of Module:Yesno: [[Wikipedia:Lua/Modules|High-risk Lua module]]: used in various interface messages ([Edit=Block all non-admin users] (indefinite) [Move=Block all non-admin users] (indefinite))</comment>
      <text xml:space="preserve" bytes="565">-- Function allowing for consistent treatment of boolean-like wikitext input.
-- It works similarly to the template {{yesno}}.
return function (val, default)
    val = type(val) == 'string' and mw.ustring.lower(val) or val -- put in lower case
    if val == nil then
        return nil
    elseif val == false or val == 'no' or val == 'n' or val == 'false' or tonumber(val) == 0 then
        return false
    elseif val == true or val == 'yes' or val == 'y' or val == 'true' or tonumber(val) == 1 then
        return true
    else
        return default
    end
end</text>
      <sha1>6m5hkfmfntcpifshp9d2hksik4fa5nj</sha1>
      <model>Scribunto</model>
      <format>text/plain</format>
    </revision>
  </page>
</mediawiki>

Latest revision as of 10:00, 24 November 2013