Module talk:Sports rbr table/Archive 1

Archive 1

Ordering

@Frietjes: Maybe it would be possible to that functionality from sports table module, that let's user reorder the teams? Basically this part:


|team1=FDT |team2=BBB |team3=CCC |team4=DDD |team5=EEE

|pos_FDT= 1/.....
|pos_BBB= 2/.....
|pos_CCC= 3/.....
|pos_DDD= 4/.....
|pos_EEE= 5/.....

|name_FDT=[[NHL All-Star Team]]
|name_BBB=Team 2
|name_CCC=Team 3
|name_EEE={{ih|ISL}}

--Edgars2007 (talk/contribs) 16:00, 15 August 2018 (UTC)

Edgars2007, sure, that could be useful when the season is still in progress. I will work on that shortly. Frietjes (talk) 16:01, 15 August 2018 (UTC)
Edgars2007, see the second example in the documentation. Frietjes (talk) 17:57, 15 August 2018 (UTC)

Font-size

Is there an option for font-size? If possible can you show me? Here is the example that the legend names EG, DG etc. are so big.--Teacher0691 (talk) 20:41, 15 August 2018 (UTC)

Teacher0691, I have reduced the legend font-size and made the code easier to import into other languages. you (should) only need to change the table of labels at the top when importing into other language WPs. Frietjes (talk) 15:26, 16 August 2018 (UTC)
Thanks Frietjes but I mean the legends inside the table not footer. The footer is okey now. Can this table be as long as that table? So I mean reducing the length of columns--Teacher0691 (talk) 23:17, 16 August 2018 (UTC)
Teacher0691, it looks like it was a problem with the cell padding. I have switched over to using templatestyles and set the cellpadding to 1px in there. I still need to do more more on the templatestyles to reduce the number of classes, but it should generally work right now. Frietjes (talk) 16:26, 17 August 2018 (UTC)
Yeah Frietjes, I am watching. Better now. Thx.--Teacher0691 (talk) 16:31, 17 August 2018 (UTC)
Frietjes teams align left please always. Looks very bad.--Teacher0691 (talk) 16:44, 17 August 2018 (UTC)
Teacher0691, example please? try refreshing the page. Frietjes (talk) 16:45, 17 August 2018 (UTC)
It is ok now. Thx.--Teacher0691 (talk) 16:48, 17 August 2018 (UTC)

Some custom table

@Frietjes: How can we convert 2009 Chinese Super League and 2012 Chinese Super League to module? Hhkohh (talk) 14:14, 20 August 2018 (UTC)

Hhkohh, see the "color" section in the documentation and/or how I converted 2009 Chinese Super League.
Frietjes How about adding |spiltN=yes? I saw some K league need this Hhkohh (talk) 12:58, 23 August 2018 (UTC)
Hhkohh, okay, that should work now. Frietjes (talk) 13:19, 23 August 2018 (UTC)

Module bug?

@Frietjes: Some pages which uses this module have error messages like 2018 J1 League, see also Category:Pages with script errors, thanks 19:14, 24 August 2018 (UTC)

|rndN=

@Frietjes: can you track pages which uses |rndN=, thanks. I want to update these pages to use |firstround= Hhkohh (talk) 13:35, 8 September 2018 (UTC)

Hhkohh, keep in mind that many of these cannot be replaced with |firstround=. I could probably write a more complicated check to see if they could be replaced with |firstround=, but for now, I will just track any |rndN= that isn't |rnd0=. Frietjes (talk) 14:01, 8 September 2018 (UTC)
okay, I will, thank you Hhkohh (talk) 14:02, 8 September 2018 (UTC)
I will ignore season page while updating Hhkohh (talk) 14:11, 8 September 2018 (UTC)

Essential problem with this module

@Frietjes: First of all, this is not a "new" problem, it already existed with the "old" "fb rbr" templates.

I refer to a discussion I had some months ago: User_talk:CRwikiCA#Template:Fb rbr t pos Netherlands14/c

Basically, the problem is, both in the old templates and in this new module, a single scheme is assumed. Meaning the assignment of spots in the European Tournaments is based on a fixed relation to the ranking.

This fixed relation does not exist. The killjoy is/are Cup Winner(s).

Take the 2012–13 Premier League. Up to round 27 the 7 spots in the European Tournaments can be assigned to the 7 highest ranked teams according to the same scheme (rank 1-3 CL GS, rank 4 CL PO, rank 5 EL GS, rank 6 EL PO and rank 7 EL 3Q).

However, as of round 28 the same scheme doesn't apply any more. Wigan Athletic won the FL Cup. So the EL 3Q spot no longer goes to the team ranked 7. We get a new scheme like rank 1-3 CL GS, rank 4 CL PO, rank 5 EL GS, rank 6 EL PO (fixed) and EL 3Q to the rank taken by Wigan Athletic which can differ each round (variable).

