Template:DYK mbox/doc

From blackwiki
< Template:DYK mbox
Revision as of 09:53, 17 February 2013 by imported>John Cline (Update categorization, ce code)
Jump to navigation Jump to search
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.

{{DYK cbox|

You can stack the template to produce multiple rows.

{{DYKM|text="Your top-box message"}}
{{DYKM|text="Your bottom-box message"}}

To produce:



Full code


{{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 = Allows a custom text message
| file2 = Allows a right side image
| cats = Allows for categorization
| clb = Creates a closing line break
| solb = Small-box opening line break
| sxfile = Eliminate small-box file
| sfile = Changes the small-box file
| stext = 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
}}

  • The SDrow switch; meaning Single Double-size row, uses:
{{subst:DYK mbox
 | SDrow
 | text  = "Your Single message in a double-size box"
}}
to produce:

  • The Trow switch; meaning Triple-rows, uses:
{{subst:DYK mbox
 | Trow
 | text  = "Your Trow, top-box message"
 | text2 = "Your Trow, middle-box message"
 | text3 = "Your Trow, bottom-box message"
}}
to produce:

  • The STrow switch; meaning Single message, triple-size row, uses:
{{subst:DYK mbox
 | STrow
 | text  = "Your Single message in a triple-size box"
}}
to produce:
  • The Qrow switch; meaning Quadruple rows, uses:
{{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"
}}
to produce:

  • The SQrow switch; meaning Single Quadruple-size row, uses:
{{subst:DYK box
 | SQrow
 | text = "Your SQrow message"
}}
to produce:

See also