Template:MessageBox: Difference between revisions

From Structorica Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 71: Line 71:
=== Documentation ===
=== Documentation ===


==== Parameters ====
* '''discuss''' - Adds a [discuss] button that links to the talk page
* '''discussPage''' - Custom talk page link for the discuss button
* '''discussAnchor''' - Specific section anchor for the discuss link
* '''linkshere''' - Adds a [links] button to Special:WhatLinksHere


==== Examples ====
== Usage ==
<syntaxhighlight lang="wikitext">{{Message box
| mini = Mini mode
| small = Mini mode
| subtle = Subtle mode
| class = Classes for the template
| type = Notice type
| bgcol = Custom background color
| linecol = Custom line color
| width = Custom width
| float = Custom alignment
| icon = Icon from Template:CommentSprite
| imagecss = Custom image CSS
| image = Extra image
| imagetextbefore = Text before the image
| imagetextafter = Text after the image
| imagesize = Image size
| imageclass = Image class
| dolinkimage = Whether the image links to its file page (usually unnecessary, defaults to no link)
| title = Template title
| discuss = Discuss button
| discussPage = Talk page link
| discussAnchor = Talk page section specification
| linkshere = Links button to Special:WhatLinksHere
| text = Template text
| css = Custom CSS
}}</syntaxhighlight>
 
== Examples ==
<syntaxhighlight lang="wikitext">
<syntaxhighlight lang="wikitext">
{{MessageBox
{{MessageBox
Line 129: Line 152:
| title = Major content issue
| title = Major content issue
| text = This article contains significant problems including outdated information, broken links, and inaccurate gameplay mechanics descriptions.
| text = This article contains significant problems including outdated information, broken links, and inaccurate gameplay mechanics descriptions.
}}
}}
</syntaxhighlight>
</syntaxhighlight>
Line 146: Line 168:




---
<syntaxhighlight lang="wikitext">
{{MessageBox
| type = notice
| title = Template usage
| linkshere = 1
| text = This template is used in several places across the wiki.
}}
</syntaxhighlight>
{{MessageBox
| type = notice
| title = Template usage
| linkshere = 1
| text = This template is used in several places across the wiki.
}}


---
---
Line 153: Line 191:
|| mini = 1
|| mini = 1
|| icon = 8
|| icon = 8
|| discuss = 1
|| bgcol = rgba(255, 235, 59, 0.1)
|| bgcol = rgba(255, 235, 59, 0.1)
|| linecol = rgba(255, 235, 59, 0.3)
|| linecol = rgba(255, 235, 59, 0.3)
Line 164: Line 201:
| mini = 1
| mini = 1
| icon = 8
| icon = 8
| discuss = 1
| bgcol = rgba(255, 235, 59, 0.1)
| bgcol = rgba(255, 235, 59, 0.1)
| linecol = rgba(255, 235, 59, 0.3)
| linecol = rgba(255, 235, 59, 0.3)
Line 191: Line 227:
| text = Content issue detected: This article may contain outdated information. Please verify with latest game version.
| text = Content issue detected: This article may contain outdated information. Please verify with latest game version.
}}
}}
---
 
<syntaxhighlight lang="wikitext">
== Sources ==
{{MessageBox
 
| type = notice
This template is a fork of [https://minecraft.wiki/w/Template:message_box Minecraft Wiki's message_box template] and is quite complex in its implementation.
| title = Template Usage
 
| linkshere = 1
This template is used for creating local informational messages. In most cases, it is recommended to use standalone templates created based on it rather than using MessageBox directly. Styles are described on the MediaWiki:Common.css page.
| text = This template is used in several places across the wiki.
 
}}
</syntaxhighlight>
{{MessageBox
| type = notice
| title = Template Usage
| linkshere = 1
| text = This template is used in several places across the wiki.
}}


[[Category:Notice templates]]
[[Category:Notice templates]]

Revision as of 16:19, 15 January 2026

Documentation

Usage

{{Message box
| mini = Mini mode
| small = Mini mode
| subtle = Subtle mode
| class = Classes for the template
| type = Notice type
| bgcol = Custom background color
| linecol = Custom line color
| width = Custom width
| float = Custom alignment
| icon = Icon from Template:CommentSprite
| imagecss = Custom image CSS
| image = Extra image
| imagetextbefore = Text before the image
| imagetextafter = Text after the image
| imagesize = Image size
| imageclass = Image class
| dolinkimage = Whether the image links to its file page (usually unnecessary, defaults to no link)
| title = Template title
| discuss = Discuss button
| discussPage = Talk page link
| discussAnchor = Talk page section specification
| linkshere = Links button to Special:WhatLinksHere
| text = Template text
| css = Custom CSS
}}

Examples

{{MessageBox
| type = minor
| title = Minor edit notice
| text = This page contains minor formatting improvements and spelling corrections. No major content changes were made.
}}
Minor edit notice
 
This page contains minor formatting improvements and spelling corrections. No major content changes were made.

---

{{MessageBox
| type = delete
| mini = 1
| icon = 8
| text = This page has been nominated for deletion due to lack of content. Please review and vote.
}}
This page has been nominated for deletion due to lack of content. Please review and vote.

---

{{MessageBox
| type = info
| small = 1
| icon = 8
| text = Important information: Server maintenance scheduled for tonight from 2 AM to 4 AM UTC.
}}
Important information: Server maintenance scheduled for tonight from 2 AM to 4 AM UTC.

---

{{MessageBox
| type = major
| subtle = 1
| discuss = 1
| title = Major content issue
| text = This article contains significant problems including outdated information, broken links, and inaccurate gameplay mechanics descriptions.
}}
Major content issue
 [discuss]
This article contains significant problems including outdated information, broken links, and inaccurate gameplay mechanics descriptions.





---

{{MessageBox
| type = notice
| title = Template usage
| linkshere = 1
| text = This template is used in several places across the wiki.
}}
Template usage
 [links]
This template is used in several places across the wiki.

---

{{MessageBox
|| type = notice
|| mini = 1
|| icon = 8
|| bgcol = rgba(255, 235, 59, 0.1)
|| linecol = rgba(255, 235, 59, 0.3)
|| css = border-radius: 8px; font-style: italic;
|| text = Notice: The wiki will be temporarily unavailable during the server migration next weekend.
}}
Notice: The wiki will be temporarily unavailable during the server migration next weekend.

---

{{MessageBox
| type = issue
| small = 1
| icon = 8
| bgcol = rgba(255, 87, 34, 0.1)
| linecol = rgba(255, 87, 34, 0.3)
| css = box-shadow: 0 2px 8px rgba(255, 87, 34, 0.2);
| text = Content issue detected: This article may contain outdated information. Please verify with latest game version.
}}
Content issue detected: This article may contain outdated information. Please verify with latest game version.

Sources

This template is a fork of Minecraft Wiki's message_box template and is quite complex in its implementation.

This template is used for creating local informational messages. In most cases, it is recommended to use standalone templates created based on it rather than using MessageBox directly. Styles are described on the MediaWiki:Common.css page.