Difference between revisions of "Template:DYK mbox/doc"

From blackwiki
Jump to navigation Jump to search
imported>John Cline
(update /doc)
imported>DePiep
m (cleanup (via WP:JWB))
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
{{Documentation subpage}}
 
{{Documentation subpage}}
  
<div style="position: relative; top: -3em"><span id="Template:DYKM|DYKM"></span></div><table class="shortcutbox noprint" style="float:right; border:1px solid #aaa; background:#fff; margin:.3em .3em .3em 1em; padding:3px; text-align:center"><tr><th style="border:none; background:transparent" class="plainlist"><small>Shortcut:<ul><li><b><nowiki>{{</nowiki>[[Template:DYKM|DYKM]]<nowiki>}}</nowiki></b></li></ul></small></th></tr></table>
+
<div style="position: relative; top: 2em"><span id="Template:DYKM|DYKM"></span></div><table class="shortcutbox noprint" style="float:right; border:1px solid #aaa; background:#fff; margin:.3em .3em .3em 1em; padding:3px; text-align:center"><tr><th style="border:none; background:transparent" class="plainlist"><small>Shortcut:<ul><li><b><nowiki>{{</nowiki>[[Template:DYKM|DYKM]]<nowiki>}}</nowiki></b></li></ul></small></th></tr></table>
  
 
<b>{{tlc|DYK mbox}}</b> is a messaging utility template for posting messages related to {{DYK blue}} operations. It also supports other templates, internally—to facilitate interactive ease of use, on special pages, and editing scripts, used for the administration of {{DYK blue}}.
 
<b>{{tlc|DYK mbox}}</b> is a messaging utility template for posting messages related to {{DYK blue}} operations. It also supports other templates, internally—to facilitate interactive ease of use, on special pages, and editing scripts, used for the administration of {{DYK blue}}.
  
 
== Template <b>{{tlx|DYK mbox}}</b> ==
 
== Template <b>{{tlx|DYK mbox}}</b> ==
 
 
This template was developed for the specialized needs of {{DYK blue}}.
 
This template was developed for the specialized needs of {{DYK blue}}.
  
 
=== Usage ===
 
=== Usage ===
 
+
Either the basic syntax, {{tlc|DYK mbox}} or the shortcut, {{tlc|DYKM}} will produce:
The only required parameter for this messaging template is <b>| text =</b>. If <b>| text =</b> is blank: <b><code><nowiki>{{DYKM|text=}}</nowiki></code></b>, or not present: <b><code><nowiki>{{DYKM}}</nowiki></code></b>, the message displays <b><code><nowiki>{{{1}}}</nowiki></code></b> as shown below:
 
 
----------
 
----------
 
{{DYKM}}
 
{{DYKM}}
 
----------
 
----------
Using <b><code><nowiki>{{DYKM|text=Inserts your custom message.}}</nowiki></code></b> as follows:
+
 
 +
 
 +
You can either use <b><code><nowiki>{{DYKM|text=Inserts your custom message.}}</nowiki></code></b>, or default through the unnamed parameter switch, <b><code><nowiki>{{DYKM|Inserts your custom message.}}</nowiki></code></b> to produce the following:
 
----------
 
----------
 
{{DYKM|text=Inserts your custom message.}}
 
{{DYKM|text=Inserts your custom message.}}
 
----------
 
----------
You can use a non-printable character, like <b><code><nowiki>&nbsp;</nowiki></code></b> if you don't want to use text and the <b><code><nowiki>{{{1}}}</nowiki></code></b> will not display because the parameter is not actually blank; as show below:
+
 
 +
 
 +
You can use <b><code><nowiki>|xfile=</nowiki></code></b> to eliminate the image; the text floats to the left margin, and the box only grows as large as the included text; <b><code><nowiki>{{DYKM|xfile=true}}</nowiki></code></b> is shown below:
 
----------
 
----------
{{DYKM|text=&nbsp;}}
+
{{DYKM|xfile=true|text}}
 
----------
 
----------
You can also use <b><code><nowiki>| xfile =</nowiki></code></b> to eliminate the image as the output for <b><code><nowiki>{{DYKM|xfile=x}}</nowiki></code></b> is shown below:
+
 
 +
 
 +
Or you could use a non printable character in place of the image <b><code><nowiki>{{DYKM|file=&nbsp;|text}}</nowiki></code></b> which maintains the image's margin as if it were in place and the size of the box is maintained as shown below:
 
----------
 
----------
{{DYKM|xfile=x}}
+
{{DYKM|file=&nbsp;|text}}
 
----------
 
----------
Or you could use <b><code><nowiki>{{DYKM|xfile=x|text=This combination to display text with no image}}</nowiki></code></b> as shown below:
+
 
----------
+
 
