< Module:RoundNRevision as of 01:16, 31 December 2014 by blackwiki>Codehydro
This is the documentation page for Module:RoundN
 | 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
|
| Template:TOC tab
|
Number of columns/eliminations (3 columns for Round8, 4 columns for Round16, etc.)
Note
- For
columns less than 4 (i.e. Round2-Round8), the 3rd Place match box is hidden by default. For columns 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.
|
| Template:TOC tab
|
Unnamed parameters (i.e. a value not prefixed by [param_name] =) are read sequentially in groups of 5 such that:
Example 1
{{#invoke:RoundN|main|columns=2
|Day 1|A|'''7'''|B|5
|Day 2|C||D|
|tdb|A|||
}}
| Semi-finals | | Final | | | | | | | | | Day 1 | | | | | A | 7 | | tdb | | B | 5
| | | A | | | Day 2 | | | | | | C | | | | | D | | | |
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 <!-- Date-Place/Team 1/Score 1/Team 2/Score 2 --> on top and <!-- Finals --> above the first group of 5 in the finals round, etc.
|
| Template:TOC tab
|
No boxes will be shown for the #th match group. For example, adding |skipmatch2=yes to Example 1 will result in
| Semi-finals | | Final | | | | | | | | | Day 1 | | | | | A | 7 | | tdb | | B | 5
| | | 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 5 parameters that would have populated the skipped box will be ignored regardless of value unless
omit_blanks is set to 'yes' (see below).
- Match skipping is currently only allowed in the first round (in this case, the 'Semi Finals'). For example, setting
columns=3 normally has 4 matches in the first round; thus, skipmatch5 and beyond will be ignored.
|
| Template:TOC tab
|
Add |omit_blanks=yes|skipmatch2=yes to Example 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.)
| Semi-finals | | Final | | | | | | | | | Day 1 | | | | | A | 7 | | Day 2 | | B | 5
| | | C | | | | | | | D | | | | | | | |
|
| Template:TOC tab
|
Instead of using wikimark-up to bold the names/scores, just set bold_winner like in the following:
Example 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
|widescore=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 (5)|C|3 (6)
|Feb 3|F|||
}}
| Quarter-finals | | Semi-finals | | Final | | | | | | | | | | | | | Feb 1 | | | | | | | | A | 7 | | Feb 2 | | B | 5
| | | A | 3 (5) | | Feb 1 | | | C | 3 (6)
| | | C | 1 | | | | | D | 2
| | | | | | Feb 1 | | | | | | E | 3 | | Feb 3 | | | F | 5
| | | F | | | Feb 2 | | | | | | | G | | | | | H | | | |
Note:
- If entering a score that includes non-numbers—such as
3 (6), the Semi Final score for team C in the above example—the module will first remove all non-digit characters and concatenate the rest. For example, 3 (5) and 3 (6) would be converted to 35 and 36, respectively, before being compared. This should be valid for most cases, however, you may override using the manualboldmatch[#] parameter.
- Also modified by
low_score_wins parameter.
- If scores are tied, neither are bolded.
|
| Template:TOC tab
|
Add |low_score_wins=yes to Example 2 to bold the team with the lower score if bold_winner is set to yes. (Example is cropped to save space)
| Quarter-finals | | Semi-finals | | Final | | | | | | | | | | | | | Feb 1 | | | | | | | | A | 7 | | Feb 2 | | B | 5
| | | A | 3 (5) | | Feb 1 | | | C | 3 (6)
| | | C | 1 | | | | | D | 2
| | | | | | Feb 1 | | | | | | E | 3 | | Feb 3 | | | F | 5
| | | F | | | Feb 2 | | | | | | | G | | | | | H | | | |
|
| Template:TOC tab
|
In the same manner as the skipmatch parameters, you may use |manualboldmatch1=yes on Example 2 to prevent automatic bolding in the first group, etc. Again, leading zeroes may be added as desired.
| Quarter-finals | | Semi-finals | | Final | | | | | | | | | | | | | Feb 1 | | | | | | | | A | 7 | | Feb 2 | | B | 5
| | | A | 3 (5) | | Feb 1 | | | C | 3 (6)
| | | C | 1 | | | | | D | 2
| | | | | | Feb 1 | | | | | | E | 3 | | Feb 3 | | | F | 5
| | | F | | | Feb 2 | | | | | | | G | | | | | H | | | |
|
| Template:TOC tab
|
Use RD#, replacing # with the desired column such that 1 is the leftmost round and N is the rightmost when columns = N. For example:
{{#invoke:RoundN|main|columns=7|
|RD1 = Auditions|RD3 = Blah Blah|RD7 = Championship
}}
| Auditions | | Round of 64 | | Blah Blah | | Round of 16 | | Quarter-finals | | Semi-finals | | Championship | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Third place | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
|
| Template:TOC tab
|
Add |color=yes
| Quarter-finals | | Semi-finals | | Final | | | | | | | | | | | | | 1 | | | | | | | | | | | 5 | | | | | | | | | 2 | | | | | | | | | | | 7 | | | | | | Gold medalist | 3 | | 3 | | | Silver medalist | 2
| | | | | 6 | | | | | | | | | | 4 | | | | | | Third place | | | | | | 8 | | | | | | Bronze medalist | 1 | | | | | 0
| |
|