Module talk:Sports table

This is an old revision of this page, as edited by EddieV2003 (talk | contribs) at 02:45, 16 January 2015 (goal average). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Latest comment: 10 years ago by EddieV2003 in topic Goal average

Sorting

Is sorting based on class_rules or is that just never used? 2014–15_BeNe_League#League_table does not sort first 3 places correctly. -Koppapa (talk) 06:47, 10 October 2014 (UTC)Reply

I get it now. There is no sorting at all. Positions are set by team1=... and so on. -Koppapa (talk) 09:24, 10 October 2014 (UTC)Reply
Yes, that's correct, I followed the standings on the BeNe League website, but it's easy enough to change. Hopefully you find the new format easy to understand and edit. CRwikiCA talk 13:50, 10 October 2014 (UTC)Reply
An easy way to get around this confusion is to add comments in the table, such as <!-- Team positions --> above team1, team2 parameters and so on to explain what each section does and what the parameters are for (as many users dont read documentation). QED237 (talk) 14:31, 10 October 2014 (UTC)Reply
That could be a solution yes. CRwikiCA talk 15:11, 10 October 2014 (UTC)Reply

Head-to-head results

@CRwikiCA: The documentation seems to indicate that notes entered in |hth_TTT= will appear in the points column, but nothing shows up in the example or in my sandbox. -- Jkudlick (talk) 17:58, 4 November 2014 (UTC)Reply

Something went wrong when implementing the option to create different styles of tables. I'll try to find the issue and let you know when it's fixed.CRwikiCA talk 19:01, 4 November 2014 (UTC)Reply
@Jkudlick: I reverted the live version, so the functionality works now. I will resolve the issue in the sandbox and then bring it to the live version once it fully works. CRwikiCA talk 19:12, 4 November 2014 (UTC)Reply
I now resolved the issue and implemented it in the live version. CRwikiCA talk 19:26, 4 November 2014 (UTC)Reply
Awesome. Great work! -- Jkudlick (talk) 14:58, 5 November 2014 (UTC)Reply

res_col_header

For res_col_header= can you also have Comments as per 2014–15 Ukrainian First League ? Brudder Andrusha (talk) 05:28, 7 November 2014 (UTC)Reply

@Brudder Andrusha: Yes, see reply at WT:FOOTY:
Pos Team Pld W D L GF GA GD Pts Comments
1 FIFA World Cup Dream Team 5 5 0 0 10 0 +10 15 New
Updated to match(es) played on unknown. Source: [citation needed]

It can be customized that way, although you might want to indicate the new status with footnotes instead:

Pos Team Pld W D L GF GA GD Pts Qualification or relegation
1 FIFA World Cup Dream Team[a] 5 5 0 0 10 0 +10 15 1974 FIFA World Cup
2 Team 2 5 3 1 1 3 2 +1 10
3 Team 3[b] 5 3 0 2 3 3 0 9
4 DDD[a] 5 1 1 3 1 4 −3 4
5   Gibraltar 5 0 0 5 0 6 −6 0
Updated to match(es) played on unknown. Source: [citation needed]
Notes:
  1. ^ a b New team, promoted from lower division
  2. ^ New team, relegated from higher division

I hope this answers your questions. CRwikiCA talk 15:17, 7 November 2014 (UTC)Reply

Passing parameters via template calls

Would it be possible to write the code to allow for parameter values to be passed via template call? I'm specifically thinking of |only_pld_pts=, which is presently coded so that a truncated table is displayed if called (even if no value is assigned). If you look at the UEFA Group Stage tables on the 2015 WWC qual article you can see that the tables are truncated to fit better in the article, but the tables are full size on the main UEFA article and on each of the group articles. Could the coding for |only_pld_pts= be changed to require a specific yes or true value to activate? If that can be done, would passing the value via the template call be possible, e.g. set |only_pld_pts={{{trunc}}} in the module and call {{2015 FIFA Women's World Cup Group A table|trunc=true}}? -- Jkudlick (talk) 12:38, 7 November 2014 (UTC)Reply

