Template:Notice: Difference between revisions

update; added small parameter, changed switch to ifeq, added optional parameter header
(added code to automatically use talk page coloring only on talk pages and display the icon with correct background coloring for most users)
(update; added small parameter, changed switch to ifeq, added optional parameter header)
Line 1: Line 1:
{| class="{{#switch:{{NAMESPACE}}|Category talk|Help talk|Image talk|MediaWiki talk|Portal talk|Talk|Template talk|User talk|Wikipedia talk=messagebox standard-talk|messagebox}}"
{| class="{{#ifeq|{{NAMESPACE}}|{{TALKSPACE}}|{{#ifeq|{{{small|}}}|yes|small|standard}}-talk}} messagebox"
|-
| {{#if:{{{header|}}}|rowspan="2"}} align="center"|[[Image:Info {{#ifeq:{{NAMESPACE}}|{{TALKSPACE}}|talk|non-talk}}.png|Info]]
|align="center"|[[Image:Info {{#switch:{{NAMESPACE}}|Category talk|Help talk|Image talk|MediaWiki talk|Portal talk|Talk|Template talk|User talk|Wikipedia talk=|non-}}talk.png|Info]]
{{#if:{{{header|}}}|
<!-- -->! {{{header}}}
<!-- -->{{!-}}
}}
|align="left" width="100%"|{{{1}}}
|align="left" width="100%"|{{{1}}}
|}<noinclude>
|}<noinclude>
Anonymous user