Difference between revisions of "Template:Ambox/core"

From The Crowdsourced Resource-Based Economy Knowledgebase
Jump to: navigation, search
 
 
(3 intermediate revisions by one user not shown)
Line 1: Line 1:
<table class="metadata plainlinks ambox {{#switch:{{{small|}}}
+
<table class="metadata plainlinks ambox {{{class|}}}" style="{{{style|}}}">
| left = mbox-small-left
+
<tr>{{#switch:{{{image|}}}
}} {{#switch:{{{type|}}}
+
|blank
| speedy     = ambox-speedy
+
|none = <td class="mbox-empty-cell"></td>
| delete     = ambox-delete
+
|#default = <td class="mbox-image"><div style="width: 52px;">{{#if:{{{image|}}}
| content   = ambox-content
+
  |{{{image}}}
| style     = ambox-style
+
  |[[File:{{#switch:{{{type|}}}
| move       = ambox-move
+
  |speedy = Ambox speedy deletion.png
| protection = ambox-protection
+
  |delete = Ambox deletion.png
| notice     <!-- notice = default -->
+
  |content = Ambox content.png
| #default   = ambox-notice
+
  |style = Edit-clear.svg
}} {{{class|}}}" style="{{{style|}}}">
+
  |move = Ambox move.png
<tr>
+
  |protection = Ambox protection.png
{{#switch:{{{image|}}}
+
  |notice|#default = Ambox notice.png
| blank    <!-- Fall back to "none", since deprecated. -->
+
  }}|40x40px|link=|alt=]]
| none = <td class="mbox-empty-cell"></td>  <!-- No image. Cell with some width or padding necessary for text cell to have 100% width. -->
+
}}</div></td>
| #default =
+
}}<td class="mbox-text" style="{{{textstyle|}}}"><span class="mbox-text-span">{{{issue|}}}<span class="hide-when-compact"> {{#if:{{{talk|}}}
  <td class="mbox-image">{{
+
|{{#ifexist:{{#ifeq:{{TALKPAGENAME:{{{talk}}}}}|{{FULLPAGENAME:{{{talk}}}}}
  #switch:{{{small|}}}
+
  |{{{talk}}}
  | left = <!-- Don't use the DIV -->
+
  |{{TALKPAGENAME}}
  | #default = <div style="width: 52px;">
+
 
   }}
 
   }}
   {{#if:{{{image|}}}
+
   |&#32;Relevant discussion may be found on {{#ifeq:{{TALKPAGENAME:{{{talk}}}}}|{{FULLPAGENAME:{{{talk}}}}}
  | {{{image}}}
+
  |[[{{{talk}}}|{{FULLPAGENAME:{{{talk}}}}}]]
  | [[File:{{#switch:{{{type|}}}
+
  |the [[{{TALKPAGENAME}}#{{{talk}}}|talk page]]
    | speedy    = Ambox speedy deletion.png
+
   }}.
    | delete    = Ambox deletion.png
+
}}
    | content    = Ambox content.png
+
}} {{{fix|}}}</span>{{#if:{{{date|}}}
    | style      = Edit-clear.svg
+
  |&#32;<small>''({{{date}}})''</small>
    | move      = Ambox move.png
+
}}<span class="hide-when-compact"> {{{info|}}}</span></span></td>{{#switch:{{{imageright|}}}
    | protection = Ambox protection.png
+
|none =
    | notice          <!-- notice = default -->
+
|=
    | #default  = Ambox notice.png
+
|#default = <td class="mbox-imageright"><div style="width: 52px;">{{{imageright}}}</div></td>
    }} | {{#switch:{{{small|}}}  
+
}}</tr></table>
      | left = 20x20px
+
      | #default = 40x40px
+
      }} |link=|alt=]]
+
  }}{{#switch:{{{small|}}}
+
  | left = <!-- Don't use the /DIV -->
+
   | #default = </div>
+
  }}</td>
+
}}
+
<td class="mbox-text" style="{{{textstyle|}}}"> {{{text}}} {{#if:{{{date|}}}
+
  |<small>''({{{date}}})''</small>
+
}}</td>
+
{{#if:{{{imageright|}}}
+
| {{#ifeq:{{{imageright|}}}|none
+
  | <!-- No image. -->
+
  | <td class="mbox-imageright">{{#switch:{{{small|}}}
+
    | left = {{{imageright}}}
+
    | #default = <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:Wikipedia message box parameter needs fixing|{{main other|Main:}}{{FULLPAGENAME}}]]<!-- Sort on namespace -->
+
}}<!--
+
Detect and report usage of deprecated "image=blank":
+
-->{{#switch:{{{image|}}}
+
| blank = [[Category:Wikipedia message box parameter needs fixing|{{main other|Main:}}{{FULLPAGENAME}}]]<!-- Sort on namespace -->
+
}}<noinclude>
+
{{documentation}}
+
<!-- Add categories and interwikis to the /doc subpage, not here! -->
+
</noinclude>
+

Latest revision as of 12:56, 27 February 2013

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox
Share