Difference between revisions of "Template:Bare URL inline/doc"

From blackwiki
Jump to navigation Jump to search
imported>Gonnym
(→‎See also: already in nav template)
imported>SMcCandlish
(update, about using it INSIDE the <ref>; better example formatting; don't imply that WP can be cited as a source (WP:CIRCULAR).)
Line 7: Line 7:
 
Paste this after a bare-URL reference/link:
 
Paste this after a bare-URL reference/link:
 
:{{Tlx|Bare URL inline|date{{=}}{{CURRENTMONTHNAME}} {{CURRENTYEAR}}}}
 
:{{Tlx|Bare URL inline|date{{=}}{{CURRENTMONTHNAME}} {{CURRENTYEAR}}}}
 +
Examples:
  
* [https://en.wikipedia.org]{{Tlx|bare URL inline|date{{=}}{{CURRENTMONTHNAME}} {{CURRENTYEAR}}}}
+
* <code><nowiki>[https://www.salon.com/2020/01/31/the-disaster-of-utopian-engineering_partner/]</nowiki>{{tlp|bare URL inline|date{{=}}{{CURRENTMONTHNAME}} {{CURRENTYEAR}}}}</code>
** '''Result:''' [https://en.wikipedia.org]{{bare URL inline}}
+
** '''Result:''' [https://www.salon.com/2020/01/31/the-disaster-of-utopian-engineering_partner/]{{bare URL inline}}
* https://en.wikipedia.org{{Tlx|bare URL inline|date{{=}}{{CURRENTMONTHNAME}} {{CURRENTYEAR}}}}
+
* <code><nowiki>https://www.salon.com/2020/01/31/the-disaster-of-utopian-engineering_partner/</nowiki>{{tlp|bare URL inline|date{{=}}{{CURRENTMONTHNAME}} {{CURRENTYEAR}}}}</code>
** '''Result:''' [https://en.wikipedia.org]{{bare URL inline}}
+
** '''Result:''' https://www.salon.com/2020/01/31/the-disaster-of-utopian-engineering_partner/{{bare URL inline}}
 +
**:This is obviously better changed to the format above this example, or put into a {{tlx|ref}} tag.
 +
 
 +
With a {{xtag|ref}} tag:
 +
* <code><nowiki><ref>https://www.salon.com/2020/01/31/the-disaster-of-utopian-engineering_partner/</ref></nowiki>{{tlp|bare URL inline|date{{=}}{{CURRENTMONTHNAME}} {{CURRENTYEAR}}}}</code>
 +
** '''Result:''' <ref>https://www.salon.com/2020/01/31/the-disaster-of-utopian-engineering_partner/</ref>{{bare URL inline}}
 +
{{talkref}}
 +
 
 +
It can also be done {{em|inside}} a citation, just before the closing {{xtag|ref|c}} tag:
 +
* <code><nowiki><ref>https://www.salon.com/2020/01/31/the-disaster-of-utopian-engineering_partner/</nowiki> {{tlp|bare URL inline|date{{=}}{{CURRENTMONTHNAME}} {{CURRENTYEAR}}}}<nowiki></ref></nowiki></code>
 +
** '''Result:''' <ref>https://www.salon.com/2020/01/31/the-disaster-of-utopian-engineering_partner/ {{bare URL inline}}</ref>
 +
{{talkref}}
 +
This will still categorize the page for cleanup without cluttering the present paragraph with "<sup>[bare URL]</sup>", and it will also help track down the citation to improve by keeping the cleanup tag in the citation.  When doing it this way, the date must be manually entered; it cannot be done with the <code><nowiki>{{Bare URL inline|{{subst:</nowiki>[[Template:DATE|DATE]]<nowiki>}}}}</nowiki></code> shortcut method, because [[WP:SUBST|template substitution]] does not work inside {{xtag|ref|p}} tags.
  
 
*This template places the article into both of the following categories:
 
*This template places the article into both of the following categories:
Line 18: Line 31:
  
 
=== See also ===
 
=== See also ===
* {{Tl|Cleanup bare URLs}}
+
* {{Tlx|Cleanup bare URLs}}
* {{Tl|Citations broken}}
+
* {{Tlx|Citations broken}}
 
* [[Wikipedia:Link rot]]
 
* [[Wikipedia:Link rot]]
 
* [[Wikipedia:Template messages/Cleanup]]
 
* [[Wikipedia:Template messages/Cleanup]]

Revision as of 00:34, 1 February 2020

This template is an inline alternative to {{Cleanup bare URLs}}.

Usage

Paste this after a bare-URL reference/link:

{{Bare URL inline|date=June 2026}}

Examples:

With a <ref> tag:

  • <ref>https://www.salon.com/2020/01/31/the-disaster-of-utopian-engineering_partner/</ref>{{bare URL inline|date=June 2026}}

Template:Talkref

It can also be done inside a citation, just before the closing </ref> tag:

  • <ref>https://www.salon.com/2020/01/31/the-disaster-of-utopian-engineering_partner/ {{bare URL inline|date=June 2026}}</ref>

Template:Talkref This will still categorize the page for cleanup without cluttering the present paragraph with "[bare URL]", and it will also help track down the citation to improve by keeping the cleanup tag in the citation. When doing it this way, the date must be manually entered; it cannot be done with the {{Bare URL inline|{{subst:DATE}}}} shortcut method, because template substitution does not work inside <ref>...</ref> tags.

See also