Template talk:Official website

{{Permanently protected}}

{{talkheader|small=yes}}

{{tfdend|date=13 August 2009|result=speedy keep}}

{{User:MiszaBot/config

|archiveheader = {{talkarchivenav}}

|maxarchivesize = 100K

|counter = 4

|algo = old(92d)

|minthreadsleft = 4

|archive = Template talk:Official website/Archive %(counter)d

}}

{{archives|search=yes|bot=Lowercase sigmabot III|age=3|units=months}}

Use inside Infobox?

Is there any guidance that it is not appropriate to have this template in an infobox?Naraht (talk) 22:12, 8 February 2024 (UTC)

:Does the infobox have a field for official website? -- GreenC 22:16, 8 February 2024 (UTC)

::Template under discussion is {{t|Infobox_fraternity}} field is website. Field is "website -The URL of the official website."Naraht (talk) 23:42, 8 February 2024 (UTC)

::I do not recall any prohibition on use of {{tl|Official website}} in infoboxes, but the documentation for some infoboxes provide guidance that the {{para|website}} parameter should be for an official website only (e.g., {{tl|Infobox person}}).

::For the infoboxes I usually deal with, the general practice has been to display only the url of the website link (not including the {{code|http/https}} portion). The documentation and examples often suggest the use of {{tl|URL}}. {{tl|Official URL}} can be a useful alternative. Note that in some cases, the infobox documentation specifically advises not to include the {{code|www.}} portion of the url unless the website requires it (presumably to save space in space-constrained infoboxes). However, {{tl|Official URL}} displays the full website name including the {{code|www.}} portion if that is what is stored in wikidata or passed in as the first parameter.

::In addition to {{tl|URL}}, {{tl|Official URL}}, and {{tl|Official website}} I have seen external links like {{code|[https://about.me/ About Me]}} used, especially when the official website url is very long. Others also use, incorrectly, the deprecated second parameter of {{tl|URL}} to display alternative text instead of the url itself.

::Note that it appears that {{tl|Official website}} (with no parameters) will show a website link from wikidata, even if the website is marked as deprecated and displays an error if there is no website in wikidata. {{tl|Official URL}} does not display a deprecated link nor an error message if there is no website in wikidata.  — Archer1234 (t·c) 00:32, 9 February 2024 (UTC)

:::[https://en.wikipedia.org/w/index.php?search=intitle%3AInfobox+insource%3A%2F%7B%5BOo%5Dfficial+website%2F&title=Special:Search&profile=advanced&fulltext=1&ns10=1 Here's a search] that shows at least a few infoboxes using the template. There are a bunch of false positives in this search result; someone else could probably make a better search, but scrolling through 37 results isn't that hard. – Jonesey95 (talk) 00:35, 9 February 2024 (UTC)

Mismatch when there are multiple official websites

"Module:Official website," when used to create "Category:Official website different in Wikidata and Wikipedia," appears to assume that there is one and only one official website listed in Wikidata. However, this is not necessarily the case. For example, see FIFA Men's World Ranking which lists an official website, https://www.fifa.com/fifa-world-ranking/men, and the corresponding Wikidata page ({{q|Q180825}}), which has 3 official pages listed, https://www.fifa.com/fifa-world-ranking/, https://www.fifa.com/fifa-world-ranking/women, and https://www.fifa.com/fifa-world-ranking/men. So, despite the Wikipedia page and the Wikidata page both listing an overlapping identical official page, the Wikipedia page is still flagged by the module to be a member of "Category:Official website different in Wikidata and Wikipedia," because the Wikidata page also lists two other official pages. This seems like an incorrect outcome. Is it possible for the module to be modified to check any official website included in the Wikidata listing? So long as Wikidata allows the inclusion of multiple official websites, this seems like a worthwhile change. Coining (talk) 02:08, 2 April 2024 (UTC)

:The website for the women's ranking should probably be moved to Wikidata:FIFA Women's World Rankings. At some point, Q180825 should be moved to include the word "Men's" in its title. Multiple Wikipedias have already made this change, including English, sv, sco, no, nl, and others. Wikidata is a laggard in this instance. – Jonesey95 (talk) 05:58, 2 April 2024 (UTC)

::Thank you. I will look into making those changes. I still think that there is a broader issue with the module not checking all of the official websites listed on Wikidata. So long as Wikidata allows multiple official websites, the module should not flag a discrepancy so long as the Wikipedia listing matches one of the Wikidata entries. Coining (talk) 13:48, 2 April 2024 (UTC)

:::Is there really a problem here? The module code appears to handle multiple web sites gracefully, assigning scores by Wikidata rank and the order in which the URLs are listed, and preferring websites listed as being in English. In the FIFA article you linked to, the URL is provided in the official website template, which is why the "men's" URL is used. Wikidata does not appear to be consulted at all in that instance. – Jonesey95 (talk) 15:19, 2 April 2024 (UTC)

::::Ok. I think we can close this issue. I made all of the above recommended Wikidata changes, and as soon as the women's ranking official website was removed from the Q180825 listing, and the men's ranking official website was given a preferred rank on Q180825, the flag for "Category:Official website different in Wikidata and Wikipedia" on the Wikipedia page went away. Thank you, Jonesey95 for your help. Coining (talk) 12:51, 4 April 2024 (UTC)

::Wikidata is not a {{tq|laggard}}, Wikidata maintains a stable identity for its items. If you want to distinguish the Men’s world rankings from the general concept, you should create a new item for it; if you are shifting the subject of a Wikipedia article, you may want to link it to another item. (See also :d:Talk:Q180825.) Lucas Werkmeister (talk) 18:07, 5 April 2024 (UTC)

Wikidata language parameter or host-language selection not yet implemented

We still don't seem to have proper handling of websites with multiple languages when getting data from Wikidata. Both:

  • {{s|automatic use of the host wiki language by default}} (done; see below Boud (talk) 16:18, 21 December 2024 (UTC)); and
  • a parameter to override the host wiki language;

are needed.

Previous discussions:

Is there any progress? or a workaround? Boud (talk) 16:04, 21 December 2024 (UTC)

There does appear to be a piece of code in Module:Official website to select the English language if available:

-- Finds whether a Wikidata property is qualified as being in English.

local function isEnglish(prop)

local ret = quickPcall(function ()

for i, lang in ipairs(prop.qualifiers.P407) do

if lang.datavalue.value['numeric-id'] == 1860 then

return true

end

end

return false

end)

return ret == true

end

but it {{s|doesn't seem to have an effect. This looks like a bug.}} Boud (talk) 16:09, 21 December 2024 (UTC)

:It does work for me(TM). What remains to be programmed, it looks like to me, is to add a parameter that, if set, overrides the automatically chosen, if available, English-language value. Boud (talk) 16:18, 21 December 2024 (UTC)

Official blog template

I want someone to create an 'official blog' template using similar code as this. Wikidata has a property for it under {{prop|P1581}} and bare link versions are sometimes used, such as in the article Anna's Archive. Juwan (talk) 02:29, 11 April 2025 (UTC)

:Beware that indiscriminate use of such a template may violate WP:ELMINOFFICIAL, which warns against multiple links. For multi-national corporations, you also get the joy of deciding which country's blog gets to be officially blessed by Wikipedia.  Stepho  talk  22:42, 11 April 2025 (UTC)