Template:Ambox: Difference between revisions

From PS3 Developer wiki
Jump to navigation Jump to search
m (1 revision: Importing useful Templates)
 
No edit summary
Line 1: Line 1:
{{#ifeq:{{{subst}}}|SUBST
<table class="metadata plainlinks ambox
|{{#if:{{{name|}}}
{{#switch:{{{type|}}}
  |{{Error|Template {{Tlx|{{{name}}}}} has been incorrectly substituted.}}
| speedy    = ambox-speedy
}}[[Category:Pages with incorrectly substituted templates]]
| delete    = ambox-delete
}}{{#ifeq:{{{small}}}|left
| content    = ambox-content
|{{Ambox/core
| style     = ambox-style
  |small     = left
| move       = ambox-move
  |type       = {{{type|}}}
| protection = ambox-protection
  |image      = {{#if:{{{smallimage|}}}
| notice    <!-- notice = default -->
  |{{{smallimage}}}
| #default   = ambox-notice
  |{{{image|}}}
}}" style="{{{style|}}}">
   }}
<tr>
  |imageright = {{#if:{{{smallimageright|}}}
{{#ifeq:{{{image|}}}|none
  |{{{smallimageright}}}
| <!-- No image. Cell with some width or padding necessary for text cell to have 100% width. --><td style="border: none; padding: 0px; width: 1px;"></td>
  |{{{imageright|}}}
| <td class="mbox-image"><div style="width: 52px;">
  }}
   {{#ifeq:{{{image|}}}|blank
  |class      = {{{class|}}}
   | &nbsp;
  |style     = {{{style|}}}
   | {{#if:{{{image|}}}
  |textstyle  = {{{textstyle|}}}
    | {{{image}}}
  |text      = {{#if:{{{smalltext|}}}
    | {{#switch:{{{type|}}}
  |{{{smalltext}}}
      | speedy    = [[Image:Ambox speedy deletion.png|40x40px]]
  |{{{text}}}
      | delete    = [[Image:Ambox deletion.png|40x40px]]
  }}
      | content    = [[Image:Ambox content.png|40x40px]]
}}
      | style      = [[Image:Ambox style.png|40x40px]]
|{{Ambox/core
      | move      = [[Image:Ambox move.png|40x40px]]
  |type      = {{{type|}}}
      | protection = [[Image:Ambox protection.png|40x40px]]
  |image     = {{{image|}}}
      | notice     <!-- notice = default -->
  |imageright = {{{imageright|}}}
      | #default  = [[Image:Ambox notice.png|40x40px]]
  |class      = {{{class|}}}
      }}
  |style     = {{{style|}}}
   |textstyle  = {{{textstyle|}}}
  |text      = {{{text}}}
  |date      = {{#ifeq:{{FULLROOTPAGENAME}}|Template:{{PAGENAME:{{{name}}}}}
  |{{#ifeq:{{{date|¬}}}|¬||{{CURRENTMONTHNAME}} {{CURRENTYEAR}}}}
  |{{{date|}}}
   }}
}}
}}{{Category handler
|main={{Ambox/category
   |cat={{{cat|{{{category|}}}}}}  
  |all={{{all|}}}
  |cat2={{{cat2|{{{category2|}}}}}}  
  |all2={{{all2|}}}
  |cat3={{{cat3|{{{category3|}}}}}}
  |all3={{{all3|}}}
  |date={{{date|}}}
}}
|template={{#ifeq:{{BASEPAGENAME}}|{{SUBPAGENAME}}|<!--We are on a rootpage, not a /doc or /sandbox page-->{{#ifeq:{{{nocat|}}}|true
     | <!--Don't categorise-->
    | [[Category:Article message boxes|{{BASEPAGENAME}}]]
     }}
     }}
   }}
   }}</div></td>
}}{{#ifeq:{{FULLPAGENAME}}|Template:{{PAGENAME:{{{name}}}}}
}}
|{{#ifeq:{{{doc}}}|no|
<td class="mbox-text" style="{{{textstyle|}}}"> {{{text}}} </td>
   |{{Documentation}}<!-- Transclude documentation on template page -->
{{#if:{{{imageright|}}}
}}
| <td class="mbox-imageright"><div style="width: 52px;"> {{{imageright}}} </div></td>
}}
</tr>
</table><!-- Detect and report usage with faulty "type" parameter:
-->{{#switch:{{{type|}}}
|   <!-- No type fed, is also valid input -->
| speedy
| delete
| content
| style
| move
| protection
| notice    =    <!-- Do nothing, valid "type" -->
| #default   = <div style="text-align: center;">This message box is using an invalid "type={{{type|}}}" parameter and needs fixing.</div>[[Category:{{SITENAME}} message box parameter needs fixing|{{main other|Main:}}{{FULLPAGENAME}}]]<!-- Sort on namespace -->
}}<noinclude>
}}<noinclude>
{{pp-template|small=yes}}
{{Documentation}}
{{Documentation}}
<!-- Add categories and interwikis to the /doc subpage, not here! -->
<!-- Add categories and interwikis to the /doc subpage, not here! -->
</noinclude>
</noinclude>

Revision as of 23:13, 10 January 2012

[create] Template documentation