Module talk:Sports table/Archive 2: Difference between revisions

Content deleted Content added
m Archiving 1 discussion(s) from Module talk:Sports table) (bot
m Archiving 1 discussion(s) from Module talk:Sports table) (bot
Line 998:
 
Has anyone given a thought about writing /docs to many of the styles listed on the main page (like WLHA, for example), because I have a hard time trying to use styles without reading the /docs or knowing them too well (like WL and WL OTL tiebreaker)? –[[User:Piranha249|Piranha]][[User talk:Piranha249|249]] 17:23, 2 January 2021 (UTC)
 
== Minor tweaks wanted ==
 
<code>
<nowiki>
{{#invoke:Sports table|main|style=Custom
</nowiki><br><nowiki>
|default_style=WDLgdiff
</nowiki><br><nowiki>
|num_cols=9
</nowiki><br><nowiki>
|colstyle1=pld
</nowiki><br><nowiki>
|colstyle2=win
</nowiki><br><nowiki>
|colstyle3=draw
</nowiki><br><nowiki>
|colstyle4=loss
</nowiki><br><nowiki>
|colstyle5=gf
</nowiki><br><nowiki>
|colstyle6=ga
</nowiki><br><nowiki>
|colstyle7=diff_gf_ga
</nowiki><br><nowiki>
|colstyle8=pts
</nowiki><br><nowiki>
|col_header9={{nowrap|Excluding matches against}}
</nowiki><br><nowiki>
</nowiki><br><nowiki>
|team_order=GrB, GrG, GrF
</nowiki><br><nowiki>
|update=complete
</nowiki><br><nowiki>
|source=FIFA
</nowiki><br><nowiki>
</nowiki><br><nowiki>
|win_GrB=7 |draw_GrB=0 |loss_GrB=1 |gf_GrB=18|ga_GrB=6
</nowiki><br><nowiki>
|win_GrG=5 |draw_GrG=2 |loss_GrG=1 |gf_GrG=12|ga_GrG=8
</nowiki><br><nowiki>
|win_GrF=4 |draw_GrF=0 |loss_GrF=4 |gf_GrF=11|ga_GrF=16
</nowiki><br><nowiki>
</nowiki><br><nowiki>
|name_GrB={{fb|SUI}}
</nowiki><br><nowiki>
|name_GrG={{fb|ITA}}
</nowiki><br><nowiki>
|name_GrF={{fb|SVK}}
</nowiki><br><nowiki>
</nowiki><br><nowiki>
|show_groups=T
</nowiki><br><nowiki>
|group_GrB=[[2018 FIFA World Cup qualification – UEFA Group B|B]]
</nowiki><br><nowiki>
|group_GrG=[[2018 FIFA World Cup qualification – UEFA Group G|G]]
</nowiki><br><nowiki>
|group_GrF=[[2018 FIFA World Cup qualification – UEFA Group F|F]]
</nowiki><br><nowiki>
</nowiki><br><nowiki>
|col9_GrB=Andorra
</nowiki><br><nowiki>
|col9_GrG=Liechtenstein
</nowiki><br><nowiki>
|col9_GrF=Malta
</nowiki><br><nowiki>
</nowiki><br><nowiki>
|res_col_header=Q
</nowiki><br><nowiki>
|result1=PO |result2=PO
</nowiki><br><nowiki>
|col_PO=blue1 |text_PO=Advance to [[2018 FIFA World Cup qualification – UEFA Second Round|second round (play-offs)]]
</nowiki><br><nowiki>
}}
</nowiki>
</code>
 
{{#invoke:Sports table|main|style=Custom
|default_style=WDLgdiff
|num_cols=9
|colstyle1=pld
|colstyle2=win
|colstyle3=draw
|colstyle4=loss
|colstyle5=gf
|colstyle6=ga
|colstyle7=diff_gf_ga
|colstyle8=pts
|col_header9={{nowrap|Excluding matches against}}
 
|team_order=GrB, GrG, GrF
|update=complete
|source=FIFA
 
|win_GrB=7 |draw_GrB=0 |loss_GrB=1 |gf_GrB=18|ga_GrB=6
|win_GrG=5 |draw_GrG=2 |loss_GrG=1 |gf_GrG=12|ga_GrG=8
|win_GrF=4 |draw_GrF=0 |loss_GrF=4 |gf_GrF=11|ga_GrF=16
 
|name_GrB={{fb|SUI}}
|name_GrG={{fb|ITA}}
|name_GrF={{fb|SVK}}
 
|show_groups=T
|group_GrB=[[2018 FIFA World Cup qualification – UEFA Group B|B]]
|group_GrG=[[2018 FIFA World Cup qualification – UEFA Group G|G]]
|group_GrF=[[2018 FIFA World Cup qualification – UEFA Group F|F]]
 
|col9_GrB=Andorra
|col9_GrG=Liechtenstein
|col9_GrF=Malta
 
|res_col_header=Q
|result1=PO |result2=PO
|col_PO=blue1 |text_PO=Advance to [[2018 FIFA World Cup qualification – UEFA Second Round|second round (play-offs)]]
}}
 
I'm trying to expand tables such as [[Template:2018 FIFA World Cup qualification – UEFA Runners-up table|this one]] by adding an extra column that shows what matches are excluded from the ranking, because that is important information after all. The above basically does the job, but there are a couple more things that I'd like to achieve, namely:
 
*The '+' sign should be forced to appear in front of positive goal differences. (Slovakia's goal difference has been made negative on purpose.)
*The team names in the new column should be aligned left, like the teams ranked are.
 
Also I'm aware that the "GF" and "GA" column headers can be tooltipped with <code><nowiki>|col_header5={{abbr|GF|Goals for}}</nowiki></code> and similar, but I was surprised to find out this was not implemented by default.
 
Can anyone help? --[[User:Theurgist|Theurgist]] ([[User talk:Theurgist|talk]]) 12:34, 13 January 2021 (UTC)
 
:{{reply to|Theurgist}} Default tooltips added. I'll see about the other things tomorrow. [[Special:Contributions/2601:2C4:C481:2E0:C8BD:9914:C525:DE5A|2601:2C4:C481:2E0:C8BD:9914:C525:DE5A]] ([[User talk:2601:2C4:C481:2E0:C8BD:9914:C525:DE5A|talk]]) 04:29, 31 January 2021 (UTC)
:{{reply to|Theurgist}} I have added a new parameter {{para|aligncolN}}, which you can use in your table with {{para|aligncol9|left}} to get the desired result. [[Special:Contributions/2601:2C4:C481:2E0:1500:99BF:C19A:B707|2601:2C4:C481:2E0:1500:99BF:C19A:B707]] ([[User talk:2601:2C4:C481:2E0:1500:99BF:C19A:B707|talk]]) 20:33, 31 January 2021 (UTC)
:{{reply to|Theurgist}} And finally I have added a new parameter {{para|plus_sign_diffs}}, which will cause a plus sign to appear in front of positive numbers in a diff column. [[Special:Contributions/2601:2C4:C481:2E0:1500:99BF:C19A:B707|2601:2C4:C481:2E0:1500:99BF:C19A:B707]] ([[User talk:2601:2C4:C481:2E0:1500:99BF:C19A:B707|talk]]) 00:09, 1 February 2021 (UTC)
 
::Thanks a lot! --[[User:Theurgist|Theurgist]] ([[User talk:Theurgist|talk]]) 20:10, 4 February 2021 (UTC)