{{DYKM|xfile=x|text=This combination to display text with no image}}
+
The <b><code><nowiki>|small=</nowiki></code></b> 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 <b><code><nowiki>|stext=</nowiki></code></b>. Therefor the following code: <b><code><nowiki>{{DYKM|small=y|stext=This is the small box text}}</nowiki></code></b> produces the following:
 
----------
 
----------
The <b><code><nowiki>| small =</nowiki></code></b> 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 the begin with a small s, for example the text paramater for the small box is <b><code><nowiki>| stext =</nowiki></code></b>. Therefor the following code: <b><code><nowiki>{{DYKM|small=y|stext=This is the small box text}}</nowiki></code></b> produces the following:
+
{{DYKM|small=y|sclb=true|stext=This is the small box text}}
 
----------
 
----------
{{DYKM|small=y|stext=This is the small box text}}
 
----------
 
Several other parameters are incorporated that modify the template's output for specialized use (<i>examples are shown below</i>).
 
==== Examples ====
 
  
Custom messaging examples are included as expandable content.
 
  
<div style="margin-left:0px">
+
Several other parameters are incorporated that modify the template's output for specialized use <i>(examples are shown below)</i>).
  
<table class="navbox collapsible collapsed" style="background: transparent; text-align:left; border:0px solid transparent; margin-top:0.2em">
+
==== Examples ====
 +
Custom messaging examples are included as expandable content.
  
