มอดูล:Sports series/doc

This is a module for generating match results for a sports series, such as a two-legged tie. However, the module can support single-leg ties up to an unlimited number of legs. The template supports domestic and international football matches. While designed for association football, it can be used for any sport that features a series between teams.

**Usage**
In its simplest form, only a few parameters are needed to build a table.

**International club football**
For two-legged ties in international club football, seven parameters are expected to be passed for each row. This includes each club's name and national association country name/code, the aggregate score and the score of both legs.

**National team or domestic club football**
For two-legged ties in national team or domestic club football, five parameters are expected to be passed for each row. This includes each club's name, the aggregate score and the score of both legs. The parameter n must be passed to disable the country flag parameter.

**Examples**

**International club football**
 Usage
 Output

**Domestic club football**
 Usage
 Output

**National team football**
 Usage
 Output

**Parameter list**
Below is a full list of the named parameters for this module. Additionally, the unnamed parameters are used to pass the teams and scores of each of the ties (as shown above). All parameters are optional.

**Other features/notes**
Please note that in order to display a row in the table, at least one cell of said row must have value that is not empty or whitespace (this includes the note parameters for the aggregate and leg score columns). Otherwise, the module will not create a row for that line and all others below it.

**Team country codes**
The country codes supplied for each club are by default wrapped into fbaicon, based on Wikipedia's country data system of templates, and displayed next to each team.

**Leg and aggregate scores**
For the legs and aggregate scores, all incorrect types of dashes (such as a hyphen, em dash or minus sign) will be converted to an en dash (–). This does not apply to dashes contained in the article title/section anchor portion of wikilinks. These cells will also have  nowrap applied to them, as long as two or more sets of parentheses are not present.
In addition, the module will also automatically convert text in brackets (as it relates to how matches were decided) to wikilinks. The following are supported:- (X–Y p), (X–Y pen) or (X–Y pso)  - (aet) or (a.e.t.)  - (a) or (agr)  
 Usage
 Output

**Null/nil leg scores**
If a cell of one of the leg scores contains only null, the cell will only contain an em dash (—). If y, then this em dash will be linked. However, if y, then the cell will be left empty and given a background color of grey (#BBBBBB).
If a cell of one of the leg scores contains only nil, the cell will not be generated.
These features are useful for rounds of competitions that have an inconsistent number of legs, for example competitions that have a possible replay or play-off match after two legs.
 Usage 1 (for null)
 Output 1 (for null)
 Usage 2 (for null, y)
 Output 2 (for null, y)
 Usage 3 (for nil)
 Output 3 (for nil)

**Simplified anchor links**
Pages utilizing this module often include a wikilink with an anchor to the scores of the legs of a tie, linking to full match summaries.
Typically, when using anchored wikilinks, the page title can be omitted if the anchor appears on the same page. However, such links generally do not function properly when transcluded to other articles.
However, for this module, if any parameter contains an anchored wikilink that omits the page title (for example, ), the module will automatically insert the page title during transclusion to ensure proper linking. For proper functionality, the "sports series" module code must originate from the same page that contains the anchors.

**Quasi-parameters**

**Plus sign (+) for country codes/flag variants**
To allow for the use of flag variants, this module supports within the country code parameter the use of a plus sign (+) in between the country name/code and the name of the flag variant.
 Usage
 Output

**Three apostrophes () for manual bolding**
While the template automatically bolds winning teams (unless n), in some situations the module will be unable to determine the winner. Or, some users may find it undesirable to have the module bold the winner automatically. In these cases, manual bolding can be used to indicate the winning team of a tie. This can be done by placing the three apostrophes before and after the name of the team. If bold_winner is not disabled, the team that is manually bolded will override the winning team as determined by the module. If color_winner is also set, the cell of the team that is manually bolded will also be colored.
This may be used in conjunction with the below method by using five apostrophes on either side of a team to bold and color the cell.
(Note: The usage of three apostrophes was slightly modified for the purposes of this module to bold the cell. Therefore, it is not possible to selectively bold parts of the team parameters, while leaving other parts of said parameter unbolded.)
 Usage 1
 Output 1
 Usage 2 (third row overrides automatic bolding)
 Output 2 (third row overrides automatic bolding)

**Two apostrophes () for manual coloring**
While the template allows for automatic coloring of the cells of winning teams via y, in some situations (such as matches tied on away goals) the module will be unable to determine the winner. Or, some users may find it undesirable to use color_winner to color the winner automatically. In these cases, manual coloring can be used to indicate the winning team of a tie. This can be done by placing the two apostrophes before and after the name of the team. If color_winner is set, the cell of team that is manually colored will override the winning team as determined by the module. If bold_winner is not disabled, the cell of the team that is manually colored will also be bolded.
This may be used in conjunction with the above method by using five apostrophes on either side of a team to color and bold the cell.
Two apostrophes surrounding an aggregate score (or the score of a single-leg tie) can also be used to manually indicate a draw/tie.
(Note: While two apostrophes surrounding both sides of text are usually used to add italics in wikitext, the usage was modified here to allow for a simple way to color the cell. Therefore, it is not possible to italicize team names or aggregate scores using this formatting.)
 Usage 1
 Output 1
 Usage 2 (third row overrides automatic coloring)
 Output 2 (third row overrides automatic coloring)
 Usage 3
 Output 3

**See also**
 Module:Sports results- Module:Sports table