Content deleted Content added
more params |
No edit summary |
||
Line 6:
==Parameter List==
*
*''italicized'' parameter names are required in some cases
*{{blue|blue}} parameter names involve new features not available prior to the release of this module
{| class='wikitable' style='width:75%'
! Parameter name
Line 14 ⟶ 15:
|-
|style='text-align:center;vertical-align:top;width:9em'| {{TOC tab|
|style='background-color:#fff'|Number of columns/eliminations (3 columns for Round8, 4 columns for Round16, etc.)
Line 25 ⟶ 26:
|style='background-color:#fff'|Unnamed parameters (i.e. a value not prefixed by <code>[param_name] =</code>) are read sequentially in groups of 5 such that:
====Example 1====
{{demo|<
}}</
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'|
|style='background-color:#fff'|
{{Module talk:RoundN/testcases/1|param=style|style=width:20em;font-size:70%}}
|-
|style='text-align:center;vertical-align:top'|{{TOC tab|''{{blue|scroll_height}}''}}
|style='background-color:#fff'| For large tables, set {{code|scroll_height}} to the desired height in pixels.
{{Module talk:RoundN/testcases/1|param=scroll_height|scroll_height=140}}
CSS units are also allowed (i.e. '20em', '30%', etc.).
'''Note''' This works by duplicating the entire table and then using CSS to lock the clone of the table to the top of the div. Conceivably, for extremely large tables, this can result in a significant amount of extra HTML code to download versus if {{code|scroll_head_unlock}} is used.
|-
|style='text-align:center;vertical-align:top'|{{TOC tab|{{blue|scroll_head_unlock}}}}
|style='background-color:#fff'| If it is desirable to have the round heading scroll with the table (such as if a larger viewing area is desired), set {{code|scroll_head_unlock}} to 'yes'
{{Module talk:RoundN/testcases/1|param=scroll_head_unlock|scroll_head_unlock=yes|scroll_height=140|example=the code the {{code|scroll_height}} example}}
|-
|style='text-align:center;vertical-align:top'| {{TOC tab|skipmatch##}}
|style='background-color:#fff'|If set, boxes for the #th match group will not be shown. Most often used for playoffs or when the number of teams playing in the first round is not a power of 2.
{{Module talk:RoundN/testcases/1|param=skipmatch2|skipmatch2=yes}}
'''Note:'''
*Unlike in the original templates, 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).
*The 5 parameters that would have populated the skipped box will be ignored regardless of value unless <code>omit_blanks</code> 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 <code>columns=3</code> normally has 4 matches in the first round; thus, skipmatch5 and beyond will be ignored.
Line 54 ⟶ 69:
|-
|style='text-align:center;vertical-align:top'|{{TOC tab|{{blue|omit_blanks}}|depth=2}}
|style='background-color:#fff'|
{{
|-
|style='text-align:center;vertical-align:top'|{{TOC tab|{{blue|bold_winner}}}}
|style='background-color:#fff'|The {{code|boldwinner}} parameter accepts either {{code|'high'}} or {{code|'low'}}, which will automatically bold the text of the participant with the ''higher'' or ''lower'' score, respectively. In other words, set this to 'low' if the lower score wins and 'high' if the high score wins.
====Example 2====
{{Module talk:RoundN/testcases/2}}
'''Note:'''
* If entering a score that includes non-numbers{{--}}such as <code>3 (6)</code>, 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, <code>3 (5)</code> and <code>3 (6)</code> would be converted to <code>35</code> and <code>36</code>, respectively, before being compared. This should be valid for most cases, however, you may override using the <code>manualboldmatch
* If the scores are tied or contain no numbers, then neither will be bolded, however, you may still manually bold them with wikimarkup.
|-
|style='text-align:center;vertical-align:top'|{{TOC tab|
|style='background-color:#fff'|
{{Module talk:RoundN/testcases/2|result_arg=output|param=manualboldmatch1|manualboldmatch1=yes|before=In the same manner as the <code>skipmatch</code> parameters, you may use |after= on '''Example 2''' to prevent automatic bolding in the first group, etc. Again, leading zeroes may be added as desired.}}
|-
|style='text-align:center;vertical-align:top'|{{TOC tab|
|style='background-color:#fff'|
{{demo|<nowiki>{{#invoke:RoundN|main|columns=7
|RD1 = Auditions|RD3 = Blah Blah|RD7 = Championship
|style=display:inline-block;height:15em;max-width:80%;overflow:auto;border:2px solid;padding:2px
|1}}</nowiki>}}
|-
|style='text-align:center;vertical-align:top'|{{TOC tab|
|style='background-color:#fff'|
|-
|style='text-align:center;vertical-align:top'|{{TOC tab|color}}
|style='background-color:#fff'|Add <code><nowiki>|color=yes</nowiki></code>
{{#invoke:RoundN|main|columns=
|color=yes
|3rdplace=yes
Line 155 ⟶ 120:
|8|Bronze medalist|1||0
}}
|-
|style='text-align:center;vertical-align:top'|{{TOC tab|3rdplace}}
|style='background-color:#fff'|By default, <code><nowiki>|3rdplace=</code></nowiki> is set to 'yes' when <code>columns</code> is greater than 3 and 'no' otherwise. Override as desired.
|}
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | |
|