Content deleted Content added
m expand templates per TfD outcome |
m Archiving 1 discussion(s) from Module talk:Sports table) (bot |
||
Line 1,833:
:{{done}} — [[User:Jkudlick|Jkudlick]] ⚓ [[User_talk:Jkudlick|t]] ⚓ [[Special:Contributions/Jkudlick|c]] ⚓ [[User:Jkudlick/sandbox|s]] 14:20, 6 September 2017 (UTC)
== Anything similar? ==
Are there any similar tables already on Wikipedia? We're trying to use one for a chess tournament at [[Candidates Tournament 2018#Standings]] but it's not really suitable. Specifically, we don't need the "Pld" column, and we need 3 extra columns on the right for 3 different types of tie breaks. [[User:Adpete|Adpete]] ([[User talk:Adpete|talk]]) 05:37, 13 March 2018 (UTC)
: [[User:Adpete|Adpete]], can you provide a simple example showing the desired output? [[User:Frietjes|Frietjes]] ([[User talk:Frietjes|talk]]) 18:00, 13 March 2018 (UTC)
OK. Here is what we have at the moment. (The black and white squares indicate games with the black and white pieces (in chess, white moves first, which is a slight advantage, so every player plays every other player twice, once with white and once with black)).
{{#invoke:Sports table|main|style=WDL
|show_matches=true
|update=Round 3
|source=[http://theweekinchess.com/chessnews/events/fide-candidates-tournament-2018 FIDE Candidates Tournament 2018 at the The Week in Chess]
|only_pld_pts=yes
|team1=KRA |team2=MAM |team3=CAR |team4=GRI |team5=LIR |team6=KAR |team7=ARO |team8=SO
|win_KRA=2 |draw_KRA=1 |loss_KRA=0
|win_CAR=1 |draw_CAR=2 |loss_CAR=0
|win_ARO=0 |draw_ARO=2 |loss_ARO=1
|win_GRI=1 |draw_GRI=1 |loss_GRI=1
|win_KAR=0 |draw_KAR=2 |loss_KAR=1
|win_SO=0 |draw_SO=1 |loss_SO=2
|win_MAM=1 |draw_MAM=2 |loss_MAM=0
|win_LIR=0 |draw_LIR=3 |loss_LIR=0
|winpoints=1
|drawpoints=0.5
|losspoints=0
|team_header=Player
|name_KRA={{flagathlete|[[Vladimir Kramnik]]|RUS}} |short_KRA=KRA
|name_CAR={{flagathlete|[[Fabiano Caruana]]|USA}} |short_CAR=CAR
|name_ARO={{flagathlete|[[Levon Aronian]]|ARM}} | short_ARO=ARO
|name_GRI={{flagathlete|[[Alexander Grischuk]]|RUS}} | short_GRI=GRI
|name_KAR={{flagathlete|[[Sergey Karjakin]]|RUS}} |short_KAR=KAR
|name_MAM={{flagathlete|[[Shakhriyar Mamedyarov|Shakhriyar Mamedyarov]]|AZE}} |short_MAM=MAM
|name_LIR={{flagathlete|[[Ding Liren]]|CHN}} |short_LIR=LIR
|name_SO={{flagathlete|[[Wesley So]]|USA}} |short_SO=SO
|match_KRA_CAR={{color box|White||Black}}{{color box|Black||White}}
|match_KRA_ARO={{color box|White||Black}}{{color box|Black|1|White}}
|match_KRA_GRI={{color box|White|1|Black}}{{color box|Black||White}}
|match_KRA_KAR={{color box|White|½|Black}}{{color box|Black||White}}
|match_KRA_SO={{color box|White||Black}}{{color box|Black||White}}
|match_KRA_MAM={{color box|White||Black}}{{color box|Black||White}}
|match_KRA_LIR={{color box|White||Black}}{{color box|Black||White}}
|match_CAR_KRA={{color box|White||Black}}{{color box|Black||White}}
|match_CAR_ARO={{color box|White||Black}}{{color box|Black||White}}
|match_CAR_GRI={{color box|White||Black}}{{color box|Black||White}}
|match_CAR_KAR={{color box|White||Black}}{{color box|Black||White}}
|match_CAR_SO={{color box|White|1|Black}}{{color box|Black||White}}
|match_CAR_MAM={{color box|White|½|Black}}{{color box|Black||White}}
|match_CAR_LIR={{color box|White||Black}}{{color box|Black|½|White}}
|match_ARO_KRA={{color box|White|0|Black}}{{color box|Black||White}}
|match_ARO_CAR={{color box|White||Black}}{{color box|Black||White}}
|match_ARO_GRI={{color box|White||Black}}{{color box|Black||White}}
|match_ARO_KAR={{color box|White||Black}}{{color box|Black||White}}
|match_ARO_SO={{color box|White||Black}}{{color box|Black||White}}
|match_ARO_MAM={{color box|White||Black}}{{color box|Black|½|White}}
|match_ARO_LIR={{color box|White|½|Black}}{{color box|Black||White}}
|match_GRI_KRA={{color box|White||Black}}{{color box|Black|0|White}}
|match_GRI_CAR={{color box|White||Black}}{{color box|Black||White}}
|match_GRI_ARO={{color box|White||Black}}{{color box|Black||White}}
|match_GRI_KAR={{color box|White||Black}}{{color box|Black|½|White}}
|match_GRI_SO={{color box|White|1|Black}}{{color box|Black||White}}
|match_GRI_MAM={{color box|White||Black}}{{color box|Black||White}}
|match_GRI_LIR={{color box|White||Black}}{{color box|Black||White}}
|match_KAR_KRA={{color box|White||Black}}{{color box|Black|½|White}}
|match_KAR_CAR={{color box|White||Black}}{{color box|Black||White}}
|match_KAR_ARO={{color box|White||Black}}{{color box|Black||White}}
|match_KAR_GRI={{color box|White|½|Black}}{{color box|Black||White}}
|match_KAR_SO={{color box|White||Black}}{{color box|Black||White}}
|match_KAR_MAM={{color box|White|0|Black}}{{color box|Black||White}}
|match_KAR_LIR={{color box|White||Black}}{{color box|Black||White}}
|match_SO_KRA={{color box|White||Black}}{{color box|Black||White}}
|match_SO_CAR={{color box|White||Black}}{{color box|Black|0|White}}
|match_SO_ARO={{color box|White||Black}}{{color box|Black||White}}
|match_SO_GRI={{color box|White||Black}}{{color box|Black|0|White}}
|match_SO_KAR={{color box|White||Black}}{{color box|Black||White}}
|match_SO_MAM={{color box|White||Black}}{{color box|Black||White}}
|match_SO_LIR={{color box|White|½|Black}}{{color box|Black||White}}
|match_MAM_KRA={{color box|White||Black}}{{color box|Black||White}}
|match_MAM_CAR={{color box|White||Black}}{{color box|Black|½|White}}
|match_MAM_ARO={{color box|White|½|Black}}{{color box|Black||White}}
|match_MAM_GRI={{color box|White||Black}}{{color box|Black||White}}
|match_MAM_KAR={{color box|White||Black}}{{color box|Black|1|White}}
|match_MAM_SO={{color box|White||Black}}{{color box|Black||White}}
|match_MAM_LIR={{color box|White||Black}}{{color box|Black||White}}
|match_LIR_KRA={{color box|White||Black}}{{color box|Black||White}}
|match_LIR_CAR={{color box|White|½|Black}}{{color box|Black||White}}
|match_LIR_ARO={{color box|White||Black}}{{color box|Black|½|White}}
|match_LIR_GRI={{color box|White||Black}}{{color box|Black||White}}
|match_LIR_KAR={{color box|White||Black}}{{color box|Black||White}}
|match_LIR_SO={{color box|White||Black}}{{color box|Black|½|White}}
|match_LIR_MAM={{color box|White||Black}}{{color box|Black||White}}
}}
And here is the sort of thing I want (but done manually). There is an extra "Tiebreaks" column, which is more or less equivalent to the "Qualification/Relegation" column that this template uses. (In this particular example, it was important, because Carlsen and Kramnik finished on equal points, and Carlsen only won on tiebreaks). I've been experimenting with the Qualification/Relegation column (via the res_col_header option) but can't get it to what I want. What I want is to be able to display whatever I want in the Qualification/Relegation column (and even better, it'd be nice to have two columns, like in this example).
:{| class="wikitable"
|+ Final standings of the 2013 Candidates Tournament
|-
!rowspan="2"|Rank!!rowspan="2"|Player
!colspan="2" rowspan="2"|CAR
!colspan="2" rowspan="2"|KRA
!colspan="2" rowspan="2"|SVI
!colspan="2" rowspan="2"|ARO
!colspan="2" rowspan="2"|GEL
!colspan="2" rowspan="2"|GRI
!colspan="2" rowspan="2"|IVA
!colspan="2" rowspan="2"|RAD
!rowspan="2"|Points !! colspan=2|Tiebreaks
|-
! {{Abbr|H2H|Head-to-head}} !! Wins
|-
|- align="center" style="background:white; color:black"
|style="background:#ccffcc;"|1||align="left" style="background:#ccffcc;"|{{flagathlete|[[Magnus Carlsen]]|NOR}}
|style="background:lightgray" colspan="2"|
|½||style="background:black; color:white"|½
|0||style="background:black; color:white"|1
|½||style="background:black; color:white"|½
|1||style="background:black; color:white"|1
|1||style="background:black; color:white"|½
|0||style="background:black; color:white"|½
|½||style="background:black; color:white"|1
|style="background:#ccffcc;"|8½|| style="background:#ccffcc;"|1 || style="background:#ccffcc;"|5
|- align="center" style="background:white; color:black"
|2||align="left"|{{flagathlete|[[Vladimir Kramnik]]|RUS}}
|½||style="background:black; color:white"|½
|style="background:lightgray" colspan="2"|
|1||style="background:black; color:white"|½
|½||style="background:black; color:white"|1
|½||style="background:black; color:white"|½
|½||style="background:black; color:white"|1
|½||style="background:black; color:white"|0
|1||style="background:black; color:white"|½
|8½||1||4
|- align="center" style="background:white; color:black"
|3||align="left"|{{flagathlete|[[Peter Svidler]]|RUS}}
|0||style="background:black; color:white"|1
|½||style="background:black; color:white"|0
|style="background:lightgray" colspan="2"|
|1||style="background:black; color:white"|½
|½||style="background:black; color:white"|½
|½||style="background:black; color:white"|½
|1||style="background:black; color:white"|½
|1||style="background:black; color:white"|½
|8||1½||4
|- align="center" style="background:white; color:black"
|4||align="left"|{{flagathlete|[[Levon Aronian]]|ARM}}
|½||style="background:black; color:white"|½
|0||style="background:black; color:white"|½
|½||style="background:black; color:white"|0
|style="background:lightgray" colspan="2"|
|1||style="background:black; color:white"|0
|½||style="background:black; color:white"|½
|1||style="background:black; color:white"|1
|1||style="background:black; color:white"|1
|8||½||5
|- align="center" style="background:white; color:black"
|5||align="left"|{{flagathlete|[[Boris Gelfand]]|ISR}}
|0||style="background:black; color:white"|0
|½||style="background:black; color:white"|½
|½||style="background:black; color:white"|½
|1||style="background:black; color:white"|0
|style="background:lightgray" colspan="2"|
|½||style="background:black; color:white"|½
|½||style="background:black; color:white"|½
|½||style="background:black; color:white"|1
|6½||1||2
|- align="center" style="background:white; color:black"
|6||align="left"|{{flagathlete|[[Alexander Grischuk]]|RUS}}
|½||style="background:black; color:white"|0
|0||style="background:black; color:white"|½
|½||style="background:black; color:white"|½
|½||style="background:black; color:white"|½
|½||style="background:black; color:white"|½
|style="background:lightgray" colspan="2"|
|1||style="background:black; color:white"|½
|½||style="background:black; color:white"|½
|6½||1||1
|- align="center" style="background:white; color:black"
|7||align="left"|{{flagathlete|[[Vassily Ivanchuk]]|UKR}}
|½||style="background:black; color:white"|1
|1||style="background:black; color:white"|½
|½||style="background:black; color:white"|0
|0||style="background:black; color:white"|0
|½||style="background:black; color:white"|½
|½||style="background:black; color:white"|0
|style="background:lightgray" colspan="2"|
|1||style="background:black; color:white"|0
|6||— ||3
|- align="center" style="background:white; color:black"
|8||align="left"|{{flagathlete|[[Teimour Radjabov]]|AZE}}
|0||style="background:black; color:white"|½
|½||style="background:black; color:white"|0
|½||style="background:black; color:white"|0
|0||style="background:black; color:white"|0
|0||style="background:black; color:white"|½
|½||style="background:black; color:white"|½
|1||style="background:black; color:white"|0
|style="background:lightgray" colspan="2"|
|4||— ||1
|}
p.s. Thanks for replying, and I'm not expecting someone to spend hours on this. But if there's an easy solution or easy fix, that'd be great. [[User:Adpete|Adpete]] ([[User talk:Adpete|talk]]) 23:03, 13 March 2018 (UTC)
: [[User:Adpete|Adpete]], I will see if I can get something started for you tomorrow. it will probably not be exactly what you want, but we can iterate after we have an initial module. [[User:Frietjes|Frietjes]] ([[User talk:Frietjes|talk]]) 23:24, 13 March 2018 (UTC)
::To be more precise: I think I just need one simple change: I want a way to hide the GF/GA/GD columns, without also hiding the qualifications column. At the moment, the only way I can see to hide the GF/GA/GD columns is the "|only_pld_pts=yes" option; and if I do that, there's no way to show the qualifications column, as far as I can see. [[User:Adpete|Adpete]] ([[User talk:Adpete|talk]]) 05:58, 17 March 2018 (UTC)
::: still working on it, see [[User:Frietjes/chess]] for what I have so far. when I am finished, the matches will be formatted and the WDL will be automatically computed from the match data. [[User:Frietjes|Frietjes]] ([[User talk:Frietjes|talk]]) 16:41, 17 March 2018 (UTC)
::::I really, really appreciate that effort. But I don't want it to be in vain: you don't just need to please me, you need to please other editors at [[Candidates Tournament 2018#Standings]]. I think it's better to have the tie break columns more flexible. I mentioned in my first post that there is actually a 3rd tie break score, so we'd want a 3rd tie break column. Also if it's flexible, that allows it to be used in other tournaments which might have a different tie break method. That's why I think all I need - and perhaps what is best - is the ability to add extra columns and put whatever we want there. Also problematic would be the "+" signs in that table and the disappearance of the colours, though I'm guessing that's because you're still debugging. [[User:Adpete|Adpete]] ([[User talk:Adpete|talk]]) 22:44, 17 March 2018 (UTC)
|