Difference between revisions of "Template:DYK mbox/doc"
imported>John Cline ({{subst:DYKT|doc}} into template) |
imported>John Cline (update /doc) |
||
| 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> | ||
| − | + | <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> == |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | + | This template was developed for the specialized needs of {{DYK blue}}. | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | + | === Usage === | |
| − | < | + | 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}} | |
| − | + | ---------- | |
| − | }}</ | + | 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> </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= }} | ||
| + | ---------- | ||
| + | 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 ==== | ||
| − | + | Custom messaging examples are included as expandable content. | |
| − | < | + | <div style="margin-left:0px"> |
| − | -- | + | <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%">Expand examples → → →</th> | |
| − | < | + | <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> | ||
| + | <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
| 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
.
Contents
Template {{DYK mbox}}
This template was developed for the specialized needs of Did you know
.
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:
| Inserts your custom message. |
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:
| This combination to display text with no image |
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:
| 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
See also
Usage
</includeonly>