Module talk:Cycling race/archive6

Suggestions and comments

@ Psemdel: I come to you as if I am not mistaken, you made the last global changes.  

Hello, as I wrote before, I can't read Russian and had no possibility to test it in this language. I am therefore not surprised that there are some issues. Still the changes were required to improve the module. Personally, I have no more idea of improvement, so I hope that once we correct your issues, the version will reach a kind of stability.

So I look at Тур Даун Андер 2019, I suppose it is the basis for this discussion.

Cycling race/startlist

  1. If the driver’s spelling in English is absent in the WD, the module in the ru-wiki gives an error.
Startlist uses the function "getRiderLink" for the rider (which I didn't create). I had the idea, that you probably don't want the "official name" with latin alphabet, if it is not present in cyrillic. Therefore, I made this "if". If there is no official name, then it looks for label in the language of the wiki, if not found then it makes link = getLabelFallback(riderID, {'en', 'de'}). I corrected right now an issue with the loop for (label missing) which was damaged. I insert the 'fr' and 'es' fallback in addition. It can help.
  1. Make it possible to display the list of commands minimized by default by adding some parameter as in the calendar. For example, "closed". You can of course manually hide it through the template, but then the text becomes smaller and the place on the sides disappears.
What do you mean with "the list of commands"? What do you want to customize?
Like this. I apologize for the curvature inside, it is difficult to quickly understand your patterns. For example, in the way {{Cycling race/startlist|Q57082387|close=1}}GAN (talk) 22:20, 15 January 2019 (UTC)
Ok understood.
We should add something like that, but I don't get it correct. Can somebody correct?
<div class="NavFrame" style="margin:auto; clear:both; border-style:solid;border-color:#AAA; background-color:#FFF" title="[afficher]/[masquer]" >
<div class="NavHead" style="text-align:center; height:1.6em; background-color:#EFEFEF; color:black">
Supertitle
<div class="NavContent" style="margin:0; background:white; ;text-align:left; display:block;">
Supercontent
</div>
<div class="NavEnd"> </div>
</div></div>
  1. If the command does not specify the USI code to display an empty string. Now there is a shift up the composition of the team
  Done It is a good point, it can be solved probably. Edit: I put "___" if no UCI code. Note that in the code without wikidata, there is the same "issue".
  1. In ru-wiki in the rest of the templates, after the rider, a small Wikidata icon is displayed, which allows you to quickly jump to his star page in WD. Can I do this here?
  Done It should be possible I think.
  1. Can add the list of main abbreviations directly to the template
It seems complicated to automatize that to be honest. In French for instance, we list the type of tricot and dates...and..and..and. I realized the template, I know it is complicated (see [Modèle:LP/Légende/Course à étapes2 here]. I would suggest you to make a similar template in ru.
  1. Strange bug.

https://www.wikidata.org/wiki/Wikidata:WikiProject_Cycling/Documentation/startlist
Starts Art for Tour de Thuringe féminin 2018 (which is in the sample) Galina Chernyshova (Q57316098) (№104) - remains citizenship in the WD - the module displays in her flag of Kazakhstan. Irina Ivanova (Q57315808) (№103) - Russia. I removed her citizenship for verification - the module displayed the flag of Germany. Then he joined. Checked in ru-wiki and fr-wiki — GAN (talk) 19:11, 20 January 2019 (UTC)

I will have a look. Psemdel (talk) 21:38, 25 January 2019 (UTC)
  Done, 2 minutes work :) Psemdel (talk) 17:46, 26 January 2019 (UTC)

Cycling/Calendarcustom

  1. Make the race displayed even if no category is specified for it. Now in some tournaments among these races there are those who do not have a category. This feature allows you to quickly find them in the list.
  Done I use the categories to sort the races (for instance in UCI calendar I only show UCI races). I can give it a try. I will maybe remember, why I absolutely wanted to introduce that.

Cycling/listofstages

  1. If a manual change is made to the calendar, then when you click on the WD icon, the transition to the WD does not occur, and the icon image opens
I tried with Тур Даун Андер 2019, it worked at my place (it opens wikidata). The link is " "... Do you have an example.
Any grand tour where manually at least indicate the days of rest or the country / flag, if the stage took place in another country.—GAN (talk) 22:20, 15 January 2019 (UTC)
  Done Ok.
  • If the place of start or finish of the stage is located in another country, unlike all the others. Through (P276) add a country to display its flag (size 15px) before the name of the city. — GAN (talk) 16:01, 10 February 2019 (UTC)
So compare the country of the city to the country of the race. If different-->display flag. Yes, it can be done. Psemdel (talk) 16:44, 10 February 2019 (UTC)
@Psemdel: Do you suggest comparing countries automatically? In the race element, as well as its stages, we indicate all the countries where the race is taking place. Example 2019 Tour de France (Q30091668) FRA and BEL countries are indicated. For stages 1 - 3 country BEL. Then the comparison should show that the countries are no different. If only for a race taking place in several countries at once, it is imperative to indicate the main host country first and compare it with it. — GAN (talk) 17:03, 10 February 2019 (UTC)
A good point.
  Done As for some races, both countries have the same value, I made it simple. If there is only one country during the race --> no flag, if there are several --> flag. Psemdel (talk) 19:22, 11 February 2019 (UTC)
Changed my mind as there are many GTs and race with one main country. So I come back to the idea from GAN. Psemdel (talk) 00:25, 13 February 2019 (UTC)

Cycling race/listofteams

  1. The command is placed in the correct class if in the VD it is listed first in parameter p31. But there often can be the first or only Q53534649. When you add a class, you have to delete it first, and then enter it again. Make it ignored by the module.
  Done I am looking at that, I think it can be easily improved.

Classification leadership table

  1. Almost the last element in the manual to redeem for the race. Leaders after the stage indicate. A list of light colors for jersey is available to highlight cells with intermediate results. The number of displayed nominations (columns) can be made as in the calendar, that is, if desired (stage number, stage winner, general, points, mountains, sprint, у-23, agressive, team time, team points). The only thing missing is the icon of the desired T-shirt for the title, you can try to take it from the list in P1346 and dark colors for the final row. Probably there will not be only a merger of cells if the racer was in the lead in several stages.
    ?????
I thought about it several time. The merging of the cell makes it complicated. Moreover, copy/paste of the table takes 1 minute, so I haven't invest time in it yet. 2019 is still long, we can try.
Protocols in Latin, and we have Cyrillic.   Although, apart from the World Tour, we do not do other races in a single year. — GAN (talk) 22:20, 15 January 2019 (UTC)
A point for you. When I find some time...
This is not the most important thing, rather this one as a sentence. tables for 20 multi-day races per year in the World Tour, we will make handles.  GAN (talk) 19:29, 20 January 2019 (UTC)
When I think about it, it is almost a copy/paste of listofstages. It could be done in one week-end, I think ;). Psemdel (talk) 20:48, 22 January 2019 (UTC)
See below, alpha version done. Psemdel (talk) 21:08, 5 March 2019 (UTC)

Cycling race / infobox

  • Can I add the ability to display the navigation for the previous and next year in manual mode, replacing the automatic one? It is necessary for races (Grand Prix of Nations) which was also part of several races (not tournaments).
I understand, but I am not very familiar with the "manual" stuff. Someone else could do it maybe.
  • If we specify the compositions of all the teams, they can be made so that their number at the start is first displayed in (number of participants (P1132)). How will affect the resources of the module. Just as the number of stages and teams in a race is considered.

GAN (talk) 16:06, 10 February 2019 (UTC)

Yes, it would be rational. I suppose it is only a count "#", if it can be done then it should not be expensive. Psemdel (talk) 16:48, 10 February 2019 (UTC)
  Done, note that the NP at the first stage are not considered. It is more from an help to get the number than from a precise function.

Cycling race / listofwinners

  • Add the ability to output lines at the very bottom after the last entry. For example, "under row".
Is it not possible?
  • Cycling race / infobox and Cycling race / victories can display a link to the source next to the winners. Do the same here.

GAN (talk) 16:06, 10 February 2019 (UTC)

Yes, can be done. Psemdel (talk) 16:49, 10 February 2019 (UTC)
Do you have an example, where I can test. I think it is only 10 letters to add in the code. Psemdel (talk) 17:43, 10 February 2019 (UTC)

Cycling race / victories

GAN (talk) 16:06, 10 February 2019 (UTC)

So no country name, only country flag for ru-wiki. Correct? Psemdel (talk) 16:52, 10 February 2019 (UTC)
Yes. Only the flag of the country before the name of the race. In ru-wiki, in all templates based on the module, the country in the lists is only flagged. Plus the template does not stretch much. — GAN (talk) 17:07, 10 February 2019 (UTC)
  Done

Cycling race / teamroster

GAN (talk) 16:06, 10 February 2019 (UTC)

  Done There was two spaces in the name in ru: solved here Psemdel (talk) 17:12, 10 February 2019 (UTC)

