Jump to content

Module talk:Sports rbr table

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Frietjes (talk | contribs) at 14:33, 15 March 2020 ('Match-up results' feature proposal). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
WikiProject iconFootball Template‑class
WikiProject iconThis module is within the scope of WikiProject Football, a collaborative effort to improve the coverage of Association football on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
TemplateThis module does not require a rating on Wikipedia's content assessment scale.

|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)[reply]

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

Another issue

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

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)[reply]
@Frietjes: So how about setting dealt to the module like Module:Sports table? Hhkohh (talk) 17:07, 7 October 2018 (UTC)[reply]
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)[reply]

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)[reply]

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)[reply]
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)[reply]
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)[reply]

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)[reply]
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)[reply]
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/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/ 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)[reply]

Pinging Frietjes Hhkohh (talk) 15:17, 19 January 2019 (UTC)[reply]
Some para can be adjusted if necessary Hhkohh (talk) 15:18, 19 January 2019 (UTC)[reply]
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)[reply]
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)[reply]
Will check later Hhkohh (talk) 23:53, 21 January 2019 (UTC)[reply]
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)[reply]
Another testcase which I have created:Template:2019 Myanmar National League table 2 Hhkohh (talk) 12:42, 22 January 2019 (UTC)[reply]
Frietjes, Why is blank in another testcase: Template:2019 Liga 1 table 2? Hhkohh (talk) 14:52, 22 January 2019 (UTC)[reply]
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)[reply]
 Checking... Hhkohh (talk) 15:10, 22 January 2019 (UTC)[reply]
Not found. Maybe my eyes are too tired? Hhkohh (talk) 15:24, 22 January 2019 (UTC)[reply]

'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)[reply]

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)[reply]