Template:Ombox/doc
| This is a documentation subpage for Template:Ombox It contains usage information, categories and other content that is not part of the original template page. |
| This template is used in system messages. Changes to it can cause immediate changes to the Wikipedia user interface. To avoid major disruption, any changes should be tested in the template's /sandbox or /testcases subpages, or in your own user subpage. The tested changes can be added to this page in a single edit. Please discuss changes on the talk page before implementing them. |
| This template uses Lua: |
| Message box meta-templates | |
|---|---|
| template | context |
| {{Ambox}} | article |
| {{Cmbox}} | category |
| {{Imbox}} | image |
| {{Tmbox}} | talk |
| {{Fmbox}} | footer / header |
| {{Ombox}} | other pages |
| {{Mbox}} | auto-detect |
| {{Asbox}} | article stub |
| {{Dmbox}} | disambiguation |
Dis na the {{Ombox}} ([O]ther pages [m]essage [box]) meta-template.
Dem dey use am to build message box templates for pages like User, Wikipedia, MediaWiki, Template, Help, Portal, plus any new namespaces wey fit come later. In oda words, na for page types wey {{Ambox}}, {{Tmbox}}, {{Imbox}}, or {{Cmbox}} no cover. So, you no suppose use am for boxes wey belong to articles, talk pages, image pages, or category pages.
Dis template dey work almost the same way as {{Ambox}}, and e dey use the same parameters.
Introduction
[edit source]
Like we talk before, you suppose use dis template for message boxes wey no be article pages, talk pages, image pages, or category pages. Some message boxes for oda pages fit still dey use one of those four templates by mistake. If you see any message box wey dey for "other pages", you fit change am make e use dis meta-template. If you jam any hard case wey no clear, put am for dis template ein talk page and somebody go help you.
When dem use dis template build message boxes for oda pages, those boxes suppose still get explanatory text like before. (Fit be the same text or better improved text.) If you get image wey fit the box pass the default one, use am instead of the default image wey dem show here.
Usage
[edit source]Simple example:
{{ombox
| text = Some text.
}}
| Some text. |
Complex example:
{{ombox
| type = style
| image = [[File:Emblem-question-yellow.svg|40px]]
| style = width: 400px;
| textstyle = color: red; font-weight: bold; font-style: italic;
| text = The message body text.
}}
| The body text of the message. |
Other pages message box types
[edit source]The examples below dey use different type parameters, but dem no use any image parameter. Because of dat, dem go use the default image wey belong to each type.
| type=speedy – Templates for speedy deletion. |
| type=delete – Deletion templates. |
| type=content – Big warnings and serious problems, like {{high-use}}. |
| type=style – Small warnings and minor problems. {{Intricate template}} fit use dis type. |
| type=notice – Notices and messages of any kind, whether permanent or temporary, like {{guideline}} and {{Wikipedia how-to}}. |
| type=move – Merge, split, rename, and transwiki messages and proposals. |
| type=protection – Protection templates like {{pp}} when dem show for "other pages". |
Examples
[edit source]Some examples wey dey use the "notice" style:
| No type and no image given (default) |
| No type and image=none – No image go show, and the text go use the whole message box area. |
| image = [[File:Gnome globe current event.svg|42px]] imageright = [[File:Nuvola apps bookcase.svg|40px]] |
| Dis page dey document one English Wikipedia guideline. Plenty editors dey accept am as standard wey dem suppose follow, but make dem still use common sense and allow small exceptions when e make sense. Anytime you edit dis page, make sure say your changes follow consensus. If you no sure, discuss am for the talk page. |
| Dis page in short: Dem dey use dis template build message boxes for every page wey no be article, talk page, image page, or category page. |
Parameters
[edit source]List of all parameters:
{{ombox
| name = template ein name
| type = speedy / delete / content / style / notice / move / protection
| image = none / [[File:Some image.svg|40px]]
| imageright = [[File:Some image.svg|40px]]
| style = CSS values
| textstyle = CSS values
| plainlinks = no
| text = The body text of the message.
| small = {{{small|}}} / yes
| smallimage = none / [[File:Some image.svg|30px]]
| smallimageright = none / [[File:Some image.svg|30px]]
| smalltext = Shorter body text for the message.
}}
name
- (Optional) The name of the template. Dis one dey add one CSS class wey get the name
box-nameto the HTML element, so bots or scripts fit use am.
type
- If you no give any type parameter, the template go use notice by default. Dat one mean say e go get gray border.
image
- No parameter = If you no give image, the template go use one default image. Which default image e go use depend on the type parameter.
- An image = E suppose be image wey use normal wiki notation. 40px–50px width dey usually okay, depending on the image shape. (But the message box fit handle any image size.) Example:
image = [[File:Crystal package settings.png|40px]]
- none = Mean say no image go show.
imageright
- No parameter = If you no give imageright, no image go show for the right side.
- An image = E suppose use normal wiki notation. Around 40px–50px width dey usually okay. Example:
imageright = [[File:Nuvola apps bookcase.png|40px]]
- Anything = You fit put any oda object wey you want make e show for the right side.
style
- Optional CSS values wey go apply to the whole message box table. No put quotation marks
" ", but remember the ending semicolon;. Example:
style = margin-bottom: 0.5em;
textstyle
- Optional CSS values wey go apply only to the text cell. Example:
textstyle = text-align: center;
plainlinks
- Normally for Wikipedia, external links get small arrow icon beside dem, like dis:
But inside message boxes, the arrow icon no dey show by default, like dis:
If you want make the arrow icon show like normal, use |plainlinks=no.
text
- The main body text of the message.
The small parameters
[edit source]| small = yes |
| type = style small = yes |
small
- yes = E go make the message box small and float for the right side. E go also make the default images smaller.
Take note say anything wey you put inside smallimage, smallimageright, and smalltext go work only if "small=yes".
If you want make your own template support the small parameter too, use dis code:
small = {{{small|}}}
| small = yes image = [[File:Replacement filing cabinet.svg|50px]] |
smallimage
- No parameter = If you no give smallimage, the template go first use the image parameter. If image too no dey, then e go use one small default image.
- An image = E suppose use normal wiki notation. Around 30px width dey usually okay. Example:
smallimage = [[File:Replacement filing cabinet.svg|30px]]
- none = Mean say no image go show. If "small=yes", dis one go override anything wey you put for image.
| small = yes imageright = [[File:Nuvola apps bookcase.png|50px]] |
smallimageright
- No parameter = If you no give smallimageright, the template go use imageright. If imageright too no dey, then nothing go show for the right side.
- An image = E suppose use normal wiki notation. Around 30px width dey usually okay. Example:
smallimageright = [[File:Nuvola apps bookcase.png|30px]]
- Anything = Any oda object wey you want make e show for the right side.
- none = Mean say no image go show for the right side. If "small=yes", dis one go override imageright.
smalltext
- Short version of the message body text. If you no give smalltext, the template go use the normal text parameter instead.
Technical details
[edit source]If you need use special characters inside the text parameter, then you for escape dem like dis:
{{ombox
| text = <div>
Equal sign = plus opening and closing braces { } dey work fine as dem be.
But dis one get one pipe {{!}} plus two closing braces <nowiki>}}</nowiki>.
And now one pipe plus closing braces <nowiki>|}}</nowiki>.
</div>
}}
Equal sign = plus opening and closing braces { } dey work fine as dem be. But dis one get one pipe | plus two closing braces }}. And now one pipe plus closing braces |}}. |
Dis template dey use the ombox CSS classes wey dey inside MediaWiki:Common.css for most of how e look. Because of dat, you fit style am for different skins.
The default images wey dis meta-template dey use be PNG files instead of SVG files. The main reason be say some old web browsers no dey handle the transparent background wey MediaWiki render for SVG images well. The PNG images wey dey here get hand-optimized transparent backgrounds so dem go look better for all browsers.
Take note say SVG icons no really bad except for some old browsers. Because of dat, dis hand optimization only worth the work for icons wey people dey use plenty.
If you want know more technical information, check the talk page.
Since dis template dey work almost the same way as {{ambox}}, {{tmbox}}, {{imbox}}, and {{cmbox}}, their talk pages and related pages fit also get more technical information wey fit help you.