Jump to content

Module:RoundN/doc

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Codehydro (talk | contribs) at 22:39, 1 January 2015. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Usage

Basic form:

{{#invoke:{{BASEPAGENAME}}|main|columns = number of columns (3 columns for Round8, 4 columns for Round16, etc.)}}

Parameter List

  • red parameter names are required
  • italicized parameter names are required in some cases
  • blue parameter names involve new features not available prior to the release of this module
Parameter name Description

columns

columns
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.

{{{#}}}

{{{#}}}
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-finalsFinal
 
      
 
Day 1
 
 
A7
 
tdb
 
B5
 
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.

style

style
Set the style parameter to add custom CSS to the table.

For example, if you add |style=width:20em;font-size:70% to Example 1:

 
Semi-finalsFinal
 
      
 
Day 1
 
 
A7
 
tdb
 
B5
 
A
 
Day 2
 
 
 
C
 
 
D
 

scroll_height

scroll_height
For large tables, set scroll_height to the desired height in pixels.

For example, if you add |scroll_height=140 to Example 1:

 
Semi-finalsFinal
 
      
 
Day 1
 
 
A7
 
tdb
 
B5
 
A
 
Day 2
 
 
 
C
 
 
D
 
 
Semi-finalsFinal
 
      
 
Day 1
 
 
A7
 
tdb
 
B5
 
A
 
Day 2
 
 
 
C
 
 
D
 

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 scroll_head_unlock is used.

scroll_head_unlock

scroll_head_unlock
If it is desirable to have the round heading scroll with the table (such as if a larger viewing area is desired), set scroll_head_unlock to 'yes'

For example, if you add |scroll_head_unlock=yes to the code the scroll_height example:

 
Semi-finalsFinal
 
      
 
Day 1
 
 
A7
 
tdb
 
B5
 
A
 
Day 2
 
 
 
C
 
 
D
 

skipmatch##

skipmatch##
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.

For example, if you add |skipmatch2=yes to Example 1:

 
Semi-finalsFinal
 
      
 
Day 1
 
 
A7
 
tdb
 
B5
 
A
 
 
 
 
 
 
 

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 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.

omit_blanks

omit_blanks
If omit_blanks is set to yes, then 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.)

For example, if you add |omit_blanks=yes to Example 1 with |skipmatch2=yes:

 
Semi-finalsFinal
 
      
 
Day 1
 
 
A7
 
Day 2
 
B5
 
C
 
 
D
 
 
 
 

bold_winner

bold_winner
The boldwinner parameter accepts either 'high' or '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

{{#invoke:RoundN|main
|columns=3
|widescore=yes
|bold_winner=high
<!-- Date-Place/Team 1/Score 1/Team 2/Score 2 -->
|Feb 1|bold if bold_winner&#61;high|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-finalsSemi-finalsFinal
 
          
 
Feb 1
 
 
bold if bold_winner=high7
 
Feb 2
 
B5
 
A3 (5)
 
Feb 1
 
C3 (6)
 
C1
 
 
 
D2
 
 
 
Feb 1
 
 
 
E3
 
Feb 3
 
F5
 
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.
  • If the scores are tied or contain no numbers, then neither will be bolded, however, you may still manually bold them with wikimarkup.

manualboldmatch##

manualboldmatch##

In the same manner as the skipmatch parameters, you may use|manualboldmatch1=yeson Example 2 to prevent automatic bolding in the first group, etc. Again, leading zeroes may be added as desired.

 
Quarter-finalsSemi-finalsFinal
 
          
 
Feb 1
 
 
bold if bold_winner=high7
 
Feb 2
 
B5
 
A3 (5)
 
Feb 1
 
C3 (6)
 
C1
 
 
 
D2
 
 
 
Feb 1
 
 
 
E3
 
Feb 3
 
F5
 
F
 
Feb 2
 
 
 
G
 
 
H
 

RD##

RD##
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
|style=display:inline-block;height:15em;max-width:80%;overflow:auto;border:2px solid;padding:2px
|1}}
 
AuditionsRound of 64Blah BlahRound of 16Quarter-finalsSemi-finalsChampionship
 
                          
 
1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Consol

Consol
Set Consol=name to change the 'Third Place' label to 'name'.
 
Final
 
  
 
 
 
 
 
 
 
 
 
 
 
 
 
Runner up
 
 
 
 
 
 
 
 
 
 

color

color
Add |color=yes
 
Final
 
  
 
1
 
 
 
 
 
 
 
 
 
 
 
Third place
 
 
2
 
 
 
 
 
 
 

3rdplace

3rdplace
By default, |3rdplace=</code> is set to 'yes' when columns is greater than 3 and 'no' otherwise. Override as desired.