Module:Sports table/Rugby/doc: Difference between revisions
Appearance
Content deleted Content added
syntaxhighlight lang="wikitext" |
→Usage: Updated to reflect how Module:Sports table/WDL/doc is written, and added bonus_total note |
||
Line 18: | Line 18: | ||
|'''What you type''' |
|'''What you type''' |
||
|<syntaxhighlight lang="wikitext">{{#invoke:sports table|main|style=Rugby |
|<syntaxhighlight lang="wikitext">{{#invoke:sports table|main|style=Rugby |
||
⚫ | |||
<!-- Add team codes and names here --> |
|||
| title = Wikipedia Cup |
|||
| team1 = AAA | name_AAA = Team AAA |
| team1 = AAA | name_AAA = Team AAA |
||
| team2 = BBB | name_BBB = Team BBB |
| team2 = BBB | name_BBB = Team BBB |
||
Line 28: | Line 28: | ||
| team7 = GGG | name_GGG = Team GGG |
| team7 = GGG | name_GGG = Team GGG |
||
| team8 = HHH | name_HHH = Team HHH |
| team8 = HHH | name_HHH = Team HHH |
||
| win_AAA = 10 | draw_AAA =0| loss_AAA =4| pf_AAA =492| pa_AAA =300| tf_AAA =62| ta_AAA =30| tbp_AAA =9 | lbp_AAA =3 |
|||
<!-- Update results here and then (if needed) positions below. Don't forget to update the date below (update parameter) --> |
|||
| win_BBB = 10 | draw_BBB =0| loss_BBB =4| pf_BBB =520| pa_BBB =280| tf_BBB =59| ta_BBB =28| tbp_BBB =6 | lbp_BBB =2 |
|||
| |
| win_AAA=0 | draw_AAA=0 | loss_AAA=0 | pf_AAA=0 | pa_AAA=0 | tf_AAA=0 | ta_AAA=0 | tb_AAA=0 | lb_AAA=0 | status_AAA=CQ |
||
| |
| win_BBB=0 | draw_BBB=0 | loss_BBB=0 | pf_BBB=0 | pa_BBB=0 | tf_BBB=0 | ta_BBB=0 | tb_BBB=0 | lb_BBB=0 | status_BBB=Q |
||
| |
| win_CCC=0 | draw_CCC=0 | loss_CCC=0 | pf_CCC=0 | pa_CCC=0 | tf_CCC=0 | ta_CCC=0 | tb_CCC=0 | lb_CCC=0 | status_CCC=A |
||
| |
| win_DDD=0 | draw_DDD=0 | loss_DDD=0 | pf_DDD=0 | pa_DDD=0 | tf_DDD=0 | ta_DDD=0 | tb_DDD=0 | lb_DDD=0 | status_DDD=T |
||
| |
| win_EEE=0 | draw_EEE=0 | loss_EEE=0 | pf_EEE=0 | pa_EEE=0 | tf_EEE=0 | ta_EEE=0 | tb_EEE=0 | lb_EEE=0 | status_EEE= |
||
| |
| win_FFF=0 | draw_FFF=0 | loss_FFF=0 | pf_FFF=0 | pa_FFF=0 | tf_FFF=0 | ta_FFF=0 | tb_FFF=0 | lb_FFF=0 | status_FFF= |
||
| win_GGG=0 | draw_GGG=0 | loss_GGG=0 | pf_GGG=0 | pa_GGG=0 | tf_GGG=0 | ta_GGG=0 | tb_GGG=0 | lb_GGG=0 | status_GGG=R |
|||
| class_rules = 4 points for a win; 2 points for a draw; 1 bonus point for a loss by seven points or less; 1 bonus point for scoring four or more tries in a match |
|||
| win_HHH=0 | draw_HHH=0 | loss_HHH=0 | pf_HHH=0 | pa_HHH=0 | tf_HHH=0 | ta_HHH=0 | tb_HHH=0 | lb_HHH=0 | status_HHH=R |
|||
| col_SF = green2 | text_SF = Title Play-Off Semi-Final |
|||
⚫ | |||
<!-- Update team positions here --> |
|||
| col_RP = red2 | text_RP = Promotion/Relegation Play-Off |
|||
| team_order = AAA, BBB, CCC, DDD, EEE, FFF, GGG, HHH |
|||
| result7 = RP | result8 = RP |
|||
| update =complete|source=example.com |
|||
<!--Update team qualifications here (defined below)--> |
|||
⚫ | |||
<!-- Add promotion, qualification and/or relegation row colours and column definitions. Use green for top tournament, then blue followed by yellow; red is elimination. Different levels of same competitions should have different shades in color like green1, green2 and so on. --> |
|||
| res_col_header = QR <!-- All of these may not be needed, Promotion (P), Qualification (Q) and Relegation (R) --> |
|||
| col_C = green2 | text_C = Continental Championship |
|||
| col_R = red2 | text_R = Division 2 |
|||
| start_date = Unknown <!-- Add start date. When tournament starts, remove start_date --> |
|||
| update = future <!-- When tournament starts, update the with date of latest update --> |
|||
| source = Unknown <!-- Add source for table here with single bracket, e.g. [URL info] --> |
|||
| class_rules = 1) competition points; 2) match points difference; 3) match points for <!-- Add classification rules here --> |
|||
}}</syntaxhighlight> |
}}</syntaxhighlight> |
||
|- |
|- |
||
|'''What it looks like''' |
|'''What it looks like''' |
||
|{{#invoke:sports table|main|style=Rugby |
| {{#invoke:sports table|main|style=Rugby |
||
| res_col_header = Q |
|||
| title = Wikipedia Cup |
|||
| team1 = AAA | name_AAA = Team AAA |
| team1 = AAA | name_AAA = Team AAA |
||
| team2 = BBB | name_BBB = Team BBB |
| team2 = BBB | name_BBB = Team BBB |
||
Line 56: | Line 67: | ||
| team7 = GGG | name_GGG = Team GGG |
| team7 = GGG | name_GGG = Team GGG |
||
| team8 = HHH | name_HHH = Team HHH |
| team8 = HHH | name_HHH = Team HHH |
||
| win_AAA = 10 | draw_AAA =0| loss_AAA =4| pf_AAA =492| pa_AAA =300| tf_AAA =62| ta_AAA =30| tbp_AAA =9 | lbp_AAA =3 |
|||
| |
| win_AAA=0 | draw_AAA=0 | loss_AAA=0 | pf_AAA=0 | pa_AAA=0 | tf_AAA=0 | ta_AAA=0 | tb_AAA=0 | lb_AAA=0 | status_AAA=CQ |
||
| |
| win_BBB=0 | draw_BBB=0 | loss_BBB=0 | pf_BBB=0 | pa_BBB=0 | tf_BBB=0 | ta_BBB=0 | tb_BBB=0 | lb_BBB=0 | status_BBB=Q |
||
| |
| win_CCC=0 | draw_CCC=0 | loss_CCC=0 | pf_CCC=0 | pa_CCC=0 | tf_CCC=0 | ta_CCC=0 | tb_CCC=0 | lb_CCC=0 | status_CCC=A |
||
| |
| win_DDD=0 | draw_DDD=0 | loss_DDD=0 | pf_DDD=0 | pa_DDD=0 | tf_DDD=0 | ta_DDD=0 | tb_DDD=0 | lb_DDD=0 | status_DDD=T |
||
| |
| win_EEE=0 | draw_EEE=0 | loss_EEE=0 | pf_EEE=0 | pa_EEE=0 | tf_EEE=0 | ta_EEE=0 | tb_EEE=0 | lb_EEE=0 | status_EEE= |
||
| |
| win_FFF=0 | draw_FFF=0 | loss_FFF=0 | pf_FFF=0 | pa_FFF=0 | tf_FFF=0 | ta_FFF=0 | tb_FFF=0 | lb_FFF=0 | status_FFF= |
||
| |
| win_GGG=0 | draw_GGG=0 | loss_GGG=0 | pf_GGG=0 | pa_GGG=0 | tf_GGG=0 | ta_GGG=0 | tb_GGG=0 | lb_GGG=0 | status_GGG=R |
||
| win_HHH=0 | draw_HHH=0 | loss_HHH=0 | pf_HHH=0 | pa_HHH=0 | tf_HHH=0 | ta_HHH=0 | tb_HHH=0 | lb_HHH=0 | status_HHH=R |
|||
| class_rules = 4 points for a win; 2 points for a draw; 1 bonus point for a loss by seven points or less; 1 bonus point for scoring four or more tries in a match |
|||
| col_SF = green2 | text_SF = Title Play-Off Semi-Final |
|||
| team_order = AAA, BBB, CCC, DDD, EEE, FFF, GGG, HHH |
|||
⚫ | |||
| col_RP = red2 | text_RP = Promotion/Relegation Play-Off |
|||
⚫ | |||
| result7 = RP | result8 = RP |
|||
| update =complete|source=example.com |
|||
⚫ | |||
| col_C = green2 | text_C = Continental Championship |
|||
| col_R = red2 | text_R = Division 2 |
|||
| start_date = Unknown |
|||
| update = future |
|||
| source = example.com |
|||
| class_rules = 1) competition points; 2) match points difference; 3) match points for |
|||
}} |
}} |
||
|} |
|} |
||
===Additional parameters=== |
===Additional parameters=== |
||
# To merge the "bonus points" columns into one, use {{para|bonus_total}} |
|||
# To hide the "bonus points" columns, use {{para|show_bonus|no}} |
# To hide the "bonus points" columns, use {{para|show_bonus|no}} |
||
# To hide the "draws" column, use {{para|show_draw|no}} |
# To hide the "draws" column, use {{para|show_draw|no}} |
Revision as of 18:51, 6 June 2023
This style for Lua-based Module:Sports table is meant to build group and league tables for rugby competitions with the following optional columns
- Played / Wins / Draws / Losses
- Points for / Points against / Point difference
- Tries for / Tries against
- Try bonus points
- Loss bonus points
- Competition points
The input syntax for this module is similar to the WDL module, but specialized for Rugby competitions.
Usage
Basic usage
In its simplest form only several parameters need to be used to build a table
What you type | {{#invoke:sports table|main|style=Rugby
<!-- Add team codes and names here -->
| team1 = AAA | name_AAA = Team AAA
| team2 = BBB | name_BBB = Team BBB
| team3 = CCC | name_CCC = Team CCC
| team4 = DDD | name_DDD = Team DDD
| team5 = EEE | name_EEE = Team EEE
| team6 = FFF | name_FFF = Team FFF
| team7 = GGG | name_GGG = Team GGG
| team8 = HHH | name_HHH = Team HHH
<!-- Update results here and then (if needed) positions below. Don't forget to update the date below (update parameter) -->
| win_AAA=0 | draw_AAA=0 | loss_AAA=0 | pf_AAA=0 | pa_AAA=0 | tf_AAA=0 | ta_AAA=0 | tb_AAA=0 | lb_AAA=0 | status_AAA=CQ
| win_BBB=0 | draw_BBB=0 | loss_BBB=0 | pf_BBB=0 | pa_BBB=0 | tf_BBB=0 | ta_BBB=0 | tb_BBB=0 | lb_BBB=0 | status_BBB=Q
| win_CCC=0 | draw_CCC=0 | loss_CCC=0 | pf_CCC=0 | pa_CCC=0 | tf_CCC=0 | ta_CCC=0 | tb_CCC=0 | lb_CCC=0 | status_CCC=A
| win_DDD=0 | draw_DDD=0 | loss_DDD=0 | pf_DDD=0 | pa_DDD=0 | tf_DDD=0 | ta_DDD=0 | tb_DDD=0 | lb_DDD=0 | status_DDD=T
| win_EEE=0 | draw_EEE=0 | loss_EEE=0 | pf_EEE=0 | pa_EEE=0 | tf_EEE=0 | ta_EEE=0 | tb_EEE=0 | lb_EEE=0 | status_EEE=
| win_FFF=0 | draw_FFF=0 | loss_FFF=0 | pf_FFF=0 | pa_FFF=0 | tf_FFF=0 | ta_FFF=0 | tb_FFF=0 | lb_FFF=0 | status_FFF=
| win_GGG=0 | draw_GGG=0 | loss_GGG=0 | pf_GGG=0 | pa_GGG=0 | tf_GGG=0 | ta_GGG=0 | tb_GGG=0 | lb_GGG=0 | status_GGG=R
| win_HHH=0 | draw_HHH=0 | loss_HHH=0 | pf_HHH=0 | pa_HHH=0 | tf_HHH=0 | ta_HHH=0 | tb_HHH=0 | lb_HHH=0 | status_HHH=R
<!-- Update team positions here -->
| team_order = AAA, BBB, CCC, DDD, EEE, FFF, GGG, HHH
<!--Update team qualifications here (defined below)-->
| result1=C | result2=C | result3=C | result4=C | result7=R | result8=R
<!-- Add promotion, qualification and/or relegation row colours and column definitions. Use green for top tournament, then blue followed by yellow; red is elimination. Different levels of same competitions should have different shades in color like green1, green2 and so on. -->
| res_col_header = QR <!-- All of these may not be needed, Promotion (P), Qualification (Q) and Relegation (R) -->
| col_C = green2 | text_C = Continental Championship
| col_R = red2 | text_R = Division 2
| start_date = Unknown <!-- Add start date. When tournament starts, remove start_date -->
| update = future <!-- When tournament starts, update the with date of latest update -->
| source = Unknown <!-- Add source for table here with single bracket, e.g. [URL info] -->
| class_rules = 1) competition points; 2) match points difference; 3) match points for <!-- Add classification rules here -->
}}
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
What it looks like |
First match(es) will be played: Unknown. Source: example.com
Rules for classification: 1) competition points; 2) match points difference; 3) match points for (A) Advances to a further round; (C) Champion; (Q) Qualified for the phase indicated; (R) Relegated; (T) Qualified, but not yet for the particular phase indicated |
Additional parameters
- To merge the "bonus points" columns into one, use
|bonus_total=
- To hide the "bonus points" columns, use
|show_bonus=no
- To hide the "draws" column, use
|show_draw=no
- To hide the "tries for" column, use
|show_tries_for=no
- To hide the "tries against" column, use
|show_tries_against=no
- To add "points carried forward" to the next round, use
|show_cf=yes
- To override the default number of "win points", use
|winpoints=
- To override the default number of "draw points", use
|drawpoints=
- To override the default number of "loss points", use
|losspoints=