Difference between revisions of "Template:DYK mbox/doc"
imported>John Cline (update /doc) |
imported>John Cline (Update categorization, ce code) |
||
| Line 40: | Line 40: | ||
Custom messaging examples are included as expandable content. | Custom messaging examples are included as expandable content. | ||
| − | + | {{DYK cbox| | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
You can stack the template to produce multiple rows. | You can stack the template to produce multiple rows. | ||
| Line 158: | Line 152: | ||
*{{tlx|DYK prose}} | *{{tlx|DYK prose}} | ||
*{{tlx|DYK mbox}} | *{{tlx|DYK mbox}} | ||
| − | *{{tlx|DYK/msg}} | + | *{{tlx|DYK/msg}} |
| − | [[Category:DYK/ | + | [[Category:DYK/Pages|Template/Documentation]]<includeonly> |
| − | + | <!-- CATEGORIES AND INTERWIKIS GO HERE, THANKS. --> | |
| − | + | [[Category:DYK/Administration|{{SUBJECTSPACE}}/Documentation]] | |
| − | + | [[Category:DYK/{{SUBJECTSPACE}}]] | |
| − | + | [[Category:DYK/{{NAMESPACE}}]] | |
| − | + | [[Category:DYK/Pages/Documentation]]</includeonly> | |
| − | |||
| − | |||
| − | --> | ||
| − | [[Category:DYK/Administration|{{ | ||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | </includeonly> | ||
Revision as of 09:53, 17 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
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.
{{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:
| "Your top-box message" |
| "Your bottom-box message" |
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:
| "Your Single message in a double-size box" | |
- 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:
| "Your Trow, top-box message" |
| "Your Trow, middle-box message" |
| "Your Trow, bottom-box message" |
- 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:
| "Your Single message in a triple-size box" |
- 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:
| "Your Qrow, top box message" |
| "Your Qrow, upper-middle box message" |
| "Your Qrow, bottom-middle box message" |
| "Your Qrow, bottom box message" |
- The SQrow switch; meaning Single Quadruple-size row, uses:
{{subst:DYK box
| SQrow
| text = "Your SQrow message"
}}
- to produce:
| "Your SQrow message" |