Module:Sports series/doc: Difference between revisions

Content deleted Content added
update documentation
add
Line 141:
 
When this parameter is enabled for single-leg ties, the score cell of any draws will be automatically given a background color of {{bg|#FFFFBB|yellow (#FFFFBB)}}.
|style="background-color:#fff"|String
 
|-
 
|style="text-align:center;vertical-align:top"|{{TOC tab|generate_links}}
|style="background-color:#fff"|To enable, set to a positive value (e.g. y, yes, 1). Automatically generates wikilinks around match scores, linking to anchors in the format of "[Team 1] v [Team 2]" for the first leg and single-leg ties, and "[Team 2] v [Team 1]" for the second leg. If the first and/or second team from a tie is missing, the text within the anchor will default to "Team 1" and/or "Team 2", respectively. A link will be placed around the match score (or match date for future fixtures), excluding any text in parentheses, unless a link is already present around the score, in which case no change will be made.
|style="background-color:#fff"|String
 
Line 158 ⟶ 164:
 
|style="text-align:center;vertical-align:top"|{{TOC tab|small_text}}
|style="background-color:#fff"|Automatically enabled by default. To disable, set to a negative value (e.g. n, no, 0). The module automatically generates small text (85% font size) for legs (or the score column for single-leg ties) when no match score is present, and no small text exists in the cell already. This is to allow for the proper formatting of future matches, which typically lists the date of the fixture in a reduced font size. Small text is not applied to any references, notes or superscripts present.
|style="background-color:#fff"|String
 
Line 244 ⟶ 250:
 
|style="text-align:center;vertical-align:top"|{{TOC tab|nowrap}}
|style="background-color:#fff"|ToBy enabledefault, setonly tothe aaggregate/leg positivescores valueand (e.g.column y,headers yes, 1).will Addshave a [[Help:Table#Nowrap|nowrap]] value applied to the tablecell style.
 
To enable nowrap for the entire table, set to a positive value (e.g. y, yes, 1).
 
To disable nowrap for the cells that it is included for by default, set to a negative value (e.g. n, no, 0).
|style="background-color:#fff"|String
 
Line 252 ⟶ 262:
|style="background-color:#fff"|Modifies the font size of the table to a given percentage. The percentage sign is optional. Default is <code>100</code>. Due to [[MOS:SMALLTEXT]], values lower than 85% will be converted to 85%.
|style="background-color:#fff"|Number
 
|-
 
|style="text-align:center;vertical-align:top"|{{TOC tab|flag_size}}
|style="background-color:#fff"|Modifies the size of the flags to a specific pixel count. The size is specified in pixels: <code>'''''Width''''' px</code> or <code>x '''''Height''''' px</code> or <code>'''''Width''''' x '''''Height''''' px</code>. This scales the image to be no greater than the given width or height, keeping its aspect ratio. For more information, see [[Wikipedia:Extended image syntax]]. The trailing "px" text is optional. By default, the size is controlled by the [[Wikipedia:WikiProject Flag Template|flag icon or country data templates]], but is usually <code>23x15px</code>.
|style="background-color:#fff"|Number
 
|-
 
|style="text-align:center;vertical-align:top"|{{TOC tab|show_country}}
|style="background-color:#fff"|When set to a specific country name or code, only rows containing a team with that accompanying country name/code will be displayed in the final output. For example, if {{para|show_country|GER}}, rows only containing teams with the accompanying country code of "GER" (for Germany) will be displayed. Nothing will occur if {{para|flag|n}} is also set. Any custom headings within the table (set via {{para|heading''N''}}) will be suppressed when {{para|show_country}} is used.
 
This feature is useful when transcluding content to country-related articles, for example [[2024–25 in German football]]. However, note that if a module is being transcluded via [[Help:Labeled section transclusion|labeled section transclusion]], template parameters cannot be passed.
|style="background-color:#fff"|String
 
|-
Line 292 ⟶ 316:
 
|style="text-align:center;vertical-align:top"|{{TOC tab|h_a}}
|style="background-color:#fff"|To enable, set to a positive value (e.g. y, yes, 1). Changes the default column headers for the teams to "Home team" and "Away team". If {{para|team1}} and/or {{para|team2}} is set, those respective parameter(s) will override headers set by {{para|h_a}}.
|style="background-color:#fff"|String
 
Line 415 ⟶ 439:
 
=== 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 [[Help:Table#Nowrap|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:
Line 435 ⟶ 459:
 
=== Null/nil leg scores ===
If a cell of one of the leg scores contains only <code>null</code>, the cell will only contain an [[em dash]] (—). If {{para|generate_links|y}}, then this em dash will be linked. However, if {{para|solid_cell|y}}, then the cell will be left empty and given a background color of {{bg|#BBBBBB|grey (#BBBBBB)}}.
 
If a cell of one of the leg scores contains only <code>nil</code>, the cell will not be generated.