FANDOM


m (1 revision: importing Mbox from a test wiki)
(use onlyinclude; cat= was strangely implemented... most ppl would't expect to have to put full category link)
Line 1: Line 1:
<div {{#if: {{{id|}}} | id="{{{id}}}"}} class="mbox {{#ifeq: {{{small|}}} | yes | mbox-small}} {{#switch: {{ucfirst:{{{namespace|{{NAMESPACE}}}}}}} | {{TALKSPACE}} | Talk = tmbox | {{ns:category}} = cmbox | {{ns:file}} = imbox | {{ns:template}} = xmbox | {{ns:0}} | Main = ambox | Header | Footer = fmbox | #default = ombox }} {{#if: {{{type|}}} | mbox-{{{type}}} }} {{#ifeq: {{{plainlinks|}}} | yes | plainlinks}} {{#if: {{{class|}}} | {{{class}}}}}" {{#if: {{{style|}}} | style="{{{style}}}"}}>{{#if: {{{image|}}} | <div class="mbox-image">{{{image|}}}</div> }}<div class="mbox-message" {{#if: {{{textstyle|}}} | style="{{{textstyle}}}"}}>{{#if: {{{issue|}}} | {{{issue|}}}{{#if: {{{fix|}}} | &#32;{{{fix|}}}}} | {{{text|}}} }}{{#if: {{{date|}}} | &#32;<span class="mbox-date">({{{date|}}})</span> }}<div class="mbox-info">{{{info|}}}</div></div>{{#if: {{{imageright|}}} | <div class="mbox-image">{{{imageright|}}}</div> }}</div>{{#ifeq: {{{doc|}}} | yes || {{#if: {{{cat|}}} | {{{cat|}}}}}}}<noinclude>{{Documentation}}</noinclude>
+
<onlyinclude><div {{#if: {{{id|}}} | id="{{{id}}}"}} class="mbox {{#ifeq: {{{small|}}} | yes | mbox-small}} {{#switch: {{ucfirst:{{{namespace|{{NAMESPACE}}}}}}} | {{TALKSPACE}} | Talk = tmbox | {{ns:category}} = cmbox | {{ns:file}} = imbox | {{ns:template}} = xmbox | {{ns:0}} | Main = ambox | Header | Footer = fmbox | #default = ombox }} {{#if: {{{type|}}} | mbox-{{{type}}} }} {{#ifeq: {{{plainlinks|}}} | yes | plainlinks}} {{#if: {{{class|}}} | {{{class}}}}}" {{#if: {{{style|}}} | style="{{{style}}}"}}>{{#if: {{{image|}}} | <div class="mbox-image">{{{image|}}}</div> }}<div class="mbox-message" {{#if: {{{textstyle|}}} | style="{{{textstyle}}}"}}>{{#if: {{{issue|}}} | {{{issue|}}}{{#if: {{{fix|}}} | &#32;{{{fix|}}}}} | {{{text|}}} }}{{#if: {{{date|}}} | &#32;<span class="mbox-date">({{{date|}}})</span> }}<div class="mbox-info">{{{info|}}}</div></div>{{#if: {{{imageright|}}} | <div class="mbox-image">{{{imageright|}}}</div> }}</div>{{#ifeq: {{{doc|}}} | yes || {{#if: {{{cat|}}} | <includeonly>[[Category:{{{cat|}}}|{{PAGENAME}}]]</includeonly>}}}}</onlyinclude>{{Documentation}}

Revision as of 18:10, October 11, 2018

Export this template, then import, to install it.
Use edit summary: Copied from [[w:c:templates:Template:Mbox/wikitext]] to properly attribute this template's editors.
This template is probably not already on your wiki.
Template documentation
Note: the template above may sometimes be partially or fully invisible.

View or edit this documentation. (How does this work?)

Editors can experiment with this template's sandbox and test case pages.

This template is designed to be used in other message templates. It is derived from Mbox on Wikipedia.

{{Mbox}} is the basis for {{Ambox}}, {{Cmbox}}, {{Imbox}}, {{Xmbox}}, {{Tmbox}}, {{Fmbox}}, and {{Ombox}}. The styles for this template can be found at MediaWiki:Mbox.css.

Usage

{{Mbox
| namespace =
| type  =
| small =
| id    =
| class =
| style =
| textstyle  =
| plainlinks =
| text  =
| issue =
| fix   =
| date  =
| info  =
| image =
| imageright =
| doc =
| cat =
}}

Options

  • namespace - the namespace the box will be used in. If mbox is used where namespace is not specified, the namespace will be determined by where the template is transcluded to.
  • type
    • speedy - speedy delete message box
    • delete - delete message box
    • content - content message box
    • style - style message box
    • notice - general message box
    • protection - protection message box
  • small - a small right floated message box, except Ambox that floats left.
  • id - the id of the box
  • class - any additional classes for the box
  • style - any additional styles for the box
  • plainlinks - if you want all external links to be plain links
  • textstyle - any additional styles for the text
  • text - text of the message box or use the following together
    • issue - the issue of the message box
    • fix - how to fix the message issue
  • date - the date the message box was placed
  • info - additional information for the message box
  • image - image in the left side of the message box
  • imageright - image in the right side of the message box
  • doc - answer yes to this when you are using your Mbox template on a documentation page.
  • cat - this is the category your Mbox will put the pages in where it is used.

Installation

To install these templates to your wiki, copy the file list at the end of this documentation to the export page and save it as an xml file. Then go to your wiki's import page and enter the name of the generated xml file.

Style installation

These instructions are for the administrators of your wiki. If you are not an admin, please talk to them to complete the installation of this template and its children to your wiki.

Copy the styles from the style page to MediaWiki:Mbox.css. After you have the styles copied and saved, go to either Wikia.css or Common.css and add the following line to the top of the style sheet.

@import url("/load.php?mode=articles&only=styles&articles=MediaWiki:Mbox.css");

Boxen

Not all options shown.

This wiki has instant commons. If you want these images, your wiki's admin will have to request instant commons or you will have to upload the images manually.

Ambox

{{Ambox}} templates are article message boxes.

[[File:Ambox warning pn|80px]]
This is an article speedy deletion message box.
{{Mbox
| namespace = main
| type = speedy
| image = [[File:Ambox warning pn.svg|50px]]
| text = This is an article speedy deletion message box.
}}
[[File:Ambox warning pn|80px]]
This is an article deletion message box.
{{Mbox
| namespace = main
| type = delete
| image = [[File:Ambox warning pn.svg|50px]]
| text = This is an article deletion message box.
}}
[[File:Ambox warning orange|80px]]
This is an article content message box.
{{Mbox
| namespace = main
| type = content
| image = [[File:Ambox_warning_orange.svg|50px]]
| text = This is an article content message box.
}}
[[File:Ambox warning yellow|80px]]
This is an article style message box.
{{Mbox
| namespace = main
| type = style
| image = [[File:Ambox_warning_yellow.svg|50px]]
| text = This is an article style message box.
}}
[[File:Ambox warning blue|80px]]
This is an article general message box.
{{Mbox
| namespace = main
| type = notice
| image = [[File:Ambox_warning_blue.svg|50px]]
| text = This is an article general message box.
}}
[[File:Merge-split-transwiki default|80px]]
This is an article move message box.
{{Mbox
| namespace = main
| type = move
| image = [[File:Merge-split-transwiki_default.svg|50px]]
| text = This is an article move message box.
}}
[[File:Padlock|80px]]
This is an article protection message box.
{{Mbox
| namespace = main
| type = protection
| image = [[File:Padlock.svg|50px]]
| text = This is an article protection message box.
}}

Cmbox

{{Cmbox}} templates are category message boxes.

[[File:Ambox warning pn|80px]]
This is a category speedy deletion message box.
{{Mbox
| namespace = category
| type = speedy
| image = [[File:Ambox warning pn.svg|50px]]
| text = This is a category speedy deletion message box.
}}
[[File:Ambox warning pn|80px]]
This is a category deletion message box.
{{Mbox
| namespace = category
| type = delete
| image = [[File:Ambox warning pn.svg|50px]]
| text = This is a category deletion message box.
}}
[[File:Ambox warning orange|80px]]
This is a category content message box.
{{Mbox
| namespace = category
| type = content
| image = [[File:Ambox_warning_orange.svg|50px]]
| text = This is a category content message box.
}}
[[File:Ambox warning yellow|80px]]
This is a category style noticebox.
{{Mbox
| namespace = category
| type = style
| image = [[File:Ambox_warning_yellow.svg|50px]]
| text = This is a category style noticebox.
}}
[[File:Ambox warning blue|80px]]
This is a category general message box.
{{Mbox
| namespace = category
| type = notice
| image = [[File:Ambox_warning_blue.svg|50px]]
| text = This is a category general message box.
}}
[[File:Merge-split-transwiki default|80px]]
This is a category move message box.
{{Mbox
| namespace = category
| type = move
| image = [[File:Merge-split-transwiki_default.svg|50px]]
| text = This is a category move message box.
}}
[[File:Padlock|80px]]
This is a category protection message box.
{{Mbox
| namespace = category
| type = protection
| image = [[File:Padlock.svg|50px]]
| text = This is a category protection message box.
}}

Imbox

{{Imbox}} templates are image message boxes.

[[File:Ambox warning pn|80px]]
This is an image speedy deletion message box.
{{Mbox
| namespace = file
| type = speedy
| image = [[File:Ambox warning pn.svg|50px]]
| text = This is an image speedy deletion message box.
}}
[[File:Ambox warning pn|80px]]
This is an image deletion message box.
{{Mbox
| namespace = file
| type = delete
| image = [[File:Ambox warning pn.svg|50px]]
| text = This is an image deletion message box.
}}
[[File:Ambox warning orange|80px]]
This is an image content message box.
{{Mbox
| namespace = file
| type = content
| image = [[File:Ambox_warning_orange.svg|50px]]
| text = This is an image content message box.
}}
[[File:Ambox warning yellow|80px]]
This is an image style message box.
{{Mbox
| namespace = file
| type = style
| image = [[File:Ambox_warning_yellow.svg|50px]]
| text = This is an image style message box.
}}
[[File:Ambox warning blue|80px]]
This is an image general message box.
{{Mbox
| namespace = file
| type = notice
| image = [[File:Ambox_warning_blue.svg|50px]]
| text = This is an image general message box.
}}
[[File:Merge-split-transwiki default|80px]]
This is an image move message box.
{{Mbox
| namespace = file
| type = move
| image = [[File:Merge-split-transwiki_default.svg|50px]]
| text = This is an image move message box.
}}
[[File:Padlock|80px]]
This is an image protection message box.
{{Mbox
| namespace = file
| type = protection
| image = [[File:Padlock.svg|50px]]
| text = This is an image protection message box.
}}

Xmbox

{{Xmbox}} are template message boxes. (Tmbox was taken for all talk pages.)

[[File:Ambox warning pn|80px]]
This is a template speedy deletion message box.
{{Mbox
| namespace = template
| type = speedy
| image = [[File:Ambox warning pn.svg|50px]]
| text = This is a template speedy deletion message box.
}}
[[File:Ambox warning pn|80px]]
This is a template deletion message box.
{{Mbox
| namespace = template
| type = delete
| image = [[File:Ambox warning pn.svg|50px]]
| text = This is a template deletion message box.
}}
[[File:Ambox warning orange|80px]]
This is a template content message box.
{{Mbox
| namespace = template
| type = content
| image = [[File:Ambox_warning_orange.svg|50px]]
| text = This is a template content message box.
}}
[[File:Ambox warning yellow|80px]]
This is a template style message box.
{{Mbox
| namespace = template
| type = style
| image = [[File:Ambox_warning_yellow.svg|50px]]
| text = This is a template style message box.
}}
[[File:Ambox warning blue|80px]]
This is a template general message box.
{{Mbox
| namespace = template
| type = notice
| image = [[File:Ambox_warning_blue.svg|50px]]
| text = This is a template general message box.
}}
[[File:Merge-split-transwiki default|80px]]
This is a template move message box.
{{Mbox
| namespace = template
| type = move
| image = [[File:Merge-split-transwiki_default.svg|50px]]
| text = This is a template move message box.
}}
[[File:Padlock|80px]]
This is a template protection message box.
{{Mbox
| namespace = template
| type = protection
| image = [[File:Padlock.svg|50px]]
| text = This is a template protection message box.
}}

Tmbox

{{Tmbox}} templates are talk page message boxes.

[[File:Ambox warning pn|80px]]
This is a talk page speedy deletion message box.
{{Mbox
| namespace = talk
| type = speedy
| image = [[File:Ambox warning pn.svg|50px]]
| text = This is a talk page speedy deletion message box.
}}
[[File:Ambox warning pn|80px]]
This is a talk page deletion message box.
{{Mbox
| namespace = talk
| type = delete
| image = [[File:Ambox warning pn.svg|50px]]
| text = This is a talk page deletion message box.
}}
[[File:Ambox warning orange|80px]]
This is a talk page content message box.
{{Mbox
| namespace = talk
| type = content
| image = [[File:Ambox_warning_orange.svg|50px]]
| text = This is a talk page content message box.
}}
[[File:Ambox warning yellow|80px]]
This is a talk page style message box.
{{Mbox
| namespace = talk
| type = style
| image = [[File:Ambox_warning_yellow.svg|50px]]
| text = This is a talk page style message box.
}}
[[File:Ambox warning blue|80px]]
This is a talk page general message box.
{{Mbox
| namespace = talk
| type = notice
| image = [[File:Ambox_warning_blue.svg|50px]]
| text = This is a talk page general message box.
}}
[[File:Merge-split-transwiki default|80px]]
This is a talk page move message box.
{{Mbox
| namespace = talk
| type = move
| image = [[File:Merge-split-transwiki_default.svg|50px]]
| text = This is a talk page move message box.
}}
[[File:Padlock|80px]]
This is a talk page protection message box.
{{Mbox
| namespace = talk
| type = protection
| image = [[File:Padlock.svg|50px]]
| text = This is a talk page protection message box.
}}

Ombox

{{Ombox}} templates are other pages message boxes.

[[File:Ambox warning pn|80px]]
This is an other namespace page speedy deletion message box.
{{Mbox
| namespace = other
| type = speedy
| image = [[File:Ambox warning pn.svg|50px]]
| text = This is an other namespace page speedy deletion message box.
}}
[[File:Ambox warning pn|80px]]
This is an other namespace page deletion message box.
{{Mbox
| namespace = other
| type = delete
| image = [[File:Ambox warning pn.svg|50px]]
| text = This is an other namespace page deletion message box.
}}
[[File:Ambox warning orange|80px]]
This is an other namespace page content message box.
{{Mbox
| namespace = other
| type = content
| image = [[File:Ambox_warning_orange.svg|50px]]
| text = This is an other namespace page content message box.
}}
[[File:Ambox warning yellow|80px]]
This is an other namespace page style message box.
{{Mbox
| namespace = other
| type = style
| image = [[File:Ambox_warning_yellow.svg|50px]]
| text = This is an other namespace page style message box.
}}
[[File:Ambox warning blue|80px]]
This is an other namespace page general message box.
{{Mbox
| namespace = other
| type = notice
| image = [[File:Ambox_warning_blue.svg|50px]]
| text = This is an other namespace page general message box.
}}
[[File:Merge-split-transwiki default|80px]]
This is an other namespace page move message box.
{{Mbox
| namespace = other
| type = move
| image = [[File:Merge-split-transwiki_default.svg|50px]]
| text = This is an other namespace page move message box.
}}
[[File:Padlock|80px]]
This is an other namespace page protection message box.
{{Mbox
| namespace = other
| type = protection
| image = [[File:Padlock.svg|50px]]
| text = This is an other namespace page protection message box.
}}

Fmbox

{{Fmbox}} templates are footer or header message boxes.

[[File:Ambox warning pn|80px]]
This is a footer or header warning message box.
{{Mbox
| namespace = footer
| type = speedy
| image = [[File:Ambox warning pn.svg|50px]]
| text = This is a footer or header speedy deletion message box.
}}
[[File:Ambox warning orange|80px]]
This is a footer or header content message box.
{{Mbox
| namespace = footer
| type = content
| image = [[File:Ambox_warning_orange.svg|50px]]
| text = This is a footer or header content message box.
}}
[[File:Ambox warning yellow|80px]]
This is a footer or header style message box.
{{Mbox
| namespace = footer
| type = style
| image = [[File:Ambox_warning_yellow.svg|50px]]
| text = This is a footer or header style message box.
}}
[[File:Ambox warning blue|80px]]
This is a footer or header general message box.
{{Mbox
| namespace = footer
| type = notice
| image = [[File:Ambox_warning_blue.svg|50px]]
| text = This is a footer or header general message box.
}}
[[File:Merge-split-transwiki default|80px]]
This is a footer or header move message box.
{{Mbox
| namespace = footer
| type = move
| image = [[File:Merge-split-transwiki_default.svg|50px]]
| text = This is a footer or header move message box.
}}
[[File:Padlock|80px]]
This is a footer or header protection message box.
{{Mbox
| namespace = footer
| type = protection
| image = [[File:Padlock.svg|50px]]
| text = This is a footer or header protection message box.
}}

General deletion boxen

While this section is going show general deletion templates, the principles can be applied to any other namespace neural type of box. Note, namespace is not specified, so the template will take on the style of its name space, meaning it will look like an Xmbox, but they will change their styles when the deletion template is transcluded to a page.

{{Mbox
| type = speedy
| image = [[File:Ambox warning pn.svg|50px]]
| text = '''This page is a candidate for ''speedy'' deletion.'''
| info = ''Remember to check [[Special:Whatlinkshere/{{FULLPAGENAME}}|what links here]] and [{{fullurl:{{FULLPAGENAME}}|action=history}} the page history] before deletion.''
| doc = yes
| cat = Candidates for speedy deletion
}}
[[File:Ambox warning pn|80px]]
This page is a candidate for speedy deletion.
{{Mbox
| type = delete
| image = [[File:Ambox warning pn.svg|50px]]
| text = '''This page is a candidate for deletion.'''
| info = ''Remember to check [[Special:Whatlinkshere/{{FULLPAGENAME}}|what links here]] and [{{fullurl:{{FULLPAGENAME}}|action=history}} the page history] before deletion.''
| doc = yes
| cat = Candidates for deletion
}}
[[File:Ambox warning pn|80px]]
This page is a candidate for deletion.

Small boxen

These are small boxen that can be used to include unobtrusive messages to pages. Their borders are all narrow so text can flow around these boxen with little affect on the text. If you do not want text beside the box, you should use the <div style="clear:both"></div> directly after the box.

Small Ambox

This is a small article general message box.

This is a message box that can be used in a section of an article to highlight issues with the section. It is suggested to use a normal box for problems within the whole article.

Here is the code for the above box.

{{Mbox
| namespace = main
| small = yes
| type  = notice
| text  = This is a small article general message box.
}}

Small Cmbox

This is a small category general message box.

This is a message box that can be used to highlight minor issues with the category. It is suggested to use a normal box for bigger problems with category.

Here is the code for the above box.

{{Mbox
| namespace = category
| small = yes
| type  = notice
| text  = This is a small category general message box.
}}

Small Imbox

This is a small image general message box.

This is a message box that can be used to highlight minor issues with the image or documentation of it. It is suggested to use a normal box for bigger problems with the image.

Here is the code for the above box.

{{Mbox
| namespace = file
| small = yes
| type  = notice
| text  = This is a small image general message box.
}}

Small Xmbox

This is a small template general message box.

This is a message box that can be used to highlight minor issues with a template or documentation of it. It is suggested to use a normal box for bigger problems with the template or documentation.

Here is the code for the above box.

{{Mbox
| namespace = template
| small = yes
| type  = notice
| text  = This is a small template general message box.
}}

Small Tmbox

This is a small talk page general message box.

This is a message box that can be used to highlight minor issues with a talk page. It is suggested to use a normal box for bigger problems with the talk page.

Here is the code for the above box.

{{Mbox
| namespace = talk
| small = yes
| type  = notice
| text  = This is a small talk page general message box.
}}

Small Ombox

This is a small other pages general message box.

This is a message box that can be used to highlight minor issues with a section of a page. It is suggested to use a normal box for bigger problems with the entire page.

Here is the code for the above box.

{{Mbox
| namespace = other
| small = yes
| type  = notice
| text  = This is a small other pages page general message box.
}}

File list

Template:Mbox
Template:Ambox
Template:Cmbox
Template:Imbox
Template:Tmbox
Template:Xmbox
Template:Ombox
Template:Fmbox
Template:Mbox/doc
Template:Ambox/doc
Template:Cmbox/doc
Template:Imbox/doc
Template:Tmbox/doc
Template:Xmbox/doc
Template:Ombox/doc
Template:Fmbox/doc
Template:Mbox/style sheet
Category:Message box templates
Community content is available under CC-BY-SA unless otherwise noted.