Template talk:Plain link

Edit protected
editprotected

Please replace the content with the following, so that people using it without specifying the 'name' parameter will have it working again, thanks.

— neuro  (talk) (review) 10:26, 17 April 2009 (UTC)


 * Yes check.svg Done, thanks. I basically copied the code from plainlinks to also allow "name", and retain the old priority should someone have managed to give both "URL" and "url". :) Cheers, Amalthea  11:27, 17 April 2009 (UTC)

Ugly space at the end
Plain link seems to be causing an unwanted space at clarify-section (between "article" and the full stop) and probably other message boxes. Is this fixable? It's pretty unpleasant aesthetically. – hysteria18 (talk) 01:06, 2 April 2012 (UTC)
 * Plain link wasn't being used correctly, I've fixed it. ··gracefool&#9786; 07:45, 19 June 2012 (UTC)

Shortcut parameters
Please replace the content with the following (copied from the Sandbox where you can see it working), so that "u" and "n" can be used as shortcuts for the "url" and "name" parameters:

··gracefool&#9786; 07:50, 19 June 2012 (UTC)
 * Why is this needed? There are already 3 different names for these parameters. If name is too much to type, you can just use the unnamed parameter. &mdash; Martin (MSGJ · talk) 11:45, 19 June 2012 (UTC)
 * Because if the URL has an = in it, you have to use named parameters. Unnamed parameters would be preferable, this is a workaround. It's a lot more readable with minimal names. ··gracefool&#9786; 19:24, 19 June 2012 (UTC)
 * If the URL has = in it, you can use the syntax . Or you can type 3 extra characters. I would generally oppose adding so many alternative parameter names to a template because it complicates the code and confuses people. &mdash; Martin (MSGJ · talk) 19:33, 19 June 2012 (UTC)
 * Oh woops of course, I forgot about the default numbered parameters... thanks. I've added a note to the documentation. ··gracefool&#9786; 20:49, 19 June 2012 (UTC)

Added "Don't use http: or https:" to the doc.
I wrote in the doc that you shouldn't begin the URL with http: nor https:. --Ahora (talk) 12:07, 23 October 2012 (UTC)

