Permanently protected template

Difference between revisions of "Template:Forum/header"

From Yugipedia
Jump to: navigation, search
(convert to raw HTML table so I can steal a very good idea from w:c:inheritance:Template:Forumheader)
m (Protected "Template:Forum/header": High traffic page ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite)))
 
(12 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<table class="plainlinks ombox ombox-notice" style="height: 3.5em; width: 100%; margin: 0;">
+
{{Forum/header/core
<tr>
+
| 1        = {{
<td class="mbox-image">'''Forums:'''</td>
+
     #switch: {{{1}}}<!-- #switch in the event we ever rename or split more forums -->
<td class="mbox-text">[[Forum:Index|Index]] '''''→''''' {{
+
    | Yu-Gi-Oh! Wiki Discussion = General Yu-Gi-Oh! Discussion
     #if: {{{index|}}}
+
    | #default                  = {{{1|}}}
    || {{
+
   }}
      #ifeq: {{{1}}} | Yu-Gi-Oh! Wiki Discussion
+
| 2       = {{
      | [[Forum:General Yu-Gi-Oh! Discussion|General Yu-Gi-Oh! Discussion]]
+
     #switch: {{{2}}}<!-- #switch in the event we ever rename or split more forums -->
      | [[Forum:{{{1}}}|{{{1}}}]]
+
    | Yu-Gi-Oh! Wiki Discussion = General Yu-Gi-Oh! Discussion
    }} '''''→'''''
+
     | #default                  = {{{2|}}}
   }} {{PAGENAME}}{{
+
  }}
    #if: {{{2|}}}
+
| index    = {{
    | <br />[[Forum:Index|Index]] '''''→''''' [[Forum:{{{2}}}|{{{2}}}]] '''''→''''' {{PAGENAME}}
+
    #switch: {{FULLPAGENAME}}
  }}</td>
+
     | Forum:Help desk                          | Forum:General Yu-Gi-Oh! Discussion
<td class="mbox-imageright" rowspan="2">{{
+
     | Forum:Yu-Gi-Oh! Wiki Community Discussion | Forum:Yu-Gi-Oh! Deck Help
     #ifexpr: {{
+
     | Forum:Yu-Gi-Oh! Ruling Queries            | Forum:Yu-Gi-Oh! Lists Discussion
      #if: {{{sticky|}}}{{{demo|}}}<!-- bypass time check for stickied and demo uses -->
+
     | Forum:Duel Terminal                      | Forum:Weekly Deck Competition
      | 1
+
     | Template:Forum                            = {{PAGENAME}}
      | {{ #time: U }} - {{ #time: U | {{REVISIONTIMESTAMP}} }} < 3456000
 
    }}<!-- only forum pages edited in the last 40 days get the "post" button -->
 
     | {{
 
      #if: {{{index|}}}<!-- no "post" button on forum index pages -->
 
      || <span style="white-space: nowrap;">[{{fullurl:{{FULLPAGENAMEE}}|action=edit&section=new}} http://images.wikia.com/anime/en/images/4/4e/Forum_new.gif] [{{fullurl:{{FULLPAGENAMEE}}|action=edit&section=new}} Post]</span>
 
     }}
 
  }}</td>
 
</tr>
 
<tr>
 
<td class="mbox-text" style="padding-top: 0;" colspan="2"><span style="font-size: 10px;">Please sign your comments with <nowiki>~~~~</nowiki>. See [[w:c:help:Help:Signature|Help:Signature]] and [[w:c:help:Help:Talk pages|Help:Talk pages]] for further information.</span></td>
 
</tr>
 
</table><includeonly>{{<!-- topic cats -->
 
  #if: {{{demo|}}}
 
  | <!-- no categories for demo uses -->
 
  | [[Category:{{
 
     #if: {{{index|}}}
 
    | Forums
 
    | {{
 
      #ifeq: {{{1}}} | Yu-Gi-Oh! Wiki Discussion
 
      | General Yu-Gi-Oh! Discussion
 
      | {{{1}}}
 
     }}
 
  }}|{{
 
    #ifeq: {{FULLPAGENAME}} | Template:Forum<!-- asterisk sortkey for Template:Forum -->
 
     | *
 
  }}{{PAGENAME}}]]{{
 
    #if: {{{2|}}} | [[Category:{{{2}}}|{{PAGENAME}}]]
 
  }}{{
 
     #if: {{{sticky|}}} | [[Category:Sticky threads|{{PAGENAME}}]]
 
 
   }}
 
   }}
}}</includeonly>{{
+
| sticky   = {{{sticky|}}}
   #ifeq: {{ #titleparts: {{FULLPAGENAME}} | 1 | 1 }} | Template:Forum
+
| demo    = {{{demo|}}}
  | <!-- no maintenance cats for Template:Forum or any subtemplates, though we are going to do a bit else here -->{{
+
| archived = {{
 
     #switch: {{PAGENAME}}
 
     #switch: {{PAGENAME}}
     | Forum/header  | Forum/header/doc  | Forum/header/sandbox  | Forum/header/testcases | Forum =
+
     | Help desk                          | General Yu-Gi-Oh! Discussion
     | #default = [[Category:Forumheader preload templates|{{SUBPAGENAME}}]]<!-- keep track of the preload templates -->
+
     | Yu-Gi-Oh! Wiki Community Discussion | Yu-Gi-Oh! Deck Help
  }}
+
    | Yu-Gi-Oh! Ruling Queries            | Yu-Gi-Oh! Lists Discussion
  | <!-- maintenance cats -->{{Forum/header/move notice}}<!-- wrong namespace check
+
    | Duel Terminal                      | Weekly Deck Competition
 
+
     | Yu-Gi-Oh! Wiki Discussion          = <!-- forum indexes *never* get archived -->
     -->{{Forum/header/archived notice|index={{{index|}}}|sticky={{{sticky|}}}}}<!-- necrobumping
+
    | #default                            = {{
 
+
      #if: {{{archived|}}}{{{last edit|}}}{{ #ifeq: {{PROTECTIONLEVEL:edit}} | sysop | 1 }}<!-- manually archiving overrides everything else -->
    -->{{
+
       | 1
    #if: {{{3|}}}{{{4|}}}{{{5|}}}
 
    | [[Category:Forumheader transclusions to be checked|P]]<!-- see if {{{3}}}-{{{5}}} are used anywhere and if so how -->
 
  }}{{
 
    #if: {{{index|}}}{{{demo|}}}
 
    | {{<!-- forum index or demo; a little more parameter checking for indexes -->
 
       #if: {{{index|}}}
 
 
       | {{
 
       | {{
         #switch: {{PAGENAME}}
+
         #if: {{{sticky|}}}{{{demo|}}}<!-- sticky threads and demos don't auto-archive -->
        | Help desk                          | General Yu-Gi-Oh! Discussion
+
         || {{
        | Yu-Gi-Oh! Wiki Community Discussion | Yu-Gi-Oh! Deck Help
+
          #switch: Yu-Gi-Oh! Wiki Community Discussion<!-- wiki discussions don't auto-archive -->
        | Yu-Gi-Oh! Ruling Queries            | Yu-Gi-Oh! Lists Discussion
+
          | {{{1}}} | {{{2}}} =
         | Duel Terminal                      | Weekly Deck Competition
+
          | #default         = {{
        | Yu-Gi-Oh! Wiki Discussion           = <!-- valid value -->
+
            #ifexpr: {{ #time: U }} - {{ #time: U | {{REVISIONTIMESTAMP}} }} < 3456000<!-- everything else auto-archives after 40 days -->
        | #default                           = [[Category:Forumheader transclusions to be checked|X]]<!-- "index" used on a non-index page -->
+
            || 1
 +
          }}
 +
        }}
 
       }}
 
       }}
    }}
 
    | {{
 
      #switch: {{{1|¬}}}
 
      | ¬ = [[Category:Forumheader transclusions to be checked|U]]<!-- {{{1}}} not used (bad for obvious reasons) -->
 
      |  = [[Category:Forumheader transclusions to be checked|E]]<!-- {{{1}}} empty -->
 
      | Help desk                          | General Yu-Gi-Oh! Discussion
 
      | Yu-Gi-Oh! Wiki Community Discussion | Yu-Gi-Oh! Deck Help
 
      | Yu-Gi-Oh! Ruling Queries            | Yu-Gi-Oh! Lists Discussion
 
      | Duel Terminal                      | Weekly Deck Competition
 
      | Yu-Gi-Oh! Wiki Discussion          = <!-- valid value -->
 
      | #default                            = [[Category:Forumheader transclusions to be checked|I]]<!-- invalid value -->
 
    }}{{
 
      #switch: {{{2|¬}}}
 
      |  = [[Category:Forumheader transclusions to be checked|E]]<!-- {{{2}}} empty -->
 
      | ¬                                  | Help desk          | General Yu-Gi-Oh! Discussion
 
      | Yu-Gi-Oh! Wiki Community Discussion | Yu-Gi-Oh! Deck Help | Yu-Gi-Oh! Ruling Queries
 
      | Yu-Gi-Oh! Lists Discussion          | Duel Terminal      | Weekly Deck Competition
 
      | Yu-Gi-Oh! Wiki Discussion          = <!-- valid value or unused -->
 
      | #default                            = [[Category:Forumheader transclusions to be checked|I]]<!-- invalid value -->
 
 
     }}
 
     }}
 
   }}
 
   }}
 +
| last edit = {{ #if: {{{last edit|}}} | {{ #replace: {{{last edit}}} | ‎ }} | {{ #if: {{{archived|}}}{{ #ifeq: {{PROTECTIONLEVEL:edit}} | sysop | 1 }} | archived-without-date | {{REVISIONTIMESTAMP}} }} }}
 
}}<noinclude>
 
}}<noinclude>
 
{{documentation}}
 
{{documentation}}
 
</noinclude>
 
</noinclude>

Latest revision as of 08:02, 4 June 2019