Template talk:Official website/Archive 2

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

Add CSS class

{{editprotected}} Could we add some sort of CSS class, for example <span class="official"> around it. This would make it easier to give them a specific stylesheet if the user wishes one. Thanks, --The Evil IP address (talk) 16:01, 8 June 2010 (UTC)

plus Added — Martin (MSGJ · talk) 17:55, 8 June 2010 (UTC)
@The Evil IP address:, @MSGJ: - a question for you both. This was the edit made as a result of the above. I've only just noticed that it says class="official website" - was the space intentional? With the space, two classes have been applied, because class names cannot contain spaces - a space is the separator between multiple classes. So, a user may edit their personal CSS page to incorporate a rule like
.official { background-color: #ffffcc; }
or
.website { background-color: #ffffcc; }
and these will both work, and will have the same effect. However, if they put
.official website { background-color: #ffffcc; }
it simply won't work, since <website>...</website> is not a HTML element, so the selector .official website will never match any markup. It won't be rejected by a CSS parser, since it is valid CSS - if that CSS were to be applied to an XML document which did declare <website>...</website> element, it might be useful. --Redrose64 (talk) 10:21, 29 September 2013 (UTC)
Indeed, I'd probably suggest official_website as a replacement. --The Evil IP address (talk) 19:13, 29 September 2013 (UTC)

Parameter for linking mobile phone editions of websites

What do you guys think about adding a "mobile=" parameter to indicate the URL of a mobile phone edition of an official website?

At Wikipedia:External_links/Noticeboard#Mobile_phone_editions_of_websites there is a discussion about linking to mobile phone editions of websites (I.E. http://m.cnn.com of http://www.cnn.com ) - For reasons indicated in the noticeboard post, I support the linking of mobile phone sites.

Anyway, the idea is that the format would be like Official website (Mobile) So that users can select either the regular or the mobile editions.

WhisperToMe (talk) 03:36, 13 January 2011 (UTC)

  • I have seen no objections so far. In a few days I will add the coding for the mobile parameter. WhisperToMe (talk) 04:22, 17 January 2011 (UTC)
    • I have no problem with the change and think it is innovative.--NortyNort (Holla) 04:24, 17 January 2011 (UTC)

Edit request from UncleDouggie, 5 February 2011

{{edit protected}} I have made edits in the sandbox to:

  1. Add "http://" on the mobile link if needed the same way it is done for the standard link.
  2. Add a "format=flash" option that will make the official link look like it does when using {{Linkflash}} per this request.

I have already updated the doc and testcases pages.

My tested version to copy from the sandbox is here. —UncleDouggie (talk) 06:07, 5 February 2011 (UTC)

Should not be a problem, but I will leave this open for a bit longer to make sure there are no objections. Plastikspork ―Œ(talk) 19:42, 5 February 2011 (UTC)
No comments so I have implemented this. But then I thought of a couple of possible improvements. Please look at the edits to the sandbox (edit summaries are self-explanatory I think). — Martin (MSGJ · talk) 18:36, 6 February 2011 (UTC)
Your improvements look fine. The page Template:Official_website/http will need to be protected, just like the main template. —UncleDouggie (talk) 21:50, 6 February 2011 (UTC)
Okay,  Done — Martin (MSGJ · talk) 12:41, 8 February 2011 (UTC)

Broken?

No URL found. Please specify a URL here or add one to Wikidata. My example doesn't seem to work anymore. Ng.j (talk) 12:55, 23 April 2011 (UTC)

(Super late reply, but in case someone else encounters this). That's because you have an equals sign "=" in the url. You should use: {{official|1=http://www.airforce.forces.gc.ca/8w-8e/sqns-escs/page-eng.asp?id=667}} like example #5 in documentation. —  HELLKNOWZ  ▎TALK 09:37, 27 June 2011 (UTC)
H3llkn0wz, as you can see in NG.j's code (and I can confirm), this isn't the case. {{official|http://www.airforce.forces.gc.ca/8w-8e/sqns-escs/page-eng.asp?id=667}} produces No URL found. Please specify a URL here or add one to Wikidata.. The template appears to be broken. OlYellerTalktome 15:03, 8 July 2011 (UTC)
Whoops. I misread your statement. My apologies. I'm guessing there's no way to solve this issue without using the "1=" code, right? OlYellerTalktome 15:08, 8 July 2011 (UTC)
Right. MediaWiki software does not know that "http://www.airforce.forces.gc.ca/8w-8e/sqns-escs/page-eng.asp?id" is not meant to be a parameter name. —  HELLKNOWZ  ▎TALK 17:09, 8 July 2011 (UTC)

Eliminate sensitivity to leading space

Compare the following:

{{official website| leadingspace.com}}   Official website
{{official website|noleadingspace.com}}   Official website

Please change this template—using {{StripWhitespace}} or other implementation technique of your preference—to allow the website name to be preceded by one or more spaces. Thank you in advance. 67.101.5.72 (talk) 21:47, 2 November 2011 (UTC)

Done! I added a "1=" which should take care of the problem. Thanks! Plastikspork ―Œ(talk) 00:24, 3 November 2011 (UTC)

Template needs a title parm

As others have said in the Talk section "Don't agree with this template", this template really needs a title parm. (So, can provide some idea of where the poor soul will be taken to, should they risk clicking on the link.) Duh! Ihardlythinkso (talk) 13:04, 5 January 2012 (UTC)

Why?
You will be taken to the Official Website which is what this template is for.
If you have some suspicion of chicanery, edit the section and read the URL. Duh! And then fix it if it's buggered.
The beauty of this template is twofold: its simplicity, and its uniformity. Renaming a site to some editor's personal pet phrasing benefits no one.
And, no, I had nothing to do with the creation of this template. I just remember the chaos reigning before it came into common use. You propose to bring on the chaos. No thank you.
Varlaam (talk) 10:47, 3 February 2012 (UTC)
They will be taken to the "official website" of the topic in question. What are the hypothetical cases where the title needs to be different and why cannot plain links be used for that? —  HELLKNOWZ  ▎TALK 10:52, 3 February 2012 (UTC)
Precisely. Varlaam (talk)
Also, there is a feature you can use if there is any doubt.
An internal link displays the link target with the link itself.
This, however, is an external link, so the target appears on the message line.
If the link target has been altered to www.riskysite, then that is visible before you click, if you look on the message line.
Varlaam (talk)

"Official website Requires Adobe Flash Player"

Having "Requires" in mixed case when it is not a proper noun implies the beginning of an incomplete sentence.
If this were "requires", then it would read as a sentence.
Varlaam (talk) 11:03, 3 February 2012 (UTC)

Don't agree with this

I don't expect this will ever be changed, so this isn't any sort of formal complaint, but I just want to go on record as someone who dislikes this template. Although it should seem quite obvious that the "Official website" to which the tl refers is, in fact, the same entity as the subject of the article on which the tl appears, I hate that it just says "Official website" without context. When I add offical els to articles, I make sure to add the name of the entity and note that this is the official website). Something like "*Big Important Company (offical website)". I don't revert if someone changes to using the template, but I think all links should have full titles, much like some people noted above. It just looks weird to say "Official website" by itself. Valfontis (talk) 00:55, 19 March 2012 (UTC)

We could modify it to show "Offical website of {{{PAGENAME}}}" plus some string trickery. —  HELLKNOWZ  ▎TALK 09:30, 19 March 2012 (UTC)
It looks like you can already manually enter the title per {{Official website|1=http://www.example.org|name=Official example website}} which is better than nothing. I'd prefer, however, that any wording noting it as an "official" website come after the title of the external link, but like I said, I don't expect this to change anytime soon. Like someone noted above, to start out using the term "Official" seems kind of pompous. If this is a case of necessary standardization, I guess I can go along with it, but like the rules about arbitrarily changing referencing style and British vs. American English, I get annoyed when people's only edit is to change perfectly good formatting to the template. If we're insisting on uniformity, it seems like a bot should be hired to fix this project-wide. But the template documentation doesn't say the tl *should* be used. Can there be a notation about this one way or the other, i.e. the use of the template is a requirement or don't change perfectly good titled links to the template without reason? Valfontis (talk) 20:15, 19 March 2012 (UTC)
There's nowhere written this should be used afaik. —  HELLKNOWZ  ▎TALK 21:38, 19 March 2012 (UTC)
I also do not like this template for a number of reasons:
  • Most of the cases I have seen it does not actually do anything more that if the link and name were used without the template.
  • It should be assumed that we link to an official website, and since the name will match (generally) the article name it would be obvious website.
  • "website" is redundant because it always links to a website.
  • In most cases that I have seen there is only an official website. I would imaging the music articles may make use of unofficial websites as ext links but I think they should be used sparingly anyway.
  • A minor issue is server load. A template apparently places a higher load on the servers than plan text.
Should we enforce adding the "name" parameter? This will address some of the issues raised. -- Alan Liefting (talk - contribs) 23:40, 6 May 2012 (UTC)
While not adverse to discussing formatting and parameters, I'm in favour of the template. I like the idea that we can present a standard location (neatly labelled "Official website") where readers can rely on finding a link they can trust. (Don't worry about server load as that is never a consideration for content issues.) GFHandel   00:24, 7 May 2012 (UTC)
But as I said "Official website" is redundant and conveys nothing to the Reader. And apparently server load is an issue for templates. It is why we {subst..} some templates. -- Alan Liefting (talk - contribs) 00:59, 7 May 2012 (UTC)
Disagree about "redundant". Using "Official website" is necessary to indicate that we are not linking to something else (such as the official RSS feed of the article's subject). As an editor, please disregard server load as that is not within the domain of editors (whose job is to add content according to consensus and policy—not to worry about the technical capabilities of WP's servers). The average article has so many templates that the percentage increase in load based on adding a single "Official website" template is negligible and cannot be a rationale for not using it. As I stated, providing a standard mechanism so that our readers can quickly locate what WP considers to be the official website of the article's subject is a great boon (and accounts for the increasing use of the template). With at least 61,941 articles using the template, unless there's a concrete proposal in the vicinity, it's time to move on (which I will now do). GFHandel   08:47, 7 May 2012 (UTC)

"Official blog" template

I've noticed a number of articles that link to the official blogs of companies and organizations. Would an "official blog" template be a good idea? Trivialist (talk) 14:59, 21 March 2012 (UTC)

I am of the opinion that linking to organisation blogs should be discouraged. It would be accessible from their main website anyway. -- Alan Liefting (talk - contribs) 23:19, 6 May 2012 (UTC)

RFC - name as necessary parameter

At present the template does not require the name parameter as a necessary parameter and if not added will display "Official website". This text is both redundant and uninformative. I would like the name to be a necessary parameter for all new usage of the template. I think this is technically feasible. -- Alan Liefting (talk - contribs) 00:13, 8 May 2012 (UTC)

  • Oppose...
  • As mentioned above: the text "Official website" is not redundant, and far from "uninformative", I believe it to be precise in informing our readers how to reach the website that WP has confirmed as "official" for the subject of the article.
  • The label "Official website" in the "External links" section of an article provides our readers with a standard mechanism—in a standard location—of obtaining the official website hyperlink of the subject of the article.
  • I have added a few templates to WP, and I would like to know what the basis of "I think this is technically feasible"? Please note that the "Official website" template is used on at least 61,941 articles, so we must be exceedingly careful about applying rules that affect its use and rendering. I'm not aware of a syntax in template rendering that permits the detection of "new usage".
  • Out of interest, I just clicked on the first ten links at Special:WhatLinksHere/Template:Official_website and found that 90% used the syntax "Official website" in their rendered hypertext link. Accordingly, I'm inclined to believe that the community has well-and-truly spoken in what it is comfortable in presenting to its readers. (Based on extensive experience with the template, I feel that 90% would be supported by a larger sampling.)
  • I'm concerned that compulsory use of the name parameter would lead to a strange combination of weird-and-wonderful text (as editors attempt to create their own standards—obviously in good faith). If most set the compulsory text to be "Official website" (as is predicted by current usage), then there is no point in making it compulsory.
  • The "name" parameter is of course always available for use in the template, and if "Official website" is not appropriate at an article (new or otherwise), local editors are free to implement alternate hyperlink text (hopefully also including text in the link to indicate the site to be official). I feel it is fine to leave the decision as to whether to move away from a supplied default in the hands of local editors.
GFHandel   11:17, 8 May 2012 (UTC)
  • Oppose as requirement. I don't much mind it being automatic, such as "Offical website of {{{PAGENAME}}}". That said, I do not agree with the "text [being] both redundant and uninformative". "Official website" is the shortest, most general form how one could write this. "Redundant" implies that it is reiterating something obvious, implied, or already mentioned, which it does not. In fact, adding the page name makes it more redundant but that is not necessarily bad. I also don't understand how it is uninformative, it says exactly what it links to. This template helps standardize the output, and adding a mandatory name field will move us away from that, because editors will start adding inconsistent titles. —  HELLKNOWZ  ▎TALK 12:29, 8 May 2012 (UTC)
  • Oppose While it sounds like a good idea, the chance of getting the name wrong, or not updating some change in the official name, while website stays same, is too high to make worthwhile. CarolMooreDC 18:49, 8 May 2012 (UTC)
  • Oppose To my opinion it prevents advertising and gives a clear, clean aned descriptive alternative. Night of the Big Wind talk 21:43, 18 May 2012 (UTC)
  • Are you sure that it would in fact be technically feasible? Without sending a bot through to add a parameter to every existing template to set it exempt from the new rule, I am unaware of any technical implementation for your proposed rule. Can you explain how the template would tell when it was added without such a parameter? Monty845 00:59, 20 May 2012 (UTC)
  • Oppose When copyediting, I customarily change links (outside an infobox) to a company/whatever's official website to the official website template, with no "name" parameter, specifically to standardize them. Allens (talk | contribs) 10:25, 1 June 2012 (UTC)

Edit request on 22 October 2012

Please de-capitalize the word Mobile as per MOS:CAPS. I guess that this should be uncontroversial. ♛♚★Vaibhav Jain★♚♛ Talk Email 15:12, 22 October 2012 (UTC)

That would make it inconsistent with the other links generated by this template:
so Not done: please establish a consensus for this alteration before using the {{edit protected}} template. --Redrose64 (talk) 18:57, 22 October 2012 (UTC)

Edit request on 8 December 2012

Please replace code for this template with version currently in the sandbox (09:20, 8 December 2012‎ CsDix (talk | contribs)‎ . . (647 bytes) (+320)‎ . . (new extended version) [1]). It leaves the template's function as before, with the exception of two (non-URL) cases: |website= and |webpage=. When either of these is used (i.e. {{official|website}} or {{official|webpage}}) then (Official website) or (Official webpage) is the result, i.e. an "icon" in similar vein to the {{XX icon}} language templates. This will render {{Official website icon}} and {{Official webpage icon}} redundant. Hope all that makes sense. CsDix (talk) 09:30, 8 December 2012 (UTC)

Question: As coded in the sandbox, this will mean that there are two unrelated uses for the first positional parameter: one is for your new feature, the other is because that parameter is already in use as an alias for |URL=. --Redrose64 (talk) 16:40, 8 December 2012 (UTC)
Yes, that's by design. "website" or "webpage" aren't well-formed URLs, so there should be no cross-use interference (so to speak). CsDix (talk) 05:42, 9 December 2012 (UTC)
Not done: Sorry, but I don't really see the need for this addition to the template. The code seems to be working fine according to the cases I added to the bottom of the test cases page, but I'm just not sure that anyone would use the new features. This template has more than 70,000 transclusions, so we should make sure that updates to it reflect consensus. If you're still keen to make the addition, the best bet is to start an RfC here and to advertise it in a few likely places to gain a wider consensus among uninvolved editors. (Also, be sure to read the canvassing policy as well.) Let me know if you have any questions about this. Best regards — Mr. Stradivarius (have a chat) 08:39, 11 December 2012 (UTC)
  • Oppose. This template is supposed to mirror external link appearance I don't see the need to format this the same way as language icons. This template is not redundant to {{Official website icon}}, it's that one, which is redundant. It appears you created it without discussion. —  HELLKNOWZ  ▎TALK 09:29, 11 December 2012 (UTC)

Okay, thanks to all for their input. CsDix (talk) 22:55, 12 December 2012 (UTC)

Multiple markets

In automobile articles somebody usually adds this template for the official website of the manufacturer but usually makes it for a particular country (usually for the US). To keep things fair, we should put in the official websites for other countries. However, a vertical list of "official website" looks pretty ugly (even overridden with the name param to give the country name). I would like to have a way to have multiple sites listed looking somthing like on the Toyota Land Cruiser article:

Even better it sorted them alphabetically. Is this something that could be added to this template or would it be better as a new template (eg "Official websites" (with an "s" at the end)?  Stepho  talk  05:21, 15 February 2013 (UTC)

No response, so I created {{Official websites}} . It's a bit crude but I'll work on it.  Stepho  talk  14:50, 21 February 2013 (UTC)
I presume the "official websites" template can also be used for organizations that maintain official sites in multiple languages? To name just one example, Ligue 1 maintains official sites in French (www.lpf.fr), English (www.ligue1.com), and Chinese (www.ligue1.cn). — Dale Arnett (talk) 16:53, 25 March 2013 (UTC)
Sounds reasonable to me. The Ligue 1 article could have:
{{official websites
| http://www.lpf.fr | French
| http://www.ligue1.com | English
| http://www.ligue1.cn | Chinese
}}
Or possibly listing countries instead of languages, the template isn't fussed about what is actually listed. I would lean away from listing languages because each language specific edition of Wikipedia should link to the homepage for its own language but listing countries or major markets would be fine.  Stepho  talk  02:50, 26 March 2013 (UTC)

Template-protected edit request on 21 January 2015

Hey, please add something like this:

{{#ifeq:{{{1|{{{URL|}}}}}}|{{#property:P856}}|<!-- None -->|[[Category:Official website different in Wikidata and Wikipedia]]}}

It makes things a lot easier for my bot to sync with wikidata. Best :)Ladsgroupoverleg 12:06, 21 January 2015 (UTC)

Ladsgroup  Done. Maybe Frietjes wants to refine my edit. -- Magioladitis (talk) 13:13, 21 January 2015 (UTC)

Thanks. :)Ladsgroupoverleg 13:03, 21 January 2015 (UTC)

Category:Official website different in Wikidata and Wikipedia created. -- Magioladitis (talk) 09:09, 22 January 2015 (UTC)

Dead websites

The official website of defunct organisations is useful information, but we need to ensure the reader knows that the website may no longer be online, and an archive of the site is available. See Australian Partnership for Advanced Computing. The {{cite}} templates have archive parameters. John Vandenberg (chat) 01:37, 9 April 2013 (UTC)

Sounds like an excellent idea. Perhaps something like if |archive_url=some-web-address is present then show the archived url instead of the original url (but the original url is still kept in the wiki code for historical purposes).  Stepho  talk  02:15, 10 April 2013 (UTC)
  • Support However, a slightly different issue has come up at European Network of Democratic Young Left: the site is currently unavailable, however the organization still exists and the unavailable website is still used on print material and the facebook page. Possibly the site will come back soon, and in other cases it might be just a temporary technical failure. So we need a parameter to track the date the page was found unavailable and a tracking category to sort out official websites that have been unavailable longer than a year or so. --PanchoS (talk) 12:38, 4 February 2015 (UTC)

Tracking bug

On mpv player (barely notable, but I'm optimistic) this template creates an erroneous entry in Category:Official website different in Wikidata and Wikipedia. The categories are not different, a Wikidata item for enwiki: mpv player does not (yet) exist. As far as I can tell it this needs no tracking, a bot will add this later. –Be..anyone (talk) 04:18, 24 February 2015 (UTC)

Category:Official website different in Wikidata and Wikipedia displays one line of text which states that this template populates the category.
  1. If I understand correctly, User:Be..anyone observes that the category is populated when there is no WikiData page or when the official website is missing at WikiData, where we should prefer (Be prefers) that it be populated only when EN.wikipedia (using this template) and WD both identify official websites and those values differ.
  2. When EN.wiki and WD both identify official websites, it appears to me that we now require too close a match, perhaps so much as identical strings including prefix "http://" or "https://" with or without "www." and closing slash "/".
For illustration visit The Two Steves here and at WD. Improving that page a couple days ago, I noticed the tracking category and added the official website at WD. There I think I learned that WD requires the closing slash "/" (but I did not try all six prefix variants without the slash, only two or three of them). Our page The Two Steves is now in the tracking category with the one full line of code * {{official |the2steves.net}}. WD gives officialwebsite=http://the2steves.net/, where I tried two or three prefix variants before adding the slash to that one.
--P64 (talk) 20:01, 12 March 2015 (UTC)

Language icon

It would be useful for this template to have a |lang= parameter to add a {{language icon}} to the end.  Liam987(talk) 19:56, 23 March 2015 (UTC)

Not done: please make your requested changes to the template's sandbox first; see WP:TESTCASES. — {{U|Technical 13}} (etc) 18:08, 25 March 2015 (UTC)

Dated URL parameter

A minor cleanup issue, but currently "URL" seems to be a valid alternative for parameter "1", an undocumented change implemented in 2009. Just checking: does it make sense to keep that parameter variant? Should it be properly documented? GermanJoe (talk) 09:41, 30 March 2015 (UTC)

If it ain't BROKE… Apparently URL= is documented in the template data, does it work for folks who don't want to specify the URL as first parameter? And why do you mention "dated", I see nothing about dates in the source or on d:Property:P856? –Be..anyone (talk) 10:24, 30 March 2015 (UTC)
Thanks for the very detailed response. Keeping the parameter, I have now added the missing documentation to the template data section. GermanJoe (talk) 11:05, 30 March 2015 (UTC)
Example added, to test this feature. Works for me, maybe it was about compatibility with some now long forgotten vintage 2009 templates. –Be..anyone (talk) 11:37, 30 March 2015 (UTC)

punctuation immediately after template used

Currently impossible to use punctuation immediately after template? (without intervening whitespace)

See e.g. O'Reilly Open Source Convention.

syntax
* {{official website|http://www.oscon.com}}, oscon.com
expands to
* <span class="official website"><span class="url">[http://www.oscon.com Official website]</span></span> , oscon.com

--Jeremyb (talk) 16:55, 2 April 2014 (UTC)

Odd, three classes official + url + website in two nested spans, is that as it should be? –Be..anyone (talk) 10:08, 24 March 2015 (UTC)
It's only two classes. The first class is "official website" (i.e. two words together in quotes specifies a single class). The second class is "url".  Stepho  talk  11:12, 24 March 2015 (UTC)
IIRC class names are NMTOKENS separated by spaces. Apparently HTML5 sticks to that HTML4.1 syntax. –Be..anyone (talk) 15:24, 24 March 2015 (UTC)
I stand corrected.  Stepho  talk  04:09, 31 March 2015 (UTC)

Official site exists in Wikidata and is not specified locally

When Wikidata has the official site, but the same is not specified locally, the article ends up in Category:Official website different in Wikidata and Wikipedia. (See e.g. ExifTool.) I don't think it's right, as it seems to defeat the purpose of the template: there should be no need to specify the URL more than once. At any rate, it contravenes the doc page ("If this parameter is specified and doesn't match "official website" Property (P856) on Wikidata" ...) GregorB (talk) 11:04, 21 March 2015 (UTC)

Also, I'd like to bump what has been said above: when the Wikidata property is missing, a different tracking category should be used. GregorB (talk) 11:14, 21 March 2015 (UTC)
Anyway, my original complaint is now fixed in the sandbox...[2] GregorB (talk) 18:20, 21 March 2015 (UTC)

Since there were no comments, and the issue seems non-controversial, with no functional change to the template other than tracking, I believe it's OK to proceed. The changed version is in the sandbox. GregorB (talk) 09:43, 26 March 2015 (UTC)

@GregorB: I think the following code would actually do what you want with regards to tracking:
{{main other|{{#if:{{#property:P856}} | {{#ifeq:{{{1|{{{URL|{{#property:P856}}}}}}}}|{{#property:P856}}|<!-- None -->|[[Category:Official website different in Wikidata and Wikipedia]]}} | [[Category:Official website not in Wikidata]]}}}}
If {{#property:P856}} is not empty, then it is checked, and the page categorised into the tracking category if different to the locally specified URL. If {{#property:P856}} is empty, then the page is categorised in Category:Official website not in Wikidata (would need to be created). Wrapping it all in {{main other}} restricts tracking to main namespace (articles), i.e. excluding talk pages, drafts, user sandboxes, files, template documentation and testcases. - Evad37 [talk] 15:19, 30 March 2015 (UTC)
Thanks, this looks good! I originally intended to introduce these two changes one by one, but since both of them seem uncontroversial we might as well do it all now. Still, since this might affect bots, I'll ask Ladsgroup for feedback. Until then, I'll postpone the edit request. GregorB (talk) 15:34, 30 March 2015 (UTC)
ِYes, It would be good to add this code to the template :)Ladsgroupoverleg 02:50, 31 March 2015 (UTC)
Okay, test cases look good and the tracking categories resolve correctly, so this is good to go, I've reactivated the edit request. GregorB (talk) 12:32, 31 March 2015 (UTC)
 Done - Evad37 [talk] 14:24, 31 March 2015 (UTC)

How to resolve this issue?

Resolved

I see that Apawamis Club is one of many articles in Category:Official website different in Wikidata and Wikipedia. The article contains {{official website}} but Wikidata doesn't seem to have an entry. It seems that it would be clearer if the article was in a category called something like "Official website not listed in Wikidata". GoingBatty (talk) 22:04, 20 February 2015 (UTC)

Thanks for the fix - I see the article is now in Category:Official website not in Wikidata. GoingBatty (talk) 16:28, 31 March 2015 (UTC)

Link to wikidata

Splitting this into a separate thread as it is not actually related to tracking categories - Evad37 [talk] 14:24, 31 March 2015 (UTC)
Why not include a link to wikidata if the website url is taken from wikidata (so editors can edit it) , like
[[d:Special:ItemByTitle/enwiki/{{BASEPAGENAME}}#P856|[±]]]
(or [edit] instead of [±]). Christian75 (talk) 13:49, 31 March 2015 (UTC)
After looking at the code (which I should have done more carefully first time), it looks like the caller of this template already provide a url (and nothing are grabed from wikidata, just compared)... Sorry Christian75 (talk) 14:34, 31 March 2015 (UTC)

(edit conflict) This sounds like the sort of thing which would be better to include from a template (perhaps called {{edit in wikidata}}?). That way, the same format can be used across multiple templates which currently, or may in the future, extract data from Wikidata. Also, appropritate CSS classes could be specified in that template so that the links don't appear when they shouldn't (eg when printing, or exporting to PDF, etc), and so that users can adjust the appearance of the links (including hiding them if they wish to) with custom CSS. - Evad37 [talk] 14:39, 31 March 2015 (UTC)

Good idea, especially the CSS :-) Christian75 (talk) 14:59, 31 March 2015 (UTC)
Agree, this is a good idea, and it appears that such template does not exist yet. GregorB (talk) 19:42, 31 March 2015 (UTC)

Category:Official website different in Wikidata and Wikipedia

A lot (I just checked the 10 first, so I'm guessing its general) of the members of the Category:Official website different in Wikidata and Wikipedia are from "missing" http:// at enwiki. It could be fixed quickly with module:String / {{#invoke:String|replace|source= source_string |pattern= pattern_string|replace= replace_string |count= replacement_count |plain= plain_flag }} (replace equal http:// and replace equal ||) before comparing if they are equal. Christian75 (talk) 14:58, 31 March 2015 (UTC)

Good point. Trailing slashes also cause this, apparently. But maybe it's better to let a bot settle it.
My take on this is as follows. Once this template switches to {{WikidataCheck}} (learned about it only 30 minutes ago!), we'll have the following scenarios:
  1. URL not set locally, but set on Wikidata - this is as it's supposed to be, do nothing.
  2. URL set locally, but not set on Wikidata - move to Wikidata and delete local URL (bot).
  3. URL set both locally and on Wikidata and is identical - delete local URL (bot).
  4. URL set both locally and on Wikidata and is different:
a) URLs differ only in http:// and/or trailing slash - delete local URL (bot).
b) Everything else (URLs substantially different) - human review.
So, the bot might as well deal with 4a, leaving just 4b (much fewer cases, as I understand) to humans. Ladsgroup will hopefully say am I getting it right... GregorB (talk) 20:09, 31 March 2015 (UTC)
Module:URL as used in Template:URL already contains several of those URL-checking functions to format an URL (only for display). Parts of that logic could probably be useful to analyze the official website URL and its Wikidata counterpart as well - to fine-tune the difference tracking. GermanJoe (talk) 20:28, 31 March 2015 (UTC)
Presumably irrelevant, but in theory servers are free to interpret the absence or presence of a trailing slash as completely different URLs, and it won't suprise me if that is not only a theory for some stuff on toollabs: or phabricator:. OTOH these should be no "official websites". ;-) –Be..anyone (talk) 21:25, 31 March 2015 (UTC)
about the bot thing b). A lot of websites do both have a local and a English version e.g. in Canada they both have a English and French version of their official home pages for the goverment - it will probably give some revert wars at wikidata... Christian75 (talk) 00:34, 1 April 2015 (UTC)
There's probably not going to be any wars on Wikidata, as each property can have multiple, valid, referenced statements. Though I'm not actually sure how including or checking data works in these cases. - Evad37 [talk] 00:48, 1 April 2015 (UTC)
Seems in those cases {{#property:P856}} outputs a comma separated list of all values. d:New Democratic Party (Q130765) has different official websites for English and French (I just added the French one into Wikidata). If you try {{#property:P856}} in New Democratic Party (preview only, no need to save), it expands to " http://www.ndp.ca, http://www.npd.ca/ " - Evad37 [talk] 01:03, 1 April 2015 (UTC)
This complicates matters. {{Official website}} is designed for a single website, while {{Official websites}} and {{Official websites in}} are meant for multiple websites. Handling multiple Wikidata websites might be difficult, or even impossible without Lua scripting. GregorB (talk) 10:02, 1 April 2015 (UTC)
It sounds like we need a way to choose a value taking into account d:Property:P407 (language of work) qualifiers? —SamB (talk) 22:33, 30 April 2015 (UTC)
Yes, possibly. {{Official website}} could be redefined to behave like: "if Wikidata has just one official website, display it; if it has more, display the one which is in English" ("English" = hardcoded default for English Wikipedia). However, e.g. {{WikidataCheck}} does not support multiple properties either. GregorB (talk) 16:21, 4 May 2015 (UTC)

Wikidata

Why don't start using Wikidata for official websites? P856 has been created for such kind of work :) --→ Airon 11:05, 24 April 2014 (UTC)

Here is the correct code:
<span class="official website">{{URL|1={{{1|{{{URL|{{#property:P856}}}}}}}}|2={{{2|{{{name|Official website}}}}}}}}</span>
{{#ifeq:{{{format}}}|flash|{{link note|note=Requires [[Adobe Flash Player]]}} }}
{{#if:{{{1|{{{URL|}}}|}}}|{{#if:{{{mobile|}}}|({{URL|1={{{mobile}}}|2=Mobile}})}} }}<noinclude>
{{documentation}}</noinclude>
--→ Airon 10:45, 7 June 2014 (UTC)

Local value or Wikidata

Now that we can use Wikidata, which one should we prefer to use, Wikidata or local value? Two questions:

  1. Should we update existing templates transcluded in articles to use {{Official Website}}? Should we use bots?
  2. Should we encourage/require users to use Wikidata from now on?

Chmarkine (talk) 00:20, 28 October 2014 (UTC)

  • My opinion is to always use Wikidata. Because it's easier to update on Wikidata. Chmarkine (talk) 00:22, 28 October 2014 (UTC)
  • Hello! In my opinion, {{Official website}} shouldn't be changed if the specified website matches the one provided by Wikidata; thus, edits such as this one shouldn't be performed by Dexbot. Having an official website as part of the {{Official website}} invocation actually improves the overall readability of Wiki code by reducing the "easter egg" factor of not knowing what's to be displayed. — Dsimic (talk | contribs) 21:51, 31 May 2015 (UTC)
Dsimic the current trend is the other way round. We try to move the official website info in Wikidata and we are almost done. -- Magioladitis (talk) 21:57, 31 May 2015 (UTC)
Hm, what are the actual benefits? What should we do with infoboxes, which also contain links to official websites? — Dsimic (talk | contribs) 21:58, 31 May 2015 (UTC)
Dsimic the benefits is that the info is available for all wikis. Infoboxes will have to follow the same trend very soon. In fact there is another trend to not have many external links in infoboxes. -- Magioladitis (talk) 22:00, 31 May 2015 (UTC)
Ok, that makes sense, but there are no reasons to edit already existing {{Official website}} templates if the specified website matches the one provided by Wikidata. Could you, please, point me to a discussion in which such trends have been set? By the way, you don't need to ping me in each reply, I'm already watching this page. — Dsimic (talk | contribs) 22:06, 31 May 2015 (UTC)
By removing all those that match we see what is left and needs user attention in order to e fixed. Our tracking system is not that clever and slight changes such as prefix or slash at the end appear as inconsistencies between English Wikipedia and Wikidata. -- Magioladitis (talk) 22:11, 31 May 2015 (UTC)
Some history: In December 2014 Wikidata support added. We started tracking pages with inconsistencies started transition (see Wikipedia:Bot_requests/Archive_62#Sync_official_website_with_Wikidata). This month we started checking for same urls that have differ only in prefix (one has the other has not). -- Magioladitis (talk) 22:17, 31 May 2015 (UTC)
Next stage is that the bot checks whether the inconsistency is because the one url redirects to the other. -- Magioladitis (talk) 22:20, 31 May 2015 (UTC)
(edit conflict) Then make the tracking system more sophisticated; I could even offer some help there. However, there are no reasons to delete already existing stuff if it matches the Wikidata – there are maintenance categories for such mismatches and missing data (Category:Official website different in Wikidata and Wikipedia and Category:Official website not in Wikidata), which should be used instead of emptying out {{Official website}} templates. — Dsimic (talk | contribs) 22:23, 31 May 2015 (UTC)

Well, I guess it is the same with interlanguage links. We would like this info to be stored in Wikidata in order to have better control on it, minimise local changes and avoid info overwrite. -- Magioladitis (talk) 22:29, 31 May 2015 (UTC)

Hm, that's debatable. Personally, I don't care that much about versions in different languages. — Dsimic (talk | contribs) 22:57, 31 May 2015 (UTC)

In one of their edits, ViperSnake151 referred to WP:POINT. Could anyone, please, point out which guideline says that {{Official website}} templates must be emptied out if appropriate Wikidata exists? Even the documentation of that template doesn't mention something like that. — Dsimic (talk | contribs) 23:29, 31 May 2015 (UTC)

Well, if a bot is enforcing this, there is consensus and/or approval to do so as a best practice. ViperSnake151  Talk  23:30, 31 May 2015 (UTC)
In fact, none disagreed at Wikipedia:Bot_requests/Archive_62#Sync_official_website_with_Wikidata 6 months ago which was the continuation of the changes done in early December. -- Magioladitis (talk) 23:33, 31 May 2015 (UTC)
Discussions about interwikis, {{Authority control}} and Persondata show consensus that we should transfer certain information to Wikidata. -- Magioladitis (talk) 23:34, 31 May 2015 (UTC)
I asked Dexbot to perform this task based on this spirit. -- Magioladitis (talk) 23:37, 31 May 2015 (UTC)
Well, I disagree. Does my opinion count as everyone else's? — Dsimic (talk | contribs) 23:39, 31 May 2015 (UTC)
Of course your opinion counts as much as anyone else's - but that doesn't give you a veto, if you are in a minority of one. Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 09:29, 1 June 2015 (UTC)
Totally agreed, but do silent agreements count as majority votes? — Dsimic (talk | contribs) 17:16, 1 June 2015 (UTC)

"I don't care that much about versions in different languages" is not a good argument. Some people do. And keeping websites alive to avoid WP:LINKROT it's better if we have external links is a more central place. -- Magioladitis (talk) 23:40, 31 May 2015 (UTC)

Dsimic sure consensus can change. But what is exactly you would like to see here? Having all links in all Wikipedias and when a value changes in Wikidata a bot comes and updates the link? This is waste of resources. We can educate editors that typing "official website" in a page reveal the official website realetd to that page. -- Magioladitis (talk) 23:44, 31 May 2015 (UTC)
(edit conflict) I agree that it isn't a good argument, but versions in different languages aren't what I'm complaining about. People who care about that should discuss and find the best possible solutions. Once again, I'm not against storing official websites in a central place, I'm against emptying out {{Official website}} templates. — Dsimic (talk | contribs) 23:46, 31 May 2015 (UTC)
What do you perceive as the benefit of keeping a value in {{Official website}}, when there is also a value in Wikidata? Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 09:33, 1 June 2015 (UTC)
IMHO, there are a few advantages:
  • No "easter egg" factor of not knowing what's to be displayed until the page is rendered
  • No need to watch multiple pages to track all changes to an article (how does one watch changes in Wikidata anyway?)
  • No confusion about how to actually change centrally stored official website data (if someone changes what's specified in {{Official website}} and that doesn't match the centrally stored data, article is placed into appropriate maintenance categories and other editors should get that handled)
Also, what if there are multiple official websites for an article? Somehing like that isn't too uncommon, and how should that be handled? Is that supported at all? — Dsimic (talk | contribs) 17:16, 1 June 2015 (UTC)

I'm very much in favour of making use of Wikidata, both in this template and in infoboxes, but there are some issues to consider:

  • we have some orgs with multi-lingual websites; de.WP links to example.com/de; en.WP to example.com/en, and so on. Often different forms are used in {{Official}} and the infobox, with the latter having the root domain name, and the external link section a language-specific form.
  • we need to account for this template's |mobile= and |format= parameters
  • in infoboxes, we use several different parameter names (standardising in one would be good, but won't happen overnight)
  • some infoboxes use {{URL}}, so that the URL is available in the emitted microformat. This must still be supported.
  • some infoboxes hide the URL behind link text (e.g. Website); this should be discouraged in general, but allowed for very long URLs. Again, getting project-wide consensus for a single style will take time.

-- Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 09:23, 1 June 2015 (UTC)

All of issues addressed above can be handled very easily with qualifiers and Lua. :)Ladsgroupoverleg 12:12, 1 June 2015 (UTC)

How would you handle above described multilingual websites automatically? As we know, not all websites follow the same URL patterns when selecting which language to display; there's no standard for that, and in some cases different languages may be even on different domains. — Dsimic (talk | contribs) 17:16, 1 June 2015 (UTC)
This question is a good question in progress. The bot only touched the straightforward cases. It's a fact that we have pages that use the official website more than once. Sometimes it's because there are more than official websites, sometimes it's only due to bad use of the template. These are questions to be answered. We are now discovering them. -- Magioladitis (talk) 17:26, 1 June 2015 (UTC)
The "Easter egg" effect is not that big in this case. We already have {{Authority control}}, hatnotes and more templates that produce automated text. Especially, the first one takes info from Wikidata. I think the biggest problem to solve is how editors will be able to edit this info if they want to. -- Magioladitis (talk) 18:16, 1 June 2015 (UTC)
(edit conflict) Quite frankly, beside the "easter egg" factor which I still find important, I don't think such things can be solved in a way that isn't going to introduce troublesome complexity. See, even now Wikipedia lacks editors due to a huge number of guidelines (which are good per se), so adding more hard-to-perceive layers of complexity isn't going to help. If we need an article to have a link to its official website, let's just add a URL, not a somewhere-stored data structure that lists it in all language varieties while somehow allowing multiple different links per article, while keeping all that in a place no new editor has an idea about or has enough time to learn about. Just my $0.02. — Dsimic (talk | contribs) 18:24, 1 June 2015 (UTC)
By the way, what in the world {{Authority control}} is for? I've had a look at a few links it produces in various articles, and had absolutely no clue what to do with the displayed web pages. And I'm someone who had spent almost two years here on Wikipedia, editing thousands of articles and even contributing to a few Wikipedia guidelines. Imagine the effects on someone with zero edits. — Dsimic (talk | contribs) 18:27, 1 June 2015 (UTC)

No parameter

I just noticed in this edit that the template can link to the correct website even without a parameter. How does that work, and shouldn't the documentation be updated? Debresser (talk) 07:09, 31 May 2015 (UTC)

Well, the documentation does explain it:
1= is used to specify the URL. If this parameter is omitted, the value of "official website" Property (P856) on Wikidata is used.
Still, Wikidata interface is still fairly new and used only in a handful of templates, so I suppose 99% of the editors are not familiar with it - is the explanation in the docs sufficient? GregorB (talk) 09:16, 31 May 2015 (UTC)
The table of possible parameters does not have this option. That is where I looked. Debresser (talk) 06:14, 1 June 2015 (UTC)

Debresser. There is also a bot fixing them. Check Wikipedia:Bot_requests#Sync_official_website_with_Wikidata_part_2. -- Magioladitis (talk) 11:55, 31 May 2015 (UTC)

Going back to the idea above at #Link_to_wikidata, should this template be providing an "edit in wikidata" link if the website info comes from wikidata? I did develop a sandbox-version template (User:Evad37/sandbox/Template:Edit wikidata) to make such links, and can easily move it to a proper template so it can be used within this template. - Evad37 [talk] 03:51, 1 June 2015 (UTC)
I think we should make a more centralised discussion about that. This template is not the only that grabs info directly from Wikidata and there are more planned as far as I know. -- Magioladitis (talk) 07:45, 1 June 2015 (UTC)
@Magioladitis: I've started an RFC at Wikipedia talk:Wikidata#Edit_in_Wikidata_links, and advertised it at Wikipedia:Village pump (proposals). (Also ping @Christian75 and GregorB: who commented in the discussion further up the page) - Evad37 [talk] 01:38, 3 June 2015 (UTC)

Request for comments on "edit in Wikidata" links, for templates using Wikidata

You are invited to join the discussion at Wikipedia talk:Wikidata#Edit in Wikidata links. Thanks. Evad37 [talk] 01:39, 5 June 2015 (UTC)

Blank first parameter

I propose to make this change so that a blank first parameter, e.g. {{official website|}} will be interpreted the same as {{official website}}. It is possible that this change should be made in Module:URL instead, but this will fix this template. — Martin (MSGJ · talk) 14:00, 4 June 2015 (UTC)

 Done — Martin (MSGJ · talk) 20:21, 6 June 2015 (UTC)
(MSGJ why is this useful? -- Magioladitis (talk) 20:43, 6 June 2015 (UTC)
So when someone types {{official website|}} it will work without causing an error. This actually happened to me on 100th (Yeomanry) Regiment Royal Artillery. I moved the url to wikidata, and then removed it from the template call. But for some reason visual editor left in the | and it didn't work. — Martin (MSGJ · talk) 21:42, 6 June 2015 (UTC)

Proposed parameter to ignore Wikidata

After a post at Wikipedia:Help desk#Can't find use of the Official Website template in Lynette Woodard I removed {{official website}} from several navboxes [3][4][5][6][7] to stop articles using the navbox being added to Category:Official website not in Wikidata. It's possible I got all the navboxes but it's not an elegant solution and there are still many direct article uses which aren't supposed to match Wikidata, because the given site is not for the article subject. I suggest a parameter like subject=no (or anything other than yes) to indicate that it's not the official website of the article subject and Wikidata should be ignored. PrimeHunter (talk) 15:05, 29 June 2015 (UTC)

That might also be very usable when the article subject has multiple official websites – one for the open-source variant of a software project, and another website for its commercial variant, for example. — Dsimic (talk | contribs) 05:05, 30 June 2015 (UTC)

URL template

This template should not be calling {{URL}}, which is explicitly intended for use only in infoboxes, navboxes and other microformat-emitting templates, where the full URL is displayed. Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 12:16, 25 October 2015 (UTC)

Links break when more than one link is listed on Wikidata

If more than one link are listed on Wikidata, the template concatenates them and adds a comma between the links. This will make the links not work. Perhaps just get the first link from Wikidata? Or list all but separately. --Bensin (talk) 22:13, 29 December 2015 (UTC)

I suggest only the first listed link from Wikidata be used by the template until there is a better solution. --Bensin (talk) 05:56, 8 January 2016 (UTC)
Can you give an example please? Is this just happening since the new version was installed on 6 January? We should ask Mr. Stradivarius to look into this. — Martin (MSGJ · talk) 09:21, 8 January 2016 (UTC)
This should be fixed now. The new Module:Official website chooses the website from Wikidata that has the highest rank, and if there are multiple highest-ranked websites, it chooses the first one. If the template is still showing multiple URLs in the link, something is seriously broken. — Mr. Stradivarius ♪ talk ♪ 17:00, 8 January 2016 (UTC)
@Mr. Stradivarius: Yes, it appears to be fixed since I first noticed it. Thanks! --Bensin (talk) 08:49, 10 January 2016 (UTC)
Awesome, this seems to work really smooth now! Thanks for your work, Mr. Stradivarius! As a further tweak, it would be great to prefer an official website tagged with "English language", if more than one is given with the same ranking. --PanchoS (talk) 10:43, 10 January 2016 (UTC)
@PanchoS: Could you give me an example where this happens on Wikidata? I think I'll need to see an example to be able to code it up. — Mr. Stradivarius ♪ talk ♪ 14:04, 10 January 2016 (UTC)
I came across a few places with several official websites being tagged by language on Wikidata, but there are much more cases where it would be useful. I'll give you some examples by tonight. Regards, PanchoS (talk) 14:11, 10 January 2016 (UTC)
@Mr. Stradivarius: I found a few I recently came across:
More tonight. PanchoS (talk) 14:34, 10 January 2016 (UTC)
No, that's enough to go on. I've added it to the module - let me know if you see any unexpected behaviour. — Mr. Stradivarius ♪ talk ♪ 00:59, 11 January 2016 (UTC)
@Mr. Stradivarius: Nice! However I think, we need to reverse the order of the three sorting passes (rank, language, original position → original position, language, rank). All priorizations (by rank and language) are currently undone by the final pass which sorts it by original position. See the examples Kurdistan Democratic Party (Iran) and People's World, both being correctly qualified now on Wikidata. --PanchoS (talk) 10:57, 11 January 2016 (UTC)
Actually, that behaviour was due to a bug in the language detection code. The isEnglish function was giving a result of false for all languages, including English. This should be fixed now. — Mr. Stradivarius ♪ talk ♪ 11:43, 11 January 2016 (UTC)
Oops, I missed that in the code. Thanks for fixing, it seems to work like a charm now, and this is not just a huge improvement, but a completely new feature that will actually help improving quite some articles! :)
As I'm quite much around in the area of political parties which use Template:official website a lot, often with multilingual websites, I have some more ideas to further refine this module. I better add further proposals as individual edit requests though. --PanchoS (talk) 16:18, 11 January 2016 (UTC)

Can someone add to the description how this template populates Category:Official website missing URL? Is both lacking a URL in the template and one in Wikidata? Does that template need to be created? -- Ricky81682 (talk) 06:28, 15 January 2016 (UTC)

@Ricky81682: Sorry, my bad. I forgot to do this after I switched the template to Module:Official website. I've now created the category and updated Template:Official website/doc. — Mr. Stradivarius ♪ talk ♪ 06:40, 15 January 2016 (UTC)
Also, perhaps the error message could be more descriptive? At the moment, all the pages in the category show an error message of No URL found. Please specify a URL here or add one to Wikidata. Perhaps something like Error in Template:Official website: no URL found (help)? Then we could add a longer help explanation to the template documentation. — Mr. Stradivarius ♪ talk ♪ 06:45, 15 January 2016 (UTC)