模組:Sports table/WL OT/doc
这是Module:Sports table/WL OT的文档页面
![]() | 此模块文档已评为通行版,稳定可靠,可各处使用无误。已可在帮助页面和其他维基百科资源中提及,以帮助新用户学习。为降低服务器负载和错误输出,改善本模块前应进行沙盒测试,而不是重复的试错性编辑。 |
This style for Lua-based Module:Sports table is meant to build group and league tables for competitions with a win-loss format decided either in regular time or in overtime/shootout. Note that this module is used extensively, so test potential changes rigorously in the sandbox and please ensure consensus exists before implementing major changes. The rest of this documentation explains how to use this module with the WL OT style in an article or template, check the table of contents for specific items.
Usage
Basic usage
In it's simplest form only several parameters need to be used to build a table
In article
What you type | {{#invoke:Sports table|main|style=WL OT
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
What it looks like |
最後更新:unknown。 資料來源:[來源請求]
|
The main command is the {{#invoke:Sports table|main|style=WL OT}} statement which basically calls the module and enables you to set everything up. Then you list the positions of the teams as |team1=
, |team2=
, etc for however many teams you need in the table. You can use full team names there without spaces if you want, but using codes (as in the example) can make it easier. For each team you now define the wins, OT wins, OT losses, losses, goals for and goals against by using |win_TTT=
, |OTwin_TTT=
, |OTloss_TTT=
, |loss_TTT=
, |gf_TTT=
and |ga_TTT=
respectively (with TTT replaced by the team code). If you do not define these numbers, it is automatically assumed to be 0. It is good practice though to include them anyway and to align the columns using appropriate spaces (as in the example), so the code is easy to read. The last step now is to define the |name_TTT=
parameters which determine what name is shown in the table, you can use wiki markup and templates in here as well. See #Dating to see how to change the update date.
In template
What you type | {{#invoke:Sports table|main|style=WL OT
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
What it looks like |
最後更新:unknown。 資料來源:[來源請求]
|
The markup is effectively the same, you only add two lines. The line |showteam={{{showteam}}}
, is needed to forward the showteam parameter from a template call (see #Team highlighting and partial table); the |only_pld_pts={{{only_pld_pts}}}
is needed to forward truncated tables, (see #Appearance); the |show_matches={{{show_matches}}}
is needed to forward match result visibility, see #Matches. The |template_name=
with the actual name of the Template-page, creates the V, T and E buttons that link to the template page (so you can easily reach it from any article it is included in).
Customization
Several things can be customized in these tables
Points
What you type | {{#invoke:Sports table|main|style=WL OT
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
What it looks like |
最後更新:unknown。 資料來源:[來源請求]
|
As a default a win is worth 3 points, an OT win 2 points, an OT loss 1 point and a loss 0 points, these values can be overwritten to what you need by |winpoints=
, |OTwinpoints=
, |OTlosspoints=
and |losspoints=
. Teams can also start the season with bonus or penalty points, this can be included by using |adjust_points_TTT=
for that specific team.
Header options (points for/against and custom other headers)
What you type | {{#invoke:Sports table|main|style=WL OT
| |||||||||||
What it looks like |
最後更新:unknown。 資料來源:[來源請求]
|
For sports with points for and against rather than goals, setting |for_against_style=points
switches the for, against and difference columns to using points instead. The wording of the OTW and OTL columns can be adjusted using |OTwin_header=
and|OTloss_header=
.
The wording of the Grp (group) column can be adjusted using |group_header=
, for example |group_header=<abbr title="League">Lge</abbr>
.
Goal ratio/goal average
What you type | {{#invoke:Sports table|main|style=WL OT
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
What it looks like |
最後更新:unknown。 資料來源:[來源請求]
|
Using |use_goal_ratio=yes
use goal ratio (goal average) instead of goal differential.
Module:Sports table/doc/doc
Footer options
What you type | {{#invoke:Sports table|main|style={{{style_option}}}
|
What it looks like | package.lua第80行Lua错误:module 'Module:Sports table/{{{style_option}}}' not found |
The footer information can be customized (although notes and status will be inserted automatically if they are called; see XXX and YYY). The update date is set by |update=
, see below for details. If no source is given a citation-needed tag is shown, |source=
can provide an actual link. The classification results can be shown with |class_rules=
, either directly or as a wikilink to a tie-breaker rules section. Using |only_pld_pts=no_hide_class_rules
suppresses the classification rules (this should only be used in template calls when multiple groups are summarized on a page and the rules are listed elsewhere on that page).
Dating
The default description is match(es), this can be changed by calling |matches_text=
for any other term.
- Active season
What you type | {{#invoke:Sports table|main|style={{{style_option}}}
|
What it looks like | package.lua第80行Lua错误:module 'Module:Sports table/{{{style_option}}}' not found |
When the season is active, the footer should include the date of the last match played that is included in the table. This can be achieved by setting |update=date
.
- Completed season
What you type | {{#invoke:Sports table|main|style={{{style_option}}}
|
What it looks like | package.lua第80行Lua错误:module 'Module:Sports table/{{{style_option}}}' not found |
When all matches have been played, the season is completed and the update line can be removed by setting |update=complete
.
- Future season
What you type | {{#invoke:Sports table|main|style={{{style_option}}}
|
What it looks like | package.lua第80行Lua错误:module 'Module:Sports table/{{{style_option}}}' not found |
Before any games are played, the date of the first game should be indicated by using |update=future
and setting the start date by |start_date=
.
Stacking
Using |only_pld_pts=
makes the table smaller, which may lead to undesired width and linebreaks in the footer that can be fixed with parameter |status_footer=
. By setting |status_footer=yes
(or y, t, true or 1 or upper case variant of those) every new information, such as "source" and statuses, is displayed on a new row.
- Without status_footer
What you type | {{#invoke:Sports table|main|style={{{style_option}}}
|
What it looks like | package.lua第80行Lua错误:module 'Module:Sports table/{{{style_option}}}' not found |
- With status_footer
What you type | {{#invoke:Sports table|main|style={{{style_option}}}
|
What it looks like | package.lua第80行Lua错误:module 'Module:Sports table/{{{style_option}}}' not found |
Appearance
What you type | {{#invoke:Sports table|main|style={{{style_option}}}
|
What it looks like | package.lua第80行Lua错误:module 'Module:Sports table/{{{style_option}}}' not found |
What you type | {{#invoke:Sports table|main|style={{{style_option}}}
|
What it looks like | package.lua第80行Lua错误:module 'Module:Sports table/{{{style_option}}}' not found |
What you type | {{#invoke:Sports table|main|style={{{style_option}}}
|
What it looks like | package.lua第80行Lua错误:module 'Module:Sports table/{{{style_option}}}' not found |
Only the position, team, matches and points columns can be displayed by defining |only_pld_pts=yes
(or y, t, true or 1 or upper case variant of those); |only_pld_pts=no_hide_class_rules
suppresses the classification rules only (this should only be used in template calls when multiple groups are summarized on a page and the rules are listed elsewhere on that page).
A line can be added between section of the table (if desired) by adding |splitN=
with N the position below which the bar should be shown. (Note that this bar will not be shown for the bottom position in the table).
A custom width of the team column can be set by |teamwidth=
, for example when multiple groups exist within one tournament and you want to force the same width on all groups.
The position column header can be customized by |postitle=
and the position labels by |pos_TTT=
for each team.
When multiple a table compares teams from multiple groups, the group can also be listed by setting |show_groups=yes
(or y, t, true or 1 or upper case variant of those) and using |group_TTT=
to indicate what teams comes from what group. The group column header can be customized by |group_header=
, for example |group_header=<abbr title="League">Lge</abbr>
.
Example usage
The module parameters can be arranged in different orders depending on the editor and article but below is an example use that can be copied when creating a module table.
What you type | {{#invoke:Sports table|main|style=WL OT
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
What it looks like |
首場比賽將於Unknown開始。資料來源:Unknown
排名規則:1) Points; 2) Goal difference; 3) Number of goals scored; (A) 晉級下一圈; (C) 冠軍; (Q) 晉身到指定賽事階段; (R) 降班; (T) 已確定晉級,但未確定到指定階段 |