Other

  1. In ru-wiki almost all riders (except for representatives of several countries) are displayed in all templates as Last Name, First Name. Comma separated. It can be done (if it is not difficult and resource-intensive) so that the part is first displayed before the comma, and then after it. But without a comma. As in all other wiki. — Last Name, First Name >>>>> First Name Last Name

"embarrassing smiley"

In teamroster, there is a fonction to invert the Last Name and the First Name in ru. Is it working? If yes, we can try to expand it to other functions.
In ru-wiki in all tables on the basis of the module cyclists are displayed as follows in order of priority:

- because the article is named about him. We have this last name, first name and patronymic
- as written in Russian in Wikidat
- writing in a foreign language in Latin
Therefore, to remove the middle name so as not to stretch the tables, at the moment it is only possible through p1448

List of all templates. You can see. Everywhere comma-separated viewing convenience

So you don't want "Вивиани, Элиа" but "Элиа Вивиани" all the time. Even though the label and article in wikipedia are both "Вивиани, Элиа". Is that correct? Psemdel (talk) 21:37, 16 January 2019 (UTC)
I inserted a test in ru. Psemdel (talk) 18:30, 20 January 2019 (UTC)
Checked, revealed the following. All cyclists
- for which no articles were created (red and black) and named on the VD using a comma, they began to be displayed without a comma >>> Name First Name.
- for which articles were not created and named without a comma, cause a module breakdown >>> it gives an error
- for which articles are created (blue) are still displayed as the article is named about him.

For example https://ru.wikipedia.org/wiki/%D0%A8%D0%B0%D0%B1%D0%BB%D0%BE%D0%BD:Cycling_race/listofwinnersGAN (talk) 19:19, 20 January 2019 (UTC)

official name (P1448)

https://www.wikidata.org/wiki/Q711397 In ru-wiki his name has ceased to be displayed in Russian as a module.

I haven't thought about it. It will be corrected. Can you give an example?

GAN (talk) 19:48, 15 January 2019 (UTC)

https://ru.wikipedia.org/wiki/%D0%A2%D1%83%D1%80_%D0%A8%D0%B2%D0%B5%D0%B9%D1%86%D0%B0%D1%80%D0%B8%D0%B8 1986 The rest are not translated cyclists do not have at the moment Russian writing in WD. You can of course create an article. But then it will be difficult to verify this error. — GAN (talk) 22:20, 15 January 2019 (UTC)
So the issue is here, what I thought with official name and cyrillic. You prefer a "wrong" name in cyrillic, than a correct name in latin. It was probably poorly implemented. I will see, if we can do better.
Thank you for your feedback and the ideas! It is the right time of the year to correct such things. I hope that then we can have a nice season without too much debugging and programming, so we can concentrate on the essential. Psemdel (talk) 20:53, 15 January 2019 (UTC)

At first I thought it was because of the gender of Millar and the lack of an article about him in ru-wiki. It turns out it is not. If necessary, we can write a name for the ru-wiki using the p1448 parameter and in Latin. I want through this option to try to show cyclists of the former USSR without patronymic of Екимов, Вячеслав Владимирович >>> Вячеслав Екимов. So that the template does not stretch because of the middle names.— GAN (talk) 19:26, 20 January 2019 (UTC)

  • all lines from (official name (P1448)) are displayed on your FR-Wiki regardless of the specified language. https://fr.wikipedia.org/wiki/Philippa_York
  • It is possible for the module to make it display only the name in the native language if it is indicated. If not then on any other in order of priority.
  • I found the item (short name (P1813)). You can add it in the same way (P1448) with language and time support. Output order - if specified (P1448), then (P1813) is not displayed. This is to reduce the display names of cyclists in ru-wiki.

GAN (talk) 16:11, 10 February 2019 (UTC)

I still agree with you, but it is still difficult for me to test on ru-wiki. Do you have a test module for that? The link you send for FR-wiki uses the infobox, which is completely independent from Cycling race. In cycling race, we use the official name in the name of the wiki (at least should be so). Psemdel (talk) 17:16, 10 February 2019 (UTC)
@Psemdel: Made on your page draft / sandbox. Will do? You can edit as needed. In the template winners, all drivers VD translated into Russian. And how did you find an extra space because of which module gave an error? — GAN (talk) 17:39, 10 February 2019 (UTC)
I also need a sandbox module, otherwise I have to modify the real Cycling race module to make test, which would make the whole module wrong during my test... For instance, I use that on fr-wiki. About the error, I am a wizard... no just joking. I tried first to find out which rider was problematic (I copied the P527 in another item to do test). Then, I tried to understand why the module thought that the rider had 3 parts of the name, when it had 2 (that I discovered reading the code at the error line). And then I read the name of the rider in "ru" with lot of attention --> solved :D. Psemdel (talk) 17:48, 10 February 2019 (UTC)

Generalization

Ok then revert. I still don't find a way to test it on my computer directly... Maybe you could make some tests. I mean it is not very complicated, you can have a look at what I did. Psemdel (talk) 19:42, 20 January 2019 (UTC)
Ok, I will have a look. Psemdel (talk) 16:31, 10 February 2019 (UTC)
Many good ideas. Right now, I am quite busy preparing the season with maps and so on, but when I find 5 minutes I will implement the proposition. For official names, I can't promise anything right now as I can't test in ru (I understand nothing...). But I think we will find a solution... Psemdel (talk) 17:18, 10 February 2019 (UTC)
No issue with the Ping, I am online. Perfect, so I will be able to progress on the topic. For the flag, I see that it is different. I solve it. Psemdel (talk) 18:25, 10 February 2019 (UTC)

Error with calendars in eswiki

Some months ago, I tried to update eswiki with latest code version but I found some errors at custom calendars, so I never did it. I was talking about it with @Dipsacus fullonum: but I could not dedicate time to check problems. So recently @Jérémy-Günther-Heinz Jähnick: updated eswiki to introduce startlist function and today I checked that the problem is still present: "Error de Lua en Módulo:Cycling_race en la línea 931: attempt to concatenate a nil value". You can see the problem at es:UCI America Tour 2019 or es:UCI America Tour 2018, but the problem is not present at es:UCI WorldTour 2018. I do not know how to have some whatsdog to catch the problem, could someone help us? @Psemdel:. Regards. Repf72 (talk) 18:30, 16 January 2019 (UTC)

@Repf72: Removed a space before and after Q on one link - everything became normal. Asks for the second captcha - did not rule. — GAN (talk) 18:40, 16 January 2019 (UTC)
@GAN: thank you. I did not have in mind this. Fixed.Repf72 (talk) 20:21, 16 January 2019 (UTC)

Bots

@Psemdel, Jérémy-Günther-Heinz Jähnick, Hejsa, Douglasfugazi, Papuass, Mr. Ibrahem: The situation is as follows. At first it was World Champions and USI Tours for some years. Now go racing. Two bot User:DeltaBot and User:MatSuBot massively traversing them making the following changes:

- adds element sports season of league or competition (P3450)
- then follows (P155) and followed by (P156) contribute to it as qualifiers
- removes follows (P155) and followed by (P156) as separate elements
- in some cases, removes the race name from instance of (P31)

As a result of this, in Cycling race / infobox, navigation for the next years is no longer displayed. I wrote to the bot owner - the answer of the type is so true. — GAN (talk) 15:57, 1 February 2019 (UTC)

Thank you for the info. A world championship is not a season. Or we will have to change definition in the lexicon. Now it makes no sense at all! I really don't appreciate those kind of bots that do massively things on items without any concertation or allowance. Psemdel (talk) 23:05, 1 February 2019 (UTC)
Same opinion as Psemdel. Jérémy-Günther-Heinz Jähnick (talk) 16:45, 2 February 2019 (UTC)

countryflag

@Psemdel: The following code appears in function listofwinners_main:

    if countryflag==true then country=false end
    winner(partID, winners, timeOfRace, country, WDlink_on)

Should that be:

    winner(partID, winners, timeOfRace, not countryflag, WDlink_on)

I would have made that change but I don't understand exactly what's going on and it has different meaning from the original. The current code is not right because country is a global variable that has not been set. Therefore it is either nil (if nothing happens) or is false (if countryflag is true). Johnuniq (talk) 01:23, 16 February 2019 (UTC)

Thank you for the attention. I just noticed this week that I was using a variable "countryflagonly" everywhere but that it was exactly the same (with a "not") as "country" in all other functions. So I wanted to delete all "countryflagonly", but it is different from countryflag... I check the point you mention. Psemdel (talk) 09:16, 16 February 2019 (UTC)
Edit, you were perfectly right. Thank you. Psemdel (talk) 10:51, 17 February 2019 (UTC)

Need help cleaning TODO

