Difference between revisions of "Template:DYK mbox"
imported>John Cline (remove extraneous to /doc per WP:DOC) |
imported>WOSlinker (https) |
||
| (32 intermediate revisions by 3 users not shown) | |||
| Line 2: | Line 2: | ||
| user | | user | ||
| #default= | | #default= | ||
| − | + | {{#ifeq:{{{small|}}}||{{#if:{{{olb|}}}|<br />|}}<table class="{{{table class|plainlinks ombox dykbox-notice}}}" style="{{{table style|}}}">{{{th|}}}{{{tr|<tr>}}}{{#ifeq:{{{xfile|}}}||<td class="{{{td class|mbox-image}}}">{{{file|[[File:DYK questionmark icon.svg|{{{px|22}}}x{{{px|22}}}px|link={{{link|https://en.wikipedia.org/wiki/Wikipedia:DYK}}}|alt={{{alt|DYK review icon}}}]]}}}</td><td class="{{{td class2|mbox-text}}}" style="{{{td style|}}}">{{{1|{{{text|}}}}}}</td>{{#if:{{{file2|}}}|<td><span style="float:right">{{{file2}}}</span></td>|}}</tr></table>{{{cats|}}}{{#if:{{{clb|}}}|<br />|}}|<td class="{{{td class2|mbox-text}}}" style="{{{td style|}}}">{{{1|{{{text|}}}}}}</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">{{{sth|}}}{{{str|<tr>}}}{{#ifeq:{{{sxfile|}}}||<td class="mbox-image">{{{sfile|[[File:DYK questionmark icon.svg|20x20px|link=Wikipedia:DYK|alt=DYK question mark icon]]}}}</td><td class="mbox-text">{{{1|{{{stext|}}}}}}</td>{{#if:{{{sfile2|}}}|<td><span style="float:right">{{{sfile2}}}</span></td>|}}</tr></table>{{{scat|}}}{{#if:{{{sclb|}}}|<br />|}}|<td class="mbox-text">{{{1|{{{stext|}}}}}}</td>{{#if:{{{sfile2|}}}|<td><span style="float:right">{{{sfile2}}}</span></td>|}}</tr></table>{{{scat|}}}{{#if:{{{sclb|}}}|<br />|}}}}}} | |
| − | + | ||
| − | + | | r= | |
| − | + | ||
| − | < | + | <table class="plainlinks ombox dykbox-notice">{{{th|}}}{{#if:{{{tr|}}}|{{{tr}}}|<tr>}}{{#ifeq:{{{righ|}}}|t|<td class="mbox-image">[[File:Updated DYK query.svg|40x40px|link=https://en.wikipedia.org/wiki/Wikipedia:DYK|alt=DYK question mark icon]]</td><td class="mbox-text">{{{text}}}</td>|<td class="mbox-text">{{{text}}}</td>}}</tr></table> |
| − | + | ||
| − | + | | Srow =<table class="plainlinks ombox dykbox-notice"><tr><td class="mbox-image">{{#if:{{{file|}}}|{{{file}}}|[[File:Updated DYK query.svg|{{#if:{{{px|}}}|{{{px}}}x{{{px}}}px|40x40px}}|link=|alt=]]}}</td><td class="mbox-text">{{{text}}}</td></tr></table> | |
| − | + | ||
| − | + | | Drow =<table class="plainlinks ombox dykbox-notice"><tr><td class="mbox-image">[[File:Updated DYK query.svg|40x40px|link=|alt=]]</td><td class="mbox-text">{{{text}}}</td></tr></table><table class="plainlinks ombox dykbox-notice"><tr><td class="mbox-image">[[File:Updated DYK query.svg|40x40px|link=|alt=]]</td><td class="mbox-text">{{{text2}}}</td></tr></table> | |
| − | | | + | |
| − | <table class="plainlinks ombox dykbox-notice"><tr><td class="mbox-image">[[File: | + | | SDrow =<table class="plainlinks ombox dykbox-notice"><tr><td class="mbox-image">[[File:Updated DYK query.svg|40x40px|link=|alt=]]<br />[[File:Updated DYK query.svg|40x40px|link=|alt=]]</td><td class="mbox-text">{{{text}}}</td></tr><tr></table> |
| − | + | ||
| − | + | | Trow =<table class="plainlinks ombox dykbox-notice"><tr><td class="mbox-image">[[File:Updated DYK query.svg|40x40px|link=|alt=]]</td><td class="mbox-text">{{{text}}}</td></tr></table><table class="plainlinks ombox dykbox-notice"><tr><td class="mbox-image">[[File:Updated DYK query.svg|40x40px|link=|alt=]]</td><td class="mbox-text">{{{text2}}}</td></tr></table><table class="plainlinks ombox dykbox-notice"><tr><td class="mbox-image">[[File:Updated DYK query.svg|40x40px|link=|alt=]]</td><td class="mbox-text">{{{text3}}}</td></tr></table> | |
| − | | | + | |
| − | <table class="plainlinks ombox dykbox-notice"><tr><td class="mbox-image">[[File: | + | | STrow =<table class="plainlinks ombox dykbox-notice"><tr><td class="mbox-image">[[File:Updated DYK query.svg|40x40px|link=|alt=]]<br />[[File:Updated DYK query.svg|40x40px|link=|alt=]]<br />[[File:Updated DYK query.svg|40x40px|link=|alt=]]</td><td class="mbox-text">{{{text}}}</td></tr></table> |
| − | + | ||
| − | <table class="plainlinks ombox dykbox-notice"><tr><td class="mbox-image">[[File: | + | | Qrow =<table class="plainlinks ombox dykbox-notice"><tr><td class="mbox-image">[[File:Updated DYK query.svg|40x40px|link=|alt=]]</td><td class="mbox-text">{{{text}}}</td></tr></table><table class="plainlinks ombox dykbox-notice"><tr><td class="mbox-image">[[File:Updated DYK query.svg|40x40px|link=|alt=]]</td><td class="mbox-text">{{{text2}}}</td></tr></table><table class="plainlinks ombox dykbox-notice"><tr><td class="mbox-image">[[File:Updated DYK query.svg|40x40px|link=|alt=]]</td><td class="mbox-text">{{{text3}}}</td></tr></table><table class="plainlinks ombox dykbox-notice"><tr><td class="mbox-image">[[File:Updated DYK query.svg|40x40px|link=|alt=]]</td><td class="mbox-text">{{{text4}}}</td></tr></table> |
| − | | | + | |
| − | <table class=" | + | | SQrow =<table class="plainlinks ombox dykbox-notice"><tr><td class="mbox-image">[[File:Updated DYK query.svg|40x40px|link=|alt=]]<br />[[File:Updated DYK query.svg|40x40px|link=|alt=]]<br />[[File:Updated DYK query.svg|40x40px|link=|alt=]]<br />[[File:Updated DYK query.svg|40x40px|link=|alt=]]</td><td class="mbox-text">{{{text}}}</td></tr></table> |
| − | + | ||
| − | + | | box2 =<table class="{{#if:{{{table class|}}}|{{{table class}}}|plainlinks ombox dykbox-notice}}" style="{{#if:{{{table style|}}}|{{{table style}}}|}}">{{#if:{{{th|}}}|{{{th}}}|}}{{#if:{{{tr|}}}|{{{tr}}}|<tr>}}{{#if:{{{td|}}}|{{{td}}}|<td class="mbox-image">{{#if:{{{file|}}}|[[File:{{{file}}}|{{#if:{{{px|}}}|{{{px}}}x{{{px}}}px|67x67px}}|{{#if:{{{link|}}}|link={{{link}}}|link=}}|{{#if:{{{alt|}}}|alt={{{alt}}}|alt=}}]]|[[File:Updated DYK query.svg|67x67px|link=|alt=]]}}</td><td class="mbox-text" style="{{#if:{{{td style|}}}|{{{td style}}}|}}">{{{text}}}</td>}}{{#if:{{{file2|}}}|<td><span style="float:right">{{{file2}}}</span></td>|}}</tr></table> | |
| − | + | ||
| − | + | | box3 =<table class="{{#if:{{{table class|}}}|{{{table class}}}|plainlinks ombox dykbox-notice}}" style="{{#if:{{{table style|}}}|{{{table style}}}|}}">{{#if:{{{th|}}}|{{{th}}}|}}{{#if:{{{tr|}}}|{{{tr}}}|<tr>}}{{#if:{{{td|}}}|{{{td}}}|<td class="mbox-image">{{#if:{{{file|}}}|[[File:{{{file}}}|{{#if:{{{px|}}}|{{{px}}}x{{{px}}}px|120x120px}}|{{#if:{{{link|}}}|link={{{link}}}|link=}}|{{#if:{{{alt|}}}|alt={{{alt}}}|alt=}}]]|[[File:Updated DYK query.svg|100x100px|link=https://en.wikipedia.org/wiki/Wikipedia:DYK|alt=]]}}</td><td class="mbox-text" style="{{#if:{{{td style|}}}|{{{td style}}}|}}">{{{text}}}</td>}}{{#if:{{{file2|}}}|<td><span style="float:right">{{{file2}}}</span></td>|}}</tr></table> | |
| − | + | ||
| − | + | | box4 =<table class="{{#if:{{{table class|}}}|{{{table class}}}|plainlinks ombox dykbox-notice}}" style="{{#if:{{{table style|}}}|{{{table style}}}|}}">{{#if:{{{th|}}}|{{{th}}}|}}{{#if:{{{tr|}}}|{{{tr}}}|<tr>}}{{#if:{{{td|}}}|{{{td}}}|<td class="mbox-image">{{#if:{{{file|}}}|[[File:{{{file}}}|{{#if:{{{px|}}}|{{{px}}}x{{{px}}}px|48x48px}}|{{#if:{{{link|}}}|link={{{link}}}|link=}}|{{#if:{{{alt|}}}|alt={{{alt}}}|alt=}}]]|[[File:Updated DYK query.svg|48x48px|link=|alt=]]}}</td><td class="mbox-text" style="{{#if:{{{td style|}}}|{{{td style}}}|}}">{{{text}}}</td>}}{{#if:{{{file2|}}}|<td><span style="float:right">{{{file2}}}</span></td>|<td><span style="float:right">[[File:Artículo bueno.svg|48x48px|link=|alt=]]</span></td>}}</tr></table> | |
| − | + | ||
| − | + | | box5 =<table class="{{#if:{{{table class|}}}|{{{table class}}}|plainlinks ombox dykbox-notice}}" style="{{#if:{{{table style|}}}|{{{table style}}}|}}">{{#if:{{{th|}}}|{{{th}}}|}}{{#if:{{{tr|}}}|{{{tr}}}|<tr>}}{{#if:{{{td|}}}|{{{td}}}|<td class="mbox-image">{{#if:{{{file|}}}|[[File:{{{file}}}|{{#if:{{{px|}}}|{{{px}}}x{{{px}}}px|100x100px}}|{{#if:{{{link|}}}|link={{{link}}}|link=}}|{{#if:{{{alt|}}}|alt={{{alt}}}|alt=}}]]|[[File:Updated DYK query.svg|80x80px|link=|alt=]]<br />[[File:Symbol arrow down.svg|80x80px|link=|alt=]]<br />[[File:Symbol arrow up.svg|80x80px|link=|alt=]]}}</td><td class="mbox-text" style="{{#if:{{{td style|}}}|{{{td style}}}|}}">{{{text}}}</td>}}{{#if:{{{file2|}}}|<td><span style="float:right">{{{file2}}}</span></td>|<td><span style="float:right">[[File:Artículo bueno.svg|80x80px|alt=|link=]]</td>}}</tr></table> | |
| − | + | ||
| − | }}<noinclude> | + | }}<noinclude>{{documentation}}</noinclude> |
| − | {{documentation}}</noinclude> | ||
Latest revision as of 07:43, 19 September 2018
{{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:
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:
| 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:
| text |
Or you could use a non printable character in place of the image {{DYKM|file= |text}} which maintains the image's margin as if it were in place and the size of the box is maintained as shown below:
| text |
The |small= parameter switches from the 80% width, center aligned, message box to a smaller box that aligns to the right side of the line it is added to. It uses similar parameters as the main box except they begin with a small s, for example the text parameter for the small box is |stext=. Therefor the following code: {{DYKM|small=y|stext=This is the small box text}} produces the following:
| This is the small box text |
Several other parameters are incorporated that modify the template's output for specialized use (examples are shown below)).
Examples
Custom messaging examples are included as expandable content.
See also
| The above documentation is transcluded from Template:DYK mbox/doc. (edit | history) Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages. Please add categories to the /doc subpage. Subpages of this template. |