User:Johan G/Messagebox: Difference between revisions

Jump to navigation Jump to search
Moving off some material to "/box content"; etc
(Extending)
(Moving off some material to "/box content"; etc)
Line 1: Line 1:
{| <!-- Begin box -->
{| class="wikitable" <!-- Begin box -->  
|<!-- Begin text cell -->
|
'''{{{title|<span style="color:red;">{{tl|messagebox}}: Missing parameter: title</span>}}}''' {{#ifeq: {{lc: {{{one-liner|}}} }}
|}
  | true
<!-- End box
  | &emsp;  <!-- If one-liner = true add 1 em space between title and text. -->
  | {{-}}  <!-- If one-liner != true add break between title and text. -->
  }}
{{{text|<span style="color:red;">{{tl|messagebox}}: Missing parameter: text</span>}}} <!-- Need to start at a new line in case there are wiki markup sensitive to that, e.g tables and headings -->
<!-- End text cell -->
|}<!-- End box -->


<!-- Snippet with automatic categorisation -->
--><!-- Snippet with automatic categorisation
<includeonly>{{#switch: {{{nocat|}}}
 
--><includeonly>{{#switch: {{{nocat|true}}}
   | true =
   | true =
   | false = [[:Category:Templates using messagebox meta template]][[:Category:Messagebox templates]]
   | false = [[:Category:Templates using messagebox meta template]][[:Category:Messagebox templates]]
   | #default = {{template other|[[:Category:Templates using messagebox meta template]][[:Category:Messagebox templates]]}}
   | #default = {{template other|[[:Category:Templates using messagebox meta template]][[:Category:Messagebox templates]]}}
   }}</includeonly><noinclude>
   }}</includeonly><!-- End template
 
--><noinclude>
{{Informative template|1=
{{Informative template|1=
== Goal ==
== Goal ==
Line 25: Line 22:
== Usage ==
== Usage ==
  <nowiki>{{</nowiki>'''messagebox'''
  <nowiki>{{</nowiki>'''messagebox'''
  <nowiki>|</nowiki> title      =  
  <nowiki>|</nowiki> ''title''       =  
  <nowiki>|</nowiki> text        =  
  <nowiki>|</nowiki> text        =  
   
   
  <nowiki>|</nowiki> ''box        =''
  <nowiki>|</nowiki> ''box''         =  
  <nowiki>|</nowiki> ''style      =''
  <nowiki>|</nowiki> ''style''       =  
  <nowiki>|</nowiki> ''one-liner  =''
  <nowiki>|</nowiki> ''one-liner''   =  
  <nowiki>|</nowiki> ''image      =''
  <nowiki>|</nowiki> ''image''       =  
  <nowiki>|</nowiki> ''image-width =''  
  <nowiki>|</nowiki> ''image-width'' =
   
   
  <nowiki>|</nowiki> ''box-style  =''
  <nowiki>|</nowiki> ''box-style''   =  
  <nowiki>|</nowiki> ''text-style  =''
  <nowiki>|</nowiki> ''text-style'' =  
  <nowiki>|</nowiki> ''image-style =''  
  <nowiki>|</nowiki> ''image-style'' =
   
   
  <nowiki>|</nowiki> ''page        =''
  <nowiki>|</nowiki> ''page''       =  
  <nowiki>|</nowiki> ''nocat      =''
  <nowiki>|</nowiki> ''nocat''       =  
  <nowiki>}}</nowiki>
  <nowiki>}}</nowiki>


=== Mandatory parameters ===
=== Main parameters ===
;title:  Title for the messagebox that will be shown in bold, for example '''Danger''', '''Warning''', '''Caution''', '''Cleanup''', '''Note''', '''Notice''', '''Tip''', '''Hint''', '''Protected''' etc.
;title:  Optional alternative title for the messagebox that will be shown in bold, for example '''Danger''', '''Warning''', '''Caution''', '''Cleanup''', '''Note''', '''Notice''', '''Tip''', '''Hint''', '''Protected''' etc.  Defaults to '''Notice'''.


;text:  Text to be shown in the messagebox.
;text:  Text to be shown in the messagebox.


=== Parameters affecting the appearence ===
=== Parameters affecting the appearance ===
Optional parameters affecting the appearance of the messagebox.
Optional parameters affecting the appearance of the messagebox.


Line 54: Line 51:
;style:  Style of the messagebox.  Valid values are '''immediate''', '''danger''', '''caution''', '''notice''', '''tip''' and '''protected'''. Defaults to '''notice'''.
;style:  Style of the messagebox.  Valid values are '''immediate''', '''danger''', '''caution''', '''notice''', '''tip''' and '''protected'''. Defaults to '''notice'''.


;one-liner:  Makes the dialogue a one-liner if '''one-liner=true'''.
;one-liner:  Makes the messagebox a one-liner if '''one-liner=true'''.


;image:  Image or icon to use excluding the '''File:''' namespace prefix, for example '''image=Cleanup.png'''.  Instead of an image name a shortcut can be used.  When using the shortcuts the icons will automatically get the right colour for the style.  Valid icon shortcuts are: '''/!\''', '''(!)''', '''(?)''', '''(i)''', '''(x)''' and '''U''' (for padlock).
;image:  Image or icon to use excluding the '''File:''' namespace prefix, for example '''Cleanup.png'''.  Instead of an image name a shortcut can be used.  When using the shortcuts the icons will automatically get the right colour for the style.  Valid icon shortcuts are: '''/!\''', '''(!)''', '''(?)''', '''(i)''', '''(x)''' and '''U''' (for padlock).


;image-width:  Width of the image.  Defaults to 40 pixels or for one-liners 24 pixels.
;image-width:  Width of the image.  Defaults to 40 pixels or for one-liners 24 pixels.
Line 92: Line 89:


== Related templates ==
== Related templates ==
* [[User:Johan G/Messagebox/box content]]
* [[User:Johan G/Messagebox/box format]]
* [[User:Johan G/Messagebox/box format]]
* [[User:Johan G/Messagebox/style]]
* [[User:Johan G/Messagebox/box style]]


}}
}}


</noinclude>
</noinclude>

Navigation menu