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>John Cline
(update /doc)
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: -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>
  
{{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.
 
====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-->
+
This template was developed for the specialized needs of {{DYK blue}}.
<table class="navbox collapsible collapsed" style="background: transparent; text-align: left; border: 0px solid transparent; margin-top: 0.2em; ">
 
<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%;">
 
-------------
 
  
*The '''Srow''' switch; meaning ''Single-row'', uses:
+
=== Usage ===
  
<pre>
+
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:
{{subst:DYK mbox
+
----------
| Srow
+
{{DYKM}}
| text = "Your Srow message"
+
----------
}}</pre>
+
Using <b><code><nowiki>{{DYKM|text=Inserts your custom message.}}</nowiki></code></b> as follows:
 +
----------
 +
{{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:
 +
----------
 +
{{DYKM|text=&nbsp;}}
 +
----------
 +
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:
 +
----------
 +
{{DYKM|xfile=x}}
 +
----------
 +
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 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|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 ====
  
;to produce<nowiki>:</nowiki>
+
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=]]</td><td class="mbox-text">"Your Srow message"</td></tr></table>
+
<div style="margin-left:0px">
  
--------------
+
<table class="navbox collapsible collapsed" style="background: transparent; text-align:left; border:0px solid transparent; margin-top:0.2em">
  
*The '''Drow''' switch; meaning ''Double-rows'', uses:
+
<th style="background-color:transparent; text-align:center; font-size:112%">Expand examples → → →</th>
  
<pre>
+
<tr><td style="border:solid 1px transparent; padding:4px; background-color:transparent; font-size:112%">
{{subst:DYK mbox
 
| Drow
 
| text  = "Your Drow, top-box message"
 
| text2 = "Your Drow, bottom-box message"
 
}}</pre>
 
  
;to produce<nowiki>:</nowiki>
+
You can stack the template to produce multiple rows.
  
<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>
+
<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 bottom-box message"}}
 +
----------
 +
====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:
+
* The '''SDrow''' switch; meaning ''Single Double-size row'', uses:
  
 
<pre>
 
<pre>
Line 144: Line 162:
 
[[Category:DYK/doc
 
[[Category:DYK/doc
 
[[Category:DYK/Templates|Mbox]]</includeonly>
 
[[Category:DYK/Templates|Mbox]]</includeonly>
 +
 +
 +
=== See also ===
 +
 +
*<b>[[WP:DYK]]</b><includeonly><!--                                                                          CATEGORIES AND INTERWIKIS GO BELOW THIS LINE
 +
-->
 +
[[Category:DYK/Administration|{{BASEPAGENAME}}]]</includeonly>
 +
 +
 +
 +
 +
 +
 +
===Usage===
 +
 +
</includeonly>

Revision as of 07:08, 12 February 2013

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

The only required parameter for this messaging template is | text =. If | text = is blank: {{DYKM|text=}}, or not present: {{DYKM}}, the message displays {{{1}}} as shown below:



Using {{DYKM|text=Inserts your custom message.}} as follows:



You can use a non-printable character, like   if you don't want to use text and the {{{1}}} will not display because the parameter is not actually blank; as show below:



You can also use | xfile = to eliminate the image as the output for {{DYKM|xfile=x}} is shown below:



Or you could use {{DYKM|xfile=x|text=This combination to display text with no image}} 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 the begin with a small s, for example the text paramater 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


See also




Usage

</includeonly>