As of round 37 it becomes even more complex. Swansea City won the FA Cup. So the EL GS spot no longer goes to the team ranked 5. We get another new scheme like rank 1-3 CL GS, rank 4 CL PO, rank 5 EL PO (fixed), EL GS to the rank taken by Swansea City and EL 3Q to the rank taken by Wigan Athletic which both individually can differ each round (variable).

If, in the season as mentioned above, both Cups had been won by teams ending on rank 1-4, a single scheme would have done.

All in all, in this specific season, not all spots in the European Tournaments are ranked based. 2 spots in the European Tournaments are team based, the 2 Cup winners.

Something like this happening is not uncommon.

Now this probably can be solved by using the parameter "posX_rndY_color" (if it's a color not used yet, it would also require a parameter "posX_rndY_text").

But have a look at this table: Dutch Eerste divisie 2017/18

I don't even want to think about using an endless amount of "posX_rndY_color" parameters to create a correct table.

However I think the problem can be solved by using something like this:

Let's assume something like a league with only 5 teams. Rank 1 plays CL GS, Cup winner CL PO, rank 2 EL GS. If rank 1 wins Cup as well then rank 2 plays CL PO and rank 3 EL GS. Only 4 teams in the league. Cup is decided after round 4.

{{#invoke:Sports rbr table|table
| title = Example new
| sortable = y
| team1 = CCC | team2 = AAA | team3 = DDD | team4 = BBB
| name_AAA = A Team
| pos_AAA  = 1CLGS/2CLPO/3ELGS/3ELGS/2ELGS/2ELGS/2ELGS
| name_BBB = B Team
| pos_BBB  = 3ELGS/3ELGS/4/4/3CLPO/4CLPO
| name_CCC = C Team
| pos_CCC  = 2CLPO/1CLGS/1CLGS/1CLGS/1CLGS/1CLGS
| name_DDD = D Team
| pos_DDD  = 4/4/2CLPO/2CLPO/4/3
| color_CLGS = green1
| text_CLGS = Champion and qualified for Champions League group stage
| color_CLPO = green2
| text_CLPO = Qualified for Champions League play offs stage
| color_ELGS = blue1
| text_ELGS = Qualified for European League group stage
| source = Some source
}}
Champion and qualified for Champions League group stage
Qualified for Champions League play offs stage
Qualified for European League group stage
Example new
Team ╲ Round1234567
C Team211111
A Team1233222
D Team442243
B Team334434
Source: Some source

It's kinda a mix of the "pos" and "res" notation. "1CLGS" is split into "1" (the "pos" part) and "CLGS" (the "res" part). The "res" part is only used for the color of the cell, the "pos" part only for the string to display, the position. --Sb008 (talk) 04:14, 26 September 2018 (UTC)

Agree but I think we only use new style in some articles not all articles. Hhkohh (talk) 09:33, 26 September 2018 (UTC)
Sb008, I see. something like this is definitely possible, just need to figure out if this is the best syntax from a programming and usage point of view. from a programming point of view, it would be more robust if there were a delimiter between the "1" and the "CLGS". but, as long as we can assume that the "1" is always numeric and the "CLGS" is always in the [A-Za-z] set, and there are no other cases where one would want to use a combination of a number followed by letters for a symbol, we can use the notation you have presented. at the moment, I can't think of any cases, so your suggested syntax should work. Frietjes (talk) 12:35, 26 September 2018 (UTC)
@Frietjes and Hhkohh: The syntax in general would be [<pos>][<res>] where <pos> is numeric and <res> is a string starting with a character. So not [A-Za-z]* but [A-Za-z].* Both can be empty. If both empty it's a future round. if [<res>] is empty it's the current "posN" or "pos_XX" and if [<pos>] is empty it's the current "resN". (@Hhkohh) It's not meant to replace the current 2 notations (pos/res), but as an extension. As far as I see it, there's no need for a delimiter as long as the order is [<pos>][<res>] and not [<res>][<pos>]. But if introducing a delimiter simplifies matters, so be it.
"elseif tostring(k):match( '^%s*colou?_?(.-)%s*$' ) then" (line 135). I assume an "r" is missing.
--Sb008 (talk) 16:26, 26 September 2018 (UTC)
Sb008, okay, should work now. we could probably get rid of the other |posX_rndY_color= syntax, assuming the cases using it would work with this syntax. but, would have to check those to be sure. Frietjes (talk) 17:25, 26 September 2018 (UTC)

@Frietjes: Looking at the code, I don't think it will work the way I meant it to be. "posrc = posrc:match('^%s*[%d]+([A-Za-z]+)')" is as you mentioned the [A-Za-z] set, where I like it to be a single [A-Za-z] character optionally followed by 1 or more characters (which could be restricted to [A-Za-z0-9]). Something like e.g. 4CL3Q (rank 4, Champions League 3rd qualification round) should be possible. The 1st non digit is basically not only part of "posrc" but the delimiter as well.

All in all maybe something like:

  • "| pos4 = 4/3/6/1/3": list of rankings, if you wish cells to be colored based on rank use e.g. "| color_3-4 = blue2". The values displayed in the cells are the rankings/positions. So both color (optionally) and display value are based on the listed rankings/positions. (as before)
  • "| res2= W/ L/ L/ W/ W/ D": list of indicators. if you wish cells to be colored based on indicator use e.g. "| color_D = yellow2". The values displayed in the cells are the indicators. So both color (optionally) and display value are based on the listed indicators. (as before)
  • "| res1= 2CLGS/ 6CL3Q/ 7/ 15/ 19REL": list of ranking and indicator combinations. if you wish cells to be colored it's indicator based only, e.g. "| color_REL = red2". The values displayed in the cells are the rankings. So the colors (optionally) are indicator based and the display values are rank/spot based.

You could also say, we only have result lists. Each result list is a "/" delimited list of rank/indicator combinations. Both rank and indicator can be empty. If

  • both empty "/ /": a result in the future
  • indicator empty, only a rank "/ 6 /": rank is displayed, optionally colors can be set using rank based parameters e.g. color_7-
  • rank empty, only an indicator "/ W /": indicator is displayed, optionally colors can be set using indicator based parameters color_W
  • both not empty "6CL3Q", the 1st none digit ("C") is the delimiter and splits the string into a rank part ("6") and an indicator part ("CL3Q"). The rank is displayed, optionally colors can be set using the indicator part.

Do not use pos<number> at all, but only pos_<name> (define results for team <name>) and name_<name>= (define wikilink for team <name>) and team<number> = <team> (define list sequence number for team <name>). Or even better not pos_<name> but res_<name>. Get rid of pos.... completely.

If "name_<name>" is not used, no Wikilink is shown but just <name>. It can also be used instead of "label<number>". E.g. "| res_WLD = W/L/L/W/W/D | name_WLD = Result | color_W = green2 | color_D = yellow2 | color_L = red2", or "| res_GRD = H/A/A/H/A | name_GRD = Ground". Seems to me "label<number>" is unneeded.

If team<number> = <team> is not used, teams are listed in the order as they occur in the Wiki code. --Sb008 (talk) 19:32, 26 September 2018 (UTC)

Sb008, go ahead and edit the sandbox, but your example works. Frietjes (talk) 19:37, 26 September 2018 (UTC)

@Frietjes: Seems to be okay.

  • Eredivisie last season
Team ╲ Round12345678910111213141516171819202122232425262728293031323334
PSV Eindhoven5325311111111111111111111111111111
Ajax12863676222222332222222222222222222
AZ11976258764433223333333333333333333
Feyenoord7511142356677556545444445554444444
Utrecht22548910898855675666776654445555555
Vitesse1142533435566767777667777666776766
ADO Den Haag1717171414149118101191111889889108888888999997
Heerenveen1011974256791089891089988999991110888678
PEC Zwolle4639764543344444454555566777667889
Heracles Almelo871011111012131411911891091011121212121112121199101111111110
Excelsior61011131312131011771010101112111210111111121110121011111010101011
Groningen9121210101111121314151313121211131313131313131313131313141313121212
Willem II14151818171718171516171515141414141414141414141414151514131414141313
NAC Breda16181415151314141617161717151516161516161615151515141415151515151514
VVV-Venlo34889879101212121213131312101110910101011101212121212131415
Roda JC Kerkrade15161617181817161818181818181718171717171717161717181817161616161616
Sparta Rotterdam18131312121516181715131414161617181818181818181818171616171717171717
Twente13141516161615151213141616171815151615151516171616161718181818181818
Qualification to Champions League third qualifying round
Qualification to Champions League second qualifying round
Qualification to Europa League third qualifying round
Qualification to Europa League second qualifying round
Qualification to European competition play-offs
Qualification to Relegation play-offs
Relegation to Eerste Divisie
Source: [citation needed]
  • Eerste divisie last season
Team ╲ Round1234567891011121314151617181920212223242526272829303132333435363738
Jong Ajax[a]72121111111223333333321211122123321111
Fortuna Sittard19544322233332222111133333333331112222
NEC45466643322111111222212122211212233333
De Graafschap84895565666564544578998787666777755444
Jong PSV[a]127977711151614111297789755554656777664444555
Telstar13121110991310854446477444445565444445666666
Emmen567888865789108866689876444555556577777
Cambuur15191213111091415161517161717161313131313111112121314131312131212109888
Almere City1616181112141613141516141514101010121066678788101113121413111110109
MVV68333457912101012101212111011121214151413121212101081010889910
Den Bosch171720121512797896556558910101010101010101112910991313141611
Eindhoven9111517131512161213141181291112111211111212131515151617161817171716161212
Dordrecht20101015141110810111315141113131515161514131311119119889881212121313
Volendam101517181818181920202020202019181817171716151415141413141414141311910111114
Oss2121223444577911989677899911989111111141414151415
Jong AZ[a]336510131512131012131315151717181919191918171616161515151515151515131516
Go Ahead Eagles1413141617171411119781113141414141416151616161717171718181716161617171717
RKC Waalwijk1818192019191918191918181716161516161514171717181818191919191919191919191818
Helmond Sport1114161920202020171819161818181919191818181819191919181816171618181818181919
Jong FC Utrecht[a]1920131416161717181717191919202020202020202020202020202020202020202020202020
Champion but not allowed to promote
Champion and promotion to the Eredivisie
Promotion to the Eredivisie
Qualification to promotion play-offs Second round
Qualification to promotion play-offs First round
  1. ^ a b c d Reserves teams aren't eligible to be promoted nor to participate in play offs for promotion
Source: [citation needed]

Now an extra nice addition would be to have team notes as in the module "sports table".

Specifically for the Eerste Divisie as above:

| note_JAJ = Reserves teams aren't eligible to be promoted nor to participate in play offs for promotion
| note_JAZ = JAJ
| note_JPS = JAJ
| note_JUT = JAJ

--Sb008 (talk) 21:18, 26 September 2018 (UTC)

Sb008, could be done, or you could just use {{efn}} directly? Frietjes (talk) 22:02, 26 September 2018 (UTC)
Sb008, it turns out it wasn't that hard to do, so now done. Frietjes (talk) 22:30, 26 September 2018 (UTC)
@Frietjes: Of course I could have used {{efn}}. But this is better. We want all sports modules to be similar. Then something else, it doesn't bother me personally since I didn't use it (yet), the splitN parameter. Define it in some table and next push the sort buttons, see what happens. --Sb008 (talk) 22:57, 26 September 2018 (UTC)
the splitN parameter appears to function the same as Module:Sports table, which is good since we want all sports modules to be similar. Frietjes (talk) 13:17, 27 September 2018 (UTC)
@Frietjes: It functions indeed the same in both modules. However I can't imagine the behavior which occurs when pushing a sort button is as intended. Maybe it went unnoticed cause the sort functionality probably is never or rarely activated when using "sports table". --Sb008 (talk) 21:38, 27 September 2018 (UTC)
Sb008 to change the sort behaviour, you need to assign a sort key to the divider rows. some options include (1) sort top, (2) sort bottom, (3) some other key. clearly, the dividers are based on the unsorted presentation, so having them stay fixed while the other rows are sorted is probably not correct. Frietjes (talk) 13:58, 28 September 2018 (UTC)

@Frietjes: I agree the dividers are based on the unsorted presentation. And indeed it wouldn't be that easy to make them behave correct in a sorted situation. You can even discuss about what the behavior should be. Should the dividers stay in a fixed position or should they move with the cells they're attached to in the sort column. But as is, it's not correct. Maybe easiest to accept it as as, and add a note to the parameter in the documentation. --Sb008 (talk) 15:11, 28 September 2018 (UTC)

the dividers have no meaning after you start sorting the table, so they should either move to the top or bottom or disappear. Frietjes (talk) 15:19, 28 September 2018 (UTC)
@Frietjes: In the "sports rbr table" the dividers still have a meaning after sorting, that is as long as the sort column is a column representing a round. Let's assume we have a fully filled table (end of season) of 38 rounds (20 teams). In general the table will initially be sorted on the last (round 38) column. Also assume we defined "split4" and "split8". So a divider will be shown between rank 4 and 5 as well as between rank 8 and 9 (based on the ranks in the last column). Now if I push the sort button for e.g. round 12, the dividers should still show between rank 4/5 and rank 8/9, however between those ranks for round 12. Effectively it means the dividers remain in a fixed position. Because looking at the column used for sorting, rank 4 will always be on line 4, rank 5 always on line 5, rank 8 always on line 8 and rank 9 always on line 9. If I use a reverse sort then rank 4 will be on line 21-4=17, rank 5 on line 21-5=16, rank 8 on line 21-8=13 and rank 9 on line 21-9=12.
So as long as we sort on a round there are 2 possible fixed positions for the dividers, depending on whether it's a normal or a reserved sort.
It becomes a different story if we use the team name as sort column. In that case the dividers have no meaning any more and should disappear. Right now they are moved to the top or bottom, no matter which sort button is used, because the dividers are basically lines with empty cells which, when sorting, either end up first (normal) or last (reversed).
In the "sports table", except when sorting based on the position column, the dividers always lose their meaning. In some cases sorting based on the points column could result in correct dividers but we can't assume to be that lucky. In even more rare cases sorting based on matches won (or lost) or goals for (or goals against) could even result in correct dividers.
The only thing we are sure of is, sorting based on the position column in the "sports table" will result in correct dividers or sorting based on any of the round (which are position based) columns in the "sports rbr table". In all other cases we have to assume the dividers have no meaning and should disappear.
Seems to me hard if not even impossible the implement since we don't program the sort button functionality. Therefore the only option might be to add a note in the documentation about the limitations of sortN whenever sort buttons are pushed. --Sb008 (talk) 17:40, 28 September 2018 (UTC)

|update=future

@Frietjes:See 2019 Chinese Super League. When I typed |update=future, the module output First match(es) will be played on ?. not First match(es) will be played on unknown. Can you fix it? Hhkohh (talk) 14:00, 5 October 2018 (UTC)

fixed. Frietjes (talk) 16:52, 7 October 2018 (UTC)

Another issue

the table now only show 2 line, not 16 lines Hhkohh (talk) 16:02, 5 October 2018 (UTC)

you need to add more teams for the rows to be displayed, or use a place holder like - or TBA or {{0}} Frietjes (talk) 16:52, 7 October 2018 (UTC)
@Frietjes: So how about setting dealt to the module like Module:Sports table? Hhkohh (talk) 17:07, 7 October 2018 (UTC)
this module uses Module:Arguments, which removes blank input, and intelligently merges parent args with frame args. I would rather not make this module worse by implementing the poor design choice used by Module:Sports table. Frietjes (talk) 17:12, 7 October 2018 (UTC)

Overtime win

Is there any way to add in overtime wins, as I'm looking to use this Module for ice-hockey results on my sandbox? Joefoxon (talk) 12:09, 8 October 2018 (UTC)

Joefoxon, you can use any letters, numbers, or other symbols. you just have to decide on what to use to denote an overtime win, e.g. OW or whatever. Frietjes (talk) 13:48, 8 October 2018 (UTC)
User:Joefoxon/sandbox#Results_by_matchday This is what happens when I try to do that, the OL doesn't appear in the legend. Joefoxon (talk) 13:53, 8 October 2018 (UTC)
Joefoxon, I see, you want the symbols inside the boxes in the legend. that should work now. Frietjes (talk) 17:07, 8 October 2018 (UTC)

Consistent data

@Frietjes: In out footy, after each match ended, we need to update data in league article and at least two club season article. Can we update the module to support we only update once instead of several times? Like Module:Sports table.

For example, we update data in a template, then put {{Template name|showstyle=rbr}} or {{Template name|showstyle=pos}} in league articles and put {{Template name|showteam=AAA}} in club season articles separately Hhkohh (talk) 09:01, 19 January 2019 (UTC)
Hhkohh, I think you are asking for the ability to have the Module:Sports table and Module:Sports rbr table information in the same module call, similar how we can call Module:Sports results from Module:Sports table? could be possible, but I would need to do some testing/coding. can you provide a link to examples in articles so I can be certain about what you are requesting. Frietjes (talk) 14:55, 19 January 2019 (UTC)
Probably you misunderstand, but I give you an example:
If coding in a template

{{#invoke:sports rbr table|table|sortable=y|legendpos=br <!--Update team positions here--> | update=complete |team1=SSI |team2=GZE |team3=SD |team4=BJS |team5=JSS |team6=HBC |team7=SGS |team8=BJR |team9=TJQ |team10=GZF |team11=DLY |team12=HN |team13=CQ |team14=TJT |team15=CC |team16=GZZ |pos_BJR = 12/ 9/ 9/11/13/10/10/10/ 8/10/ 8/10/ 7/ 8/ 9/10/11/12/11/ 6/ 7/ 9/ 9/ 8/ 7/ 8/ 8/ 8/ 8/ 8 |pos_BJS = 14/10/ 5/ 3/ 3/ 5/ 5/ 4/ 3/ 3/ 3/ 1/ 1/ 1/ 1/ 1/ 1/ 1/ 1/ 1/ 1/ 3/ 3/ 4/ 4/ 4/ 4/ 4/ 4/ 4 |pos_CC = 7/14/14/15/15/13/12/11/12/12/12/12/12/13/12/11/12/ 8/ 9/12/12/ 7/ 8/10/10/10/11/12/14/15 |pos_CQ = 6/ 8/ 4/ 7/ 8/ 9/ 7/ 9/13/13/13/13/13/14/14/14/15/15/15/15/15/14/14/14/14/14/13/14/13/13 |pos_DLY = 16/16/16/16/16/16/15/15/15/15/15/15/15/15/15/15/14/14/13/13/13/13/10/11/ 9/ 9/ 9/10/15/11 |pos_GZE = 11/ 5/ 3/ 2/ 2/ 2/ 3/ 3/ 4/ 5/ 5/ 4/ 4/ 4/ 4/ 4/ 4/ 4/ 4/ 3/ 3/ 2/ 2/ 2/ 2/ 2/ 2/ 2/ 2/ 2 |pos_GZF = 5/ 3/ 6/ 5/ 7/ 7/ 9/ 7/ 6/ 7/ 6/ 8/ 9/ 9/ 6/ 7/ 9/10/ 8/10/ 6/ 8/ 7/ 9/11/11/12/11/ 9/10 |pos_GZZ = 13/14/15/14/14/15/16/16/16/16/16/16/16/16/16/16/16/16/16/16/16/16/16/16/16/16/16/16/16/16 |pos_HBC = 10/ 4/ 8/10/ 9/11/11/ 8/10/ 9/ 9/ 9/10/10/10/12/10/11/10/11/ 9/ 6/ 6/ 6/ 8/ 7/ 7/ 7/ 7/ 6 |pos_HN = 15/11/13/12/12/14/14/14/14/14/14/14/14/12/13/13/13/13/14/14/14/15/15/15/15/15/15/13/10/12 |pos_JSS = 4/ 7/12/ 8/ 6/ 6/ 4/ 6/ 5/ 4/ 4/ 5/ 5/ 5/ 5/ 5/ 5/ 5/ 5/ 5/ 5/ 5/ 5/ 5/ 5/ 5/ 5/ 5/ 5/ 5 |pos_SD = 3/ 2/ 2/ 4/ 5/ 3/ 2/ 2/ 1/ 1/ 2/ 3/ 2/ 2/ 2/ 2/ 2/ 2/ 3/ 4/ 4/ 4/ 4/ 3/ 3/ 3/ 3/ 3/ 3/ 3 |pos_SGS = 8/13/10/ 6/ 4/ 4/ 6/ 5/ 7/ 6/ 7/ 6/ 6/ 6/ 7/ 6/ 7/ 6/ 6/ 9/10/11/13/ 7/ 6/ 6/ 6/ 6/ 6/ 7 |pos_SSI = 1/ 1/ 1/ 1/ 1/ 1/ 1/ 1/ 2/ 2/ 1/ 2/ 3/ 3/ 3/ 3/ 3/ 3/ 2/ 2/ 2/ 1/ 1/ 1/ 1/ 1/ 1/ 1/ 1/ 1 |pos_TJQ = 2/ 6/11/13/10/12/13/13/11/11/11/ 7/ 8/ 7/ 8/ 9/ 8/ 9/12/ 8/ 8/10/11/13/13/13/10/ 9/11/ 9 |pos_TJT = 9/12/ 7/ 9/11/ 8/ 8/12/ 9/ 8/10/11/11/11/11/ 8/ 6/ 7/ 7/ 7/11/12/12/12/12/12/14/15/12/14 <!--Team definitions (wikilinks in table)--> |name_BJR=[[Beijing Renhe F.C.|Beijing Renhe]] |name_BJS=[[Beijing Sinobo Guoan F.C.|Beijing Sinobo Guoan]] |name_CC=[[Changchun Yatai F.C.|Changchun Yatai]] |name_CQ=[[Chongqing Dangdai Lifan F.C.|Chongqing Dangdai Lifan]] |name_DLY=[[Dalian Yifang F.C.|Dalian Yifang]] |name_GZE=[[Guangzhou Evergrande Taobao F.C.|Guangzhou Evergrande Taobao]] |name_GZF=[[Guangzhou R&F F.C.|Guangzhou R&F]] |name_GZZ=[[Guizhou Hengfeng F.C.|Guizhou Hengfeng]] |name_HBC=[[Hebei China Fortune F.C.|Hebei China Fortune]] |name_HN=[[Henan Jianye F.C.|Henan Jianye]] |name_JSS=[[Jiangsu Suning F.C.|Jiangsu Suning]] |name_SD=[[Shandong Luneng Taishan F.C.|Shandong Luneng Taishan]] |name_SGS=[[Shanghai Greenland Shenhua F.C.|Shanghai Greenland Shenhua]] |name_SSI=[[Shanghai SIPG F.C.|Shanghai SIPG]] |name_TJQ=[[Tianjin Quanjian F.C.|Tianjin Quanjian]] |name_TJT=[[Tianjin Teda F.C.|Tianjin Teda]] |toptext_rbr= <small>To preserve chronological evolvements, any postponed matches are not included to the round at which they were originally scheduled, but added to the full round they were played immediately afterwards. For example, if a match is scheduled for round 7, but then played between rounds 8 and 9, it will be added to the standings for round 8.</small> | color_1=gold |text_1= Leader and qualification to [[2019 AFC Champions League#Group stage|AFC Champions League Group stage]] | color_2=green1 |text_2= Qualification to [[2019 AFC Champions League#Group stage|AFC Champions League Group stage]] | color_3=green2 |text_3= Qualification to [[2019 AFC Champions League#Play-off round|AFC Champions League Play-off round]] | color_15-16=red1 |text_15-16= Relegation to [[2019 China League One|League One]] | res_BJR = L/W/D/L/L/W/D/W/D/L/W/D/W/L/L/D/D/L/W/W/D/L/D/D/W/L/L/W/L/D≠ | res_BJS = L/W/W/W/D/D/D/W/W/D/W/W/W/D/W/D/W/W/L/W/W/L/L/L/W/D/L/D/W/L | res_CC = D/L/D/L/L/W/W/W/L/L/L/W/L/L/W/D/W/W/L/D/D/W/L/L/D/D/L/L/D/L | res_CQ = W/L/W/L/D/D/W/L/L/L/L/L/W/L/L/D/L/D/L/D/L/W/D/W/L/D/W/D/W/L | res_DLY = L/L/L/D/D/L/D/L/W/L/W/D/L/L/L/W/W/L/W/D/W/W/W/L/W/L/L/L/L/W | res_GZE = L/W/W/W/W/D/D/W/L/D/L/W/L/W/W/W/L/W/W/W/W/W/W/W/W/W/W/L/L/W | res_GZF = W/W/L/W/L/L/L/W/W/D/D/L/D/D/W/L/L/L/W/L/W/L/D/L/L/L/L/W/W/D | res_GZZ = L/L/L/W/L/L/L/L/L/D/L/L/D/L/W/L/L/L/W/L/D/L/W/W/L/W/L/L/L/W | res_HBC = D/W/L/L/W/L/D/W/L/D/W/D/D/D/L/L/W/L/W/D/D/W/W/L/L/D/W/L/L/W | res_HBC = L/W/L/D/L/L/L/L/W/W/D/L/D/W/L/W/L/L/L/L/D/L/L/W/L/W/W/W/W/L | res_JSS = W/L/L/W/W/D/W/L/W/W/L/D/D/D/W/W/L/D/D/W/D/D/L/W/L/D/W/W/L/W | res_SD = W/W/W/L/L/W/W/W/D/D/W/D/W/D/W/D/W/W/L/L/L/W/W/D/W/W/L/W/W/D | res_SGS = D/L/W/W/W/D/L/W/L/W/L/W/D/D/L/D/L/W/L/L/L/D/L/W/W/D/W/L/L/D | res_SIP = W/W/W/W/W/W/D/L/L/D/W/D/W/W/W/L/W/W/W/W/D/W/W/W/W/D/W/W/W/L | res_TJQ = W/L/L/L/W/D/D/L/W/D/W/W/L/W/L/L/D/D/L/W/D/L/L/L/L/D/W/D/D/W | res_TJT = D/L/W/L/D/W/D/L/W/W/L/L/L/W/L/W/W/D/D/L/L/L/D/L/D/L/L/D/W/L | legendpos=b | color_W = green1 | color_D = yellow1 | color_L = red1 | text_W = Win | text_D = Draw | text_L = Loss | source = [http://csl-china.com/schedule.html Results] |ground_BJS=A/ A/ A/ H/ H/ A/ H/ H/ A/ H/ A/ H/ H/ A/ H/ H/ H/ H/ A/ A/ H/ A/ A/ H/ A/ H/ A/ A/ H/ A | | source = [[#Matches|Competitive matches]] }}

You can see if you type {{Template name|showstyle=pos}}:

To preserve chronological evolvements, any postponed matches are not included to the round at which they were originally scheduled, but added to the full round they were played immediately afterwards. For example, if a match is scheduled for round 7, but then played between rounds 8 and 9, it will be added to the standings for round 8.

Team ╲ Round123456789101112131415161718192021222324252627282930
Shanghai SIPG111111112212333333222111111111
Guangzhou Evergrande Taobao1153222334554444444433222222222
Shandong Luneng Taishan322453221123222222344443333333
Beijing Sinobo Guoan14105335543331111111111334444444
Jiangsu Suning4712866465445555555555555555555
Hebei China Fortune1048109111181099910101012101110119666877776
Shanghai Greenland Shenhua81310644657676667676691011137666667
Beijing Renhe129911131010108108107891011121167998788888
Tianjin Quanjian26111310121313111111787898912881011131313109119
Guangzhou R&F5365779767689967910810687911111211910
Dalian Yifang161616161616151515151515151515151414131313131011999101511
Henan Jianye151113121214141414141414141213131313141414151515151515131012
Chongqing Dangdai Lifan6847897913131313131414141515151515141414141413141313
Tianjin Teda912791188129810111111118677711121212121214151214
Changchun Yatai7141415151312111212121212131211128912127810101011121415
Guizhou Hengfeng131415141415161616161616161616161616161616161616161616161616
Leader and qualification to AFC Champions League Group stage
Qualification to AFC Champions League Group stage
Qualification to AFC Champions League Play-off round
Relegation to League One
Source: Results

You can see if you type {{Template name|showstyle=rbr}}::

Team ╲ Round123456789101112131415161718192021222324252627282930
Beijing RenheLWDLLWDWDLWDWLLDDLWWDLDDWLLWLD
Beijing Sinobo GuoanLWWWDDDWWDWWWDWDWWLWWLLLWDLDWL
Changchun YataiDLDLLWWWLLLWLLWDWWLDDWLLDDLLDL
Chongqing Dangdai LifanWLWLDDWLLLLLWLLDLDLDLWDWLDWDWL
Dalian YifangLLLDDLDLWLWDLLLWWLWDWWWLWLLLLW
Guangzhou Evergrande TaobaoLWWWWDDWLDLWLWWWLWWWWWWWWWWLLW
Guangzhou R&FWWLWLLLWWDDLDDWLLLWLWLDLLLLWWD
Guizhou HengfengLLLWLLLLLDLLDLWLLLWLDLWWLWLLLW
Hebei China FortuneDWLLWLDWLDWDDDLLWLWDDWWLLDWLLW
Henan JianyeLWLDLLLLWWDLDWLWLLLLDLLWLWWWWL
Jiangsu SuningWLLWWDWLWWLDDDWWLDDWDDLWLDWWLW
Shandong Luneng TaishanWWWLLWWWDDWDWDWDWWLLLWWDWWLWWD
Shanghai Greenland ShenhuaDLWWWDLWLWLWDDLDLWLLLDLWWDWLLD
Shanghai SIPGWWWWWWDLLDWDWWWLWWWWDWWWWDWWWL
Tianjin QuanjianWLLLWDDLWDWWLWLLDDLWDLLLLDWDDW
Tianjin TedaDLWLDWDLWWLLLWLWWDDLLLDLDLLDWL
Source: Results
W = Win; D = Draw; L = Loss

You can see if you type {{Template name|showteam=BJS}}

Round123456789101112131415161718192021222324252627282930
GroundAAAHHAHHAHAHHAHHHHAAHAAHAHAAHA
ResultLWWWDDDWWDWWWDWDWWLWWLLLWDLDWL
Position14105335543331111111111334444444
Source: Competitive matches
A = Away; H = Home; W = Win; D = Draw; L = Loss


Hhkohh (talk) 15:10, 19 January 2019 (UTC)

Pinging Frietjes Hhkohh (talk) 15:17, 19 January 2019 (UTC)
Some para can be adjusted if necessary Hhkohh (talk) 15:18, 19 January 2019 (UTC)
Hhkohh, okay, this is clear, but slightly complicated to implement all the cases. I will work on it tomorrow. Frietjes (talk) 16:55, 19 January 2019 (UTC)
Hhkohh, getting close to a working prototype, see 'User:Frietjes/rbr'. still have to fix the legend, and table headings, but otherwise it seems to be generally working. Frietjes (talk) 18:00, 21 January 2019 (UTC)
Will check later Hhkohh (talk) 23:53, 21 January 2019 (UTC)
Frietjes, the source para need to be split because {{Template name|showstyle=rbr}} do not need Competitive matches. And in template, better to put in alphabetical order while previewing in template and in |showstyle=rbr version but we put in position order in |showstyle=pos version (2 order systems needed!) Hope you can do it successfully! Hhkohh (talk) 11:59, 22 January 2019 (UTC)
Another testcase which I have created:Template:2019 Myanmar National League table 2 Hhkohh (talk) 12:42, 22 January 2019 (UTC)
Frietjes, Why is blank in another testcase: Template:2019 Liga 1 table 2? Hhkohh (talk) 14:52, 22 January 2019 (UTC)
Hhkohh, may be because I was working on it, or may be because you used the wrong syntax? Frietjes (talk) 15:06, 22 January 2019 (UTC)
  Checking... Hhkohh (talk) 15:10, 22 January 2019 (UTC)
Not found. Maybe my eyes are too tired? Hhkohh (talk) 15:24, 22 January 2019 (UTC)

'Match-up results' feature proposal

Hi @Frietjes: in some athletic conference articles like 2019 PBA Philippine Cup and UAAP Season 82 basketball tournaments you will see "Schedule" table (sometimes called "match-up results table") showing the order of opponents of each team with the background colors indicating that team's win/loss results against their opponents.

I'd like to propose such feature to be implemented to this module.

I have already created the implementation in my sandbox: Module:Sandbox/McVahl/sometest including the test cases. The schedule appearance will apply if argument sched=y.

If you agree with the merge, or if there is an existing feature that is affected by the change, please let me know. I would welcome everybody for comments and suggestions. :) – McVahl (talk) 09:38, 13 March 2020 (UTC)

Hi McVahl, thank you for working on this. I definitely think we can make this possible. first, if possible, I would like to enable multiple rows per team to support tables like this one (there are many of these). so, in this case, the colouring for the opponents row is home/away and not W/D/L. that one also has the two tables merged into one table. right now, the module doesn't support multiple rows per team. I had been working on multirow support in the sandbox but stopped working on it for some reason. that said, looking at the diff between your version an the current version, I don't see any serious problems with your changes. Frietjes (talk) 14:33, 15 March 2020 (UTC)
Hi, @Frietjes: added style arg (works similar to Module:Sports table) so that the impact is minimal if "multiple rows" will be implemented soon. The style (or submodule) sandbox is in Module:Sandbox/McVahl/sometest/testtable. The new submodule (if pushed through) will be named as Module:Sports rbr table/sched. Kindly review if this is okay with you. Thanks. – McVahl (talk) 16:45, 21 March 2020 (UTC)
McVahl, you seem to be careful and competent so I have no objection to you pushing your changes (assuming it doesn't break anything :)) Frietjes (talk) 17:32, 22 March 2020 (UTC)