Template:Ambox: Difference between revisions

From Zoophilia Wiki
Jump to navigationJump to search
meta>MSGJ
(only show talk page link if talk page exists, add info parameter for additional information, make nocat=true work, tracking category adjustments)
meta>MSGJ
(major rewrite, splitting code for small ambox, add section parameter)
Line 1: Line 1:
{{#ifeq:{{{subst}}}|SUBST
{{#ifeq:{{{subst}}}|SUBST
  |{{#if:{{{name|}}}
  |{{#if:{{{name|}}}
   |{{Error|Template {{Tlx|{{{name}}}}} has been incorrectly substituted.}}
   |{{Error|Template {{tlx|{{{name}}}}} has been incorrectly substituted.}}
  }}[[Category:Pages with incorrectly substituted templates]]
  }}[[Category:Pages with incorrectly substituted templates]]
}}{{#ifeq:{{{small}}}|left
}}{{Ambox/{{#ifeq:{{{small}}}|left|small|core}}
  |{{Ambox/core
  |type = {{{type|}}}
  |small      = left
|image = {{{image|}}}
  |type      = {{{type|}}}
|smallimage = {{#if:{{{smallimage|}}}|{{{smallimage}}}|{{{image|}}}}}
  |image      = {{#if:{{{smallimage|}}}
|imageright = {{{imageright|}}}
  |{{{smallimage}}}
|smallimageright = {{#if:{{{smallimageright|}}}|{{{smallimageright}}}|{{{imageright|}}}}}
  |{{{image|}}}
|class = ambox-{{#switch:{{{type|}}}
  }}
  |speedy = speedy
  |imageright = {{#if:{{{smallimageright|}}}
  |delete = delete
  |{{{smallimageright}}}
  |content = content
  |{{{imageright|}}}
   |style = style
  }}
  |move = move
  |class     = {{{class|}}}
  |protection = protection
   |style     = {{{style|}}}
  |notice|#default = notice
  |textstyle  = {{{textstyle|}}}
}} {{{class|}}}
  |text      = {{#if:{{{smalltext|}}}
|style = {{{style|}}}
  |{{{smalltext}}}
|textstyle  = {{{textstyle|}}}
  |{{#if:{{{issue|}}}
|smalltext  = {{{smalltext|}}}
    |{{{issue}}}
|talk = {{#switch:{{{talk|¬}}}
    |{{{text}}}
  |¬        = <!-- No talk link used -->
  }}
  |        = {{#ifeq:{{FULLROOTPAGENAME}}|Template:{{PAGENAME:{{{name}}}}}|#}}
   }}
   |#default = {{{talk}}}
  }}
  }}
  |{{Ambox/core
  |issue = {{#switch:{{{sect|¬}}}
  |type      = {{{type|}}}
  |¬ = <!-- No section parameter used -->
  |image      = {{{image|}}}
  | = This article
  |imageright = {{{imageright|}}}
  |This {{{sect}}}
  |class      = {{{class|}}}
}} {{{issue<includeonly>|</includeonly>}}} {{{text|}}}
  |style      = {{{style|}}}
|fix = {{{fix<includeonly>|</includeonly>}}}
  |textstyle  = {{{textstyle|}}}
|date = {{#switch:{{{date|¬}}}
  |text      = {{{text|}}} {{{issue<includeonly>|</includeonly>}}}<span class="hide-when-compact"> {{#switch:{{{talk|¬}}}
  |¬        = <!-- No date used -->
        = <!-- No talk link used -->
  |        = {{#ifeq:{{FULLROOTPAGENAME}}|Template:{{PAGENAME:{{{name}}}}}|{{CURRENTMONTHNAME}} {{CURRENTYEAR}}}}
  |         = {{#ifeq:{{FULLROOTPAGENAME}}|Template:{{PAGENAME:{{{name}}}}}|&#32;More details and relevant discussion can be found on the [[{{TALKPAGENAME}}|talk page]].}}
  |#default = {{{date}}}
  |#default = {{#ifexist:{{#ifeq:{{TALKPAGENAME:{{{talk}}}}}|{{FULLPAGENAME:{{{talk}}}}}
    |{{{talk}}}
    |{{TALKPAGENAME}}
    }}
    |&#32;More details and relevant discussion may be found on {{#ifeq:{{TALKPAGENAME:{{{talk}}}}}|{{FULLPAGENAME:{{{talk}}}}}
    |[[{{{talk}}}|{{FULLPAGENAME:{{{talk}}}}}]]
    |the [[{{TALKPAGENAME}}#{{{talk}}}|talk page]]
    }}.
  }}
  }} {{{fix<includeonly>|</includeonly>}}}</span>{{#switch:{{{date|¬}}}
  |¬        = <!-- No date used -->
  |        = {{#ifeq:{{FULLROOTPAGENAME}}|Template:{{PAGENAME:{{{name}}}}}|&#32;<small>''({{CURRENTMONTHNAME}} {{CURRENTYEAR}})''</small>}}
  |#default = &#32;<small>''({{{date}}})''</small>
  }}<span class="hide-when-compact"> {{{info|}}}</span>
  }}
  }}
|info = {{{info|}}}
}}{{Category handler
}}{{Category handler
  |nocat={{{nocat|}}}
  |nocat={{{nocat|<noinclude>true</noinclude>}}}
  |main={{Ambox/category
  |main={{Ambox/category
   |cat={{{cat|{{{category|}}}}}}  
   |cat={{{cat|{{{category|}}}}}}  
Line 66: Line 53:
   |date={{{date|}}}
   |date={{{date|}}}
  }}
  }}
  |template={{#switch:Template:{{{name|<noinclude>Ambox</noinclude>}}}
  |template={{#switch:Template:{{{name|}}}
  |{{FULLPAGENAME}} = [[Category:Article message templates]]{{#ifexpr:{{#ifeq:{{{issue|¬}}}|¬|1|0}}+{{#ifeq:{{{fix|¬}}}|¬|1|0}}+{{#ifeq:{{{subst|¬}}}|¬|1|0}}
  |{{FULLPAGENAME}} = [[Category:Article message templates]]{{#ifexpr:{{#ifeq:{{{issue|¬}}}|¬|1|0}}+{{#ifeq:{{{fix|¬}}}|¬|1|0}}+{{#ifeq:{{{subst|¬}}}|¬|1|0}}
    |[[Category:Article message templates with missing parameters|{{#expr:{{#ifeq:{{{issue|¬}}}|¬|1|0}}+{{#ifeq:{{{fix|¬}}}|¬|1|0}}+{{#ifeq:{{{subst|¬}}}|¬|1|0}}}}]]
  |[[Category:Article message templates with missing parameters|{{#expr:{{#ifeq:{{{issue|¬}}}|¬|1|0}}+{{#ifeq:{{{fix|¬}}}|¬|1|0}}+{{#ifeq:{{{subst|¬}}}|¬|1|0}}}}]]
  }}{{#if:{{{category|}}}{{{category2|}}}{{{category3|}}}
  }}{{#if:{{{category|}}}{{{category2|}}}{{{category3|}}}
    |[[Category:Article message templates with missing parameters|C]]
  |[[Category:Article message templates with missing parameters|C]]
  }}
  }}
  |Template:        = {{#ifeq:{{BASEPAGENAME}}|{{SUBPAGENAME}}|[[Category:Article message templates with missing parameters]]}}
  |Template:        = {{#ifeq:{{BASEPAGENAME}}|{{SUBPAGENAME}}|[[Category:Article message templates with missing parameters]]}}
  }}
  }}
}}<noinclude>
}}<noinclude>

Revision as of 05:50, 5 July 2012

Template:Ambox/core