Module:Sports rbr table/doc: Difference between revisions
en>Gonnym (category) |
m (1 revision imported) |
(No difference)
|
Latest revision as of 02:15, 18 January 2023
File:Lua-Logo.svg | This module depends on the following other modules: |
Script error: No such module "Uses TemplateStyles".
Usage
Position tables <syntaxhighlight lang=moin>
1st place |
</syntaxhighlight>
WDL tables <syntaxhighlight lang=moin>
</syntaxhighlight>
Style
The XXX
in style=XXX
is to be replaced by one of the following available styles:
- matchup – for tables showing matchups and head-to-head results
Parameters
General parameters | |
---|---|
Parameter | Description |
title |
A top caption for the table, omit for no title. |
sortable |
Is the table sortable? Set to y for a sortable table, and omit for unsortable.
|
color_X |
The background color for position X . Here, X can be a single number (e.g., 1 for position 1), or a non-numeric value corresponding to a position used in the table (e.g., R for relegated or W for withdrew ...) See the color section below for more information on color syntax.
|
color_-3 |
The background color for position 1, 2, and 3. See the color section below for more information on color syntax. |
color_15- |
The background color for position 15, 16, .... See the color section below for more information on color syntax. |
text_Y |
Legend text for color_Y . Adding any legend text will trigger the inclusion of a legend at the bottom of the table.
|
source |
Source for the information in the table. |
notes |
Any additional notes at add to the foot of the table. |
update start_date |
Date of the last round of matches included in the table. If the table is complete, use |update=complete . If the matches will occur at a future date, use |update=future and |start_date= for the date of the first round of matches.
|
legendpos |
Position for the legend. Supported values include tr (top right), br (bottom right), tl (top left), bl (bottom left), t (top), and b (bottom).
|
legendorder |
The order for the entries in the legend (e.g., |legendorder=W/D/L ).
|
toptext |
Text to include at the top of the table. This is useful when |legendpos=tr and you wish to have the legend float next to text at the top.
|
header |
Text for the team column header. The default is Team ╲ Round .
|
labelalign |
Alignment for the column labels. The default is left .
|
firstround |
The number of the first round. The default is 1 .
|
rnd1 |
Text to use for the label for round 1. The default is 1 .
|
splitN |
A line can be added between section of the table (if desired) by adding |splitN=yes with N the position below which the bar should be shown.
|
Compact syntax | |
Parameter | Description |
team1 |
The wikilinked name of the first team. For additional teams, use team2 , team3 , ... For a temporary place holder, use |team1=- or |team1= or |team1=  or |team1=TBA .
|
pos1 |
The forward slash (/ ) delimited list of round-by-round positions for the first team. For example, |pos1=1/2/3/8/3/2/1 for seven rounds with the position changing from 1 to 2 to 3 to 8 to 3 to 2 to 1.
|
pos1_rnd3_note |
A footnote to append the 3rd position in the pos1 positions.
|
res1 |
The forward slash (/ ) delimited list of match results for the first team. For example, |res1=W/D/D/W/L for five rounds with the round-by-round results of win, draw, draw, win, loss. Note, this parameter cannot be used if |pos1= is being used.
|
res1_rnd3_note |
A footnote to append the 3rd result in the res1 match results.
|
Sports table syntax | |
Parameter | Description |
team1 |
this can be abbreviation for the first team. The remainder of the documentation in this section assumes the abbreviation is ABC . For additional teams, use team2 , team3 , ...
|
name_ABC |
The wikilinked name of team ABC
|
pos_ABC |
The forward slash (/ ) delimited list of round-by-round positions for team ABC . For example, |pos_ABC=1/2/3/8/3/2/1 for seven rounds with the position changing from 1 to 2 to 3 to 8 to 3 to 2 to 1.
|
res_ABC |
The forward slash (/ ) delimited list of match results for team ABC . For example, |res_ABC=W/D/D/W/L for five rounds with the round-by-round results of win, draw, draw, win, loss. Note, this parameter cannot be used if |pos_ABC= is being used.
|
Color
The module has several preset background colors that have acceptable contrast with black foreground text. It is recommended to use one of these colors, which match colors used by Module:Sports table.
Name | Hex value |
---|---|
green1 | BBF3BB |
green2 | CCF9CC |
green3 | DDFCDD |
green4 | EEFFEE |
blue1 | BBF3FF |
blue2 | CCF9FF |
blue3 | DDFCFF |
blue4 | EEFFFF |
Name | Hex value |
---|---|
yellow1 | FFFFBB |
yellow2 | FFFFCC |
yellow3 | FFFFDD |
yellow4 | FFFFEE |
red1 | FFBBBB |
red2 | FFCCCC |
red3 | FFDDDD |
red4 | FFEEEE |
Name | Hex value |
---|---|
black1 | BBBBBB |
black2 | CCCCCC |
black3 | DDDDDD |
black4 | EEEEEE |
1st | FFD700 |
2nd | C0C0C0 |
3rd | CC9966 |
In some rare cases, it may be necessary to override the background color for a particular cell. This can be accomplished using |posX_rndY_color=
or |resX_rndY_color=
where X
is the row number, and Y
is the round number.
Examples
Example 1: Compact positions syntax
First place | |
Promoted | |
Championship League | |
Relegated |
<syntaxhighlight lang=moin>
First place | |
Promoted | |
Championship League | |
Relegated |
</syntaxhighlight>
Example 2: Sports table positions syntax
First place | |
Promoted | |
Championship League | |
Relegated |
<syntaxhighlight lang=moin>
First place | |
Promoted | |
Championship League | |
Relegated |
</syntaxhighlight>
Example 3: Team combined table
<syntaxhighlight lang=moin>
</syntaxhighlight>
Example 4: Team combined table with a legend
A = Away; H = Home; W = Win; D = Draw; L = Loss
<syntaxhighlight lang=moin>
A = Away; H = Home; W = Win; D = Draw; L = Loss
</syntaxhighlight>
See also
Tracking category
- Category:Pages using sports rbr table with dubious updated parameter (0) (pages where the updated date does not match the parent page name)
- Category:Pages using sports rbr table with legendorder (2) (pages where the
|legendorder=
parameter is used) - Category:Pages using sports rbr table with rnd parameters (0) (pages where the
|rnd1=
parameter is used and may be converted to|firstround=
) - Category:Pages using sports rbr table with unsupported parameters (0) (pages where unsupported parameters are used, or where the
|header=
is potentially missing) - Category:Pages using sports rbr table with conflicting parameters (0)
- Category:Pages using sports rbr table with an undescribed result (2)
- Category:Pages using sports rbr table with an unusual source (0)
- Category:Pages using sports rbr table with unequal row lengths (0)
- Category:Pages using sports rbr table with per team and round coloring (0)