Difference between revisions of "Template:Tmbox/core"

16,152 bytes removed ,  15:01, 3 February 2009
m
1 revision
m (1 revision)
 
m (1 revision)
Line 1: Line 1:
{{ Template test cases notice }}
<table class="plainlinks tmbox {{#ifeq:{{{small}}}|yes|mbox-small}} {{#switch:{{{type|}}}
 
| speedy    = tmbox-speedy
== Tmbox ==
| delete     = tmbox-delete
 
| content    = tmbox-content
<pre>
| style     = tmbox-style
----
| move      = tmbox-move
[[Image:Canis lupus laying.jpg|thumb|A test image.]]
| protection = tmbox-protection
{{ Tmbox }}
| notice          <!-- notice = default -->
{{ Tmbox
| #default  = tmbox-notice
| text = This is the message.
}}" style="{{{style|}}}">
}}
<tr>
{{ Tmbox
{{#ifeq:{{{image|}}}|none
| text = This is the message.
| <!-- 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>
| image=blank
| <td class="mbox-image">
}}
  {{#if:{{{image|}}}
{{ Tmbox
  | {{{image}}}
| text = This is the message.
  | [[Image:{{#switch:{{{type|}}}
| image=none
    | speedy    = Imbox speedy deletion.png
}}
    | delete    = Imbox deletion.png
{{ Tmbox
    | content    = Imbox content.png
| text = This is the message.
    | style     = Imbox style.png
| type = delete
    | move      = Imbox move.png
}}
    | protection = Imbox protection.png
{{ Tmbox
    | notice          <!-- notice = default -->
| text = This is the message.
    | #default  = Imbox notice.png
| type = delete
    }} | {{#ifeq:{{{small|}}}|yes|30x30px|40x40px}} ]]
| image = [[Image:Broom icon.svg|40px]]
  }}</td>
}}
{{ Tmbox
| text = This is the message.
| type = delete
| image = [[Image:Broom icon.svg|40px]]
| imageright = [[Image:Broom icon.svg|40px]]
}}
{{ Tmbox
| text = Lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text.
| type = delete
| image = [[Image:Broom icon.svg|40px]]
| imageright = [[Image:Broom icon.svg|40px]]
}}
{{ Tmbox
| text = This is the message.
| type = delete
| image = [[Image:Broom icon.svg|40px]]
| imageright = [[Image:Broom icon.svg|40px]]
| style = color: red; font-weight: bold; text-align: center
}}
{{ Tmbox }}
{{ Tmbox
| text = This is the message.
}}
{{ Tmbox
| text = This is the message.
| image=blank
}}
{{ Tmbox
| text = This is the message.
| image=none
}}
{{ Tmbox
| text = This is the message.
| type = delete
}}
{{ Tmbox
| text = This is the message.
| type = delete
| image = [[Image:Broom icon.svg|40px]]
}}
{{ Tmbox
| text = This is the message.
| type = delete
| image = [[Image:Broom icon.svg|40px]]
| imageright = [[Image:Broom icon.svg|40px]]
}}
{{ Tmbox
| text = Lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text.
| type = delete
| image = [[Image:Broom icon.svg|40px]]
| imageright = [[Image:Broom icon.svg|40px]]
}}
{{ Tmbox
| text = This is the message.
| type = delete
| image = [[Image:Broom icon.svg|40px]]
| imageright = [[Image:Broom icon.svg|40px]]
| style = color: red; font-weight: bold; text-align: center
}}
----
</pre>
 
----
[[Image:Canis lupus laying.jpg|thumb|A test image.]]
{{ Tmbox }}
{{ Tmbox
| text = This is the message.
}}
{{ Tmbox
| text = This is the message.
| image=blank
}}
{{ Tmbox
| text = This is the message.
| image=none
}}
{{ Tmbox
| text = This is the message.
| type = delete
}}
{{ Tmbox
| text = This is the message.
| type = delete
| image = [[Image:Broom icon.svg|40px]]
}}
{{ Tmbox
| text = This is the message.
| type = delete
| image = [[Image:Broom icon.svg|40px]]
| imageright = [[Image:Broom icon.svg|40px]]
}}
{{ Tmbox
| text = Lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text.
| type = delete
| image = [[Image:Broom icon.svg|40px]]
| imageright = [[Image:Broom icon.svg|40px]]
}}
{{ Tmbox
| text = This is the message.
| type = delete
| image = [[Image:Broom icon.svg|40px]]
| imageright = [[Image:Broom icon.svg|40px]]
| style = color: red; font-weight: bold; text-align: center
}}
{{ Tmbox }}
{{ Tmbox
| text = This is the message.
}}
{{ Tmbox
| text = This is the message.
| image=blank
}}
{{ Tmbox
| text = This is the message.
| image=none
}}
{{ Tmbox
| text = This is the message.
| type = delete
}}
{{ Tmbox
| text = This is the message.
| type = delete
| image = [[Image:Broom icon.svg|40px]]
}}
{{ Tmbox
| text = This is the message.
| type = delete
| image = [[Image:Broom icon.svg|40px]]
| imageright = [[Image:Broom icon.svg|40px]]
}}
{{ Tmbox
| text = Lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text.
| type = delete
| image = [[Image:Broom icon.svg|40px]]
| imageright = [[Image:Broom icon.svg|40px]]
}}
{{ Tmbox
| text = This is the message.
| type = delete
| image = [[Image:Broom icon.svg|40px]]
| imageright = [[Image:Broom icon.svg|40px]]
| style = color: red; font-weight: bold; text-align: center
}}
----
 
== Tmbox/sandbox ==
 
<pre>
----
[[Image:Canis lupus laying.jpg|thumb|A test image.]]
{{ Tmbox/sandbox }}
{{ Tmbox/sandbox
| text = This is the message.
}}
{{ Tmbox/sandbox
| text = This is the message.
| image=blank
}}
{{ Tmbox/sandbox
| text = This is the message.
| image=none
}}
{{ Tmbox/sandbox
| text = This is the message.
| type = delete
}}
{{ Tmbox/sandbox
| text = This is the message.
| type = style
| image = [[Image:Broom icon.svg|40px]]
}}
{{ Tmbox/sandbox
| text = This is the message.
| type = style
| image = [[Image:Broom icon.svg|40px]]
| imageright = [[Image:Broom icon.svg|40px]]
}}
{{ Tmbox/sandbox
| text = Lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text.
| type = style
| image = [[Image:Broom icon.svg|40px]]
| imageright = [[Image:Broom icon.svg|40px]]
}}
{{ Tmbox/sandbox
| text = This is the message.
| type = style
| image = [[Image:Broom icon.svg|40px]]
| imageright = [[Image:Broom icon.svg|40px]]
| style = color: red; font-weight: bold; text-align: center
}}
{{ Tmbox/sandbox }}
{{ Tmbox/sandbox
| text = This is the message.
}}
{{ Tmbox/sandbox
| text = This is the message.
| image=
}}
{{ Tmbox/sandbox
| text = This is the message.
| image=none
}}
{{ Tmbox/sandbox
| text = This is the message.
| type = notice
}}
{{ Tmbox/sandbox
| text = This is the message.
| type = style
| image = [[Image:Broom icon.svg|40px]]
}}
{{ Tmbox/sandbox
| text = This is the message.
| type = style
| image = [[Image:Broom icon.svg|40px]]
| imageright = [[Image:Broom icon.svg|40px]]
}}
{{ Tmbox/sandbox
| text = Lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text.
| type = style
| image = [[Image:Broom icon.svg|40px]]
| imageright = [[Image:Broom icon.svg|40px]]
}}
{{ Tmbox/sandbox
| text = This is the message.
| type = style
| image = [[Image:Broom icon.svg|40px]]
| imageright = [[Image:Broom icon.svg|40px]]
| style = color: red; font-weight: bold; text-align: center
}}
----
</pre>
 
----
[[Image:Canis lupus laying.jpg|thumb|A test image.]]
{{ Tmbox/sandbox }}
{{ Tmbox/sandbox
| text = This is the message.
}}
{{ Tmbox/sandbox
| text = This is the message.
| image=blank
}}
{{ Tmbox/sandbox
| text = This is the message.
| image=none
}}
{{ Tmbox/sandbox
| text = This is the message.
| type = notice
}}
{{ Tmbox/sandbox
| text = This is the message.
| type = style
| image = [[Image:Broom icon.svg|40px]]
}}
{{ Tmbox/sandbox
| text = This is the message.
| type = style
| image = [[Image:Broom icon.svg|40px]]
| imageright = [[Image:Broom icon.svg|40px]]
}}
{{ Tmbox/sandbox
| text = Lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text.
| type = style
| image = [[Image:Broom icon.svg|40px]]
| imageright = [[Image:Broom icon.svg|40px]]
}}
{{ Tmbox/sandbox
| text = This is the message.
| type = style
| image = [[Image:Broom icon.svg|40px]]
| imageright = [[Image:Broom icon.svg|40px]]
| style = color: red; font-weight: bold; text-align: center
}}
{{ Tmbox/sandbox }}
{{ Tmbox/sandbox
| text = This is the message.
}}
{{ Tmbox/sandbox
| text = This is the message.
| image=blank
}}
{{ Tmbox/sandbox
| text = This is the message.
| image=none
}}
{{ Tmbox/sandbox
| text = This is the message.
| type = delete
}}
{{ Tmbox/sandbox
| text = This is the message.
| type = delete
| image = [[Image:Broom icon.svg|40px]]
}}
{{ Tmbox/sandbox
| text = This is the message.
| type = delete
| image = [[Image:Broom icon.svg|40px]]
| imageright = [[Image:Broom icon.svg|40px]]
}}
{{ Tmbox/sandbox
| text = Lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text.
| type = style
| image = [[Image:Broom icon.svg|40px]]
| imageright = [[Image:Broom icon.svg|40px]]
}}
{{ Tmbox/sandbox
| text = This is the message.
| type = style
| image = [[Image:Broom icon.svg|40px]]
| imageright = [[Image:Broom icon.svg|40px]]
| style = color: red; font-weight: bold; text-align: center
}}
----
 
== More tmbox test cases ==
 
{{tmbox
| type = speedy
| text = speedy
}}
{{tmbox
| type = delete
| text = delete
}}
[[Image:Canis lupus laying.jpg|thumb|60px]]
{{tmbox
| type = content
| text = content, lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text
| imageright = [[Image:Nuvola apps bookcase.svg|40x40px]]
}}
{{tmbox
| type = style
| text = style, lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text
| imageright = [[Image:Nuvola apps bookcase.svg|40x40px]]
}}
{{tmbox
| type = notice
| text = notice, lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text
| imageright = [[Image:Nuvola apps bookcase.svg|80px]]
}}
{{tmbox
| type = move
| text = move
}}
{{shortcut|WP:TEST}}
{{tmbox
| type = protection
| text = protection
}}
 
Some text just to test bottom margin.
 
=== Special ===
 
Some other parameter combinations.
 
{{tmbox
| text  = No type and no image given ('''default''')
}}
 
{{tmbox
| image = none
| text  = No type and '''image=none''' – No image is used and the '''text''' uses the whole message box area.
}}
}}
 
<td class="mbox-text" style="{{{textstyle|}}}"> {{{text}}} </td>
{{tmbox
{{#if:{{{imageright|}}}
| image =
| {{#ifeq:{{{imageright|}}}|none
| text  = image =
  | <!-- No image. -->
  | <td class="mbox-imageright"> {{{imageright}}} </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  = [[Category:Wikipedia message box parameter needs fixing|{{main other|Main:}}{{FULLPAGENAME}}]]<!-- Sort on namespace -->
}}<noinclude>


{{tmbox
{{pp-template|small=yes}}
| image = [[Image:Nuvola apps bookcase.svg|100px]]
{{documentation}}
| text  = Trying large left side image. - lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text
<!-- Add categories and interwikis to the /doc subpage, not here! -->
}}
</noinclude>
 
{{tmbox
| image = [[Image:Nuvola apps bookcase.svg|100px]]
| text  = Trying large left and right side image. - lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text lots of text
| imageright = [[Image:Nuvola apps bookcase.svg|100px]]
}}
 
=== Parameters ===
 
List of all parameters:
 
<pre>
{{tmbox
| type  = speedy / delete / content / style / notice / move / protection
| image = none / [[Image:Some image.svg|40px]]
| imageright = [[Image:Some image.svg|40px]]
| style = CSS value
| textstyle = CSS value
| text  = The message body text.
| small = yes / {{{small|}}}
| smallimage = none / [[Image:Some image.svg|30px]]
| smallimageright = none / [[Image:Some image.svg|30px]]
| smalltext  = A shorter message body text.
}}
</pre>
 
=== Examples of varying width ===
 
These examples were copied from the ombox, so their images and texts might seem strange. But we are just testing image cell widths here.
 
{{tmbox
| type      = notice
| image      = [[Image:Blue check.svg|30px]]
| text      =
'''This page documents an English Wikipedia [[Wikipedia:Policies and guidelines|guideline]].''' It is a generally accepted standard that editors should follow, though it should be treated with [[Wikipedia:Use common sense|common sense]] and the [[Wikipedia:Ignore all rules|occasional exception]]. When editing this page, please ensure that your revision reflects [[Wikipedia:Consensus|consensus]]. When in doubt, discuss on the [[{{TALKPAGENAME}}|talk page]].
}}
 
{{tmbox
| type      = notice
| image      = [[Image:Purple question mark.svg|50px]]
| text      =
'''The following is a ''proposed'' Wikipedia {{{type|[[Wikipedia:Policies and guidelines|policy, guideline,]] or process}}}.''' <br> The proposal may still be in development, under [[{{NAMESPACE}} talk:{{PAGENAME}}|discussion]], or in the process of gathering [[Wikipedia:Consensus|consensus]] for adoption. Thus references or links to this page should not describe it as "policy".
}}
 
{{tmbox
| type      = notice
| image      = [[Image:Purple question mark.svg|70px]]
| imageright = {{shortcut|WP:SHORT}}
| text      =
'''The following is a ''proposed'' Wikipedia {{{type|[[Wikipedia:Policies and guidelines|policy, guideline,]] or process}}}.'''
}}
 
{{tmbox
| type      = notice
| image      = [[Image:Crystal package settings.png|40px]]
| imageright = {{shortcut|WP:SHORT}}
| text      =
This page is a '''how-to guide''' detailing a practice or process on the English Wikipedia.
}}
 
=== Small message boxes ===
 
{{tmbox
| type      = notice
| small      = yes
| text      =
type = notice, small = yes, no image set.
}}
{{tmbox
| type      = notice
| small      = yes
| image      = [[Image:Imbox notice.png|40x40px]]
| text      =
type = notice, small = yes, image = <nowiki>[[Image:Imbox notice.png|40x40px]]</nowiki>
}}
{{tmbox
| type      = notice
| small      = yes
| image      = [[Image:Imbox notice.png|30x30px]]
| imageright = [[Image:Nuvola apps bookcase.png|30x30px]]
| text      =
type = notice, small = yes, image = <nowiki>[[Image:Imbox notice.png|30x30px]], imageright = [[Image:Nuvola apps bookcase.png|30x30px]]</nowiki>
}}
{{tmbox
| type      = notice
| small      = yes
| image      = [[Image:Information icon4.svg|30x30px]]
| imageright = [[Image:Nuvola apps bookcase.png|30x30px]]
| text      =
type = notice, small = yes, image = <nowiki>[[Image:Information icon4.svg|30x30px]], imageright = [[Image:Nuvola apps bookcase.png|30x30px]]</nowiki>
}}
{{tmbox
| type      = style
| small      = yes
| text      =
type = style, small = yes, no image set.
}}
{{tmbox
| type      = style
| small      = yes
| image      = [[Image:Imbox style.png|40x40px]]
| text      =
type = style, small = yes, image = <nowiki>[[Image:Imbox style.png|40x40px]]</nowiki>
}}
{{tmbox
| type      = style
| small      = yes
| image      = [[Image:Broom icon.svg|30x30px]]
| text      =
type = style, small = yes, image = <nowiki>[[Image:Broom icon.svg|30x30px]]</nowiki>
}}
{{tmbox
| type      = notice
| small      = yes
| image      = none
| text      =
type = notice, small = yes, image = none
}}
 
{{lorem ipsum|4}}
 
{{clear}}
 
=== Testing box flow ===
 
{{tmbox
| type      = notice
| text      =
Box 1: type = notice, no small set, no image set.
}}
{{tmbox
| type      = notice
| small      = yes
| text      =
Box 2: type = notice, small = yes, no image set.
}}
{{tmbox
| type      = style
| small      = yes
| text      =
Box 3: type = style, small = yes, no image set.
}}
{{tmbox
| type      = notice
| text      =
Box 4: type = notice, no small set, no image set.
}}
 
{{lorem ipsum|2}}
 
{{clear}}
 
=== Testing smallimage, smallimageright and smalltext ===
 
{{tmbox
| text      = Long text.
| small      = yes
| smalltext  =
Smalltext: no image set, small = yes, smalltext set.
}}
{{tmbox
| image      = [[Image:Nuvola apps bookcase.png|40px]]
| text      = image = <nowiki>[[Image:Nuvola apps bookcase.png|40px]]</nowiki>
| small      = yes
}}
{{tmbox
| image      = none
| text      = image = none, smallimage = <nowiki>[[Image:Nuvola apps bookcase.png|30px]]</nowiki>
| small      = yes
| smallimage  = [[Image:Nuvola apps bookcase.png|30px]]
}}
{{tmbox
| text      = smallimage = <nowiki>[[Image:Nuvola apps bookcase.png|30px]]</nowiki>
| small      = yes
| smallimage  = [[Image:Nuvola apps bookcase.png|30px]]
}}
{{tmbox
| text      = smallimage = none
| small      = yes
| smallimage  = none
}}
{{tmbox
| imageright      = none
| text      = imageright = none, smallimageright = <nowiki>[[Image:Nuvola apps bookcase.png|30px]]</nowiki>
| small      = yes
| smallimageright  = [[Image:Nuvola apps bookcase.png|30px]]
}}
{{tmbox
| imageright      = [[Image:Nuvola apps bookcase.png|40px]]
| text      = imageright = <nowiki>[[Image:Nuvola apps bookcase.png|40px]]</nowiki>, smallimageright = none
| small      = yes
| smallimageright  = none
}}
 
{{lorem ipsum|3}}
 
{{clear}}
Budlight
Bots, Bureaucrats, Administrators
529

edits