Difference between revisions of "Template:DYK mbox/doc"
imported>John Cline (Update categorization, ce code) |
imported>John Cline (update documentation) |
||
| Line 1: | Line 1: | ||
{{Documentation subpage}} | {{Documentation subpage}} | ||
| − | <div style="position: relative; top: | + | <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: | |
| − | |||
---------- | ---------- | ||
{{DYKM}} | {{DYKM}} | ||
---------- | ---------- | ||
| − | + | ||
| + | |||
| + | 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 | + | |
| + | |||
| + | 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 | + | {{DYKM|xfile=true|text}} |
---------- | ---------- | ||
| − | + | ||
| + | |||
| + | Or you could use a non printable character in place of the image <b><code><nowiki>{{DYKM|file= |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| | + | {{DYKM|file= |text}} |
---------- | ---------- | ||
| − | + | ||
| + | |||
| + | 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| | + | {{DYKM|small=y|sclb=true|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>). | |
| − | + | ||
| − | Several other parameters are incorporated that modify the template's output for specialized use | ||
==== Examples ==== | ==== Examples ==== | ||
| − | |||
Custom messaging examples are included as expandable content. | Custom messaging examples are included as expandable content. | ||
| − | {{DYK cbox| | + | {{DYK cbox|1= |
You can stack the template to produce multiple rows. | 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> | ||
| + | |||
| + | <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==== | ||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | + | ;Parameters | |
| − | < | + | {{pre2|<nowiki>{{DYKM |
| − | {{ | + | | small = Changes from the larger box to a smaller one |
| − | | | + | | olb = Creates an opening line break |
| − | | text = | + | | 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> | ||
| + | }} | ||
| − | + | }} | |
| − | + | ===See also=== | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
*{{tlx|DYK prose}} | *{{tlx|DYK prose}} | ||
*{{tlx|DYK mbox}} | *{{tlx|DYK mbox}} | ||
| Line 158: | Line 101: | ||
[[Category:DYK/{{SUBJECTSPACE}}]] | [[Category:DYK/{{SUBJECTSPACE}}]] | ||
[[Category:DYK/{{NAMESPACE}}]] | [[Category:DYK/{{NAMESPACE}}]] | ||
| − | [[Category:DYK/Pages/Documentation]]</includeonly> | + | [[Category:DYK/Pages/Documentation]] |
| + | </includeonly> | ||
Revision as of 12:35, 20 February 2013
| This is a documentation subpage for Template:DYK mbox. It contains usage information, categories and other content that is not part of the original template page. |
{{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.