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

From blackwiki
Jump to navigation Jump to search
imported>John Cline
({{subst:DYKT|doc}} into template)
imported>DePiep
m (cleanup (via WP:JWB))
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
{{Documentation subpage}}
 
{{Documentation subpage}}
<!-- CATEGORIES AND INTERWIKIS GO AT THE BOTTOM OF THIS PAGE. -->
 
== Template <b>{{tlx|DYK mbox}}</b> ==
 
This template was developed for the special needs of {{DYK blue}}.
 
=== Usage ===
 
*<b>{{tlx|DYK mbox}}</b>
 
<b>Produces:</b>
 
{{DYK mbox}}__NOTOC__
 
=== See also ===
 
*<b>[[WP:DYK]]</b><includeonly>
 
<!-- CATEGORIES AND INTERWIKIS GO HERE. -->
 
[[Category:DYK/Administration|{{BASEPAGENAME}}]]
 
</includeonly>
 
  
 +
<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>
  
{{Documentation subpage}}
+
<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}}.
<noinclude><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>'''<nowiki>{{</nowiki>[[Template:DYKM|DYKM]]<nowiki>}}</nowiki>'''</li></ul></small></th></tr></table>
 
;This template uses the following internal syntax:
 
<code><nowiki><table class="{{#if:{{{table class|}}}|{{{table class}}}|plainlinks ombox dykbox-notice}}" style="{{#if:{{{table style|}}}|{{{table style}}}|}}">{{#if:{{{table header|}}}|{{{table header}}}|}}{{#if:{{{table row|}}}|{{{table row}}}|<tr>}}{{#if:{{{table data|}}}|{{{table data}}}|<td class="mbox-image">{{#if:{{{file|}}}|[[File:{{{file}}}|{{#if:{{{file size|}}}|{{{file size}}}x{{{file size}}}px|33x33px}}|{{#if:{{{file link|}}}|link={{{file link}}}|link=}}|{{#if:{{{alter|}}}|alt={{{alter}}}|alt=}}]]|[[File:Updated DYK query.svg|33x33px|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></nowiki></code>
 
;The internal template code for the default switch, {{tlx|DYK mbox}}, produces the following output<nowiki>:</nowiki>
 
<code><nowiki><table class="plainlinks ombox dykbox-notice" style=""><tr><td class="mbox-image">[[File:Updated DYK query.svg|33x33px|link=|alt=]]</td><td class="mbox-text" style="">{{{text}}}</td></tr></table></nowiki></code>
 
;which produces<nowiki>:</nowiki></noinclude>
 
{{DYK mbox}}
 
'''[[Template:DYK mbox|DYK mbox]]''' is a messaging utility template for posting messages to editors regarding DYK nominations. It also supports other templates, internally, to facilitate interactive ease of use on special pages and editing scripts used for administering the [[WP:DYK|DYK]] [[Wikipedia:Wikiproject|WikiProject]].
 
  
===Usage===
+
== Template <b>{{tlx|DYK mbox}}</b> ==
Several parameters are incorporated that modify the template's output for specialized use. Examples are shown below. To create and use the basic message box, for [[WP:DYK|DYK messaging]], paste <code><nowiki>{{DYK mbox|text="Your message"}}</nowiki></code> where you want the message box to appear, replace "Your message" with the message you want to post, and save the edit.
+
This template was developed for the specialized needs of {{DYK blue}}.
====Examples====
 
Add your custom message.
 
;<code><nowiki>{{DYK mbox|text="Your message"}}</nowiki></code> produces <nowiki>:</nowiki>
 
{{DYK mbox|text="Your message"}}
 
  
<div style="margin-left:0px"><!-- NOTE: width renders incorrectly if added to main STYLE section-->
+
=== Usage ===
<table class="navbox collapsible collapsed" style="background: transparent; text-align: left; border: 0px solid transparent; margin-top: 0.2em; ">
+
Either the basic syntax, {{tlc|DYK mbox}} or the shortcut, {{tlc|DYKM}} will produce:
<th style="background-color: transparent; text-align:center; font-size:112%;">more examples</th>
+
----------
<tr><td style="border: solid 1px transparent; padding: 4px; background-color: transparent; font-size:112%;">
+
{{DYKM}}
-------------
+
----------
  
*The '''Srow''' switch; meaning ''Single-row'', uses:
 
  
<pre>
+
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:
{{subst:DYK mbox
+
----------
| Srow
+
{{DYKM|text=Inserts your custom message.}}
| text = "Your Srow 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 Srow message"</td></tr></table>
+
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|xfile=true|text}}
 +
----------
  
--------------
 
  
*The '''Drow''' switch; meaning ''Double-rows'', uses:
+
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|file=&nbsp;|text}}
 +
----------
  
<pre>
 
{{subst:DYK mbox
 
| Drow
 
| text  = "Your Drow, top-box message"
 
| text2 = "Your Drow, 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 Drow, 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 Drow, bottom-box message"</td></tr></table>
 
  
 +
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:
 +
----------
 +
{{DYKM|small=y|sclb=true|stext=This is the small box text}}
 
----------
 
----------
  
*The '''SDrow''' switch; meaning ''Single Double-size row'', uses:
 
  
<pre>
+
Several other parameters are incorporated that modify the template's output for specialized use <i>(examples are shown below)</i>).
{{subst:DYK mbox
 
| SDrow
 
| text  = "Your Single message in a double-size box"
 
}}</pre>
 
  
;to produce<nowiki>:</nowiki>
+
==== Examples ====
 +
Custom messaging examples are included as expandable content.
  
<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>
+
{{DYK cbox|1=
  
-----------------
+
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>
  
*The '''Trow''' switch; meaning ''Triple-rows'', uses:
+
<b>To produce:</b>
  
<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>
+
----------
 +
{{DYKM|text="Your top-box message"}}
 +
{{DYKM|text="Your bottom-box message"}}
 +
----------
  
<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>
+
====Full code====
  
-----------
+
;Parameters
  
*The '''STrow''' switch; meaning ''Single message, triple-size row'', uses:
+
{{pre2|<nowiki>{{DYKM
 +
| small = Changes from the larger box to a smaller one
 +
| olb = Creates an opening line break
 +
| table class = Allows table class options
 +
| 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>
 +
}}
  
<pre>
+
}}
{{subst:DYK mbox
 
| STrow
 
| text  = "Your Single message in a triple-size box"
 
}}</pre>
 
  
;to produce<nowiki>:</nowiki>
+
===See also===
 
 
<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]]
 +
 
 +
[[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