Module talk:Sports table
Module:Sports table is permanently protected from editing because it is a heavily used or highly visible module. Substantial changes should first be proposed and discussed here on this page. If the proposal is uncontroversial or has been discussed and is supported by consensus, editors may use {{edit template-protected}} to notify an administrator or template editor to make the requested edit.
|
This is the talk page for discussing improvements to the Sports table module. |
|
Archives: 1, 2Auto-archiving period: 3 months |
This module does not require a rating on Wikipedia's content assessment scale. It is of interest to the following WikiProjects: | |||||||||||||||
|
To help centralize discussions and keep related topics together, the following pages redirect here: |
|
||
This page has archives. Sections older than 90 days may be automatically archived by Lowercase sigmabot III when more than 4 sections are present. |
Winning percentage four digits
[edit]Can an option be done for goal percentage with 4 digits, for example like the win percentage with notratio setting?
I need help if there is another notratio code for goal percentage please, anyone who can help me?
Example
[edit]Pos | Team | Pld | W | L | GF | GA | PP | PCT | Qualification |
---|---|---|---|---|---|---|---|---|---|
1 | South East Melbourne Phoenix | 8 | 6 | 2 | 686 | 636 | 107.9 | 75.00 | Semi-Finals |
2 | Melbourne United | 11 | 8 | 3 | 931 | 830 | 112.2 | 72.73 | |
3 | Perth Wildcats | 10 | 7 | 3 | 880 | 809 | 108.8 | 70.00 | |
4 | Illawarra Hawks | 11 | 6 | 5 | 962 | 966 | 99.6 | 54.55 | |
5 | Tasmania JackJumpers | 11 | 5 | 6 | 834 | 837 | 99.6 | 45.45 | |
6 | Sydney Kings | 12 | 5 | 7 | 959 | 987 | 97.2 | 41.67 | |
7 | Brisbane Bullets | 10 | 4 | 6 | 844 | 880 | 95.9 | 40.00 | |
8 | Adelaide 36ers | 10 | 4 | 6 | 805 | 854 | 94.3 | 40.00 | |
9 | Cairns Taipans | 6 | 2 | 4 | 459 | 484 | 94.8 | 33.33 | |
10 | New Zealand Breakers | 11 | 3 | 8 | 866 | 943 | 91.8 | 27.27 |
Giacontigers (talk) 12:10, 6 February 2022 (AEDT)
Edit request 18 September 2024
[edit]This edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Description of suggested change:
Allow custom text inside splitN
for tables like 2014 FIFA World Cup#Final standings.
Diff:
− | table.insert(t,'|- style="background-color:'..result_col['black1']..'; line-height:3pt;"\n') | + | 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
|
SocietyBox (talk) 23:46, 18 September 2024 (UTC)
- The
{{{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. Nthep (talk) 13:42, 19 September 2024 (UTC)- Thanks. Just the excuse I needed to rewrite that table. SocietyBox (talk) 23:59, 20 September 2024 (UTC)
Help with a custom table
[edit]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.
Pos | Team | Pld | W | PKW | PKL | L | GF | GA | GD | Pts | Qualification |
---|---|---|---|---|---|---|---|---|---|---|---|
1 | Union Omaha | 5 | 3 | 2 | 1 | 2 | 16 | 13 | +3 | 9 | Advanced to knockout stage |
2 | Lexington SC | 5 | 3 | 2 | 1 | 2 | 10 | 10 | 0 | 9 | |
3 | Greenville Triumph SC | 6 | 3 | 1 | 1 | 3 | 10 | 8 | +2 | 9 | |
4 | Chattanooga Red Wolves SC | 6 | 1 | 1 | 1 | 5 | 10 | 15 | −5 | 3 | |
5 | Richmond Kickers | 5 | 2 | 3 | 0 | 3 | 9 | 11 | −2 | 6 | |
6 | Spokane Velocity FC | 6 | 1 | 0 | 2 | 5 | 9 | 17 | −8 | 3 | |
7 | One Knoxville SC | 6 | 4 | 1 | 1 | 2 | 8 | 7 | +1 | 12 | |
8 | Central Valley Fuego FC | 4 | 1 | 1 | 3 | 3 | 8 | 10 | −2 | 3 | |
9 | South Georgia Tormenta FC | 4 | 0 | 2 | 2 | 4 | 8 | 13 | −5 | 0 |
Or, instead of using the Custom module, would it be easier to allow an option to modify WL PK/WDL OT to change which columns are and are not bolded? What would be the best solution? Pining Frietjes, who is very knowledgeable with this module. Thanks, S.A. Julio (talk) 18:06, 15 October 2024 (UTC)
- S.A. Julio, yes, changing WL PK/WDL OT would probably be less complicated, with a lot less code in the article. looking at WDL OT. we may be able to trigger it through
|ranking_style=
without adding another parameter. I have to look. Frietjes (talk) 18:17, 15 October 2024 (UTC)- I added
|ranking_style=forpts
which bolds the goals for column. I could have it unbold the points column, but the looking at the logic for|ranking_style=
in the other cases, I would expect it to bold both. to selectively turn on and off bolding, we should have a different parameter for clarity. but, in this case, the ranking is first by points scored, and second by points, so it seems okay to have both bolded. Frietjes (talk) 19:44, 15 October 2024 (UTC)- @Frietjes: Ok, great thank you! I will note that for this article, only head-to-head points is a tiebreaker. Therefore, the points column doesn't really need to be emphasized, but it's not a big deal if it requires too many changes for another parameter. S.A. Julio (talk) 20:06, 15 October 2024 (UTC)
- I added
Totals check
[edit]@Frietjes: One other quick question: often this module will be used to show how teams rank from different groups, for example: UEFA Euro 2016#Ranking of third-placed teams. However, then the totals check will give a number of warnings when previewing an edit that the wins/losses, goals for/against, etc. do not total each other. Is there any way the totals check feature could be disabled when groups are present? Would be really appreciated if possible! Thanks, S.A. Julio (talk) 20:48, 17 October 2024 (UTC)
- @S.A. Julio try adding
|notracking=yes
to the table. Nthep (talk) 21:07, 17 October 2024 (UTC)- @Nthep: The only issue is that there are hundreds of such tables, having a simpler way of disabling the totals check would be nice. I would say almost all tables with the 'group' column do not need a total check. S.A. Julio (talk) 21:17, 17 October 2024 (UTC)
- The test to display total checks could be set to depend on either of the
|show_groups=
or|notracking=
parameters without too much difficulty (I think). But there would need to be a way to allow total checks to be shown, if wanted, on tables with groups so the logic would need to allow that. - There's probably more investigation needed into how many tables there are that use groups and how many of those don't need total checks. Nthep (talk) 21:51, 17 October 2024 (UTC)
- The test to display total checks could be set to depend on either of the
- @Nthep: The only issue is that there are hundreds of such tables, having a simpler way of disabling the totals check would be nice. I would say almost all tables with the 'group' column do not need a total check. S.A. Julio (talk) 21:17, 17 October 2024 (UTC)