Open main menu
Home
Random
Donate
Recent changes
Special pages
Community portal
Preferences
About Stockhub
Disclaimers
Search
User menu
Talk
Contributions
Create account
Log in
Editing
Module:Sports table/Chess/doc
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
====Customizing the crosstable==== There are a few parameters that can be used to customize crosstables. {| class="wikitable" style="background:white;" |- |'''What you type''' |<syntaxhighlight lang=moin>{{#invoke:Sports table|main|style=Chess |team1=AAA |team2=BBB |team3=CCC |team4=DDD |team5=CAR |name_AAA=[[Grandmaster (chess)|Grandmaster]] |name_BBB=Team 2 |name_CCC=Team 3 |short_CCC={{Abbr|3|Team 3}} |name_DDD=Team 4 |name_CAR={{flagathlete|[[Fabiano Caruana]]|USA}} |show_matches=yes |crosstable_fractions=yes |short_style=noflag |solid_cell=silver |match_AAA_BBB=1+0+½+½ |match_AAA_CCC=1+½ |match_AAA_DDD=½+ |match_AAA_CAR= +0 |hth_AAA=2 |match_BBB_AAA=1+0+½+½ |match_BBB_CCC=½+½ |match_BBB_DDD=½+0 |match_BBB_CAR=½ |hth_BBB=2 |match_CCC_AAA=0+½ |bgcol_CCC_AAA=B+W |match_CCC_BBB=½+½ |match_CCC_DDD=1 |match_CCC_CAR= |match_DDD_AAA= +½ |match_DDD_BBB=1+½ |match_DDD_CCC= +0 |match_CAR_AAA=1+ |bgcol_CAR_AAA=W+W+W+W+W+W+W+W+W |match_CAR_BBB= +½ }}</syntaxhighlight> |- |'''What it looks like''' |{{#invoke:Sports table|main|style=Chess |team1=AAA |team2=BBB |team3=CCC |team4=DDD |team5=CAR |name_AAA=[[Grandmaster (chess)|Grandmaster]] |name_BBB=Team 2 |name_CCC=Team 3 |short_CCC={{Abbr|3|Team 3}} |name_DDD=Team 4 |name_CAR={{flagathlete|[[Fabiano Caruana]]|USA}} |show_matches=yes |crosstable_fractions=yes |short_style=noflag |solid_cell=silver |match_AAA_BBB=1+0+½+½ |match_AAA_CCC=1+½ |match_AAA_DDD=½+ |match_AAA_CAR= +0 |hth_AAA=2 |match_BBB_AAA=1+0+½+½ |match_BBB_CCC=½+½ |match_BBB_DDD=½+0 |match_BBB_CAR=½ |hth_BBB=2 |match_CCC_AAA=0+½ |bgcol_CCC_AAA=B+W |match_CCC_BBB=½+½ |match_CCC_DDD=1 |match_CCC_CAR= |match_DDD_AAA= +½ |match_DDD_BBB=1+½ |match_DDD_CCC= +0 |match_CAR_AAA=1+ |bgcol_CAR_AAA=W+W+W+W+W+W+W+W+W |match_CAR_BBB= +½ }} |} {| class="wikitable" style="background:white;" |- |'''What you type''' |<syntaxhighlight lang=moin>{{#invoke:Sports table|main|style=Chess |team1=AAA |team2=BBB |team3=CCC |team4=DDD |team5=CAR |name_AAA=[[Grandmaster (chess)|Grandmaster]] |name_BBB=Team 2 |name_CCC=Team 3 |short_CCC={{Abbr|3|Team 3}} |name_DDD=Team 4 |name_CAR={{flagathlete|[[Fabiano Caruana]]|USA}} |show_matches=yes |use_pos_short=yes |short_style=nocountry |colorbg=no |solid_cell=silver |match_AAA_BBB=1+0+½+½ |match_AAA_CCC=1+½ |match_AAA_DDD=½+ |match_AAA_CAR= +0 |hth_AAA=2 |match_BBB_AAA=1+0+½+½ |match_BBB_CCC=½+½ |match_BBB_DDD=½+0 |match_BBB_CAR=½ |hth_BBB=2 |match_CCC_AAA=0+½ |bgcol_CCC_AAA=B+W |match_CCC_BBB=½+½ |match_CCC_DDD=1 |match_CCC_CAR= |match_DDD_AAA= +½ |match_DDD_BBB=1+½ |match_DDD_CCC= +0 |match_CAR_AAA=1+ |bgcol_CAR_AAA=W+W+W+W+W+W+W+W+W |match_CAR_BBB= +½ }}</syntaxhighlight> |- |'''What it looks like''' |{{#invoke:Sports table|main|style=Chess |team1=AAA |team2=BBB |team3=CCC |team4=DDD |team5=CAR |name_AAA=[[Grandmaster (chess)|Grandmaster]] |name_BBB=Team 2 |name_CCC=Team 3 |short_CCC={{Abbr|3|Team 3}} |name_DDD=Team 4 |name_CAR={{flagathlete|[[Fabiano Caruana]]|USA}} |show_matches=yes |use_pos_short=yes |short_style=nocountry |colorbg=no |solid_cell=silver |match_AAA_BBB=1+0+½+½ |match_AAA_CCC=1+½ |match_AAA_DDD=½+ |match_AAA_CAR= +0 |hth_AAA=2 |match_BBB_AAA=1+0+½+½ |match_BBB_CCC=½+½ |match_BBB_DDD=½+0 |match_BBB_CAR=½ |hth_BBB=2 |match_CCC_AAA=0+½ |bgcol_CCC_AAA=B+W |match_CCC_BBB=½+½ |match_CCC_DDD=1 |match_CCC_CAR= |match_DDD_AAA= +½ |match_DDD_BBB=1+½ |match_DDD_CCC= +0 |match_CAR_AAA=1+ |bgcol_CAR_AAA=W+W+W+W+W+W+W+W+W |match_CAR_BBB= +½ }} |} As shown in this example, no parameter is needed to determine the number of games per match. This is calculated automatically from the largest number of plus signs in the match data. If the {{para|use_pos_short}} parameter is set to "yes", then the automatically generated short name is generated from the position in the table rather than the team code. In the previous example, when no {{para|short_XXX}} parameter was given for a team whose {{para|name_XXX}} contained a <nowiki>{{flagathlete}}</nowiki> template, a short column header was created containing the appropriate flag. However, when {{para|short_style}} is set to "noflag", then no flag is displayed in the automatically created header. If instead {{para|short_style}} is set to "nocountry", then no country code is displayed in the automatically created header as well as no flag. Column headers explicitly defined by {{para|short_XXX}} are not affected by {{para|use_pos_short}} or {{para|short_style}}. If the parameter {{para|crosstable_fractions}} is set to yes, then draws in the crosstable will be displayed as {{frac|1|2}} instead of using the unicode character ½. While the games in a match typically show the white background first, and the black background second, this behavior can be changed using the {{para|bgcol_XXX_YYY}} parameter. When no {{para|bgcol_XXX_YYY}} data is present, the background alternates between white and black for each successive game. If the {{para|colorbg}} parameter is set to no, then no cells in the crosstable will be colored black, even if there is {{para|bgcol_XXX_YYY}} data present. The {{para|solid_cell}} parameter determines the color of the cells of the crosstable's main diagonal. Currently, {{para|solid_cell}} may take on the values "gray", "grey", "lightgray", "lightgrey", or "silver", as well as "#xxx" or "#xxxxxx" where the x indicates a valid [[hexadecimal]] digit. If no value or an invalid value is given, then the entries on the main diagonal will display an [[Em dash]] in a cell with the table background color.
Summary:
Please note that all contributions to Stockhub may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Stockhub:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)