{{#ifeq:doc |doc
|
{{#ifeq:show |show
|
40px | This is a documentation subpage for 模板:Ivory messagebox. It contains usage information, categories and other content that is not part of the original {{#if: |{{{text2}}} |{{#if: |{{{text1}}} |{{#ifeq:模板 |用户 |模板 template page |{{#if:模板 |模板 page|article}}}}}}}}. |
}}{{#if: | | {{#ifexist:模板:Ivory messagebox | [[Category:{{#switch:模板 |Template=Template |Module=Module |User=User |#default=Wikipedia}} documentation pages]] | }} }} | }}
40px | This template is used on approximately 108,000 pages. To avoid major disruption and server load, 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. Consider discussing changes on the talk page before implementing them. Transclusion count updated automatically (see documentation). |
40x40px | This 模板 is used {{#if:|{{{1}}}|in system messages}}. Changes to it can cause immediate changes to the Wikipedia user interface. {{#ifeq:10|6||To avoid large-scale disruption, any changes should first be tested in this 模板's [[{{#if:{{#ifeq:doc|sandbox|1}}{{#ifeq:doc|doc|1}}|模板:Ivory messagebox|模板:Ivory messagebox/doc}}/sandbox|/sandbox]] or [[{{#if:{{#ifeq:doc|sandbox|1}}{{#ifeq:doc|doc|1}}|模板:Ivory messagebox|模板:Ivory messagebox/doc}}/testcases|/testcases]] subpage, or in your own user space. The tested changes can then be added in one single edit to this 模板.}} Please discuss any changes {{#if:|at [[{{{2}}}]]|on the [[{{#if:{{#ifeq:doc|sandbox|1}}{{#ifeq:doc|doc|1}}|模板讨论:Ivory messagebox|模板讨论:Ivory messagebox/doc}}|talk page]]}} before implementing them. |
{{#if:{{#ifeq:doc|sandbox|1}}{{#ifeq:doc|doc|1}}||{{#switch:Lua错误:First parameter must be one of edit, move, create, upload, undelete, autoreview。|sysop|templateeditor|interfaceadmin=|#default=}}}}
The ivory messagebox or Ivmbox is a simplistic, full-width box intended to surround important messages or notices. The ivory background of this template contrasts well to the white background used by most Wikipedia users on most Wikipedia pages (so it is noticeable enough to be used in notices or messages), but the background colour is not as garish as many other message boxes.
The basic use of the template is as follows. If the message you wish to convey using Ivmbox contains complex wiki-code or equals signs, it may be necessary to use |{{SAFESUBST:#if:1|1=}}Lorem ipsum [etc…]
instead of merely |{{SAFESUBST:#if:|=}}Lorem ipsum [etc…]
:
{{Ivmbox|Lorem ipsum [etc…]}}
which gives:
The template can display an image to the left of the text content. By default, the image will be 25px in width:
{{Ivmbox|Lorem ipsum [etc…]|Information icon4.svg}}
The image can be made smaller or larger using the |{{SAFESUBST:#if:imagesize|imagesize=}}
parameter:
{{Ivmbox|Lorem ipsum [etc…]|Information icon4.svg|imagesize=40px}}
Advanced use
By default, if an icon is used with Ivmbox, the icon will not be clickable (in MediaWiki image nomenclature, |{{SAFESUBST:#if:link|link=}}
will be declared but empty). If you wished, for example, clicking the image to lead to List of Prime Ministers of the United Kingdom, you would include the following parameter:
|{{SAFESUBST:#if:image link|image link=}}List of Prime Ministers of the United Kingdom
The background of an Ivmbox is the off-white X11 colour ivory. If you like the functionality of Ivmbox but require it to display with a background other than the off-white ivory it uses by default, simply include the parameter |{{SAFESUBST:#if:bg|bg=}}
; for example:
|{{SAFESUBST:#if:bg|bg=}}salmon
for a salmon message box
|{{SAFESUBST:#if:bg|bg=}}#90EE90
for a #90EE90 (light green) message box.
See also
- {{Ambox}}, for messageboxes on article pages.
- {{Cmbox}}, for messageboxes on category pages.
- {{Imbox}}, for messageboxes on file (image) pages.
- {{Tmbox}}, for messageboxes on talk pages.
- {{Fmbox}}, for header and footer messageboxes.
- {{Ombox}}, for messageboxes on other types of page.
- {{Mbox}}, for messageboxes that are used in different namespaces and change their presentation accordingly.
Closely related metatemplates:
- {{Asbox}}, for messageboxes in article stubs.
- {{Dmbox}}, for messageboxes on disambiguation or set-index pages.
- {{Ivory messagebox}}, a simple full-width box with default ivory background intended to frame important messages or notices.
Templates intended to be used in conjunction with Mboxes:
- {{Ombox/shortcut}}, an alternative to {{Shortcut}} for use in Mbox templates