While looking through the module I added some TODO comments. I'm hoping someone with a better understanding of the details will work out what should be done. That is, please edit the module to fix the problem and remove the comment. The lines concerned follow, with the function in which they are defined.

  • local function commastage(stageID,racelabel)
    comma = v.article -- TODO should 'break' come after this?
  Done correct.
  • local function fn_rider(entityID,dateOfRace,displayteam,only_winner)
    local WDlink_on -- TODO should this be set?
  Done WP-ru and WP-mk likes to have the WDlink_on, I inserted that.
  • function nationalchampionships_main(s)
    local dateOfRace -- TODO this is always nil
  Done correct, I obviously completely forgot to insert that.
  • function p.teamroster(frame)
    if wiki ~= 'ja' then -- TODO is this right? (it was "if language ~= 'ja'" but language is not defined)
I am rewritting this part of the code. Right now, this code doesn't work at all.

Johnuniq (talk) 07:01, 17 February 2019 (UTC)

Thank you for your comments. There is a bit of work ongoing to make the module works better for cyrillic wikipedia. It created a bit of confusion in the code. I am trying to solve the problems...but sometimes create new ones. Psemdel (talk) 10:43, 17 February 2019 (UTC)
Thanks for those fixes. You are doing a lot of work and I hope you don't mind me fiddling. I noticed the following line which might be temporary while you are working but I thought I'd mention it.
if true then return tostring(count) end
Johnuniq (talk) 06:58, 18 February 2019 (UTC)
No problem, elegant coding is not easy, a bit of help is welcomed. Oh yes, it is a line I completely forgot...(edit: much better now!) Psemdel (talk) 20:44, 18 February 2019 (UTC)

One more duplication: we have function "number(gender, b, wiki)". It should be reused in "p.infobox" for edition number formatting. --Papuass (talk) 14:11, 19 February 2019 (UTC)

Idea is not bad, but I am not sure that the word "edition" is feminile in all languages. For a man or a woman, it is clear, here not. If I look now, I see that both displays are very different. Wait and see (the code in p.infobox is only 10 lines long...no drama). Psemdel (talk) 03:29, 7 March 2019 (UTC)

Listofstagesclassification

After proposal of GAN, I create a function "Listofstagesclassification". It is clearly an alpha version. An overview:

 StageWinner
_
General classification
 
Mountains
 
Sprints
 
Youth
 
Combativity
_
Team
_
Nationality
_
1re stage
 
hilly stage
  Coryn Rivera  Coryn Rivera  Kathrin Hammes  Ellen van Dijk  Alba Teruel Ribes  Margarita Syrodoeva  Sunweb  Lisa Brennauer
2e stage
 
hilly stage
  Elena Cecchininot attributed
3e stage
 
hilly stage
  Coryn Rivera  Coryn Rivera  Tatjana Paller
4e stage
 
hilly stage
  Lisa Brennauer  Liane Lippert
5e stage
 
hilly stage
  Rozanne Slik  Lisa Brennauer  Trixi Worrack
6e stage
 
hilly stage
  Alice Barnes  Liane Lippert  Jacqueline Dietrich
7e stage
 
individual time trial stage
  Ellen van Dijknot attributed
Final  Lisa Brennauer  Kathrin Hammes  Coryn Rivera  Liane Lippertnot attributed  Sunweb  Lisa Brennauer

So still several problems, that I can't solve:

  • In table "winners" the order of the columns is defined. In table columntable (line 5874) not anymore. I looked at help for sorting issue, made also some sortkey..but still don't work.
  •   Done Still some problem with the css: I don't want those white border, and I introduced a gray top border above the winner... it will be solved
  •   Done Here in the table, the "nationality" is not given for the final classifications.
  • Probably it is not as elegant as it should be.
  • The name can be discussed also.

So, don't hesitate to improve. When it has a correct quality, then only, we can put it on wikipedia. Psemdel (talk) 21:14, 5 March 2019 (UTC)

1. BAG. If the winner has a link to the source, then the module generates an error. Probably better to support the "links" than to suppress it. For example Tour Down Under 2019

 StageWinner
_
General classification
 
Mountains
_
Sprints
_
Youth
_
Combativity
_
Team
_
1re stage
 
plain stage
  Elia Viviani  Elia Viviani  Jason Lea  Elia Viviani  Michael Storer  Patrick Bevin  UAE Team Emirates
2e stage
 
plain stage
  Patrick Bevin  Patrick Bevin  Caleb Ewan  Matthieu Ladagnous
3e stage
 
hilly stage
  Peter Sagan  Peter Sagan  Michael Storer  Manuele Boaro
4e stage
 
intermediate stage
  Daryl Impey  Patrick Bevin  Chris Hamilton  Thomas De Gendt
5e stage
 
plain stage
  Jasper Philipsen  Ryan Gibbons
6e stage
 
intermediate stage
  Richie Porte  Daryl Impey  Chris Hamilton  Danny van Poppel
Final  Daryl Impey  Jason Leanot attributed  Chris Hamiltonnot attributed  UAE Team Emirates

Is it possible to add a display of "links" for "Cycling race / listofinners"?

What?

2. Make the T-shirt icons be with the new line as the USI code in the start list. If there is no T-shirt, then an empty space. That titles were visually in one line. Instead of "point" empty space

 Étape Vainqueur
.
Classement général
.
Classement sprints
.
Classement montagne
 
Classement jeune
.
Super-combatif
.
Classement allemande
.
Classement équipe
.
Ok

3. Headings of classifications in the form of links with the ability to add clarification. And the possibility of a separate translation for headings classifications and the ability to add. Now they, if I am not mistaken, are taken from the list of headings for the final classifications, so that the displayed part can be reduced.

