Module talk:Sports table: Difference between revisions

Content deleted Content added
m Archiving 1 discussion(s) to Module talk:Sports table/Archive 2) (bot
 
(49 intermediate revisions by 10 users not shown)
Line 51:
 
 
== Winning percentage ==
== How do I adjust goals for ==
 
As our article is at [[winning percentage]], shouldn't the tooltip say "winning percentage" as well, instead of "win percentage"?
On [[2023–24 Nigeria Premier Football League#League table|this table]], it was reported that Gombe United were deducted 6 points and 6 goals, I was able to adjust the points but not the same for the goals. <span style="color:#9400D3;">[[User:Josedimaria237|Jõsé]]<sup>[[User talk:Josedimaria237| ''hola'']]</sup></span> 10:51, 4 April 2024 (UTC)
 
Also, all league tables that use this method do not boldface the winning percentage column (see [https://www.nba.com/standings NBA.com], [https://www.espn.com/nba/standings ESPN], [https://sports.yahoo.com/nba/standings/ Y!Sports], [https://www.cbssports.com/nba/standings/ CBS], etc., unlike assoc. football tables that boldface the "Pts." columns. With that, can the boldfaced columns be converted to regular text? [[User:Howard the Duck|Howard the Duck]] ([[User talk:Howard the Duck|talk]]) 17:44, 18 April 2025 (UTC)
== How to indicate that two teams have tied in a Sports Table module. ==
 
:win percentage or winning percentage looks like it's a bit of a UK/US thing, win is more common in the UK than winning. Regarding bolding, just because those sources don't bold the column is not necessarily a reason for WP not to, you could call it WP's house style. That said, almost anything is possible and looking at the code for WDL it doesn't look the most difficult change to put a bold/normal font weight flag in, although for backwards compatibility with all the existing tables there would have to be an acceptance that bold is the default. [[User:Nthep|Nthep]] ([[User talk:Nthep|talk]]) 20:26, 18 April 2025 (UTC)
On my current draft page, at [[User:Yoblyblob/1985 Niue Soccer Tournament]], the two top teams in Division 1 officially tied for a joint championship. Does anyone know how to edit the number to show them both finishing in first? [[User:Yoblyblob|Yoblyblob]] ([[User talk:Yoblyblob|Talk]]) :) 15:20, 30 May 2024 (UTC)
::FWIW, re: [[WP:ENGVAR]], "winning percentage" is used in sports such as basketball, and in league tables that this is used, it's a safe bet none of those are from the UK. Re [[MOS:BOLD]], we do have a house style, and it seems that this is not one of the cases... at least I can [[WP:IAR]] association football usage since it is near universal. The league table not having boldface for teams using winning percentage, it's all near universal. [[User:Howard the Duck|Howard the Duck]] ([[User talk:Howard the Duck|talk]]) 20:38, 18 April 2025 (UTC)
:::@[[User:Howard the Duck|Howard the Duck]] I'll have a play around in the sandbox. Is this only WDL or are there any others that need to be considered? [[User:Nthep|Nthep]] ([[User talk:Nthep|talk]]) 10:58, 19 April 2025 (UTC)
::::Good question. AFAIK winning percentage is only relevant on WL style. [[User:Howard the Duck|Howard the Duck]] ([[User talk:Howard the Duck|talk]]) 12:33, 19 April 2025 (UTC)
:::::thanks. WL invokes WDL anyway. [[User:Nthep|Nthep]] ([[User talk:Nthep|talk]]) 12:42, 19 April 2025 (UTC)
::::::@[[User:Howard the Duck|Howard the Duck]] can you give me some example tables to look at. I picked up {{tl|2011 PBA Governors' Cup standings}} as something you'd edited but I could do with a wider range to play around with. I've identified which lines affect the bolding and I've hard changed it in the module sandbox. My sandbox page [[User:Nthep/sandbox2]] shows the results as well as a UK table which used both percentage points and competition points. If this is what you're looking for then next step is to make it a variable. [[User:Nthep|Nthep]] ([[User talk:Nthep|talk]]) 17:57, 19 April 2025 (UTC)
:::::::That's more or less how it looks like; see for example [[2020–21 NBA G League season#Regular season]]. Winning percentage is used primarily on [[Module:Sports table/WL]] (not WDL) for basketball and baseball. In these sports, the "Pld" column is denoted as "GP" (or games played). Another sport that uses winning percentage but has draws (or tied games) is American football, but North American based leagues do not use this module except for that one instance in the [[NBA G League]] during covid. [[User:Howard the Duck|Howard the Duck]] ([[User talk:Howard the Duck|talk]]) 21:47, 19 April 2025 (UTC)
:::::::To think about it, this can also be applied to WDL as both baseball and American football have tied games and use winning percentages, it's just that the value of tied games have changed through time in some leagues. Also, the ties column is after losses, or WLT, not WDL. [[User:Howard the Duck|Howard the Duck]] ([[User talk:Howard the Duck|talk]]) 21:54, 19 April 2025 (UTC)
:{{ping|Nthep}}, update on this? The examples on your sandbox looks great. Other leagues also have a similar PCT statistics; see [[2024–25 NBL season#Ladder]] (Australia), that actually uses percentages rounded off to the nearest hundredths. [[User:Howard the Duck|Howard the Duck]] ([[User talk:Howard the Duck|talk]]) 21:04, 21 May 2025 (UTC)
::@[[User:Howard the Duck|Howard the Duck]] sorry, it's gone on a bit of a back burner. I hit a snag that I haven't worked out yet. [[User:Nthep|Nthep]] ([[User talk:Nthep|talk]]) 21:21, 21 May 2025 (UTC)
:::No worries. [[User:Howard the Duck|Howard the Duck]] ([[User talk:Howard the Duck|talk]]) 21:38, 21 May 2025 (UTC)
 
== Edit request 11 June 2025 ==
:<s>@[[User:Yoblyblob|Yoblyblob]] I don't think you can, but you can use the status column to show that the title was shared (see [[Module:Sports table/WDL#Results and status]]). Otherwise I think you'd have to use a normal table and not this module. [[User:Nthep|Nthep]] ([[User talk:Nthep|talk]]) 21:16, 30 May 2024 (UTC)</s>
:|pos_XXX=1 [[User:Quri.inka|Quri.inka]] ([[User talk:Quri.inka|talk]]) 17:09, 31 May 2024 (UTC)
::This is true. I'd forgotten about the {{para|POS}} parameter. [[User:Nthep|Nthep]] ([[User talk:Nthep|talk]]) 19:38, 31 May 2024 (UTC)
 
== Edit request 18 September 2024 ==
 
{{Edit template-protected|answered=yes}}
 
'''Description of suggested change: Add "Exclusion" on result column header for Module:Sports table/Volleyball'''
Allow custom text inside <code>splitN</code> for tables like [[2014 FIFA World Cup#Final standings]].
 
'''Diff:'''
{{TextDiff|1=<nowiki> table.insert(t,'|- style="background-color:'..result_col['black1']..'; line-height:3pt;"\n')
table.insert(t,string.rep('|',2*N_cols)..'\n')
</nowiki>
|2=<nowiki> if yesno(Args['split'..ii]) == nil then
table.insert(t,'|-\n')
table.insert(t,'|colspan='..(2*N_cols)..'|'..Args['split'..ii]..'\n')
else
table.insert(t,'|- style="background-color:'..result_col['black1']..'; line-height:3pt;"\n')
table.insert(t,string.rep('|',2*N_cols)..'\n')
end
</nowiki>
}} [[User:SocietyBox|SocietyBox]] ([[User talk:SocietyBox|talk]]) 23:46, 18 September 2024 (UTC)
 
:The {{param|res_col_header}} parameter allows grouping and has the benefit of positively identifying which rows the comment applies to. It's not always apparent which rows a heading like those in [[2014 FIFA World Cup#Final standings]] applies to. [[MOS:COLHEAD]] actively discourages the use of inserted summary rows like this. [[User:Nthep|Nthep]] ([[User talk:Nthep|talk]]) 13:42, 19 September 2024 (UTC)
::Thanks. Just the excuse I needed to rewrite that table. [[User:SocietyBox|SocietyBox]] ([[User talk:SocietyBox|talk]]) 23:59, 20 September 2024 (UTC)
 
== Help with a custom table ==
 
I've been trying to convert the wikitable at [[2024 USL Cup#Ranking of non-group leading teams]] to use [[Module:Sports table]], but have come across some issues. When using [[Module:Sports table/Custom]], the following issues arise:
*Played column calculation: cannot add W+PKW+PKL+L
*Points column calculation: cannot assign 2 points for a PKW and 1 point for a PKL
*Points column formatting: cannot disable bolding
See the below code for an example.
{{Hidden|Using Sports table/Custom|text=
{{#invoke:Sports table|main|style=Custom/sandbox
|num_cols=9
|plus_sign_diffs=y
|colstyle1=played
|colstyle2=win
|colstyle3=PKwin
|col_header3={{Abbr|PKW|Penalty kicks win}}
|colstyle4=PKloss
|col_header4={{Abbr|PKL|Penalty kicks loss}}
|colstyle5=loss
|bold_col6=yes
|col_header6={{Abbr|GF|Goals for}}
|colstyle6=gf
|col_header7={{Abbr|GA|Goals against}}
|colstyle7=ga
|col_header8={{Abbr|GD|Goal difference}}
|colstyle8=diff_gf_ga
|colstyle9=points
 
|team_order=OMA, LEX, GVL, CHA, RIC, SPK, KNX, CV, TRM
 
|win_CV =1 |PKwin_CV =1 |PKloss_CV =3 |loss_CV =3 |gf_CV =8 |ga_CV =10
|win_SPK=1 |PKwin_SPK=0 |PKloss_SPK=2 |loss_SPK=5 |gf_SPK=9 |ga_SPK=17
|win_OMA=3 |PKwin_OMA=2 |PKloss_OMA=1 |loss_OMA=2 |gf_OMA=16 |ga_OMA=13
|win_CHA=1 |PKwin_CHA=1 |PKloss_CHA=1 |loss_CHA=5 |gf_CHA=10 |ga_CHA=15
|win_LEX=3 |PKwin_LEX=2 |PKloss_LEX=1 |loss_LEX=2 |gf_LEX=10 |ga_LEX=10
|win_KNX=4 |PKwin_KNX=1 |PKloss_KNX=1 |loss_KNX=2 |gf_KNX=8 |ga_KNX=7
|win_GVL=3 |PKwin_GVL=1 |PKloss_GVL=1 |loss_GVL=3 |gf_GVL=10 |ga_GVL=8
|win_RIC=2 |PKwin_RIC=3 |PKloss_RIC=0 |loss_RIC=3 |gf_RIC=9 |ga_RIC=11
|win_TRM=0 |PKwin_TRM=2 |PKloss_TRM=2 |loss_TRM=4 |gf_TRM=8 |ga_TRM=13
 
'''Diff:'''<br>
|name_CV = [[Central Valley Fuego FC]]
{{TextDiff|1=From "Promotion, qualification or relegation"|2=To "Promotion, qualification, relegation or exclusion"}} [[User:D.18th|<b style="color:#008080; text-shadow:0.1em 0.2em 0.1em #FFF8E7">𝙳.𝟷𝟾𝚝𝚑</b>]] [[User talk:D.18th|<b style="color:#008080; text-shadow:0.1em 0.2em 0.1em #FFF8E7"><small>(𝚃𝚊𝚕𝚔)</small></b>]] 11:06, 11 June 2025 (UTC)
|name_SPK = [[Spokane Velocity|Spokane Velocity FC]]
:[[File:X mark.svg|20px|link=|alt=]] '''Not done for now''': please establish a [[Wikipedia:Consensus|consensus]] for this alteration '''[[Wikipedia:Edit requests#Planning a request|before]]''' using the {{Tlx|Edit template-protected}} template.<!-- Template:ETp --> If this has already been discussed, then please link to that discussion. '''''[[User:Paine Ellsworth|<span style="font-size:92%;color:darkblue;font-family:Segoe Script">P.I.&nbsp;Ellsworth</span>]]'''''&thinsp;,&nbsp;[[Editor|<span style="color:black">ed.</span>]]&nbsp;[[User talk:Paine Ellsworth|<sup>put'er&nbsp;there</sup>]]&nbsp;<small>13:09, 11 June 2025 (UTC)</small>
|name_OMA = [[Union Omaha]]
::This seems to be relevant on [[2025 FIVB Men's Volleyball Nations League]] in regards to the US team being "excluded" in the 2026 Nations League. Aside from it being unexplained (and unreferenced) on why this is so, this seems to be extraordinary, akin to [[Bury F.C.]] being expelled from the Football League some years ago. [[User:Howard the Duck|Howard the Duck]] ([[User talk:Howard the Duck|talk]]) 14:21, 11 June 2025 (UTC)
|name_CHA = [[Chattanooga Red Wolves SC]]
|name_LEX = [[Lexington SC]]
|name_KNX = [[One Knoxville SC]]
|name_GVL = [[Greenville Triumph SC]]
|name_RIC = [[Richmond Kickers]]
|name_TRM = [[Tormenta FC|South Georgia Tormenta FC]]
 
== sticky-header - Template-protected edit request on 17 July 2025 ==
|res_col_header=Q
|result1=KO
|col_KO = green1 |text_KO = Advanced to [[2024 USL Cup#Knockout stage|knockout stage]]
}}
}}
 
{{edit template-protected|Module:Sports table|answered=yes}}
Or, instead of using the Custom module, would it be easier to allow an option to modify [[Module:Sports table/WL PK|WL PK]]/[[Module:Sports table/WDL OT|WDL OT]] to change which columns are and are not bolded? What would be the best solution? Pining {{u|Frietjes}}, who is very knowledgeable with this module. Thanks, [[User:S.A. Julio|S.A. Julio]] ([[User talk:S.A. Julio#top|talk]]) 18:06, 15 October 2024 (UTC)
Could {{tl|sticky-header}} be implemented in the module so that column headers stick to the top of the screen as the table's data is scrolled. This would be highly recommended, especially for long tables like [[2024–25_UEFA_Champions_League_league_phase#League_phase_table]].
: [[User:S.A. Julio|S.A. Julio]], yes, changing [[Module:Sports table/WL PK|WL PK]]/[[Module:Sports table/WDL OT|WDL OT]] would probably be less complicated, with a lot less code in the article. looking at [[Module:Sports table/WDL OT|WDL OT]]. we may be able to trigger it through {{para|ranking_style}} without adding another parameter. I have to look. [[User:Frietjes|Frietjes]] ([[User talk:Frietjes|talk]]) 18:17, 15 October 2024 (UTC)
For comparison, the implementation of the sticky header has also been done in a similar module {{tl|Medals table}}, see {{diff2|1240638416|diff}}. [[User:Miria~01|<b style="background-color:white; color:black">Mir</b><b style="background-color:white; color:#EE3939">ia~01</b>]] ([[User talk:Miria~01|talk]]) 12:58, 17 July 2025 (UTC)
:{{Not done}}: please make your requested changes to the module's sandbox first; see [[Wikipedia:Template sandbox and test cases|WP:TESTCASES]].<!-- Template:ETp --> – [[User:Jonesey95|Jonesey95]] ([[User talk:Jonesey95|talk]]) 17:41, 18 July 2025 (UTC)
::{{diff2|1301246279|Diff: 21:29, 18 July 2025}} in [[Module:Sports table/WDL/sandbox]]
::<syntaxhighlight lang=lua>table.insert(t,'{| class="wikitable sticky-header'..sort_text..'" style="text-align:center;"\n')</syntaxhighlight>
::The CSS for loading the sticky header would leave it up to the user to decide whether they want the sticky header or not, as it is done by adding the {{tl|sticky header}} in testcases, see {{diff2|1301245648|diff in testcases}}. [[User:Miria~01|<b style="background-color:white; color:black">Mir</b><b style="background-color:white; color:#EE3939">ia~01</b>]] ([[User talk:Miria~01|talk]]) 21:49, 18 July 2025 (UTC)