Difference between revisions of "Module:RoundN/doc"
blackwiki>Codehydro (←Created page with '{{Module rating |pre-alpha<!-- Values: pre-alpha • alpha • beta • release • protected -- If a rating not needed/relevant, delete this template call --...') |
blackwiki>Codehydro (alpha release and basic doc) |
||
| Line 1: | Line 1: | ||
| − | {{Module rating | | + | {{Module rating |alpha<!-- Values: pre-alpha • alpha • beta • release • protected -- If a rating not needed/relevant, delete this template call -->}} |
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) --> | <!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) --> | ||
== Usage == | == Usage == | ||
| + | Basic form: | ||
| + | <pre>{{#invoke:{{BASEPAGENAME}}|main|columns = number of columns (3 columns for Round8, 4 columns for Round16, etc.)}}</pre> | ||
| − | + | ===Parameter List=== | |
| + | *'''bold''' parameter names are required | ||
| + | *''italicized'' parameter names are required in some cases | ||
| + | {| class='wikitable' style='width:75%' | ||
| + | ! Parameter name | ||
| + | ! Description | ||
| + | |- | ||
| + | |style='text-align:center;vertical-align:top'| '''columns''' | ||
| + | | Number of columns/eliminations (3 columns for Round8, 4 columns for Round16, etc.) | ||
| + | '''Note''' | ||
| + | * For <code>columns</code> ''less than 4'' (i.e. Round2-Round8), the 3rd Place match box is hidden by default. For <code>columns</code> ''greater or equal to 4'', the 3rd Place match box is visible by default. This reflects the behavior of the templates prior to this module's release. | ||
| + | |- | ||
| + | |style='text-align:center;vertical-align:top'| {{{#}}} | ||
| + | |Unnamed parameters (i.e. a value not prefixed by <code>[param_name] =</code>) are read sequentially in groups of 5 such that: | ||
| + | ====Template 1==== | ||
| + | <pre>{{#invoke:RoundN|main|columns=2 | ||
| + | |Day 1|A|'''7'''|B|5 | ||
| + | |Day 2|C||D| | ||
| + | |tdb|A||| | ||
| + | }}</pre> | ||
| + | {{#invoke:RoundN|main|columns=2 | ||
| + | |Day 1|A|'''7'''|B|5 | ||
| + | |Day 2|C||D| | ||
| + | |tdb|A||| | ||
| + | }} | ||
| + | Placing each group of 5 on a new line is optional, but does make it easier to read. Also, consider adding the comments such as <code><nowiki><!-- Date-Place/Team 1/Score 1/Team 2/Score 2 --></nowiki></code> on top and <code><nowiki><!-- Finals --></nowiki></code> above the first group of 5 in the finals round, etc. | ||
| + | |- | ||
| + | |style='text-align:center;vertical-align:top'| skipmatch[#] | ||
| + | |No boxes will be shown for the #th match group. For example, adding <code><nowiki>|</nowiki>skipmatch2=yes</code> to '''Template 1''' will result in | ||
| + | {{#invoke:RoundN|main|columns=2|skipmatch2=yes | ||
| + | |Day 1|A|'''7'''|B|5 | ||
| + | |Day 2|C||D| | ||
| + | |tdb|A||| | ||
| + | }} | ||
| + | Useful for playoffs or when the number of teams playing in a round is not a power of 2. Unlike in the original template, this module does not require leading zeroes in this parameter, i.e. skipmatch001 is the same as skipmatch1 (though it may make your template code easier to read if lead with an appropriate number of zeroes). | ||
| + | |||
| + | '''Note:''' | ||
| + | *The next 5 unnamed parameters will be ignored regardless of value unless <code>omit_blanks</code> is set to 'yes' (see below). | ||
| + | *Skipping is currently only allowed in the first round (in this case, the 'Semi Finals'). For example, setting <code>columns=3</code> normally has 4 matches in the first round; thus, skipmatch5 and beyond will be ignored. | ||
| + | |- | ||
| + | |style='text-align:center;vertical-align:top'|omit_blanks | ||
| + | |Add <code><nowiki>|omit_blanks=yes|skipmatch2=yes</nowiki></code> to '''Template 1''' and all parameters that would have been skipped will instead be shifted to the next non-skipped box. (This is turned off by default because most templates made before the release of this module were required to use empty parameters as placeholders.) | ||
| + | {{#invoke:RoundN|main|columns=2|skipmatch2=yes|omit_blanks=yes | ||
| + | |Day 1|A|'''7'''|B|5 | ||
| + | |Day 2|C||D| | ||
| + | |tdb|A||| | ||
| + | }} | ||
| + | |- | ||
| + | |bold_winner | ||
| + | |Instead of using wikimark-up to bold the names/scores, just set <code>bold_winner</code> like in the following: | ||
| + | ====Template 2==== | ||
| + | turned off by default because most templates made before the release of this module were required to use empty parameters as placeholders.) | ||
| + | {{#invoke:RoundN|main|columns=3 | ||
| + | |bold_winner=yes | ||
| + | |Feb 1|A|7|B|5 | ||
| + | |Feb 1|C|1|D|2 | ||
| + | |Feb 1|E|3|F|5 | ||
| + | |Feb 2|G||H| | ||
| + | |Feb 2|A|3|C|5 | ||
| + | |Feb 3|F||| | ||
| + | }} | ||
| + | |} | ||
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | | | <includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | | | ||
<!-- Categories below this line, please; interwikis at Wikidata --> | <!-- Categories below this line, please; interwikis at Wikidata --> | ||
}}</includeonly> | }}</includeonly> | ||
Revision as of 20:24, 30 December 2014
| 26x26px | This module is rated as alpha. It is ready for third-party input, and may be used on a few pages to see if problems arise, but should be watched. Suggestions for new features or changes in their input and output mechanisms are welcome. |
Usage
Basic form:
{{#invoke:{{BASEPAGENAME}}|main|columns = number of columns (3 columns for Round8, 4 columns for Round16, etc.)}}
Parameter List
- bold parameter names are required
- italicized parameter names are required in some cases
| Parameter name | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| columns | Number of columns/eliminations (3 columns for Round8, 4 columns for Round16, etc.)
Note
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| {{{#}}} | Unnamed parameters (i.e. a value not prefixed by [param_name] =) are read sequentially in groups of 5 such that:
Template 1{{#invoke:RoundN|main|columns=2
|Day 1|A|'''7'''|B|5
|Day 2|C||D|
|tdb|A|||
}}
Placing each group of 5 on a new line is optional, but does make it easier to read. Also, consider adding the comments such as | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| skipmatch[#] | No boxes will be shown for the #th match group. For example, adding |skipmatch2=yes to Template 1 will result in
Useful for playoffs or when the number of teams playing in a round is not a power of 2. Unlike in the original template, this module does not require leading zeroes in this parameter, i.e. skipmatch001 is the same as skipmatch1 (though it may make your template code easier to read if lead with an appropriate number of zeroes). Note:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| omit_blanks | Add |omit_blanks=yes|skipmatch2=yes to Template 1 and all parameters that would have been skipped will instead be shifted to the next non-skipped box. (This is turned off by default because most templates made before the release of this module were required to use empty parameters as placeholders.)
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| bold_winner | Instead of using wikimark-up to bold the names/scores, just set bold_winner like in the following:
Template 2turned off by default because most templates made before the release of this module were required to use empty parameters as placeholders.)
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||