Default
General or [[General classification (cycling)|General]]
If we add |title = G (or T = Tour de France, V = Vuelta a Espana) --> {{#invoke:Cycling race|listofstagesclassification|Q57082387|title = G}}
or through instance of (P31) --> Giro d'Italia (Q33861), Tour de France (Q33881), Vuelta a España (Q33937)
We get the following [[General classification (Giro d'Italia)|General]]
A visual example in the “picture” just above - general classification.

Further through the redirection, you can make the transition to the desired article. In some wikis now these headlines in Gran Tour races articles lead to the corresponding article about this nomination. Example

  Done With instance of (P31), ok. For the rest, I have nothing against it, but it is very complicated. With the old system, you can personalize what you want. Psemdel (talk) 18:36, 6 March 2019 (UTC)

GAN (talk) 11:26, 6 March 2019 (UTC)

So it is starting to be fine. Only the order of the column is still problematic in my opinion. Psemdel (talk) 03:21, 7 March 2019 (UTC)   Done Many thanks to Johnuniq who solves this problem on my request! Psemdel (talk) 20:15, 15 March 2019 (UTC)

At the same time

  • Cycling race/startlist

1. The coach does not display the latest team in the list. No matter how many of them are located in the last line - 1, 2 or 3. Although at the moment the coaches do not yet indicate in the templates. {{Cycling race/startlist|Q1129396}}

It worked, but I haven't tested for long. I will check.
  Done

2.The name of the discipline (RR or ITT) comes after the last T-shirt, and not the championship. {{Cycling race/startlist|Q55638555}} 1.NED Marianne Vos --> yellow shirt for RR

I would prefer it the other way, but then we would have to rewrite completely the function jersey (presently it list all jersey, and don't make difference if national or not). So I leave it as it is.
  • Cycling race/infobox

winner of the nationality classification (Q61976872) Add to template. To this winner not only in the list of leaders was present.

  Done I created the item Yesterday. So it is still not include. I do it. Psemdel (talk) 18:10, 6 March 2019 (UTC)

GAN (talk) 11:26, 6 March 2019 (UTC)


@Psemdel:

  • Listofstagesclassification. Can the lowest line-split (before the final results) also make a dark color? That on yellow-orange columns did not merge.
  • Bag. See how the winning teams of the stage are displayed:
OK --- fr:1re étape du Tour d'Espagne 2015
not OK --- fr:1re étape du Tour d'Espagne 2016, fr:1re étape du Tour d'Espagne 2017, fr:3e étape du Tour de France 2018
  Done Ok
@Psemdel: Name/Titles -   Done, Flag -   Not doneGAN (talk) 20:05, 7 March 2019 (UTC)
What is the problem with the flags?
@Psemdel: The flag does not match the country from which the team.GAN (talk) 20:32, 7 March 2019 (UTC)
You can just write it, I can't read in your thought.
  • Can you extend the functionality of these templates --> listofwinnerssecondpart and customclassification ?
Example
  • listofwinnersChampsecondpart / listofwinnerssecondpart
{|class="sortable" cellpadding="4" style="border:1px solid rgb(200,200,200); color:black;margin:0 0 0.5em 0; padding:5px;  clear:left;font-size:95%; line-height:1.6em;background:#f8f9fa;cellspacing:0 2px;"
|- style=" text-align:center;"
! scope="col" style="background-color:#FFDF80;"|<span style="float:left">[[File:Wikidata-logo S.svg|12px|link=d:Q30332924#P527]]</span>Année
! scope="col" style="background-color:#FFDF80;"|12345
! scope="col" style="background-color:#FFDF80;"|Vainqueur
! scope="col" style="background-color:#FFDF80;"|Deuxième
! scope="col" style="background-color:#FFDF80;"|Troisième
|- 
|style="text-align:center;"|2015 || [[Jolien D'Hoore]] || [[Lotte Kopecky]] || [[Kelly Druyts]]
|-
{{Cycling race/listofwinnersChampsecondpart|Q30332924|2016|XXXX
| above row 1: '''Destination Thy'''
| above row 3: '''Grand Prix Viborg'''}}

The ability to add not only before the template, but after it. By specifying the second year in the template |XXXX

|- 
|style="text-align:center;"|2020 || [[Jolien D'Hoore]] || [[Lotte Kopecky]] || [[Kelly Druyts]]
|}
  • custompointsclassification / customtimeclassification
{{Cycling race/custompointsclassification|Q42158490|propriété=P4323|titre=Giro de Italia Femenino 2018

By analogy with the previous example, but only after the template. This will allow you to specify other places without displaying them in other wikis.

|- 
| 41 || [[Lotte Kopecky]] || [[Lotto–Soudal Ladies]] ||  + 30' 00'' 
}}
I still don't know how to do that. And why don't you just write
|style="text-align:center;" colspan=3| '''Destination Thy'''
It would work the same.
If instead | align=center colspan="3" then in this case I took this code from some random pattern — GAN (talk) 20:32, 7 March 2019 (UTC)
  • Some templates may display a link next to the cyclist. Screenshot. A similar opportunity for listofwinners. Let all links go to the bottom of the article. Example below:
Année Vainqueur Deuxième Troisième
1948   Albéric Schotte[1]   Fermo Camellini   Gino Bartali
1949-1999 not conducted[2]
2000   Elia Viviani   Daryl Impey non attribué[3]
  Done It is the "reference" management. I can have a look.
Note that if you want to display the team in listofwinners, it is very easy to implement.
I managed to see the variant with the teams in your draft.   If only optional, via parameter. — GAN (talk) 20:05, 7 March 2019 (UTC)
I can do a function "listofwinnerswithteam" for those interrested. Psemdel (talk) 20:12, 7 March 2019 (UTC)


GAN (talk) 18:09, 7 March 2019 (UTC)

References

  1. That's so that you can display links to the winners.
  2. The reason is not known
  3. Or like this

Minor clean

I noticed some minor issues that may as well be cleaned up:

Line 5803
local WPcontent = {} --not used yet
Is the above going to be used? Perhaps delete the line?

Line 5971
local startTime, endTime = getStartEndTime(sTime, eTime)
Above line is not used. Should it be deleted?

Line 6018
local win, jerseytable= {}, {}
It might not be a problem, but the above replaces jerseytable that was created earlier.
ok, I correct.

Also, should this talk page be archived? If wanted, I could manually archive everything earlier than 2019. Johnuniq (talk) 07:15, 16 March 2019 (UTC)

@Psemdel: I archived this talk page. Do you have time to check/fix the above comments? Have you tried the module somewhere (frwiki?) Are the results good? Johnuniq (talk) 22:58, 17 March 2019 (UTC)
Thank you that you archived the talk page. I think most of the points archived are not anymore up to date. Still on going/open:
  • Finalization of listofstagesclassification, which is still new
  •   Done Listofstarter which can be hidden
  •   Done Not only "row above" WP content, but also "row below".
  • Clean up/structure/...

Yes, the module is implemented on several wikipedias and used on many pages. The French one is up to date, the others sometimes less, but in general It works pretty well (and if not we get quite fast a feedback :) ).Psemdel (talk) 19:20, 18 March 2019 (UTC)

That's good, thanks. I'll be elsewhere for a while but I plan to return and do some more cleaning. Johnuniq (talk) 00:02, 19 March 2019 (UTC)

Regular bugs and suggestions

@Psemdel:  

@Psemdel: Answered below — GAN (talk) 22:41, 26 March 2019 (UTC)
@Psemdel: Answered below — GAN (talk) 00:37, 28 March 2019 (UTC)

startlist

show/hide --- SUPER.

1. I would suggest to increase the scale of the internal elements to 110%. Inside the collapsed block, the normal size decreases by about 10% and becomes smaller.
2. And what a yellow stripe over the first three teams when you deploy?
  Done Ok, I will have a look.
Or remove the frame on the sides and bottom during deployment. — GAN (talk) 22:41, 26 March 2019 (UTC)

listofteams

1. If the official title is not indicated, then the title of the article on the WD is displayed with the year specified. Previously, in this case it was displayed without a year.
I made a modification, I hope it has no side effect.
2. If in the list participating team (P1923) the main page of the command is indicated, and not for a specific year, then writing on the class of commands does not work correctly. The first parameter entered on the WD is used.
2.1. with country of registration too
Example Milan-San Remo 2008. The Groupe sportif category was no longer existing this year. See ru-wiki and fr-wiki. {{#invoke:Cycling race|listofteams|Q930215}} or {{Cycling race/listofteams|Q930215}} and Milan-San Remo 2005 {{Cycling race/listofteams|Q2555793}} --> Naturino-Sapore di Mare from Switzerland in 2005.
I will check, it seems that you are right, but somehow I don't understand why it does appears in 2008 but not in 2018.
After check: in participating team (P1923) you should indicate the season of a team, not the team itself (so Miche 2008, not Miche)! Before the creation of the property "season", it was impossible to differentiate both, so we had to choose. To sum up: fill correctly the item then it will work!
I know that you need to specify the team for a particular year, and not the main article. But until 2008, the seasons are not created for all teams. And the farther back so that they become smaller.
I have done races (Milan – San Remo) since 1989 (the beginning of the UCI Road World Cup) and I am not physically able to create 10 teams for each year. :( — GAN (talk) 22:41, 26 March 2019 (UTC)
I understand that it be easier, but this module can't work without a database halfway filled. I spend also much time filling the database. As long as not all seasons are with P31 "season", it is difficult to differentiate with certainty if it is the team or a team season (and it makes many "if"). I note it but won't act now. Psemdel (talk) 22:24, 27 March 2019 (UTC)
The creation of all teams for all years will take time, I agree. But it is the only way to be clean. You are not alone, goal of this module is to mutualize the work from all countries. You can start the work. (and for your information, I am doing the same for the women with flèche wallonne, and I also have to create 10 teams for each year).Psemdel (talk) 22:38, 27 March 2019 (UTC)
Maybe a lamer question. If in the list of teams you specify the main article about the team (and not for a particular year), the module correctly displays the official name of the team for each year (the time frame for using this name is indicated). For the team category and the country of registration, the time frame is also specified - but the module does not process them. For a rider, the module of his country of nationality (flag), taking into account the specified time frame, is processed normally.
2013 Katusha (Q13411156) The team during the season of 2013 had two catagorias at once. She did not take part in the “Tour Down Under 2013” ​​race (when she was Procontinental). Perhaps this is the only case. --> fr:Utilisateur:GAN/BrouillonGAN (talk) 00:18, 28 March 2019 (UTC)
Right now it works as following:
  • We know that the item read is a season. If name --> display name, if no name then look in parent (so the team) for the name at the right time. Of course, we can look also in the season for the right time, but normally it is always the right time and it makes only the function more expensive in cpu time/memory (I can test it). Moreover, if we don't know if the item is a season or a team, then the whole logic with the parent doesn't work anymore (the team has no parent). I really fear that this tolerance leads to some chaos. Let's take a concrete example, Paris-Roubaix 1996. There is no item Mapei 1996, so you insert Deceuninck-Quick Step. Let's assume official name is not filled for 1996. As the module try to avoid an error, it display the label of the item and then we have Deceuninck-Quick Step that participates to Paris-Roubaix 1996!! Right now this risk almost doesn't exist. Let's stay rigourous. We invest today 1 hour more, but tomorrow we save much time because everything is in order. Psemdel (talk) 22:31, 28 March 2019 (UTC)

classification after stage or full race

If no points are indicated or time is possible, the template gives an error. There are cases when winners are known in some final classification, but their result is not known.
Ok
Do you have an example here it works [1].
So any classification by points (not time). Indicate the rider and his place, without specifying the points scored and the module will give an error. — GAN (talk) 22:41, 26 March 2019 (UTC)
  Done Ok. Actually, it is if you forget the rank that it fails/failed.

stageclassification

The racer was disqualified. To display this line in the list for convenience, and there was no question that someone forgot to specify it. It was only possible to do this. How correct is this? Or see fr-wiki {{#invoke:Cycling race|stageclassification|Q59975520}} or {{Cycling race/stageclassification|Q59975520}}GAN (talk) 21:47, 25 March 2019 (UTC)

Ok. Edit: I really thought that there was a possibility to disqualify a rider with the module, but obviously it is not implemented. I will add it soon. Psemdel (talk) 20:37, 26 March 2019 (UTC)
There are three options for disqualifications for visual display.

1. Place was left empty / vacant -> empty line with number
2. We moved everyone up one position -> empty line without a number.
3. Removed the winner -> empty line without a number in front of # 1.
Can these riders display a light gray color, along with their result? In order not to suffer with footnotes and notes. And instead of the place number to display the DSC — GAN (talk) 22:41, 26 March 2019 (UTC)

We normally use rider name for this purpose. How do you display a footnote/note right now. In women cycling, almost nobody is disqualified, I have to learn. Psemdel (talk) 22:27, 27 March 2019 (UTC)
fr:Tour_de_Catalogne_2011#2e_étape - Redistribution of places. Name is displayed. Classement général. Contador is deprived of the 9th place (there is a line), then go 9 and 10 places. Similarly, the following stages where he occupied the 1st place.
fr:Paris-Nice_2016#6e_étape - Without redistribution of places. The name is not displayed and you need to follow the footnote. 6th place on the stage and 8th place in the general.
Or look Tour de France from 1999 to 2005 when Armstrong was disqualified. — GAN (talk) 00:32, 28 March 2019 (UTC)
 Stage classification
RiderTeamTime
1er  Alberto Contador Saxo Bank-SungardDSQ
1er  Michele Scarponi Lampre-ISD+ 23"
2e  Levi Leipheimer Team RadioShack+ 23"
3e  Daniel Martin Garmin-Cervélo+ 35"
4e  Christopher Horner Team RadioShack+ 35"
5e  Alex Cano Colombia es Pasión-Café de Colombia+ 35"
6e  Ivan Basso Liquigas-Cannondale+ 38"
7e  Rigoberto Urán Sky+ 38"
8e  Xavier Tondo Movistar Team+ 38"
9e  Cadel Evans BMC Racing Team+ 50"
 General classification
RiderTeamTime
1er  Alberto Contador Saxo Bank-SungardDSQ
1er  Levi Leipheimer  Team RadioShack+ 23"
2e  Michele Scarponi Lampre-ISD+ 23"
3e  Daniel Martin Garmin-Cervélo+ 35"
4e  Christopher Horner Team RadioShack+ 35"
5e  Rigoberto Urán Sky+ 38"
6e  Ivan Basso Liquigas-Cannondale+ 38"
7e  Xavier Tondo Movistar Team+ 38"
8e  Cadel Evans BMC Racing Team+ 50"
9e  Bauke Mollema Rabobank+ 1' 12"


 Stage classification
RiderTeamTime
1er  İlnur Zäkärin Katusha4h 45' 11"
2e  Geraint Thomas Sky+ 0"
3e  Alberto Contador Tinkoff+ 1"
4e  Richie Porte BMC Racing Team+ 7"
5e  Sergio Henao Sky+ 10"
6e  Simon Yates Orica-GreenEDGEDSQ
7e  Rui Costa Lampre-Merida+ 31"
8e  Romain Bardet AG2R La Mondiale+ 31"
9e  Ion Izagirre Movistar Team+ 31"
10e  Tony Gallopin Lotto-Soudal+ 31"
Source: ProCyclingStats
 General classification
RiderTeamTime
1er  Geraint Thomas  Sky24h 10' 26"
2e  Alberto Contador Tinkoff+ 15"
3e  İlnur Zäkärin Katusha+ 20"
4e  Richie Porte BMC Racing Team+ 21"
5e  Tom Dumoulin Giant-Alpecin+ 32"
6e  Ion Izagirre Movistar Team+ 37"
7e  Sergio Henao Sky+ 39"
8e  Simon Yates Orica-GreenEDGEDSQ
9e  Tony Gallopin Lotto-Soudal+ 51"
10e  Romain Bardet AG2R La Mondiale+ 1' 00"
Source: ProCyclingStats


 General classification
RiderTeamTime
1er  Lance Armstrong  US Postal ServiceDSQ
2e  Alex Zülle Banesto+ 7' 37"
3e  Fernando Escartín Kelme-Costa Blanca+ 10' 26"
4e  Laurent Dufaux Saeco-Cannondale+ 14' 43"
5e  Ángel Casero Vitalicio Seguros-Grupo Generali+ 15' 11"
6e  Abraham Olano ONCE-Deutsche Bank+ 16' 47"
7e  Daniele Nardello Mapei-Quick Step+ 17' 02"
8e  Richard Virenque  Polti+ 17' 28"
9e  Wladimir Belli Festina-Lotus+ 17' 37"
10e  Andrea Peron ONCE-Deutsche Bank+ 23' 10"
11e  Kurt Van de Wouwer Lotto-Mobistar+ 23' 32"
12e  David Etxebarria ONCE-Deutsche Bank+ 26' 41"
13e  Tyler Hamilton US Postal Service+ 26' 53"
14e  Stéphane Heulot La Française des jeux+ 27' 58"
15e  Roland Meier Cofidis-Le Crédit par Téléphone+ 28' 44"
16e  Benoît Salmon  Casino+ 28' 59"
17e  Alberto Elli Deutsche Telekom+ 33' 39"
18e  Paolo Lanfranchi Mapei-Quick Step+ 34' 14"
19e  Carlos Alberto Contreras Kelme-Costa Blanca+ 34' 53"
20e  Georg Totschnig Deutsche Telekom+ 37' 10"
21e  Mario Aerts Lotto-Mobistar+ 39' 21"
22e  Giuseppe Guerini Deutsche Telekom+ 39' 29"
23e  Gianni Faresin Mapei-Quick Step+ 40' 28"
24e  Álvaro González de Galdeano Vitalicio Seguros-Grupo Generali+ 47' 20"
25e  Marcos Serrano ONCE-Deutsche Bank+ 51' 09"
Source: ProCyclingStats


@GAN:, is it ok? I used P1534, if there is a better idea, it can be easily changed. References can be given but the number is crossed :/. Psemdel (talk) 17:39, 15 April 2019 (UTC)

But there is one moment. At Giro 2009, the 2nd, 3rd and 9th places were immediately disqualified in the general classification. Now the drivers in the table are in places, not in time. That is, the 4th became the 2nd, and the 5th became the 3rd. How often such a situation can be difficult for me to say. It is necessary to ask more knowledgeable.

Can there be a similar opportunity to display disqualified and for all templates (list of winners, race card)? Instead of the current "missing."

As a user I can suggest the following for similar situations:

- arrange the places in order and not pay attention to inconsistencies
- get out for disqualified instead of DSQ
- make support series ordinal (P1545) through which it will be possible to indicate the desired location for display. The parameter ranking (P1352) is specified in order for proper sorting. in the table

And what is better / easier to implement, choose yourself as a programmer.

At the same time as an option for another addition to the result tables. https://fr.wikipedia.org/wiki/Utilisateur:GAN/Brouillon

GAN (talk) 11:37, 17 April 2019 (UTC)

We can put the same for other functions, it is no issue. For the suggestion, I don't get it. We don't sort the places. They are displayed in the order you give them. Psemdel (talk) 11:56, 17 April 2019 (UTC)
@Psemdel: Places are sorted automatically. In the data for the general classification, the order of places is 1-2-3-2-3-4. In table 1-2-2-3-3-4. See screenshot https://radikal.ru/lfp/d.radikal.ru/d11/1904/51/baacd2c36161.jpg/htmGAN (talk) 12:23, 17 April 2019 (UTC)
My mistake, sorry. You are right. Psemdel (talk) 17:11, 17 April 2019 (UTC)

listofstages

The template displays the riders if in parameter winner (P1346) - stage winner (Q20882747) and overall leader at the end of the stage (Q20882763) are indicated. But sometimes in the last stage of the leader indicate overall winner general classification (Q20882667) as a result, this driver is not displayed. — GAN (talk) 19:53, 28 March 2019 (UTC)

Yes, because it is wrong. I can add a "or", but I would prefer that people fill correctly this f****** database. Psemdel (talk) 22:42, 28 March 2019 (UTC)
  Done

@Psemdel: About the disqualified unsubscribed a little higher.

Can you make this template listofstagesallflag so that it displays flags at all starting and finishing places? You have already added this feature to the module (used here). It is necessary for races that are officially held in several countries at once. First of all for fr:Eneco_Tour_2016.

That was the risk with the display of flag only if different, I mentioned it before. I based on GT. For Eneco, yes an option could be fine.

Proposal for start point (P1427) and destination point (P1444) to add the possibility of location (P276). so that you can add a clarification for the starting and finishing places. And in the template display as Paris (Champs Elysees) or Champs Elysees (Paris), Roubaix (Vélodrome André Petit) or Vélodrome André Petit (Roubaix).

What? If you don't know where is champ Elysees, you should click on the link. It is the principle of Wikipedia.
Where are the Champs Elysees, I know. There is more like an opportunity to indicate a general and specific place for the start and finish at the same time. How to do it even on the sites https://www.letour.fr/en/stage-21 , https://tourdelavenir.com/journee2019/etape-8/ or https://www.lavuelta.es/en/stage-16GAN (talk) 12:42, 17 April 2019 (UTC)

Purely mathematical addition. We indicate the distance of the stages and the time of the winner. Based on these data, you can automatically display the total distance and the average race speed.

Could be added, but it is as the number of participants. It can be only a solution to determine the number and then add it in the database. Those functions are quite expensive, and should be replaced as fast as possible with the present function (read fields --> done). Psemdel (talk) 11:51, 17 April 2019 (UTC)
  Done I added the total distances and the speed. Psemdel (talk) 08:10, 28 April 2019 (UTC)

GAN (talk) 11:40, 17 April 2019 (UTC)

Later disqualification

What to do when a winner is disqualified long after the event? Leonardo Bertagnolli (Q538622) is the stated winner of 2006 Tour du Haut Var (Q2488267), but according to http://archive.wikiwix.com/cache/?url=http://www.uci.ch/mm/Document/News/CleanSport/16/80/16/20141223SanctionsADRVEN2.0_English.pdf he much later became disqualified for 01.01.2003-18.05.2011 due to biological passport. Should that be marked in 2006 Tour du Haut Var (Q2488267), and how should it be presented in listofwinners? --Dipsacus fullonum (talk) 15:08, 9 May 2019 (UTC)

I suppose a name and a note (reference) would be the best. Psemdel (talk) 18:29, 12 May 2019 (UTC)

Cycling race/stagetitle

Hi friend. I suggest to create some kind of "Cycling race/stagetitle" in order to use info from Wikidata to generate a "stagetitle" in wikipedia articles to give better information about stage and GC classifications (not just put stage classification and GC classification with no more info) like we implemented manually at ES-Wiki (example: HERE. Are you agree? It is easy for you create it? Regards. Repf72 (talk) 17:50, 19 April 2019 (UTC) @Repf72:, I recognize the English way to display the stages :). Yes, it is possible to implement it. It will be done. Psemdel (talk) 07:17, 20 April 2019 (UTC)

Thank you friend. If you prefer format: "<From> - <To> <StageProfileLogo> <(xxx Km)>" maybe it could be better than format I currently use, due it is the order shown at "listofstages", so I do not have problem replacing with the new format. Regards. Repf72 (talk) 19:21, 21 April 2019 (UTC)
@Repf72:. It should works. Psemdel (talk) 19:44, 12 May 2019 (UTC)

Number of riders in classifications

Hello,

On Topic:V0p4gqejrlhllbto, we were talking about the number of cyclists that had to be mentioned in the rankings. Where was a decision made on a maximum of 10 riders in the rankings? Can I restore my changes to Q57991628?

Thanks, Aabbccddeeffabcdef (talk), the 16:43, 30 May 2019 (UTC). (If possible answer in French).

  • Tables with a large number of rows stretch the article. Not all wikis use separate articles for each stage on Grand Tours. For the final general standings display the first 20 may still be relevant. But the best option would be to do so (ask the user Psemdel  ) for the module to collapse the lines starting with the 11th if it does not appear on its resources. — GAN (talk) 07:54, 31 May 2019 (UTC)
@Aabbccddeeffabcdef:, yes it should be technically possible to display only the 10 first with an option. However, I don't know, why do we want to insert the top 100? We are not procyclingstats, but an encyclopedia, we should not care about details. I can unstertand for world championships and GT but otherwise 10 should be enough. Psemdel (talk) 20:12, 2 June 2019 (UTC)
I agree with Psemdel, there are many questions about this issue: Why to put more data in Wikidata due main purpose is feed wikipedia's articles? More than top-10 or top-20 is not relevant considering we always left sources for more details and Wikipedia is a general enciclopedia, not a cycling portal, not a sports portal (why cycling should include all positions and not tennis, atletism...?). Who decide how many positions can be data filled for every race? Who are going to rebuild thousands races to add more information for have data consistency? Because there is no case having top 100 for only one stand alone edition or for only for one stand alone stage (like stage 18 of Giro 2019) (and who are going to do it?), and the rest editions or stages with only top-10. Who are going to develop changes in code to having compatibility for all Wikipedias? Because we can not just ignore relation between Wikipedias and Wikidata (by "Cycling race module") and just add more information. Who are going to edit hundreds races in all wikipedias if the changes implies adding new parameters (for example to limit races to top-10)? Repf72 (talk) 13:23, 4 June 2019 (UTC)

Property suggestion based on UCI ID

I belive that there has been a suggestion to add UCI ID as a WD property before, but I don't think that anything happened. One problem is that there is no page on the UCI website that we can send it to, so it really has very little use in that way. But I had a little look at how it's made up, and maybe we could rather make a property that is directly derived from the UCI ID, which the UCI website will receive.

Just as an example I use Edvald Boasson-Hagen (Q333351). His UCI ID is 10019821326. So to break it up a bit, I believe that the first digit (1) is only there for the sole reason to avoid all the leading zeroes to be cropped by different spreadsheet software like Excel, etc., so this is not really needed for us. Then, the last two digits (26), I have absolutely no clue what they do, but I have come to the conclusion that they must be some kind of control digits. At least, for our purpose they can be discarded. This means that the actual serial number part, the true ID, is 00198213, or if we cut the leading zeroes: 198213. And now we have an ID that we absolutely can use on the UCI website.

https://www.uci.org/road/teams/TeamMemberDetails?memberId=198213&showFunction=True

This shows the full registered name of the rider, the birthdate and the UCI teams the rider has had a contract with. This also goes for all other team members like sporting directors, etc.. It shows contract dates, and when we use the parameter "&showFunction=True", we can also see what function they have in the team. This is useful to see when riders have changed to sporting directors in the same team the following year. Even if this is supposed to show riders that are part of UCI teams, it can actually be used on absolutely everybody who have a UCI ID. On other people we only get the name and the birthdate, but that's also quite useful on lesser known riders.

You may have seen on the above link that we only see data since 2017. That is unfortunately because of some kind of flaw in the system, or rather more like a flaw in how data are stored. Even if Edvald didn't change his name, the way his name was stored was changed from the old registration to the new one for the UCI ID. Earlier, he was registered as having a double family name (Boasson Hagen), but now he is registered as having a single family name (Hagen) and a middle name (Boasson). His old ID with team history all the way back to 2006 can be found here: https://www.uci.org/road/teams/TeamMemberDetails?memberId=32675&showFunction=True

Anyhow, these are issues we can get past. Either we only use the ID that is after introduction of UCI ID in 2017, or we make some kind of system with preffered/deprecated values when there are more than one ID per person. It also seems that these IDs are based on an older system than the UCI ID, so all people that weren't "renamed" with the UCI ID, still have their old ID as part of the UCI ID. We can use this for people who are too old to have a UCI ID too, we just find their ID in the team member lists for older seasons. Another kind of issue is that the URL is based on what discipline you are viewing, and there seems to be no neutral one. Anyhow, I guess that 90% of all uses of this will be fore road cycling anyway, so no need to worry about it. The content is the same anyway, only the menu, title and colours are slightly different.

So, should we make a property proposal with https://www.uci.org/road/teams/TeamMemberDetails?memberId=$1&showFunction=True as the URL for these IDs? And what should it be named, if we don't name it UCI ID? I could try to make a property request, but I don't know if I'm any good at it. Bergenga (talk) 20:54, 4 June 2019 (UTC)

Suggestion for secondary classifications

Hi friend @Psemdel: I am trying to apply "listofpointswinners", "listofmountainwinners", "listofyoungwinners" and "listofwinnerswithteam" but due they generate separate tables, they are not useful to large races (like Tour, Giro, Vuelta...) because articles could be very very long puting and could be not easy to read. I suggest some function like "customsecondarywinners" in order be able in a similar way that "customcalendar" to chose and join classifications to build one unified table and make it easy to deploy. Repf72 (talk) 13:43, 5 June 2019 (UTC)

@Repf72:, sorry I have not been on this page for a long time. What you ask already exists, at least partly. See custompointsclassification (and the same with time). Can you specify more precisely what you mean? Do you have an example for "because articles could be very very long puting and could be not easy to read"... Psemdel (talk) 21:19, 6 August 2019 (UTC)
@Psemdel: Perhaps this table is meant, but with the ability to select the displayed classifications https://fr.wikipedia.org/wiki/Tour_de_San_Luis#Classements_annexesGAN (talk) 21:33, 6 August 2019 (UTC)
Ok, I was thinking of something else. It can be done. Psemdel (talk) 21:38, 6 August 2019 (UTC)
  Done, see [Modèle:Cycling race/listofwinnerscustom/Documentation listofwinnerscustom] or "Tour d'Italie féminin", the function is listofwinnerscustom. The other functions, like listofpointswinner are not needed anymore (it is just a special case covered from custom). I changed the French model, if you don't use them on other wiki, I could delete them. Psemdel (talk) 16:03, 10 August 2019 (UTC)
@Psemdel: Thanks a lot :D. Repf72 (talk) 17:12, 10 August 2019 (UTC)
The original remark was very just. It was not really usable. Psemdel (talk) 20:10, 10 August 2019 (UTC)

Bug: Nationality winner crashes the stage infobox

It seems that the stage infobox can no longer cope with leader of the nationality classification (Q61976871)/winner of the nationality classification (Q61976872) and any other winner type that is not pre-defined in the code.

Instead of showing the infobox, it only returns the following error message: "Lua error in Module:Cycling_race at line 3679: attempt to index field '?' (a nil value).". I tried looking in the code, but there doesn't seem to be anything relevant on line 3679 as far as I can see. Could it be trying to call an array index that doesn't exist, or something like that?

If it finds a winner in the list that it doesn't know how to display, it should rather only display a local error message or nothing at all at that position, not "explode" with only an error message like this, as there could probably be some other local winner items that may not be interresting to display in all cases, but users would want to add anyway.

Here is an example code from Ladies Tour of Norway 2017, where Susanne Andersen was best Norwegian rider:

{{#invoke:Cycling race|stageinfobox|Q29862934}}

Bergenga (talk) 12:00, 8 June 2019 (UTC)

I've realised that nobody's going to fix this bug in several months, so I've had to remove the nationality leaders/winners on stages where the stage infobox is used, to avoid showing articles with error messages any longer. It's just to revert my removals before debugging. Bergenga (talk) 20:42, 4 July 2019 (UTC)
@Bergenga: I have fixed the crash at nowiki, but the function p.stageinfobox really needs a more thorough update. There are other places where it can crash if indata isn't as expected, and it is slow and generally could be coded better. --Dipsacus fullonum (talk) 18:24, 6 July 2019 (UTC)
Thanks for fixing this, @Dipsacus fullonum:! Now I can add or re-add these to other articles where it would crash. I guess someone should rewrite the code some time, but now it can wait until nights are darker, as there isn't anything crashing at the moment.
If rewritten, it would be nice if functionality was added so that it will take the values (race time and points) from the other classifications too, not only the stage and general classifications. (I know that this was initially not implemented because the other classifications were stuck in property proposal limbo for quite some time, but it seems it was never added later.) Bergenga (talk) 18:49, 6 July 2019 (UTC)
As written above, I haven't read this page for a long time. Sorry to hear about your issue Bergenga... For "stageinfobox", I confirm that it is a mess. When I introduced the "Dipsacus fullonum" changes in it, I also thought about rewritting it. But I don't even really understand, how it does work now.. For example the "t_s[t_P642[qual][1]][t_P642[qual][2]][1]" and the "t_s[value_order][value][4]" are not obvious to me. So I agree for a change. I would also prefer to realize big changes during the winter, as now we are all buzzy filling the results for the season. Psemdel (talk) 21:26, 6 August 2019 (UTC)

Countries that are no countries

I noticed increasing problem with "sport nationality" that are no country. For instance: Hong Kong, Scotland, Porto Rico... Up to now, I inserted simply "Hong Kong" in country (P17). There are however bots like KrBot, Trilotat,... that "correct" these false countries. I can of course write to all those bots, but I have the clear impression that it will come back every 2 weeks again. I was thinking to use country for sport (P1532) to handle the problem. So one more if loop in the code, it was too easy... Has someone a better idea? Psemdel (talk) 21:34, 6 August 2019 (UTC)

I support. Since in addition to the "Countries that are not countries" the rider may have several citizenships at once. But he stands for one of them. Example Pavel Sivakov (Q26206919) I periodically fill this parameter using the plug-in in the ru-wiki, though without specifying a time frame — GAN (talk) 21:49, 6 August 2019 (UTC)
A good point, an idea to handle that? Psemdel (talk) 21:02, 7 August 2019 (UTC)
Better as now with ordinary citizenship. Through the addition of start time (P580) and end time (P582). As an example for the test, I can offer Marc de Maar (Q1892905) - he has the usual citizenship Kingdom of the Netherlands (Q29999). And sports were 3 or 4 (source https://cqranking.com/men/asp/gen/rider.asp?riderid=1015) or Olga Zabelinskaya (Q266686) as a lover of women's cycling - she has already set the date of change of sports citizen — GAN (talk) 08:57, 8 August 2019 (UTC)
Olga Zabelinskaya works pretty well I think. For all races before 08/2018 she is Russian and afterwards Ouzbek, or you noticed an issue? Psemdel (talk) 19:32, 9 August 2019 (UTC)
I mean, on these races it will be possible to test the withdrawal of the country by the module through country for sport (P1532)GAN (talk) 19:40, 9 August 2019 (UTC)

UCI Pro/World Tour

@Bergenga, Dbastro, Douglasfugazi, Hejsa, Mr. Ibrahem:. @Papuass, Parabarchan, Pcm, Repf72, YoaR:. I pinged those I noticed in using the module. Except the French. There are many of them, I wrote to them separately.


I contributed approximately 80-85% to Wikidata for all the multi-day races (not Grand Tours) that have been part of these tournaments UCI ProTour (Q1329578) / UCI World Calendar (Q12270097) / UCI World Tour (Q635366) since 2005. Including those released for the 2008 season.

MADE

  • All participating teams, each in the form of an annual element.
- on Tour Poland 2008-2010, he used Bank BGŻ (Q65457000) (analogous to UniSA-Australia (Q2610824)) as a team with a sponsor name
  • The calendar

He took as a basis a calendar on it wiki. It was easiest to handle in Excel (start and finish cities are separated by ">"). Made the following changes.

- A more accurate start and / or finish location
- If the stage was shortened, it indicated the relevant data after the change.
- If the winner or leader was disqualified and the places passed to the next, then he indicated the new owners
- If the winner or leader was disqualified, and the place was empty, then he indicated those disqualified. I did not want to leave empty lines. Perhaps it will be possible to cross out them with a module.
  • Stage results
- Based on data in en-wiki or fr-wiki
- for each stage, the first 10 riders, including disqualified ones, are indicated
- all disqualified ones appear crossed out with the current version of the module
- places indicated taking into account disqualifications
- all time intervals are relative to the first position. Regardless of whether the winner of the stage / leader of the general was disqualified or not
- at some stages the rider may have a strange time, then the answer should be in the en-wiki or fr-wiki article as far as I remember
- The general standings for the entire race are now in the last stage
- jersey indicated:
- for all leaders of the general classification
- minor jerseys only in those where I could be sure of its color with a large percentage (%), it was in the results in the article and there were no discrepancies in the name of the classification. The problems could be as follows:
- plain or striped jersey in the Vuelta of Catalonia.
- different Wikis have the same color for the same classification
- in different Wikis, the same classification differed in its name. This applies mainly to Spectacled / Sprint / Intermediate finish / Fight. This is very relevant for the new listofwinnerscustom template.

NO (need / can do)

- minor classifications
- for some races indicate follows (P155) and followed by (P156)
- indicate in separate lines the winners according to the results of the race in each standings with an indication of jersey. If the rider won two classifications, then he must have two separate entries. Then it will be possible to do "Cycling race / listofstagesclassification |" for each race and at the same time "Cycling race / listofwinnerscustom"
- lineups for the race. From 2005 to 2010, the teams for which the rider played were indicated in about 50% of the crews present. Since 2011, approximately 85%

EXCEL https://dropmefiles.com/QO9vB Tables with which I prepared data for quickstatements with all the "Q" races, stages, teams. The tables are given a small explanation in English (located on a bright yellow background). In the list of riders, the priority language is Spanish, as Repf72 gave them to me.

GAN (talk) 11:44, 15 August 2019 (UTC)

Suggestions and comments

@Psemdel:  GAN (talk) 12:05, 15 August 2019 (UTC)

Classifications of stage and general after stage

- Add time gap (P2911) support for first place in general classification of race participants (P2321). It used to be.

If the winner is disqualified in order not to forward all the lag intervals that are given regarding him. At the moment, in such cases, a void is displayed. See an example.

 General classification
RiderTeamTime
1er  Alberto Contador Saxo Bank-SungardDSQ
1er  Levi Leipheimer  Team RadioShack+ 23"
2e  Michele Scarponi Lampre-ISD+ 23"
3e  Daniel Martin Garmin-Cervélo+ 35"
4e  Christopher Horner Team RadioShack+ 35"
5e  Rigoberto Urán Sky+ 38"
6e  Ivan Basso Liquigas-Cannondale+ 38"
7e  Xavier Tondo Movistar Team+ 38"
8e  Cadel Evans BMC Racing Team+ 50"
9e  Bauke Mollema Rabobank+ 1' 12"


Ok

Further ideas / wishes

for classification templates based on the results of a stage / race

make it possible to dismiss the teams instead of the clubs for which the riders in this race played. So that, for example, at World Championships or other races where only or mainly national teams compete (2018 Tour de l'Avenir (Q51285462)) not to register for each rider member of sports team (P54) For example, through the parameter "team = 1".

And links for national teams can be made to the respective cycling federation or country. The result should be a universal template for cycling at the national team level.

In French, most of the national teams are already linked. I am also working now on national teams. We could actually do an option. Psemdel (talk) 21:17, 15 August 2019 (UTC)

Roster

There are some ideas for roasters for the race.

- Here is a variant of the template for TTT racing

https://fr.wikipedia.org/wiki/Contre-la-montre_par_équipes_de_l'Open_de_Suède_Vårgårda_2012 https://fr.wikipedia.org/wiki/Contre-la-montre_par_%C3%A9quipes_de_l%27Open_de_Su%C3%A8de_V%C3%A5rg%C3%A5rda

to use on a one-day TTT. The conclusion can be made through "roster = 1, flag = 1"

the “flag” parameter is needed so as not to display the flag in front of the rider if the teams participated in the race. For example World Championship. The font size for riders can be made smaller.

From my point of view, there are 2 TTTs every year (and with the World championship cancelled...) so I am not planning to invest much time on it. We can do something manually one or twice a year.

listofwinnerscustom

-And how to remove the display of teams from the riders? Very much because of this, the pattern increases in width (less compact).
Small mistake, was not voluntary.
-Now an empty line may mean that there is no winner or he is not known. If you simply add for example declared deserted (Q45123627) if this nomination has not been played, then the same value will be displayed in the Cycling race / infobox which is not good
And what should we write, "not attributed"? "-"? On a website like CQ, it is left blank, I don't really see the problem.
- https://fr.wikipedia.org/wiki/Mod%C3%A8le:Cycling_race/listofwinnerscustom Add the "points" parameter to the manual
yes

listofstagesclassification

-Can I make a separate translation element for the "general classification" column? He is the only one in whose name is the word "classification" and ru-wiki it turns out very long.
Just go line 2576 of the code, and replace "general classification" through whatever you want. I will affect only listofstagesclassification normally.
-similarly "listofwinnerscustom" make it possible to display the desired columns.
Here, I didn't wanted to write everything again so I used "infobox_translate". The short versions are already present in "listofstagesclassification_translate". I should probably create "listofwinners_translate". Will be done... once. Psemdel (talk) 21:38, 15 August 2019 (UTC)

teamroster+startlist

An overlock based on two. Appearance from TIMROSTER, but

- add column No. to the beginning
- add the column "result" to the end
- command to display the current
- if, instead of the date of birth, the age of January 1 of the year of conduct is generally good
- jersey

A good table for a single article with the ability to sort by any criterion. https://en.wikipedia.org/wiki/List_of_teams_and_cyclists_in_the_2015_Giro_d%27Italia

I never saw a startlist like that. I also fear that the display of the birthday will make explode the expense of the function. It is a variation of startlist, it can be done, but I am not very motivated to do that. Psemdel (talk) 21:41, 15 August 2019 (UTC)
It seems to be a need for such a function for very old races where the numbers for the riders of one team are not successive. Maybe in winter... Psemdel (talk) 15:36, 21 September 2019 (UTC)

???

What are these championship listings for? https://www.wikidata.org/w/index.php?title=Module:Cycling_race&diff=prev&oldid=994518846

I am presently determining if a jersey is a national jersey through the label in French from the jersey... which is awful, consume some resourses, and lead to failure if someone change the label. With the listing of all national champs, it is quite easily solved and consume no more resourse. I just need a bit of time to complete this list, but normally the countries don't change so often, once done it is done. ~

listofwinners

@Psemdel:  

  • I entered on Wikidata all the winners of the World Championships of categories A (Q506424) and B (Q2466565) (not completely only women U-19 RR and ITT) without TTT. Template listofwinners the year turns into a link if an article about the race for this year is created. It can be done so that if there is no article on the race there is a link to an article on the World Championships for a given year. How is it done in the template calendar?

Examples https://fr.wikipedia.org/wiki/Utilisateur:GAN/Brouillon

It would only concern the race that are a world championship, then we should get the link of part of (P361). Only issue here is that there is no clear class for the world championship. We use CDM (Q23015458) but it is also for the world cup... Psemdel (talk) 19:40, 6 October 2019 (UTC)
QQQ-racing World Championships


== A ==
=== M - RR ===
{{Cycling race/listofwinners|Q13603535}}
=== M - ITT ===
{{Cycling race/listofwinners|Q2557477}}
=== M Am - RR ===
{{Cycling race/listofwinners|Q1750741}}

=== M U-23 - RR ===
{{Cycling race/listofwinners|Q2610391}}
=== M U-23 - ITT ===
{{Cycling race/listofwinners|Q2404958}}
=== M U-19 - RR ===
{{Cycling race/listofwinners|Q3652330}}
=== M U-19 - ITT ===
{{Cycling race/listofwinners|Q40769365}}

=== W - RR ===
{{Cycling race/listofwinners|Q934877}}
=== W - ITT ===
{{Cycling race/listofwinners|Q2630733}}
=== W U-19 - RR ===
{{Cycling race/listofwinners|Q3652329}}
=== W U-19 - ITT ===
{{Cycling race/listofwinners|Q17147490}}

== B ==
=== M - RR ===
{{Cycling race/listofwinners|Q69639167}}
=== M - ITT ===
{{Cycling race/listofwinners|Q69639169}}
=== W - RR ===
{{Cycling race/listofwinners|Q69639191}}
=== W - ITT ===
{{Cycling race/listofwinners|Q69639194}}

GAN (talk) 13:17, 4 October 2019 (UTC)

New relevant property

cumulative elevation gain (P7297) was created recently. It seems that we can use it for races and stages. --Papuass (talk) 19:47, 16 September 2019 (UTC)

Top! It was clearly missing. Psemdel (talk) 15:34, 21 September 2019 (UTC)

Red links on nowiki

Jonas Koch (Q20872345), Quinn Simmons (Q66417354), Carlos Barbero (Q12156396) and Jannik Steimle (Q22806856) are all turned into a red link in nowiki when used in this module, while the other riders without an article are not linked (black). What's the cause of this difference?--Pirker (talk) 16:21, 29 September 2019 (UTC)

Black is for homonymy. Psemdel (talk) 19:35, 6 October 2019 (UTC)
It seems I have found the answer to this very odd behavior. In the classification templates, all names are black (no redlinks) if the person has no article in nowiki. But for these exact persons they were showing redlinks, for no apparent reason. I have seen on some wikis that the redlinks have been present because there is a WD label in the wiki's language, but this has never been the case with nowiki. But just now I realised that this was because somebody had added labels in the language "no" (norsk), while others don't have. The language used on nowiki is "nb" (norsk bokmål), not "no".
This really means that the absense of redlinks is a bug, but I honestly prefer it that way. Perhaps it would be right with redlinks on top three, but I just can't see why all top ten riders on UCI 1.2 races or similar should be automatically notable for articles in all languages. Redlinks are after all there to suggest notability and to encourage people to add articles, but redlinks should not be there when notability isn't obvious. (This is obviously just my personal opinion.) Bergenga (talk) 18:43, 19 October 2019 (UTC)
Yes, I also observed today, that the display of name and link is still not perfect... Some more testing to do. In WP:fr we have the opposite problem actually, there is almost always a label and we can't really detect what happens when there is none. Psemdel (talk) 18:34, 26 October 2019 (UTC)
After looking at the code, I confirm that if there is a label in the language then we return "[[ lable ]]" and if there is no label in the language, only label (as we don't know how it should be called). I don't see how we can call it a bug. The test if it is a top 3 would make the code unnecessarily complex I think. Psemdel (talk) 12:22, 4 November 2019 (UTC)

Rider ranking

I use wikidata to display the UCI ranking of the riders for each team in the team articles. However, the UCI ranking in the rider articles is still displayed manually. To insert the ranking in wikidata, I propose using participant in (P1344), like here: Lorena Wiebes (Q40853827). Any better idea? Psemdel (talk) 19:27, 4 November 2019 (UTC)

@Psemdel: Use ranking (P1352) directly as a property, as it is in tennis players. Look Q10132#P1352. Amadalvarez (talk) 05:32, 29 November 2019 (UTC)
Too late, I implemented it for all women. In every case, it is not possible to present it the same way as in tennis: 1st there are several ranking in cycling, so it should be rank/25/from/uci/in 2018... would be not so elegant. Psemdel (talk) 21:45, 29 November 2019 (UTC)

install combativeclassification

Hi, in cawiki we already work with this module, but now it faults combativeclassification. As I'm not used with installation of this module, I'm not sure how to proceed. Do I refresh completely the module:cycling race ?, do I copy just the function combativeclassification ?, any other action?. Sorry I was not the person in charge to install and do not want to break anything. Thanks, Amadalvarez (talk) 05:39, 29 November 2019 (UTC)

The process is to have the same code on every wiki, so copy everything. When you do though, it is a good idea to open several articles to see, if there is no surprise. That's why the copy is not automatized, as I wouldn't check every wiki individually all the time. Psemdel (talk) 21:48, 29 November 2019 (UTC)
Return to "Cycling race/archive6" page.