Template talk:R from domain name
This template does not require a rating on Wikipedia's content assessment scale. It is of interest to the following WikiProjects: | ||||||||
|
Template:R from domain name is permanently protected from editing because it is a heavily used or highly visible template. Substantial changes should first be proposed and discussed here on this page. If the proposal is uncontroversial or has been discussed and is supported by consensus, editors may use {{edit template-protected}} to notify an administrator or template editor to make the requested edit. Usually, any contributor may edit the template's documentation to add usage notes or categories.
Any contributor may edit the template's sandbox. Functionality of the template can be checked using test cases. |
Note: Any changes made to this template's content needs to be checked as workable in the tables on the references which include it directly: |
Proposal to merge R from dotcom into here
[edit]I have proposed this merger because, although this template is somewhat newer than Template:R from dotcom, this one is used a lot more extensively and its name is bigger-encompassing, more clearly indicating that it can be applied to titles with .edu and .org suffixes. Thoughts? If there's no disagreement, I'll go ahead and perform the merger. Lenoxus " * " 21:33, 16 April 2008 (UTC)
R from .com domains
[edit]I just saw the subcategories in Category:Redirects_from_domain_names today. These categories are manually added to the redirects and not with a R from templates. I suggest that this template (R from domain name) just check the ending of the redirect title and then add a second category i.e. Category:Redirects from .com domain names. Christian75 (talk) 14:31, 5 February 2019 (UTC)
It could be made with something like, {{#ifeq:{{#invoke:String|match|{{PAGENAME}}|%.com$|nomatch=nomatch}}|.com|[[Category:Redirects from .com domain names]]}}. Christian75 (talk) 14:59, 9 February 2019 (UTC)
- Good idea? Can someone with enough editing skill (and user rights) do this? --Geolodus (talk) 09:32, 17 February 2019 (UTC)
I think it is probably easier to do this simply with a new parameter. This would also help with edge cases, such as where a redirect title doesn't actually contain the domain name (such as steamcommunity or target com). I added an optional |domain=
parameter to the sandbox; if no one opposes I think it should be fine to just add it. ―Jochem van Hees (talk) 15:00, 16 June 2021 (UTC)
And then of course it should be recommended to use the new parameter in the documentation. Maybe there could even be a tracking category for transclusions that don't include the parameter or something, because in almost all cases the parameter should be used. ―Jochem van Hees (talk) 16:24, 16 June 2021 (UTC)
Purpose
[edit]I changed the text:
This is a redirect ... to an article about a website (or the entity to which the official website belongs) that is more often referred to by its short name or company name rather than its domain name
to:
This is a redirect ... to an article about an associated entity or website, which is more often referred to by its official name than by its domain name.
This seemed more useful, since there are way more articles about people and organizations that have websites than about websites themselves. —Sangdeboeuf (talk) 20:39, 4 September 2020 (UTC)
Template-protected edit request on 13 September 2021
[edit]This edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Implement the changes to the sandbox that improve the |domain=
parameter. You no longer have to precede the domain name with a dot, and the domain name will be displayed on the template. Otherwise the template will instruct you to add the domain parameter. I have tested these changes and they appear to work. ―Jochem van Hees (talk) 11:56, 13 September 2021 (UTC)
- Not done Greetings Jochem van Hees. The main purpose of these Rcat templates is categorization. While the changes are asthetic improvements, they can not be implemented unless they properly sort the domains into their appropriate subcategory. If you correct this, you can reinstated the request by changing the |answered= parameter from yes to no.--John Cline (talk) 13:18, 14 September 2021 (UTC)
- @John Cline: I think I made them correctly sort in the appropriate subcategory? If I for example use
|domain=.com
then it will categorise it under both Category:Redirects from .com domain names and Category:Redirects from domain names. Or should it only be the subcat? ―Jochem van Hees (talk) 14:34, 14 September 2021 (UTC)- That's correct Jochem van Hees, the only redirects that should be in the main category are redirects that use the template without any parameters, specifically |1= (or the 1st unnamed parameter) or |domain=. Ostensibly this is to allow users willing to visit these pages to add the unused parameter and sort them from the main category into the appropriate subcategory. One other thing, which I did not check but is important: because these templates are transcluded, you must maintain the functionality in current use and your changes can not have a detrimental affect on the pages where the template is already in use. In particular I'm concerned that where you cause the parameter to accept |1=com yet render as .com doesn't cause the parameters in use that use |1=.com to render as ..com possibly emptying the .com subcategory and moving the pages to a red/non-existent ..com subcategory. I didn't look at the template's coding but I suspect it will be a significant challenge to bring all these things together. Best regards.--John Cline (talk) 15:41, 14 September 2021 (UTC)
- I have now changed it so that they only get categorised in the subcategory. I have also double checked that the template now works exactly the same way with or without the dot (see also the testcases). ―Jochem van Hees (talk) 15:54, 14 September 2021 (UTC)
- Done Nice work Jochem van Hees I did verify that everything is in order and, in my opinion, improved overall. If you would, please copyedit the template's documentation subpage so that everything accords with its new and fuller functionality. Thank you for your efforts and interest in this area.--John Cline (talk) 17:15, 14 September 2021 (UTC)
- I have now changed it so that they only get categorised in the subcategory. I have also double checked that the template now works exactly the same way with or without the dot (see also the testcases). ―Jochem van Hees (talk) 15:54, 14 September 2021 (UTC)
- That's correct Jochem van Hees, the only redirects that should be in the main category are redirects that use the template without any parameters, specifically |1= (or the 1st unnamed parameter) or |domain=. Ostensibly this is to allow users willing to visit these pages to add the unused parameter and sort them from the main category into the appropriate subcategory. One other thing, which I did not check but is important: because these templates are transcluded, you must maintain the functionality in current use and your changes can not have a detrimental affect on the pages where the template is already in use. In particular I'm concerned that where you cause the parameter to accept |1=com yet render as .com doesn't cause the parameters in use that use |1=.com to render as ..com possibly emptying the .com subcategory and moving the pages to a red/non-existent ..com subcategory. I didn't look at the template's coding but I suspect it will be a significant challenge to bring all these things together. Best regards.--John Cline (talk) 15:41, 14 September 2021 (UTC)
- @John Cline: I think I made them correctly sort in the appropriate subcategory? If I for example use
Ripe for automation
[edit]I see Christian75, Glades12, and Jochem van Hees were discussing automatically filling the .com subcategory above. I agree and think we can probably go further. This template should be extracting the top-level domain from the title, checking to see if it matches a subcategory, and sorting it automatically if so. There will still be some edge cases that'll need doing manually, like the Target example above, but the vast majority can be automated, and that'll save us a lot of busywork. {{u|Sdkb}} talk 03:41, 18 November 2021 (UTC)
- I wasn't so sure about automating because there will always be those oddly titled redirects that mess it up. But I guess as long as the
|domain=
parameter is preferred I think it could work. ―Jochem van Hees (talk) 10:29, 18 November 2021 (UTC)|domain=
will always override any automatic detection. The only situation we need to be worried about is a page title that ends in one domain with a category but actually belongs in a different one, since those would be miscategorized until overridden. I can't think of any circumstance in which what could happen—can you? {{u|Sdkb}} talk 16:07, 18 November 2021 (UTC)- No, I highly doubt that'd be a problem. The ones I mentioned earlier, steamcommunity and target com, don't have a dot at all in their name and therefore should just default to the main category. I made a test on the sandbox that works as far as I can tell, although it does involve using the same regex four times. I wonder if there is a smarter solution. ―Jochem van Hees (talk) 16:17, 18 November 2021 (UTC)
- @EN-Jungwon, bringing this to your attention, since I've seen you making a bunch of edits to these recently. It really doesn't make sense to hardcode the fact that Payscale.com is a redirect to a website, rather than just deriving that information from the page name. {{u|Sdkb}} talk 02:47, 21 December 2021 (UTC)
- @Sdkb, I agree that this can be automated in some way. Unfortunately I'm of no help as I have very little clue about how templates work. EN-Jungwon 15:48, 21 December 2021 (UTC)
- The sandbox test from @Jochem van Hees appears to work fine, based on the preview checks I just did at Amazon.sg, Target com, and Payscale.com. As this has sat for a month with no concerns, I'm going to call that sufficient consensus to proceed and implement. If any bugs/concerns crop up, please let me know. Cheers, {{u|Sdkb}} talk 20:34, 21 December 2021 (UTC)
- @Sdkb, I agree that this can be automated in some way. Unfortunately I'm of no help as I have very little clue about how templates work. EN-Jungwon 15:48, 21 December 2021 (UTC)
Creating redirects by bot
[edit]You are invited to join the discussion at Wikipedia:Bot requests § Redirects from organization/newspaper domain names. {{u|Sdkb}} talk 08:28, 12 October 2023 (UTC)
Template-protected edit request on 5 May 2024
[edit]This edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Add {{lowercase title}}. Website domain names are always written in all lowercase. InfiniteNexus (talk) 06:58, 5 May 2024 (UTC)
- Reverted – (please see outdent below). P.I. Ellsworth , ed. put'er there 07:29, 6 May 2024 (UTC)
- @Paine Ellsworth, could you wrap that part in
{{ifeq:{{lc:{{PAGENAME}}}}|{{PAGENAME}}|
...}}
{{ifeq:{{lc:{{PAGENAME}}}}|{{lcfirst:{{PAGENAME}}}}|
...}}
maybe? I don't think pages like Aviation-Safety.net should get the first letter turned into lower case. 1234qwer1234qwer4 15:54, 24 September 2024 (UTC)- As SilverLocust wrote in the section below, I think
It would be better to instead have the rcat disable its displaytitle with a parameter like
InfiniteNexus (talk) 18:10, 26 September 2024 (UTC)|lowercase=no
rather than putting the exceptions in the template itself.- I don't think this is better, since it would require users actively maintaining even more templates/parameters manually on potentially thousands of pages. 1234qwer1234qwer4 20:32, 26 September 2024 (UTC)
- (Not opposed to this kind of parameter in general, just that in "many" cases it would be easy to handle that automatically. Unlike the section below, this suggestion concerns (significantly) more than a single page.) 1234qwer1234qwer4 20:33, 26 September 2024 (UTC)
- Thank you for the ping, editor 1234qwer1234qwer4! Interesting, because my preference would be to lowercase the entire title, as in "aviation-safety.net", also an existing redirect. I think we have to accept a few facts. First, these are only redirects, not articles, so as page titles go they are far less important than page titles of actual articles, project pages, and so on. Next, I've actually tried several ways to lowercase more than the title's first letter. Basically, I've found that while the
{{lcfirst:{{PAGENAME}}}}
magic word works to lowercase the first letter of a page title when used inside{{DISPLAYTITLE:}}
, the{{lc:string}}
does NOT work to lowercase the entire title, as I had hoped. I just got an error message that the magic word was ignored because it didn't exactly match the page title (the Aviation-Safety.net redirect was used and tested in "preview"). A third point would be that if "Aviation-Safety.net" is copied to a brower's url field, it redirects over to the main website, "asn.flightsafety.org", as do the other similar WP redirects. Not sure how many pages are actually affected by this perceived issue – you say "(significantly) more than a single page" and "potentially thousands of pages" – so that would have to be measured and evaluated before we consider it a major problem. My gut feeling here is that leaving things the way they are won't adversely affect the project. I could be wrong. P.I. Ellsworth , ed. put'er there 11:05, 28 September 2024 (UTC)- Changing the display title to complete lowercase is not a good idea (and is not possible for a reason), since it would confuse both readers and editors, with multiple different pages potentially displaying the same title. So if a page actually contains some capital letters in the middle, we should not suggest that it doesn't. Most of these redirects will probably have completely different stories behind them, but in this case, for example, the site aviation-safety.net now redirects to shows "www.FlightSafety.org" (with this capitalisation) in its footer. It would not be appropriate to change the display title of a (potential) FlightSafety.org redirect to "flightSafety.org". There are exceptions, of course, like arXiv.org which should probably be lower-case, but just looking at Special:WhatLinksHere/Template:R from domain name it seems to me that it is best to turn off the automatic lower-casing for titles that contain multiple capital letters. 1234qwer1234qwer4 14:33, 28 September 2024 (UTC)
- I've tested your suggested fix in the sandbox and it does work as expected. My concern is that some editors will come along and simply place the {{Lowercase title}} template below the {{R from domain name}} rcat template. Since it will be the final title adjustment on the page, then it will prevail, and your fix will be... unfixed. So again I must say that, for reasons already stated and for this reason, it appears to me to be better to leave things as they are. P.I. Ellsworth , ed. put'er there 03:05, 30 September 2024 (UTC)
simply plac[ing] the {{Lowercase title}} template below the {{R from domain name}} rcat template
would be the intended way of handling the cases like arXiv.org above that contain a capital letter yet should stay lower-cased. Either way, there needs to be at least some way to turn the casing off. 1234qwer1234qwer4 19:03, 1 October 2024 (UTC)- Yes, that is one way to handle it; however, the "fix" that you want, which would uc the first letter of all redirects with a second capital letter in the title, would still compel some editors to add the {{Lowercase title}} template even to redirects like Aviation-Safety.net. Then it would again appear like aviation-Safety.net, which would unfix your fix. Again, for that and other reasons given, it's best left as it is. You are welcome to try and garner a consensus for your opinion, of course. P.I. Ellsworth , ed. put'er there 14:12, 2 October 2024 (UTC)
- I've tested your suggested fix in the sandbox and it does work as expected. My concern is that some editors will come along and simply place the {{Lowercase title}} template below the {{R from domain name}} rcat template. Since it will be the final title adjustment on the page, then it will prevail, and your fix will be... unfixed. So again I must say that, for reasons already stated and for this reason, it appears to me to be better to leave things as they are. P.I. Ellsworth , ed. put'er there 03:05, 30 September 2024 (UTC)
- Changing the display title to complete lowercase is not a good idea (and is not possible for a reason), since it would confuse both readers and editors, with multiple different pages potentially displaying the same title. So if a page actually contains some capital letters in the middle, we should not suggest that it doesn't. Most of these redirects will probably have completely different stories behind them, but in this case, for example, the site aviation-safety.net now redirects to shows "www.FlightSafety.org" (with this capitalisation) in its footer. It would not be appropriate to change the display title of a (potential) FlightSafety.org redirect to "flightSafety.org". There are exceptions, of course, like arXiv.org which should probably be lower-case, but just looking at Special:WhatLinksHere/Template:R from domain name it seems to me that it is best to turn off the automatic lower-casing for titles that contain multiple capital letters. 1234qwer1234qwer4 14:33, 28 September 2024 (UTC)
- As SilverLocust wrote in the section below, I think
- @Paine Ellsworth, could you wrap that part in
To editors InfiniteNexus and 1234qwer1234qwer4: I think this has become a controversial situation in which I, as a TE, must make the decision to revert this edit until other editors attend and can come to a consensus about both the usage of the {{Lowercase title}} template and also the {{ifeq:{{lc:{{PAGENAME}}}}|{{lcfirst:{{PAGENAME}}}}|
... }}
wrapper suggested by editor 1234qwer1234qwer4. Best to you, and thank you both very much! P.I. Ellsworth , ed. put'er there 15:57, 2 October 2024 (UTC)
- 1234qwer1234qwer4 did not ask for this edit to be reverted, they asked for this edit to be amended — which, honestly, I do not have strong feelings against. All three of us have expressed that it is a good idea to lowercase some URL redirects, so there is a clear use case for this. Perhaps @SilverLocust and Eejit43 have thoughts on this. InfiniteNexus (talk) 16:08, 2 October 2024 (UTC)
1234qwer1234qwer4 did not ask for this edit to be reverted, they asked for this edit to be amended
- Acknowledged. I have a strong sense of stewardship where all of the rcat templates are concerned. This has developed from before I even registered to edit. So I think it's important to start from scratch and get consensus. A few neutral notices of this discussion on appropriate talk pages should bring some interested editors here to opine. Thank you for your patience and understanding! P.I. Ellsworth , ed. put'er there 16:47, 2 October 2024 (UTC)
- I agree with @1234qwer1234qwer4. I think the template should be applied in cases except for titles where there are multiple capitalized characters. Cases like arXiv.org can be handled with {{lowercase title}} placed after this template's usage. If there are other cases I'm missing, I wouldn't be opposed to an override parameter in this template. ~ Eejit43 (talk) 18:02, 2 October 2024 (UTC)
- Looking at Special:WhatLinksHere/Template:R from domain name as suggested above we see redirects like CocaCola.com, YouTube.com, GOOGLE.com, BBC.com and many other similar domains. I was thinking of a switch if there were just a few exceptions, but there seem to be far too many for that. I'm beginning to see editor 1234qwer1234qwer4's point, and I'm not sure that my previous concerns are strong enough to override that. P.I. Ellsworth , ed. put'er there 19:08, 2 October 2024 (UTC)
- Skimmed this. I'd suggest something like
{{Yesno-no|{{{lowercase|yes}}}|{{#ifeq:{{lcfirst:PAGENAME}}|{{lc:PAGENAME}}|{{lowercase title}}}}}}
SilverLocust 💬 07:51, 3 October 2024 (UTC)
- Skimmed this. I'd suggest something like
Template-protected edit request on 15 August 2024
[edit]This edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Please wrap {{lowercase title}} with a check for redirect page listing, as other similar redirects have. See below:
{{#ifeq:{{FULLPAGENAME}}|Wikipedia:Template index/Redirect pages||{{lowercase title}}}}
~ Eejit43 (talk) 17:43, 15 August 2024 (UTC)
- It would be better to instead have the rcat disable its displaytitle with a parameter like
|lowercase=no
rather than putting the exceptions in the template itself. SilverLocust 💬 21:37, 15 August 2024 (UTC)
- To editor Eejit43: please help me out here – I don't understand why this edit is needed. First of all, the title that you want to be excluded, "Wikipedia:Template index/Redirect pages", is unaffected by this template on that page. It is not lowercased. Secondly, can you give examples of the "other similar redirects" you mention? P.I. Ellsworth , ed. put'er there 03:41, 16 August 2024 (UTC)
- It is affected as a matter of fact, it is just overridden (see the "trap" sprung at the bottom of the page, and as mentioned in the source text).
- See other templates, such as {{R from album}}, {{R from work}}, {{R from film}}, {{R from book}}, and more. ~ Eejit43 (talk) 03:45, 16 August 2024 (UTC)
- Ah, makes sense now – you meant "redirect category templates", not "redirects", and so completed. P.I. Ellsworth , ed. put'er there 04:16, 16 August 2024 (UTC)
- Thank you, sorry for the confusion! :) ~ Eejit43 (talk) 13:37, 16 August 2024 (UTC)
- Ah, makes sense now – you meant "redirect category templates", not "redirects", and so completed. P.I. Ellsworth , ed. put'er there 04:16, 16 August 2024 (UTC)
To editor Eejit43: this is just to let you know that as a result of the discussion in the section just above this one, the {{Lowercase title}} template has been removed along with your suggested wrapper, which is of course no longer required. Best to you! P.I. Ellsworth , ed. put'er there 16:04, 2 October 2024 (UTC)