Support/Design/Boxes
De DigiWiki.
Usage
Simple usage example:
{{imbox | text = Some text.}}
![]() |
Some text. |
Complex example:
{{imbox | type = style | image = [[Image:Emblem-question-yellow.png|40px]] | style = width: 400px; | textstyle = color: red; font-weight: bold; font-style: italic; | text = The message body text. }}
![]() |
The message body text. |
Image message box types
The following examples use different type parameters but use no image parameters thus they use the default images for each type.
![]() |
type=speedy – Speedy deletion templates such as {{isd}}. |
![]() |
type=delete – Deletion templates such as {{ifd}}. |
![]() |
type=content – Major warnings and problems, such as {{non-free reduce}}. |
![]() |
type=style – Minor warnings and problems, such as {{cleanup-image}}. |
![]() |
type=notice – Notices and messages of any kind, both permanent and temporary. |
![]() |
type=move – Move and rename messages and proposals, such as {{rename media}}. |
![]() |
type=protection – Protection templates such as {{pp-protected}} when shown on an image page. |
![]() |
type=license – License templates such as {{GFDL}}. |
![]() |
type=featured – Featured image templates such as {{FeaturedPicture}}. |
Other images
The default images shown above are mostly for convenience. In many cases it is more appropriate to use more specific images. These examples use the image parameter to specify an image other than the default images.
![]() |
type = style image = [[Image:Gnome-dev-camera.png|42px]] This image is used for {{cleanup-image}}. |
![]() |
type = move image = [[Image:To Commons.png|52px]] This image is used for {{copy to Wikimedia Commons}}. |
![]() |
type = license image = [[Image:Heckert GNU white.png|48px]] This image is used for the GFDL license templates such as {{GFDL}}. |
Special
Some other parameter combinations.
![]() |
No type and no image given (default) |
No type and image=none – No image is used and the text uses the whole message box area. |
![]() ![]() |
type = license image = [[Image:Imbox license.png|40px]] <br> [[Image:Ambox warning yellow.svg|40px]] imageright = [[Image:Shuttle.png|30px]] |
![]() |
![]() ![]() |
This file is in the public domain because it was created by NASA.
Note that use of NASA logos, insignia and emblems are restricted per US law. |
![]() |
![]() |
type = license image = [[Image:Imbox license.png|40px]] below = {{imbox | type = content | text = '''This license tag is deprecated!''' }} |
||
|
Parameters
List of all parameters:
{{imbox | type = speedy / delete / content / style / notice / move / protection / license / featured | image = none / [[Image:Some image.png|40px]] | imageright = [[Image:Some image.png|40px]] | style = CSS value | textstyle = CSS value | text = The message body text. | below = More text or another imbox. }}
type
- If no type parameter is given the template defaults to type notice. That means it gets a blue border.
image
- No parameter = If no image parameter is given the template uses a default image. Which default image it uses depends on the type parameter.
- An image = Should be an image with usual wiki notation. 40px - 50px width are usually about right depending on the image height to width ratio. (But the message box can handle images of any size.) For example:
image = [[Image:Gnome-dev-camera.svg|40px]]
- none = Means that no image is used.
imageright
- No parameter = If no imageright parameter is given then no image is shown on the right side.
- An image = Should be an image with usual wiki notation. 40px - 50px width are usually about right depending on the image height to width ratio. (But the message box can handle images of any size.) For example:
imageright = [[Image:Nuvola apps bookcase.png|40px]]
- Anything = Any other object that you want to show on the right side.
style
- An optional CSS value used by the entire message box table. Without quotation marks
" "
. For example:style = margin-bottom: 0.5em;
textstyle
- An optional CSS value used by the text cell. For example:
textstyle = text-align: center;
text
- The message body text.
below
- A full width area below the images and text area. Can take a text or any kind of object, for instance another imbox:
below = {{imbox | type = content | text = This license tag is deprecated. }}
Technical details
Namespace "Image:" was renamed to "File:" on 11 December 2008. This template was created long before that, and that is why it is named "imbox" as in "image message box".
If you need to use special characters in the text parameter then you need to escape them like this:
{{imbox | text = <div> Equal sign = and a start and end brace { } work fine as they are. But here is a pipe {{!}} and two end braces <nowiki>}}</nowiki>. And now a pipe and end braces <nowiki>|}}</nowiki>. </div> }}
![]() |
Equal sign = and a start and end brace { } work fine as they are. But here is a pipe | and two end braces }}. And now a pipe and end braces |}}. |
This template uses the imbox CSS classes in MediaWiki:Common.css for most of its looks, thus it is fully skinnable.
See also
There are several meta-templates in the mbox family:
- {{ambox}} – For article message boxes.
- {{cmbox}} – For category message boxes.
- {{imbox}} – For file (image) page message boxes.
- {{mbox}} – Has namespace detection, for message boxes that are used on several types of pages and thus need to change style depending on what page they are used on.
- {{ombox}} – For other pages message boxes.
- {{tmbox}} – For talk page message boxes.
Closely related meta-templates:
- {{asbox}} – For article stub message boxes.
- {{dmbox}} – For disambiguation and set index message boxes.
- {{fmbox}} – For header and footer message boxes.
Hardcoded box. |
![]() | Some text. |
Here are the ambox class names and what they define.
ambox – The box size, border, background and default colour etc. |
Image | mbox-image and mbox-imageright The size and padding etc of the image cells. | Imageright |
mbox-text – The size and padding etc of the text cell. |
ambox-speedy – The red+pink "speedy deletion" style. |
ambox-delete – The red "deletion" style. |
ambox-content – The orange "content issues" style. |
ambox-style – The yellow "style issues" style. |
ambox-notice – The blue "article notices" style. |
ambox-move – The purple "move/merge/split/transwiki proposals" style. |
ambox-protection – The gray "protection" style. |
More usage
{| class="ambox ambox-notice" | class="mbox-image" | [[Image:Gnome globe current event.png|42px]] | class="mbox-text" | <div> '''This article or section documents a current [[spaceflight]].''' <br>Content may change as the mission progresses. </div> | class="mbox-imageright" | [[Image:Shuttle.png|20px]] |}
![]() | This article or section documents a current spaceflight.
| ![]() |
These are how the various {{ambox}} templates will currently be displayed from your account. If you've never edited your monobook.css page before, these boxes reflect settings in MediaWiki:Common.css. (Search for "ambox" on that page.)
![]() |
Sample text More sample text |
![]() |
Sample text More sample text |
![]() |
Sample text More sample text |
![]() |
Sample text More sample text |
![]() |
Sample text More sample text |
The options
Muted
![]() |
Sample text More sample text |
![]() |
Sample text More sample text |
![]() |
Sample text More sample text |
![]() |
Sample text More sample text |
![]() |
Sample text More sample text |
Add this code to your own monobook.css:
/* "Muted" v0.1 color bars for the article message box templates */ table.ambox-delete { border-left: 10px solid #B22222 ; } table.ambox-content { border-left: 10px solid #FFCC66 ; } table.ambox-style { border-left: 10px solid #F3EF84 ; } table.ambox-move { border-left: 10px solid #BB99FF ; } table.ambox-notice { border-left: 10px solid #BBE3F4 ; }
Light
From BenB4:
![]() |
Sample text More sample text |
![]() |
Sample text More sample text |
![]() |
Sample text More sample text |
![]() |
Sample text More sample text |
![]() |
Sample text More sample text |
Add this code to your own monobook.css:
/* "Light" v0.1 color bars for the article message box templates */ table.ambox-delete { border-left: 10px solid #ff8888 ; } table.ambox-content { border-left: 10px solid #FFCC66 ; } table.ambox-style { border-left: 10px solid #f7f777 ; } table.ambox-move { border-left: 10px solid #ddbbFF ; } table.ambox-notice { border-left: 10px solid #aaeeFF ; }
Pastel
From the mainpage colors:
![]() |
Sample text More sample text |
![]() |
Sample text More sample text |
![]() |
Sample text More sample text |
![]() |
Sample text More sample text |
![]() |
Sample text More sample text |
Add this code to your own monobook.css:
/* "Pastel" v0.1 color bars for the article message box templates */ table.ambox-delete { border-left: 10px solid #F2CECE ; } table.ambox-content { border-left: 10px solid #F2E0CE ; } table.ambox-style { border-left: 10px solid #F2F2CE ; } table.ambox-move { border-left: 10px solid #DDCEF2 ; } table.ambox-notice { border-left: 10px solid #CEDFF2 ; }
All-Color
From Anomie:
![]() |
Sample text More sample text |
![]() |
Sample text More sample text |
![]() |
Sample text More sample text |
![]() |
Sample text More sample text |
![]() |
Sample text More sample text |
Add this code to your own monobook.css:
/* "All-Color" v0.1 for the article message box templates */ table.ambox { background: #f8fcff; border: 1px solid #aaa; } table.ambox-delete { background: #efd2d2; } table.ambox-content { background: #fce6cc; } table.ambox-style { background: #fcf3d5; } table.ambox-move { background: #ead6f4; } table.ambox-notice { background: #d2e8ff; }
Eliminate icons completely
Sample text More sample text |
Add this code to your own monobook.css:
/* "Eliminate icons" v0.1 for the article message box templates */ .mbox-image { display: none; } .mbox-imageright { display: none; }
Eliminate specific message box types
From CBDunkerson:
Add this code to your own monobook.css:
/* Remove messages boxes relating to article style */ table.ambox-style { display: none; } /* Remove messages boxes relating to article content */ table.ambox-content { display: none; } /* Remove ALL message boxes */ table.ambox { display: none; }
Message box types
![]() |
Some text. |
![]() |
Some text. |
![]() |
Some text. |
![]() |
Some text. |
![]() |
Some text. |
![]() |
Some text. |
![]() |
Some text. |
![]() |
Some text. |
![]() |
Some text. |
![]() |
Text for the top of article sections. |
![]() |
type = content image = [[File:Unbalanced scales.png|40px|link=|alt=]] This image is often used for {{POV}} and similar issues. |
![]() |
type = style image = [[File:Wikitext.png|50px|link=|alt=]] This image is often used for {{wikify}} etc. |
![]() |
type = move image = [[File:Merge-arrows.png|50px|link=|alt=]] This image is used for {{merge}} etc. |
More examples
Some other parameter combinations.
![]() |
No type and no image given (default) |
No type and image=none – No image is used and the text uses the whole message box area. |
image = [[File:Gnome globe current event.png|42px|alt=Clock over a larger globe]] imageright = [[File:Nuvola apps bookcase.png|40px|alt=Three stacked books]] |
This article or section documents a current spaceflight.
Content may change as the mission progresses. |
![]() |
Parameters
List of all parameters:
{{mbox | type = critical / serious / warning / notice / / move / protection | image = none / [[File:...|40px|...]] | imagewidth = width of image section / default is 52px | imageright = [[File:...|40px|...]] | imagerightwidth = width of right image section / default is 52px | style = CSS values | textstyle = CSS values | text = The message body text. | small = {{{small|}}} / left | smallimage = none / [[File:...|20px|...]] | smallimageright = none / [[File:...|20px|...]] | smalltext = A shorter message body text. }}