Template:Mbox: Difference between revisions

From PZwiki
(new mbox)
 
(doc: added protection notice)
(13 intermediate revisions by 4 users not shown)
Line 1: Line 1:
<noinclude>
<noinclude>
{{Documentation/sandbox|doc =
{{Documentation/sandbox|doc =
This template is used to create a {{Abbr|mbox|message box}}.
{{Protection}}
This template is used to create a collapsible {{ll|PZwiki:Mboxes|mbox}}.


Do not use this template directly, instead use one of the types listed [[#Types|below]].
This is a [[mw:Manual:Collapsible elements|collapsible element]]. You can toggle it by clicking the "◥" sign on the top-right corner.
 
When collapsed, the image, content and note will be hidden, only the title will be displayed.


==Usage==
==Usage==
Do not use this template directly, use one of the types listed in {{ll|PZwiki:Mboxes}} instead.
===Syntax===
<pre>
<pre>
{{Mbox
{{Mbox
| background = background color
| background =  
| color = left bar colors
| color =  
| sign = image (collapsible)
| sign =  
| title = title
| title =  
| content = normal text (collapsible)
| content =  
| note = bottom text (collapsible)
| note =  
| cat = category name, omit 'Category:'
| cat =  
| id = id for each Mbox
| id =  
| collapsed = initial state
| collapsed =  
}}
}}
</pre>
</pre>
===Example===
 
===Parameters===
;<code>background</code>
:Background color. Default to <code>#f8f9fa</code>.
;<code>color</code>
:Left bar color. Default to <code>#eaecf0</code>.
;<code>sign</code>
:Mbox image. Default to <code><nowiki>[[File:Imbox content.png|link=]]</nowiki></code>.
;<code>title</code>
:Mbox title. Displayed in bold and large font.
;<code>content</code>
:Normal text.
;<code>note</code>
:Bottom text. Displayed in italic and small font.
;<code>cat</code>
:Category name, omit <code>Category:</code> prefix.
;<code>id</code>
:Id for each Mbox to collapse the content. Should be unique. Recommended to use the template name. The mbox will not be collapsible if not specified.
;<code>collapsed</code>
:Initial state of the content. Will be collapsed if set to <code>true</code>. Only works when <code>id</code> is specified.
 
==Example==
<pre>
{{Mbox
{{Mbox
| background = #f8f9fa
| color = #f28500
| sign = [[File:Imbox content.png|link=]]
| title = This is an Mbox.
| title = This is an Mbox.
| content = This is content of the Mbox.
| content = This is content of the Mbox.
| note = This is a note of the Mbox.
| note = This is a note of the Mbox.
| id = mbox
| id = example
| collapsed = true
| collapsed = true
}}
}}
==Types==
</pre>
===Delete===
{{Mbox
{{Mbox
| background = #ffeeee
| title = This is an Mbox.
| color = #b22222
| content = This is content of the Mbox.
| sign = [[File:Imbox deletion.png|link=]]
| note = This is a note of the Mbox.
| title = This page is a candidate for deletion.
| id = example
| content = Reason: ...
| collapsed = true
| note = This page (and any subpages) will be deleted if '''1 week''' after this notice was added and no one has objected to its deletion. Users may discuss this request for speedy deletion on the page's [[{{TALKPAGENAME}}|talk page]].
| cat = <!-- Pages requested for deletion -->
| id = delmbox
}}
===Deprecated===
{{Mbox
| color = #f28500
| sign = [[File:Imbox content.png|link=]]
| title = This template is [[Help:Deprecation|deprecated]].
| content = Please use ... instead.
| note = This template will eventually be removed.
| cat = <!-- Deprecated templates -->
| id = depmbox
}}
===Future===
{{Mbox
| color = #ff00aa
| sign = [[File:PictureKate.png|link=]]
| title = This is a future feature.
| content = This article/section is about an item or mechanic that is currently '''unimplemented''' and planned for Build xx.
| note = It has either been previewed or found in the game files and does not exist yet.
| cat = <!-- Future -->
| id = futmbox
}}
===Improve===
{{Mbox
| color = #f4c430
| sign = [[File:WhiskeyHalf.png|link=]]
| title = This article/section may be in need of improvement.
| content = Editors are encouraged to add any missing information to the article, while verifying that the article's current content is correct.
| cat = <!-- Articles in need of improvement -->
| id = impmbox
}}
===Maintenance===
{{Mbox
| color = #f28500
| sign = [[File:NailsBox.png|link=]]
| title = This page has recently undergone maintenance.
| content = There could have potentially broken parts of the page. If you notice any issues, we'd appreciate it if you reported them on the [[PZwiki:Community portal|community portal]].
| id = mainmbox
}}
===Merge===
{{Mbox
| color = #9932cc
| sign = [[File:Furniture Pickup.png|link=]]
| title = It has been suggested that this article be merged with xxx.
| content = Reason: ...
| cat = <!-- Articles to be merged -->
| id = mergmbox
}}
===Move===
{{Mbox
| color = #9932cc
| sign = [[File:Furniture Pickup.png|link=]]
| title = It has been suggested that this article be moved to xxx.
| content = Reason: ...
| cat = <!-- Articles to be moved -->
| id = movembox
}}
===Obsolete===
{{Mbox
| color = #f28500
| sign = [[File:BoxSmall.png|40px|link=]]
| title = This item or feature is obsolete.
| content = It has been removed from the game or replaced by something else.
| cat = <!-- Obsolete items -->
| id = obsmbox
}}
===Outdated===
{{Mbox
| color = #00ffaa
| sign = [[File:AppleRotten.png|link=]]
| title = This article/section may be outdated.
| content = Editors are encouraged to update this article/section with new information.
| cat = <!-- Outdated articles -->
| id = outmbox
}}
===Protection===
{{Mbox
| color = #bbbbaa
| sign = [[File:Lock-locked.png|link=]]
| title = This page has been put into protection by a PZwiki [[PZwiki:Administrators|administrator]].
| content = Reason: xxx.
| id = protmbox
}}
===Reupload===
{{Mbox
| color = #1e90ff
| sign = [[File:Frame.png|link=]]
| title = This article contains outdated/low-quality [[Help:Images|images]].
| content = Please help the PZwiki by [[Special:Upload|uploading]] an improved/updated version of the image(s) found on this page.
| cat = <!-- Images in need of improvement -->
| id = reupmbox
}}
===Spoiler===
{{Mbox
| color = #ff6666
| sign = [[File:Pillow.png|link=]]
| title = SPOILER WARNING!!!
| content = This section is likely to contain major spoilers pertaining to the story of Project Zomboid.
| id = spolmbox
}}
===Stub===
{{Mbox
| color = #00aaff
| sign = [[File:Notebook.png|link=]]
| title = This article/section may need more content.
| content = Editors are encouraged to add new material to the page while expanding upon current topics.
| cat = <!-- Stub articles -->
| id = stubmbox
}}
===Testing===
{{Mbox
| color = #ff00aa
| sign = [[File:Profession engineer.png|40px|link=]]
| title = This is a testing feature.
| content = This article/section is about an item or mechanic that is currently in '''testing''' and not part of the stable version of the game.
| note = This feature can be accessed via the testing branch for xxx.
| cat = <!-- Testing -->
| id = testmbox
}}
===Translate===
{{Mbox
| color = #f4c430
| sign = [[File:Translation icon.png|link=]]
| title = This article/section needs to be translated.
| content = Editors are encouraged to translate this page to the best of their ability.
| cat = <!-- Translation needed -->
| id = transmbox
}}
===WIP===
{{Mbox
| color = #ee0000
| sign = [[File:Hammer.png|link=]]
| title = This article or section is currently under construction.
| content = It is in the process of an expansion or major restructuring. You are welcome to assist in its construction by editing it as well.
| note = If this page has not been updated in a while, please remove this notice. Last edit was xx/xx/xx.
| cat = <!-- WIP articles -->
| id = wipmbox
}}
===Unverified===
{{Mbox
| color = #ee0000
| sign = [[File:CandleLit.png|link=]]
| title = This article may have claims which require verification.
| content = Editors should verify the article's current content and, while adding content, check new information.
| cat = <!-- Articles require verification -->
| id = unvembox
}}
}}


{{Translation guide}}
{{Translation guide}}
==See also==
*{{ll|PZwiki:Mboxes}}
==Attribution==
*[https://oxygennotincluded.fandom.com/zh/wiki/Template:%E9%80%9A%E7%9F%A5%E6%A1%86 Mbox on Chinese Oxygen Not Included Wiki]
}}
}}
{{ll|Category:Metatemplates}}
{{ll|Category:Metatemplates}}
</noinclude><includeonly><div class="mbox" {{#if:{{{background|}}}|style="background-color: {{{background}}};"}}>{{#if:{{{cat|}}}|{{ll|Category:{{{cat}}}}}}}
{{ll|Category:Mbox}}
</noinclude><includeonly><div class="mbox" {{#if:{{{background|}}}|style="background-color: {{{background}}};"}}>
   <div {{#if:{{{color|}}}|style="background-color: {{{color}}};"}}></div>
   <div {{#if:{{{color|}}}|style="background-color: {{{color}}};"}}></div>
   <div class="mw-collapsible {{#if:{{{collapsed|}}}|mw-collapsed}}" id="mw-customcollapsible-{{#if:{{{id|}}}|{{{id}}}|mbox}}">{{#if:{{{sign|}}}|{{{sign}}}|[[File:Imbox content.png|link=]]}}</div>
   <div {{#if:{{{id|}}}
   <div class="mbox-toggle mw-customtoggle-{{#if:{{{id|}}}|{{{id}}}|mbox}}" title="toggle"></div>
    | class="mw-collapsible {{yesno|{{{collapsed|}}}|yes=mw-collapsed|def=[[Category:Incorrect template usage]]}}" id="mw-customcollapsible-mbox-{{{id}}}"
    }}>{{#if:{{{sign|}}}|{{{sign}}}|[[File:Imbox content.png|link=]]}}</div>
   {{#if:{{{id|}}}
  | <div class="toggle mw-customtoggle-mbox-{{{id}}}" title="{{int:show}}/{{int:hide}}"></div>
  }}
   <div>
   <div>
     <div style="font-size: 120%; font-weight: bold;">{{#if:{{{title|}}}|{{{title}}}|Mbox title.}}</div>
     {{#if:{{{title|}}}
     <div class="mw-collapsible {{#if:{{{collapsed|}}}|mw-collapsed}}" id="mw-customcollapsible-{{#if:{{{id|}}}|{{{id}}}|mbox}}">{{#if:{{{content|}}}|{{{content}}}|Mbox content.}}</div>
    | <div style="font-size: 120%; font-weight: bold; padding-right: 1em;">{{{title}}}</div>
    }}
     <div {{#if:{{{id|}}}
      | class="mw-collapsible {{yesno|{{{collapsed|}}}|yes=mw-collapsed|def=}}" id="mw-customcollapsible-mbox-{{{id}}}"
      }}>{{#if:{{{content|}}}|{{{content}}}}}</div>
     {{#if: {{{note|}}}
     {{#if: {{{note|}}}
     | <div class="mw-collapsible {{#if:{{{collapsed|}}}|mw-collapsed}}" id="mw-customcollapsible-{{#if:{{{id|}}}|{{{id}}}|mbox}}" style="font-size: 80%; font-style: italic;">{{{note}}}</div>
     | <div {{#if:{{{id|}}}
        | class="mw-collapsible {{yesno|{{{collapsed|}}}|yes=mw-collapsed|def=}}" id="mw-customcollapsible-mbox-{{{id}}}"
        }} style="font-size: 80%; font-style: italic;">{{{note}}}</div>
     }}
     }}
   </div>
   </div>
</div></includeonly>
</div>{{#if:{{{cat|}}}|[[Category:{{{cat}}}]]}}</includeonly>

Revision as of 02:07, 10 February 2024

Notebook.pngTemplate Documentation
Lock-locked.png
This page has been put into protection by a PZwiki administrator.
Only users in the sysop user group may edit this page.

This template is used to create a collapsible mbox.

This is a collapsible element. You can toggle it by clicking the "◥" sign on the top-right corner.

When collapsed, the image, content and note will be hidden, only the title will be displayed.

Usage

Do not use this template directly, use one of the types listed in PZwiki:Mboxes instead.

Syntax

{{Mbox
| background = 
| color = 
| sign = 
| title = 
| content = 
| note = 
| cat = 
| id = 
| collapsed = 
}}

Parameters

background
Background color. Default to #f8f9fa.
color
Left bar color. Default to #eaecf0.
sign
Mbox image. Default to [[File:Imbox content.png|link=]].
title
Mbox title. Displayed in bold and large font.
content
Normal text.
note
Bottom text. Displayed in italic and small font.
cat
Category name, omit Category: prefix.
id
Id for each Mbox to collapse the content. Should be unique. Recommended to use the template name. The mbox will not be collapsible if not specified.
collapsed
Initial state of the content. Will be collapsed if set to true. Only works when id is specified.

Example

{{Mbox
| title = This is an Mbox.
| content = This is content of the Mbox.
| note = This is a note of the Mbox.
| id = example
| collapsed = true
}}
Imbox content.png
This is an Mbox.
This is content of the Mbox.
This is a note of the Mbox.

How to translate

This template doesn't need to/shouldn't be translated, but you can translate the documentation of this template with the following steps:

  1. Create a subpage of this template with the language code of the language you want to translate to.
  2. Copy the code wrapped in the <noinclude> tag in this template into the page you created.
    {{Translation guide}} template should be removed from the translated documentation.
  3. Translate the page according to the translation requirements of normal pages.

See also

Attribution

Editors can experiment in this template's sandbox.