<th style="background-color:transparent; text-align:center; font-size:112%">Expand examples → → →</th>
+
{{DYK cbox|1=
  
<tr><td style="border:solid 1px transparent; padding:4px; background-color:transparent; font-size:112%">
+
You can stack the template to produce multiple rows.
 +
 +
<code><nowiki>{{DYKM|text="Your top-box message"}}</nowiki><br /><nowiki>{{DYKM|text="Your bottom-box message"}}</nowiki></code>
  
You can stack the template to produce multiple rows.
+
<b>To produce:</b>
  
<code><nowiki>{{DYKM|text="Your top-box message"}}</nowiki><br /><nowiki>
 
{{DYKM|text="Your bottom-box message"}}</nowiki></code>
 
  
<b>To produce:</b>
 
 
----------
 
----------
 
{{DYKM|text="Your top-box message"}}
 
{{DYKM|text="Your top-box message"}}
 
{{DYKM|text="Your bottom-box message"}}
 
{{DYKM|text="Your bottom-box message"}}
 
----------
 
----------
 +
 
====Full code====
 
====Full code====
<code><nowiki></nowiki><br /><nowiki>
 
{{DYKM</nowiki><br /><nowiki>
 
| small = Changes from the larger box to a smaller one</nowiki><br /><nowiki>
 
| olb = Creates an opening line break</nowiki><br /><nowiki>
 
| table class = Allows table class options</nowiki><br /><nowiki>
 
| table style = Allows table style options</nowiki><br /><nowiki>
 
| th = Allows a table header and style options</nowiki><br /><nowiki>
 
| tr = Allows a table row and style options</nowiki><br /><nowiki>
 
| td = Allows table data and style options</nowiki><br /><nowiki>
 
| xfile = Eliminates the left side image</nowiki><br /><nowiki>
 
| file = Allows the left side image to be changed</nowiki><br /><nowiki>
 
| td style = Allows table data styling options for the text parameter</nowiki><br /><nowiki>
 
| text = Allows a custom text message</nowiki><br /><nowiki>
 
| file2 = Allows a right side image</nowiki><br /><nowiki>
 
| cats = Allows for categorization</nowiki><br /><nowiki>
 
| clb = Creates a closing line break</nowiki><br /><nowiki>
 
| solb = Small-box opening line break</nowiki><br /><nowiki>
 
| sxfile = Eliminate small-box file</nowiki><br /><nowiki>
 
| sfile = Changes the small-box file</nowiki><br /><nowiki>
 
| stext = Adds text to the small-box</nowiki><br /><nowiki>
 
| sfile2 = Adds a right side image for the small-box</nowiki><br /><nowiki>
 
| scat = Allows categorization for the small-box</nowiki><br /><nowiki>
 
| sclb = Creates a closing line break for the small-box</nowiki><br /><nowiki>
 
}}</nowiki></code>
 
  
* The '''SDrow''' switch; meaning ''Single Double-size row'', uses:
+
;Parameters
  
<pre>
+
{{pre2|<nowiki>{{DYKM
{{subst:DYK mbox
+
| small = Changes from the larger box to a smaller one
  | SDrow
+
| olb = Creates an opening line break
  | text  = "Your Single message in a double-size box"
+
| table class = Allows table class options
}}</pre>
+
  | table style = Allows table style options
 +
  | th = Allows a table header and style options
 +
| tr = Allows a table row and style options
 +
| td = Allows table data and style options
 +
| xfile = Eliminates the left side image
 +
| file = Allows the left side image to be changed
 +
| td style = Allows table data styling options for the text parameter
 +
  | text = (or the |1#switch) Allows a custom text message
 +
| file2 = Allows a right side image
 +
| cats = Allows for categorization
 +
| clb = Creates a closing line break
 +
| sth = For a table header in the small box
 +
| str = Table row attributes for the small bof
 +
| solb = Small-box opening line break
 +
| sxfile = Eliminate small-box file
 +
| sfile = Changes the small-box file
 +
| stext = (or the |1#switch) Adds text to the small-box
 +
| sfile2 = Adds a right side image for the small-box
 +
| scat = Allows categorization for the small-box
 +
| sclb = Creates a closing line break for the small-box
 +
}}</nowiki>
 +
}}
  
;to produce<nowiki>:</nowiki>
+
}}
  
<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">"Your Single message in a double-size box"</td></tr><tr></table>
+
===See also===
 
 
-----------------
 
 
 
*The '''Trow''' switch; meaning ''Triple-rows'', uses:
 
 
 
<pre>
 
{{subst:DYK mbox
 
| Trow
 
| text  = "Your Trow, top-box message"
 
| text2 = "Your Trow, middle-box message"
 
| text3 = "Your Trow, bottom-box message"
 
}}</pre>
 
 
 
;to produce<nowiki>:</nowiki>
 
 
 
<table class="plainlinks ombox dykbox-notice"><tr><td class="mbox-image">[[File:Updated DYK query.svg|40x40px|link=|alt=]]</td><td class="mbox-text">"Your Trow, top-box message"</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">"Your Trow, middle-box message"</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">"Your Trow, bottom-box message"</td></tr></table>
 
 
 
-----------
 
  
*The '''STrow''' switch; meaning ''Single message, triple-size row'', uses:
 
 
<pre>
 
{{subst:DYK mbox
 
| STrow
 
| text  = "Your Single message in a triple-size box"
 
}}</pre>
 
 
;to produce<nowiki>:</nowiki>
 
 
<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">"Your Single message in a triple-size box"</td></tr></table>
 
 
*The '''Qrow''' switch; meaning ''Quadruple rows'', uses:
 
<pre>
 
{{subst:DYK mbox
 
| Qrow
 
| text  = "Your Qrow, top box message"
 
| text2 = "Your Qrow, upper-middle-box message"
 
| text3 = "Your Qrow, bottom-middle-box message"
 
| text4 = "Your Qrow, bottom box message"
 
}}</pre>
 
 
;to produce<nowiki>:</nowiki>
 
 
<table class="plainlinks ombox dykbox-notice"><tr><td class="mbox-image">[[File:Updated DYK query.svg|40x40px|link=|alt=]]</td><td class="mbox-text">"Your Qrow, top box message"</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">"Your Qrow, upper-middle box message"</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">"Your Qrow, bottom-middle box message"</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">"Your Qrow, bottom box message"</td></tr></table>
 
 
--------------
 
 
*The '''SQrow''' switch; meaning ''Single Quadruple-size row'', uses:
 
 
<pre>
 
{{subst:DYK box
 
| SQrow
 
| text = "Your SQrow message"
 
}}</pre>
 
 
;to produce<nowiki>:</nowiki>
 
 
<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">"Your SQrow message"</td></tr></table>
 
</td></tr></table>
 
 
===See also===
 
 
*{{tlx|DYK prose}}
 
*{{tlx|DYK prose}}
 
*{{tlx|DYK mbox}}
 
*{{tlx|DYK mbox}}
*{{tlx|DYK/msg}}<includeonly>
+
*{{tlx|DYK/msg}}
[[Category:DYK/Templatestrat]]
+
<includeonly>{{sandbox other||
[[Category:DYK/doc
+
[[Category:DYK/Administration|{{SUBJECTSPACE}}/Documentation]]
[[Category:DYK/Templates|Mbox]]</includeonly>
+
[[Category:DYK/{{SUBJECTSPACE}}]]
 
+
[[Category:DYK/{{NAMESPACE}}]]
 
+
[[Category:DYK/Pages/Documentation]]
=== See also ===
 
 
 
*<b>[[WP:DYK]]</b><includeonly><!--                                                                          CATEGORIES AND INTERWIKIS GO BELOW THIS LINE
 
-->
 
[[Category:DYK/Administration|{{BASEPAGENAME}}]]</includeonly>
 
 
 
 
 
 
 
 
 
 
 
 
 
===Usage===
 
  
</includeonly>
+
[[Category:DYK templates|mbox]]
 +
}}</includeonly>

Latest revision as of 10:37, 13 April 2018

Shortcut:

{{DYK mbox}} is a messaging utility template for posting messages related to Did you knowDYK comment symbol 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 knowDYK comment symbol.

Template {{DYK mbox}}

This template was developed for the specialized needs of Did you knowDYK comment symbol.

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:




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:




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:




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:





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