Template:Message: Difference between revisions

From Imagisphere
Jump to navigation Jump to search
No edit summary
mNo edit summary
Line 1: Line 1:
<table class="msgbox" style="{{ #if: {{{border|}}} | border-color: {{{border}}}; | }} {{ #if: {{{background|}}} | background: {{{background}}}; | }} {{ #if: {{color|}}} | color: {{{color}}}; | }}"><tr><td class="msgboximg" style="min-width:{{{min-width|64}}px;">[[File:{{{image|Placeholder.png}}} | {{{pic-align|center}}} | {{{caption|Please, fix me!}}} | {{{iwidth|64}}}px]]</td><td>{{{text|'''Message template'''<br>Use the 'text' attribute to change what this message says! Consider fiddling with the other attributes to further customise it!}}}</td></tr></table>
<table class="msgbox" style="{{ #if: {{{border|}}} | border-color: {{{border}}}; | }} {{ #if: {{{background|}}} | background: {{{background}}}; | }} {{ #if: {{color|}}} | color: {{{color}}}; | }}"><tr><td class="msgboximg" style="min-width:{{{min-width|64}}px;">[[File:{{{image|Placeholder.png}}} | {{{pic-align|center}}} | {{{caption|Please, fix me!}}} | {{{iwidth|64}}}px]]</td><td>{{{text|'''Message template'''<br>Use the 'text' attribute to change what this message says! Consider fiddling with the other attributes to further customise it!}}}</td></tr></table><noinclude>
 
A handy little message box template. This makes it easier to create a bunch of other templates and messages that appear throughout the site, etc. Probably shouldn't be used on its own outside userpages.
<noinclude>
Message box template, mainly used to make it easier to create other templates like stubs, etc. Probably shouldn't be used on its own outside userpages.
==Usage==
==Usage==
<pre>
<nowiki>{{Message</nowiki>
{{Message
|text      =    Text to display in the box.
|text      =    Text to display in the box.
|image    =    Image to display in the box. (1:1 aspect ratio, resized to 64x64 by default, file name only; e.g. [[:File:Placeholder.png]] would be ''Placeholder.png'' only.
|image    =    Image to display in the box. (1:1 aspect ratio, resized to 64x64 by default, file name only; e.g. [[:File:Placeholder.png]] would be ''Placeholder.png'' only.
|imgwidth  =    Image width in pixels. Generally you'll want to keep this at 64.
|imgwidth  =    Image width in pixels. Generally you'll want to keep this at 64.
|caption  =    Sets a caption to display when hovering the cursor over the image.
|caption  =    Sets a caption to display when hovering the cursor over the image.
|border    =    Border color.
|border    =    Border color.
|background=    Background color.
|background=    Background color.
|color    =    Text color.
|textcolor =    Text color.
|min-width =    Minimum width to put the picture in
|min-width =    Minimum width to put the picture in
|pic-align =    Use ''left'', ''right'', or ''center'' to change the picture's alignment. This defaults to ''center''.
|pic-align =    Use ''left'', ''right'', or ''center'' to change the picture's alignment. This defaults to ''center''.
<nowiki>}}</nowiki>
}}
</pre>
[[Category:Templates]]
[[Category:Templates]]
</noinclude>
</noinclude>

Revision as of 02:32, 21 January 2021

Please, fix me!
Message template
Use the 'text' attribute to change what this message says! Consider fiddling with the other attributes to further customise it!

A handy little message box template. This makes it easier to create a bunch of other templates and messages that appear throughout the site, etc. Probably shouldn't be used on its own outside userpages.

Usage

{{Message
|text      =     Text to display in the box.
|image     =     Image to display in the box. (1:1 aspect ratio, resized to 64x64 by default, file name only; e.g. File:Placeholder.png would be Placeholder.png only.
|imgwidth  =     Image width in pixels. Generally you'll want to keep this at 64.
|caption   =     Sets a caption to display when hovering the cursor over the image.
|border    =     Border color.
|background=     Background color.
|color     =     Text color.
|min-width =     Minimum width to put the picture in
|pic-align =     Use left, right, or center to change the picture's alignment. This defaults to center.
}}