Make it more robust
Please apply [//en.wikipedia.org/wiki/Special:ComparePages?page1=Template%3APlain+link&rev1=377549404&page2=Template%3APlain+link%2Fsandbox&rev2=634580875&action=&diffonly=&unhide= this diff], which allows this template to handle [//en.wikipedia.org/w/index.php?title=Template%3APlain_link%2Ftestcases&diff=634581799&oldid=611873324 the new tough testcase]. Petr Matas 19:49, 19 November 2014 (UTC)


 * Red information icon with gradient background.svg Not done: please establish a consensus for this alteration before using the template. Why is this necessary?  is expensive. Using it twice, nested, needs some strong justification. -- Red rose64 (talk) 21:28, 19 November 2014 (UTC)


 * I needed it on Wikidata in d:Template:Query, which uses the brackets heavily, and I thought it would be beneficial to port it here as well. Petr Matas 02:21, 20 November 2014 (UTC)

Proposal to remove extraneous space after link
This template appears to insert an extraneous space after the link when used in templates like Linksearch and Underused external link template. Here is Plainlink in parentheses, showing that it does not insert a space on its own:



But here is a Linksearch template used in parentheses, showing a space before the closing parenthesis:


 * This is in parentheses.

And here is Underused external link template (note the space after "check here"):

I have adjusted the code in Plainlink/sandbox to test for the second parameter, adding a space only if it is found. I don't know why this fixes the downstream templates. Here is Plainlink/sandbox in parentheses, showing that it still works:



Here is a Linksearch/sandbox template used in parentheses:


 * This is in parentheses.

And here is Underused external link template using the sandbox version:

If someone has a better explanation or fix, I'm all ears. – Jonesey95 (talk) 03:06, 20 October 2016 (UTC)
 * Except for the last pipe, that's the way that I'd have done it myself, so ✅ -- Red rose64 (talk) 10:05, 20 October 2016 (UTC)
 * This change, or something related to it, seems to have broken templates further up the chain - the copyvios template is now omitting the word "Copyvios" from the link title and instead appending it to the URL (eg. link instead of Copyvio link). --McGeddon (talk) 12:25, 20 October 2016 (UTC)

Flagging this as an edit request to revert, as this is a "heavily used and/or highly visible template" and Redrose64 hasn't edited for a couple of hours so may be offline. An unexplained extraneous space seems preferable to link URLs being mangled in some cases, for now. --McGeddon (talk) 12:42, 20 October 2016 (UTC)
 * Edit-undo.svg Undone: This request has been undone. &mdash; Martin (MSGJ · talk) 12:55, 20 October 2016 (UTC)
 * I don't know why Jonesey's fix did not work, but the code currently in Template:Plain link/sandbox seems to do the job &mdash; Martin (MSGJ · talk) 13:14, 20 October 2016 (UTC)
 * Don't break any templates on my account. I was off-line and was unable to see the malformed links, but my sandbox experiments were doing the same thing to me in the Linksearch/sandbox template (adding the first word of the link text to the URL), which was why I tracked the (potential) fix back to this template. – Jonesey95 (talk) 17:51, 20 October 2016 (UTC)
 * I've deployed again. Hopefully no issues this time! &mdash; Martin (MSGJ · talk) 07:55, 21 October 2016 (UTC)

Difference between and
What is the difference between plain and plain link? appears to be a slightly less complicated version of. What’s the point of that? ―  PapíDimmi  (  talk |  contribs  ) 18:52, 10 May 2017 (UTC)
 * , I don't see any difference. I'll nominate them for merging and see how it goes. &#123;{u&#124; Sdkb  }&#125;  talk 01:43, 10 June 2020 (UTC)

Template-protected edit request on 29 August 2017
Could someone please wrap the if statement at the top in, so that this template can be cleanly substituted. It is currenly substituted by the falsepositive template, which causes an unnecessary if statement in the wikimarkup of every report to WP:EFFP. P p p er y 15:13, 29 August 2017 (UTC)
 * Yes check.svg Done —&thinsp;JJMC89&thinsp; (T·C) 18:25, 29 August 2017 (UTC)

Parameter 2 seems to have stopped working
Something broke this template: — SMcCandlish ☏ ¢ 😼  08:35, 21 June 2018 (UTC)
 * The template is not smart enough to use one named parameter and one unnamed parameter. If you're going to use url, you have to use name or 2.
 * We would need more if statements to allow what is attempted above. This is one of the many reasons templates should not allow multiple unnamed parameters. – Jonesey95 (talk) 12:59, 21 June 2018 (UTC)
 * We would need more if statements to allow what is attempted above. This is one of the many reasons templates should not allow multiple unnamed parameters. – Jonesey95 (talk) 12:59, 21 June 2018 (UTC)
 * We would need more if statements to allow what is attempted above. This is one of the many reasons templates should not allow multiple unnamed parameters. – Jonesey95 (talk) 12:59, 21 June 2018 (UTC)
 * We would need more if statements to allow what is attempted above. This is one of the many reasons templates should not allow multiple unnamed parameters. – Jonesey95 (talk) 12:59, 21 June 2018 (UTC)
 * We would need more if statements to allow what is attempted above. This is one of the many reasons templates should not allow multiple unnamed parameters. – Jonesey95 (talk) 12:59, 21 June 2018 (UTC)

Discussion at Templates for discussion/Log/2020 June 10
You are invited to join the discussion at Templates for discussion/Log/2020 June 10. &#123;{u&#124; Sdkb  }&#125;  talk 01:48, 10 June 2020 (UTC)

Maintenance category
The template instructions note that this template is "not suitable for genuinely external links". Is there a maintenance category to monitor places where the template is being used in contrary to this rule? —Ost (talk) 21:39, 11 October 2021 (UTC)

Making plurals and verb-tense forms work
Is there any way this template can be modified so any trailing plural forms or or verb tense forms of the word outside the braces will appear as part as the word in the same way it does for regular internal bracketed links do?

As an example, here is making an external plain link using the word ‘Castle’ with the plural form ‘s’ immediately after the braces:


 * s

…which does not make the plural form at the end (i.e. the ‘s’) display as part of the link.

Whereas a standard internal ‘bracketed’ link using the word ‘Castle’ with the plural form ‘s’ immediately after the brackets does:


 * Castles

Hopefully there is a way to make this work.

— Lestatdelc (talk) 08:37, 18 February 2022 (UTC)