Using WikiData

edit

I have modified the Template:Cricinfo/sandbox to use, and check, the wikidata item. At the moment, it still uses the ID or ref field if it is set in the template, so for most articles there is absolutely no change. However, in the future, you could just use {{Cricinfo}} without any parameters and it will retrieve and use the ESPNcricinfo player ID parameter from WikiData. I've also expanded the Category:Cricinfo maintenance to capture if the specified id or ref is different to the WikiData property, and if the WikiData property is missing. Because it needs a live WikiData item link to work, I've trialed the use of the parameter-less sandbox template in Tim Zoehrer, as well as checking that the id and ref versions also both work. I'll wait a day or two to see if there are any issues, and then I'll integrate it into the main template. If any experienced template editors think it's OK to go now, then I'm happy for them to do the edit. The-Pope (talk) 09:27, 12 March 2017 (UTC)Reply

  Done & Tim Zoehrer reverted to {{Cricinfo}}. Please update the documentation. Cabayi (talk) 14:25, 13 March 2017 (UTC)Reply

Access-date

edit

Following the deprecation of non-hyphenated parameter names and their ongoing replacement, this template should also allow |access-date=. Further, couldn't this template be rewritten as a wrapper for {{Cite web}}? -- Michael Bednarek (talk) 11:23, 23 January 2021 (UTC)Reply

  Done And yes, a {{cite web}} wrapper would probably make sense, if someone wants to write that. ProcrastinatingReader (talk) 13:06, 23 January 2021 (UTC)Reply

Template-protected edit request on 27 October 2021

edit

Change ci/content/player to /player. Eg. https://www.espncricinfo.com/ci/content/player/bangalore-jaya-ram-29758 to https://www.espncricinfo.com/player/bangalore-jaya-ram-29758 Chanaka L (talk) 06:57, 27 October 2021 (UTC)Reply

  Not done There seem to be two different styles of ID, one that is all-numeric and works with the "ci/content/player" URLs, and one that contains the player's name and works with the /player URLs. Instead of switching this template from one form to the other and breaking uses, I've updated B. Jayaram to use the all-numeric form and it's URL (https://www.espncricinfo.com/ci/content/player/29758.html) now works. * Pppery * it has begun... 23:55, 27 October 2021 (UTC)Reply

Cricinfo URL format change removes .html, breaks usability of |ref= parameter

edit

ESPNCricinfo seem to have changed their file structure again, so that some grounds (and maybe other pages too?) don't work with the .html added to the end of their new URLs. See https://www.espncricinfo.com/cricket-grounds/harare-south-country-club-59543 vs https://www.espncricinfo.com/cricket-grounds/harare-south-country-club-59543.html. This causes a problem in that you have know to use the old "/zimbabwe/content/ground/59543" format for the "|ref=" parameter in this template, you can't just use the current url suffix of "cricket-grounds/harare-south-country-club-59543" as this template adds the ".html" to that, which doesn't work.

Is it possible to see how many usages of this template use the "ref=" parameter? I wouldn't want to change this template to always use the ref= exactly as written, if that then breaks it for other links. I've also forgotten how to program these templates, so I don't feel comfortable making the changes to the template either.

Note that this seems to be a site wide change - they've dropped the .html from almost every page, but there seems to still be redirects from the "old /ci/content/player/#######.html" syntax to the new "/cricketers/player-name-######" syntax (ie our link of https://www.espncricinfo.com/ci/content/player/823509.html still ends up correctly at https://www.espncricinfo.com/cricketers/glenn-phillips-823509.) The main problem is, will new players still be given an old "ci/content/player/######.html" page to link to the new "/cricketers/player-name-######" page and for non-players, where the ref parameter is to be used, you have to know the old syntax, not just cut and paste the end of the new url. The-Pope (talk) 02:28, 29 September 2024 (UTC)Reply