Template:Message box: Difference between revisions

From Modded Wiki
Jump to navigation Jump to search
added rudimentary icon support
let's not do the whole pre thing, honey
Line 1: Line 1:
<div style="{{msgbox/style|{{{type|normal}}} | bgcol = {{{bgcol|#FFFFCC}}} | linecol = {{{linecol|#616161}}} }} {{{css|}}}">
<div style="{{msgbox/style|{{{type|normal}}} | bgcol = {{{bgcol|#FFFFCC}}} | linecol = {{{linecol|#616161}}} }} {{{css|}}}">
{{#if: {{{icon|}}} | {{CommentSprite| {{{icon}}} }} }} {{#if: {{{title|}}} | '''{{{title|}}}''' }} {{#if: {{{discuss|}}} | <sup>[[{{TALKPAGENAME}}|Discuss]]</sup> }}
{{#if: {{{icon|}}} | {{CommentSprite| {{{icon}}} }} }}{{#if: {{{title|}}} | '''{{{title|}}}''' }}{{#if: {{{discuss|}}} | <sup>[[{{TALKPAGENAME}}|Discuss]]</sup> }}
{{#if: {{{text|}}} |<br />{{{text}}} }}
{{#if: {{{text|}}} |<br />{{{text}}} }}
</div><noinclude>
</div><noinclude>

Revision as of 18:10, 12 February 2011


Usage

Basic usage

{{msgbox
| title = This is a normal message box
| text = With helpful and descriptive subtext
}}

Will result in:

This is a normal message box
With helpful and descriptive subtext

Mini usage

{{msgbox
| type = mini
| icon = 8
| title = This is a mini message box with an information icon using [[Template:CommentSprite]]
}}

Will result in:

Template:CommentSpriteThis is a mini message box with an information icon using Template:CommentSprite

Advanced usage

{{msgbox
| type = normal
| bgcol = #eef
| linecol = #ddf
| title = This is a blue message box
| text = It has a discuss link and custom CSS
| discuss = true
| css = width: 320px; font-size: x-large;
}}

Will result in:

This is a blue message boxDiscuss
It has a discuss link and custom width