Difference between revisions of "Template:DYK mbox"
imported>John Cline (add file) |
imported>John Cline (ce code) |
||
| Line 1: | Line 1: | ||
{{{{{|safesubst:}}}#switch:{{{1}}} | {{{{{|safesubst:}}}#switch:{{{1}}} | ||
| user | | user | ||
| − | | #default=<includeonly>{{#if:{{{olb|}}}|<br />|}}{{#ifeq:{{{small|}}}||{{#ifeq:{{NAMESPACE}}|Template|<table class="{{#if:{{{table class|}}}|{{{table class}}}|plainlinks ombox dykbox-notice" style=" | + | | #default=<includeonly>{{#if:{{{olb|}}}|<br />|}}{{#ifeq:{{{small|}}}||{{#ifeq:{{NAMESPACE}}|Template|<table class="{{#if:{{{table class|}}}|{{{table class}}}|plainlinks ombox dykbox-notice" style="{{{table style|}}}">}} |
| − | + | {{{th|}}}{{{tr|<tr>}}}{{{td|<td class="mbox-image">}}}{{#ifeq:{{{xfile|}}}||{{{file|[[File:Updated DYK query.svg|40x40px|link=http://en.wikipedia.org/wiki/Wikipedia:DYK|alt=DYK question mark icon]]}}}</td><td class="mbox-text" style="{{{td style|}}}">{{{text|{{{1|}}}}}}</td>{{#if:{{{file2|}}}|<td><span style="float:right">{{{file2}}}</span></td>|}}</tr></table>{{{cats|}}}{{#if:{{{clb|}}}|<br />|}}|{{#if:{{{solb|}}}|<br />|}}<table class="plainlinks ombox mbox-small dykbox-notice"><tr><td class="mbox-image">{{#ifeq:{{{sxfile|}}}||{{#if:{{{sfile|}}}|{{{sfile}}}|[[File:Updated DYK query.svg|29x29px|link=http://en.wikipedia.org/wiki/Wikipedia:DYK|alt=DYK question mark icon]]|}}}}</td> | |
| − | + | <td class="mbox-text">{{{stext}}}</td>{{#if:{{{sfile2|}}}|<td><span style="float:right">{{{sfile2}}}</span></td>}}</tr></table>{{{scat|}}}}}{{#if:{{{sclb|}}}|<br />|}}|{{#if:{{{solb|}}}|<br />|}}<table class="plainlinks ombox mbox-small dykbox-notice"><tr><td class="mbox-image">{{#ifeq:{{{sxfile|}}}||{{#if:{{{sfile|}}}|{{{sfile}}}|[[File:Updated DYK query.svg|29x29px|link=http://en.wikipedia.org/wiki/Wikipedia:DYK|alt=DYK question mark icon]]|}}}}</td><td class="mbox-text">{{{stext|}}}</td>{{#if:{{{sfile2|}}}|<td><span style="float:right">{{{sfile2}}}</span></td>}}</tr></table>{{{scat|}}}}}{{#if:{{{sclb|}}}|<br />|}}</includeonly> | |
| − | <tr><td class="mbox-image">{{#ifeq:{{{sxfile|}}}||{{#if:{{{sfile|}}}|{{{sfile}}}|[[File:Updated DYK query.svg|29x29px|link=http://en.wikipedia.org/wiki/Wikipedia:DYK|alt=DYK question mark icon]]|}}}}</td> | ||
| − | <td class="mbox-text">{{{stext}}}</td>{{#if:{{{sfile2|}}}|<td><span style="float:right">{{{sfile2}}}</span></td>}}</tr></table>{{{scat|}}}}}{{#if:{{{sclb|}}}|<br />|}}|{{#if:{{{solb|}}}|<br />|}}<table class="plainlinks ombox mbox-small dykbox-notice"> | ||
| − | <tr><td class="mbox-image">{{#ifeq:{{{sxfile|}}}||{{#if:{{{sfile|}}}|{{{sfile}}}|[[File:Updated DYK query.svg|29x29px|link=http://en.wikipedia.org/wiki/Wikipedia:DYK|alt=DYK question mark icon]]|}}}}</td> | ||
| − | <td class="mbox-text">{{{stext}}}</td>{{#if:{{{sfile2|}}}|<td><span style="float:right">{{{sfile2}}}</span></td>}}</tr></table>{{{scat|}}}}}{{#if:{{{sclb|}}}|<br />|}}</includeonly> | ||
| r= | | r= | ||
Revision as of 01:44, 17 February 2013
{{DYK mbox}} is a messaging utility template for posting messages related to Did you know
operations. It also supports other templates, internally—to facilitate interactive ease of use, on special pages, and editing scripts, used for the administration of Did you know
.
Template {{DYK mbox}}
This template was developed for the specialized needs of Did you know
.
Usage
Either the basic syntax, {{DYK mbox}} or the shortcut, {{DYKM}} will produce:
{{safesubst:#switch:{{{1}}}
| user| #default=
You can either use {{DYKM|text=Inserts your custom message.}}, or default through the unnamed parameter switch, {{DYKM|Inserts your custom message.}} to produce the following:
{{safesubst:#switch:{{{1}}}
| user| #default=
| Inserts your custom message. |
You can use |xfile= to eliminate the image; the text floats to the left margin, and the box only grows as large as the included text; {{DYKM|xfile=true}} is shown below:
{{safesubst:#switch:text
| user| #default=
{{safesubst:#switch:text | user| #default=
{{safesubst:#switch:{{{1}}} | user | #default=r=
ExamplesCustom messaging examples are included as expandable content. See also
|