@Jkudlick:This would be possible, do you want me to implement it for the group A to see whether my idea works? I think having values yes, y, true, t and 1 (independent of case) would catch all options, or should there be more options? CRwikiCA talk 15:21, 7 November 2014 (UTC)Reply
@CRwikiCA:Those options should be enough. If you want to test it on Group A, I have no problem with that. -- Jkudlick (talk) 15:37, 7 November 2014 (UTC)Reply

@Jkudlick: Done: Template:2015 FIFA Women's World Cup Group A table Template:2015 FIFA Women's World Cup Group A table I kept the same parameter name to keep it easier to follow if people end up reading the Lua code. CRwikiCA talk 17:29, 7 November 2014 (UTC)Reply

Last updated and source

I would be in favour of this being changed to <small> text, in line with some of the other templates used on football pages (I'm not aware for other sports), such as Template:Fb rs (footer is at Template:Fb rs footer). I don't know if there's any guidelines or policies on the use of small text here, but I'd be in favour of a change. - 97rob (talk) 17:51, 6 December 2014 (UTC)Reply

Using <small></small> in table footers is likely a violation of MOS:FONTSIZE, thus the reason the footers in the module are not as small as many editors are accustomed to. -- Jkudlick tcs 18:28, 6 December 2014 (UTC)Reply
The size was indeed brought up in one of the discussions leading up to the introduction of the module. It is now set at the user-defined reference list size, which has 90% as default. Some small text on Wikipedia does indeed seem to violate MOS:FONTSIZE. CRwikiCA talk 20:38, 6 December 2014 (UTC)Reply

About other sports

As this module is called "Sports table", are you going to prepare it for other sports (e.g., deleting the draws column for basketball, different point criteria at rugby union or volleyball, etc)? Great job, btw. Asturkian (talk) 11:42, 16 December 2014 (UTC)Reply

@Asturkian: That is the idea, when it has been rolled out to the football project and everything is working well (no errors) the plan is to spread the module to other sports as well. For example the table is currently called with |style=football but also |style=WL OT works (mainly as test) which is for tables without draw and has overtime wins (OTW) and overtime loss (OTL) instead (those names can be changed to i.e. shootout). The columns are decided in submodules (for example Module:Sports table/football or Module:Sports table/WL OT). I can give you example of thos kind of table.
For |style=football we get
Pos Team Pld W D L GF GA GD Pts
1 FIFA World Cup Dream Team 5 5 0 0 10 0 +10 15
2 Team 2 5 3 1 1 3 2 +1 10
3 Team 3 5 3 0 2 3 3 0 9
4 DDD 5 1 1 3 1 4 −3 4
5 Team 4 5 0 0 5 0 6 −6 0
Updated to match(es) played on unknown. Source: [citation needed]
For |style=WL OT we get
Pos Team Pld W OTW OTL L GF GA GD Pts
1 FIFA World Cup Dream Team 5 5 0 0 0 10 0 +10 15
2 Team 2 5 3 0 1 1 3 2 +1 10
3 Team 3 5 3 0 0 2 3 3 0 9
4 DDD 5 1 1 0 3 1 4 −3 5
5 Team 4 5 0 0 0 5 0 6 −6 0
Updated to match(es) played on unknown. Source: [citation needed]

So as you see there are already ways to make new tables and there is plan to expand, just taking it one step at the time and start at football to see if any issues comes up. QED237 (talk) 13:56, 16 December 2014 (UTC)Reply

@Asturkian: When I have some time, I plan to generalize the documentation to make it easier for people to create sport specific versions. The module is created with sub-modules, so it should be relatively easy to change the columns (and their headings) for specific sports while keeping all the advanced options that are created by the core of the module. I don't think I have time for that until mid January, that should also lead to enough time to iron out the last issues that will come up from implementing the module in various football articles. One more major issues is to generally be able to switch between goals for/against/diff to points for/against/diff to reduce the need for a multitude of style modules that are almost identical. CRwikiCA talk 17:14, 16 December 2014 (UTC)Reply

Adjust points

@Jkudlick and LRD NO: Based on the December discussion I reworded |adjust_points_TTT= for points adjustments (while leaving the old startpoints option in, but removing it from the documentation). CRwikiCA talk 20:25, 9 January 2015 (UTC)Reply

Cheers, CR. Top work as always. LRD 22:57, 9 January 2015 (UTC)Reply
Great work. This is definitely more intuitive. — Jkudlick tcs 01:34, 11 January 2015 (UTC)Reply

Exporting the template to other sports

I exported the module to the 2014–15 Primera División de Futsal article, league that works with the same pointing rules as in football. I don't know if you have a control of where is the module being used. Asturkian (talk) 09:39, 11 January 2015 (UTC)Reply

Also exported to handball at 2014–15 Liga ASOBAL as a first try. Maybe it would be good to ask to the handball editors if they'd like to use the new template at the competitions of this sport. Asturkian (talk) 15:19, 11 January 2015 (UTC)Reply
In hindsight I should have named the football-style WDL for win/draw/loss (maybe I will still do that with football grandfathered in). The long term plan is indeed to add some other styles as well. CRwikiCA talk 16:34, 11 January 2015 (UTC)Reply

First try for basketball

I made in a sandbox a first try of the module for basketball (and sports without ties) purposes here: Module:Sports table/WL/sandbox and its results are at the moment in my sandbox. The only problem I have is I can't convert GF and GA into PF and PA (and maybe it would be better to show points by default). For this table I established by default 2 points per win and one point per less, like it is written in FIBA rules. If you don't agree with it, please delete it. Asturkian (talk) 15:19, 14 January 2015 (UTC)Reply

The other table I want to do for basketball is for competitions that don't use points and only work with wins and losses like, e.g., 2014–15 Euroleague, 2014–15 Eurocup Basketball and Spanish 2014–15 ACB season, without points column and bolding the number of wins but this seems too complicated for me. Asturkian (talk) 15:19, 14 January 2015 (UTC)Reply

@Asturkian: It seems fine to me, I fixed the points for/against/difference issues and it displays fine now on your sandbox. I will extend this module to be able to bold wins (and no points), to use win percentage instead of points and to be able to show games behind. It is on my to do list, but there are a couple of other things on there as well. I moved this style live as well. CRwikiCA talk 15:44, 14 January 2015 (UTC)Reply

@CRwikiCA: BTW, is there any possibility to delete the "Qualification or relegation" column? Asturkian (talk) 16:26, 14 January 2015 (UTC)Reply

@Asturkian: That column is automatically removed when no "resultN"-parameter is used (N is position). HAve you found a place where is is not needed?. QED237 (talk) 17:30, 14 January 2015 (UTC)Reply

"Source:" text 'on' by default

Why was it decided to have the "source:" text there by default? It would look better (in my opinion) if the source text only appeared if there was a citation in place. TheBigJagielka (talk) 15:06, 15 January 2015 (UTC)Reply

I guess it comes fro the league tables that were always sourced and honestly I see no reason for why it should not be. All statistics must be sourced, it is good practise. If not sourced tables might/should be removed as unsourced content. QED237 (talk) 15:18, 15 January 2015 (UTC)Reply
The source text appears in combination with the {{citation needed}} template when no source is given. It is pretty much a given that any table without sources can be very easily challenged, so per WP:PROVEIT the citation needed tag is added automatically as a friendly reminder. CRwikiCA talk 15:35, 15 January 2015 (UTC)Reply

Goal average

Football leagues used to use goal average instead of goal difference (see 1965–66 Bundesliga). Goal average is calculated by dividing goals for by goals against. Is there a way to implement this in these tables? EddieV2003 (talk) 02:45, 16 January 2015 (UTC)Reply