Jump to content

Template:Ombox/doc: Difference between revisions

no edit summary
(New page: {{Documentation subpage}} <!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE --> {{mbox templates}} This is the {{tl|ombox}} or '''other pages message box''' meta-templat...)
 
No edit summary
 
(6 intermediate revisions by 3 users not shown)
Line 30: Line 30:
{{ombox
{{ombox
| type      = style
| type      = style
| image    = [[Image:Emblem-question-yellow.svg|40px]]
| image    = [[Image:Emblem-question-yellow.svg.png|40px]]
| style    = width: 400px;  
| style    = width: 400px;  
| textstyle = color: red; font-weight: bold; font-style: italic;
| textstyle = color: red; font-weight: bold; font-style: italic;
Line 39: Line 39:
{{ombox
{{ombox
| type      = style
| type      = style
| image    = [[Image:Emblem-question-yellow.svg|40px]]
| image    = [[Image:Emblem-question-yellow.svg.png|40px]]
| style    = width: 400px;  
| style    = width: 400px;  
| textstyle = color: red; font-weight: bold; font-style: italic;
| textstyle = color: red; font-weight: bold; font-style: italic;
Line 90: Line 90:
}}
}}
{{ombox
{{ombox
| image = [[Image:Gnome globe current event.svg|42px]]
| image = [[File:Globe.png|42px]]
| imageright = [[Image:Nuvola apps bookcase.svg|40px]]
| imageright = [[File:Bookstack.jpg|40px]]
| text  = image = <nowiki>[[Image:Gnome globe current event.svg|42px]]</nowiki> <br> imageright = <nowiki>[[Image:Nuvola apps bookcase.svg|40px]]</nowiki>
| text  = image = <nowiki>[[File:Globe.png|42px]]</nowiki> <br> imageright = <nowiki>[[File:Bookstack.jpg|40px]]</nowiki>
}}
}}


{{ombox
{{ombox
| type      = notice
| type      = notice
| image      = [[Image:Blue check.svg|30px]]
| image      = [[File:Blue check.png|30px]]
| imageright = {{shortcut|WP:SHORT}}
| imageright = shortcut WP:SHORT
| text      =  
| 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]].
'''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]].
Line 104: Line 104:
{{ombox
{{ombox
| type      = notice
| type      = notice
| image      = [[Image:Nutshell.png|30px]]
| image      = Nutshell.png|30px]]
| text      =  
| text      =  
'''This page in a nutshell:''' This template is used to build message boxes for all pages that are ''not'' articles, talk pages, image pages or category pages.
'''This page in a nutshell:''' This template is used to build message boxes for all pages that are ''not'' articles, talk pages, image pages or category pages.
Line 171: Line 171:
{{ombox
{{ombox
| small = yes
| small = yes
| image      = [[Image:Replacement filing cabinet.svg|50px]]
| image      = [[Image:Filing cabinet.png|50px]]
| smallimage = [[Image:Replacement filing cabinet.svg|32px]]
| smallimage = [[Image:Filing cabinet.png|32px]]
| text =  
| text =  
small = yes <br> image = <nowiki>[[Image:Replacement filing cabinet.svg|50px]]</nowiki> <br> smallimage = <nowiki>[[Image:Replacement filing cabinet.svg|32px]]</nowiki>
small = yes <br> image = <nowiki>[[Image:Filing cabinet.png|50px]]</nowiki> <br> smallimage = <nowiki>[[Image:Filing cabinet.png|32px]]</nowiki>
}}
}}
'''smallimage'''
'''smallimage'''
:'''No parameter''' = If no '''smallimage''' parameter is given then this template falls back to use the '''image''' parameter. If the '''image''' parameter also is empty then a small default image is used.
:'''No parameter''' = If no '''smallimage''' parameter is given then this template falls back to use the '''image''' parameter. If the '''image''' parameter also is empty then a small default image is used.
:'''An image''' = Should be an image with usual wiki notation. 30px width is usually about right. For example:  
:'''An image''' = Should be an image with usual wiki notation. 30px width is usually about right. For example:  
::<code><nowiki>smallimage = [[Image:Replacement filing cabinet.svg|30px]]</nowiki></code>
::<code><nowiki>smallimage = [[Image:Filing cabinet.png|30px]]</nowiki></code>
:'''none''' = Means that no image is used. This overrides any image fed to '''image''', when "small=yes".
:'''none''' = Means that no image is used. This overrides any image fed to '''image''', when "small=yes".


Line 225: Line 225:
This template calls {{tl|ombox/core}} which holds most of the code for {{tl|ombox}}, while {{tl|ombox}} itself does parameter preprocessing.  
This template calls {{tl|ombox/core}} which holds most of the code for {{tl|ombox}}, while {{tl|ombox}} itself does parameter preprocessing.  


Internally this meta-template uses HTML markup instead of wiki markup for the table code. That is the usual way we make meta-templates since wiki markup has several drawbacks. For instance it makes it harder to use [[m:Help:ParserFunctions|parser functions]] and special characters in parameters.  
Internally this meta-template uses HTML markup instead of wiki markup for the table code. That is the usual way we make meta-templates since wiki markup has several drawbacks. For instance it makes it harder to use {{mw|Help:Extension:ParserFunctions|parser functions}} and special characters in parameters.  


The default images for this meta-template are in png format instead of svg format. The main reason is that some older web browsers have trouble with the transparent background that MediaWiki renders for svg images. The png images here have hand optimised transparent background colour so they look good in all browsers. Note that svg icons only look somewhat bad in the old browsers, thus such hand optimisation is only worth the trouble for very widely used icons.
The default images for this meta-template are in png format instead of svg format. The main reason is that some older web browsers have trouble with the transparent background that MediaWiki renders for svg images. The png images here have hand optimised transparent background colour so they look good in all browsers. Note that svg icons only look somewhat bad in the old browsers, thus such hand optimisation is only worth the trouble for very widely used icons.