Template:Message box: Difference between revisions

From Modded Wiki
Jump to navigation Jump to search
m Undo revision 55228 by Wynthyst (talk)
m 96 revisions imported
 
(76 intermediate revisions by 9 users not shown)
Line 1: Line 1:
<includeonly><div style="{{msgbox/style|{{{type|normal}}} | bgcol = {{{bgcol|#FFFFCC}}} | linecol = {{{linecol|#616161}}} | width = {{{width|640px}}} }} {{{customcss|}}}"><!--
<includeonly><div
-->{{#if: {{{title|}}} | '''{{{title|}}}''' }}{{#if: {{{discuss|}}} | <sup>[[{{TALKPAGENAME}}|Discuss]]</sup> }}<!--
class="msgbox searchaux {{#if: {{{mini|{{{small|}}}}}} | msgbox-mini | }} {{
-->{{#if: {{{icon|}}} | {{CommentSprite| {{{icon}}} }}&nbsp; }}{{#if: {{{text|}}} | {{{title|}}}<br>{{{text}}} }}
  #switch: {{{type|}}}
</div></includeonly><noinclude>
  | style | display | presentation = msgbox-yellow
== Usage ==
  | minor | minor-issue | content | issue = msgbox-orange
=== Basic usage ===
  | major | major-issue | delete = msgbox-red
<pre>
  | organization | title | move = msgbox-purple
{{msgbox
  | details | parity | edition | upcoming = msgbox-blue
| title = This is a normal message box
  | notice | note | info = msgbox-green
| text = With helpful and descriptive subtext
  | other = msgbox-magenta
  | #default = {{#if: {{#pos: {{{class|}}} | msgbox- <!-- end pos -->}} || msgbox-gray <!-- end if -->}}
}} {{{class|}}}"
style="
  max-width: {{{width|{{#if: {{{mini|{{{small|}}}}}} | 50em | 90% }}}}};
  {{#if: {{{subtle|}}} | max-width: 300px; float: right; clear: both; flex-direction: column; font-size: 95%; }}
  {{#if: {{{bgcol|}}} | background: {{{bgcol}}}; | }}
  {{#if: {{{linecol|}}} | border-left: 4px solid {{{linecol}}}; | }}
  {{#if: {{{float|}}} | float: {{{float}}}; | }}
  {{{css|}}}
  "
>
<div id="msgbox-icon"> {{
  #if: {{{icon|}}}
    | <div id="msgbox-iconimage" style="{{{imagecss|}}}">
}}{{
  #if: {{{image|}}}{{{imagetextbefore|}}}{{{imagetextafter|}}}
  | <div id="msgbox-image" style="{{{imagecss|}}}">
}} {{{imagetextbefore|}}}{{
  #if: {{{icon|}}}
  | {{CommentSprite | {{{icon|}}} }}
}}{{
  #if:{{{image|}}}
  |{{
      #if: {{{imageisraw|}}}
      | {{{image}}}
      | [[File:{{{image}}}|{{#if: {{{imagesize|}}}| {{{imagesize}}}| {{#if: {{{mini|{{{small|}}}}}} | 16px | 32px }}}}|text-top]]
}}}}{{{imagetextafter|}}}{{
  #if: {{{icon|}}}
  | </div>
}}{{
  #if: {{{image|}}}{{{imagetextbefore|}}}{{{imagetextafter|}}}
  | </div>
}}
}}
</pre>
</div>
 
<div style="width: 100%;">{{
Will result in:
  #if: {{{title|}}}
{{msgbox| title = This is a normal message box | text = With helpful and descriptive subtext}}
  | '''{{{title}}}'''&nbsp;{{
 
    #if: {{{discuss|}}}{{{discussPage|}}}{{{discussAnchor|}}}
=== Mini usage ===
    | <sup>[<nowiki/>{{direct link|{{
<pre>
      #if: {{{discussPage|}}}
{{msgbox
      | {{{discussPage}}}
| type = mini
      | {{TALKPAGENAME}}
| icon = 8
    }}{{
| text = This is a mini message box with an information icon using [[Template:CommentSprite]]
      #if: {{{discussAnchor|}}}
      | &#35;{{{discussAnchor}}}
    }}|discuss}}</sup>
  }}
}}{{
  #if: {{{linkshere|}}}
  | <sup>{{#if:{{{discuss|}}}|, <nowiki/>|[<nowiki/>}}[[Special:WhatLinksHere/{{FULLPAGENAME}}|links]]{{#ifeq:{{NAMESPACENUMBER}}|6|, [[Special:GlobalUsage/{{PAGENAME}}|global usage]]}}<nowiki/>]</sup>
  | {{
    #if:{{{discuss|}}}
    |<sup>]</sup>
  }}
}}
}}
</pre>
{{
 
  #if: {{{text|}}}
Will result in:
  | <div id="msgbox-text">{{{text}}}</div>
{{msgbox| type = mini | icon = 8 | text = This is a mini message box with an information icon using [[Template:CommentSprite]]}}
 
=== Advanced usage ===
<pre>
{{msgbox
| type = normal
| bgcol = #eef
| linecol = #ddf
| title = This is a blue message box
| text = It has a discuss link, custom width and some custom CSS
| discuss = true
| width = 340px
| customcss = -moz-box-shadow: 0px 0px 6px #888; -webkit-box-shadow: 0px 0px 6px #888;
}}
}}
</pre>
</div>
 
</div>{{
Will result in:
  #if: {{{subtle|}}}
{{msgbox| type = normal | bgcol = #eef | linecol = #ddf | title = This is a blue message box | text = It has a discuss link, custom width and some custom CSS | discuss = true | width = 340px | customcss = -moz-box-shadow: 0px 0px 6px #888; -webkit-box-shadow: 0px 0px 6px #888;}}
  | <div class="mobileonly">{{-}}</div>
 
}}</includeonly><noinclude>
[[Category:Notice templates|M]]
{{documentation}}
<!-- Put categories/interwikis on the documentation page -->
</noinclude>
</noinclude>

Latest revision as of 11:33, 4 July 2024

[create] [refresh]Documentation
This template has no documentation. If you know how to use this template, please create it.