Archives |
---|
|
Women in Red World Contest
Hi. We're into the last five days of the Women in Red World Contest. There's a new bonus prize of $200 worth of books of your choice to win for creating the most new women biographies between 0:00 on the 26th and 23:59 on 30th November. If you've been contributing to the contest, thank you for your support, we've produced over 2000 articles. If you haven't contributed yet, we would appreciate you taking the time to add entries to our articles achievements list by the end of the month. Thank you, and if participating, good luck with the finale!
Template:Fb rbr t pos Netherlands14/c
Hi CRwikiCA, I read you not very active any more and semi retired, but I hope you still read this. In Template:Fb rbr t pos Netherlands14/c, unless I understand wrong, it seems something is missing. There is no way to indicate the cup winner with an appropriate color. In the current season the cup winner is on position 4 (after 32 rounds) and for sure will stay there till the end of the season (round 34). Of course I could add a color for the rank of the cup winner, but that would affect all previous rounds too. Also, the color used now for positions 4 to 7, since 4 won the cup, will shift to positions 5 to 8. Also this I could change, but this would affect all previous rounds as well. Any idea (and time) how to solve this? TIA. --Sb008 (talk) 19:17, 22 April 2018 (UTC)
- @Sb008: Better late than never, I think using 4* and 8* would do the trick, in combination with * (or another symbol) as a footnote explaining the cup was won then and the spots moved. CRwikiCA talk 02:38, 22 May 2018 (UTC)
- Hi CRwikiCA, thanks for replying.
- As I see it, using 4* and 8* doesn't do the trick. Let me be more specific. The table it's about is 2017–18 Eredivisie#Positions by round.
- In the Dutch league, the following qualification rules apply (I'll ignore the relegation rules here):
- #1 --> Champions League Play-off round (CLPO),
- #2 --> Champions League 3rd qualifying round (CL3Q),
- #3 --> Europa League 2nd qualifying round (EL2Q),
- next 4 spots without a qualification (default #4 to #7) --> play-off for 1 spot in Europa League 2nd qualifying round (PO),
- Cup winner --> Europa League 3rd qualifying round (EL3Q).
- The Cup winner is the tricky one:
-
- If the Cup winner ends #1 or #2, the Cup Winner will not play EL3Q but CLPO or CL3Q (a higher cup) and the CL3Q right will shift to #3, the CL2Q right to #4 and the PO right to #5-#8.
- If the Cup winner ends #3, the Cup winner will play EL3Q (standard), the EL2Q right will shift to #4 and the PO right to #5-#8.
- If the Cup winner ends #4, #5, #6 or #7, the Cup winner will play EL3Q (standard), #3 will play EL2Q (standard) and the PO right of the Cup winner will shift to #8.
- If the Cup winner ends #8 or lower, all will be standard.
- The colors used in Template:Fb rbr t pos Netherlands14/c are:
-
- CLPO: #BBF3BB (also known as green1 in other templates/modules)
- CL2Q: #CCF9CC (green2)
- EL2Q: #CCF9FF (blue2)
- PO: #FFFFBB (yellow1)
- EL3Q (Cup Winner): not facilitated/implemented but should #BBF3FF (blue1).
- Now there're are 2 major scenario's:
- Cup winner is still unknown: things are as implemented now, #1(CLPO):green1, #2(CL2Q):green2, #3(EL2Q):blue2 and #4-#7(PO):yellow1.
- Cup winner is known: Now the problem occurs. Let me be specific. This season Feyenoord (#4) won the Cup between round 32 and 33 (of 34). So as of round 33 it should be: #1(CLPO):green1, #2(CL2Q):green2, #3(EL2Q):blue2, #4(EL3Q):blue1 and #5-#8(PO):yellow1
- The template however doesn't facilitate the extra color for the Cup winner, and in this specific case a shift of the color yellow1 from position #4-#7 to #5-#8.
- Basically the template should have 2 color schemes, 1 for the period the Cup winner is still unknow (as it is now), and 1 for when the Cup winner is known. The last one would be quiet complex because depending on the rank of the Cup winner, the scheme can differ.
- If I use 4* and 8*, I can of course add a footnote, but the color of #4 will not change into blue1 and the color of #8 not into yellow1. Both will change into grey (transparent).
- And if you think the above is complex, have a look at this: nl:Eerste divisie 2017/18#Positieverloop per club, the Dutch Eerste divisie, where some teams (reserve teams) are excluded from "qualifying" spots and the "qualifying" sport are partly based on winning 1 of the 4 periods in the season.
- Anyway, I don't see an option to implement the "Cup winner is known" scenario into the template. But then, I'm not a template expert. Only option I see is creating a LUA module, which probably will not be easy if it has to cover the possibilities of the leagues in all the different countries.
- Maybe you know a way to fix it.
- Otherwise it's probably either LUA or define the table yourself (as is done on the Dutch page. --Sb008 (talk) 06:20, 22 May 2018 (UTC)
- @Sb008: Do you have a sandbox you're using to play around with it? The template is basically a switch statement, but it seems that you're limited to one entry per cell. I see that you might need different positions highlighted in general. I haven't worked on templates for a while, so I would need to refresh myself and see whether that statement can include a few more tricks to get it to work. CRwikiCA talk 02:24, 23 May 2018 (UTC)
Hi CRwikiCA, thanks again for the reply.
The way I see it, it's very hard to arrange it based on the concept of "Fb rbr t pos Netherlands14/c". It looks like 2 extra parameters would be needed. One for the season, and one for the round number. The round number can be derived from the (unnamed) input parameters. Needed because, as soon as the cup winner is known, a different scheme is necessary. Possibly not just one extra scheme, but even more. As soon as the Cup winner changes position, there would be a different scheme. The parameter for the season (year) is needed because every season it can be different. This season Feyenoord won the Cup at rank 4, previous season Vitesse at rank 5. Different teams doesn't matter, but different positions does. The year parameter could be derived from the page where the template is used (e.g. 2017–18 Eredivisie", so 2017). But, knowing that, I can't think of a generic way to define multiple schemes. Looks like the extra scheme has to be added each time the circumstances change.
So I tried a different approach. A note up front; I do know how to program, but this template syntax is new to me. Meaning, I don't know all the do's and don'ts yet. Also I can't find a full syntax manual and have to search for things bit by bit. So I there might be smarter ways to do what I did.
Anyway, if you can have a look at this: template:X16.
Disadvantage of my approach, more "complex" to define the ranking(/color).
Advantage of my approach, you can use colors for any position.
In case you read this at a time template:X16 already has been removed, I have copy on my system so can put it back any time.--Sb008 (talk) 22:44, 23 May 2018 (UTC)
- @Sb008: The easiest way is to use a user page, example: User:CRwikiCA/LuaTest. Use one for a test template and one for a test table, because it's not live it's a good place to experiment. The template language is limited. Some people would also argue that the position with colours would violate MOS:COLOR though. CRwikiCA talk 02:10, 24 May 2018 (UTC)