Difference between revisions of "Template:Dead link/doc"

From blackwiki
Jump to navigation Jump to search
imported>Newone
 
(195 intermediate revisions by more than 100 users not shown)
Line 1: Line 1:
 
{{Documentation subpage}}
 
{{Documentation subpage}}
<!- PESADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE -->
+
<noinclude>{{pp-semi|small=yes}}</noinclude>
<!--rediect regex: [Dd]ead[ _]+link|[Dd]l|[Dd]eadlink|[Cc]leanup-link|[Dd]l-s|404|[Bb]roken[ _]+link|[Bb]rokenlink -->
+
{{high-use| 270000 |all-pages=yes}}
{{Template shortcut|404|dl|Broken link}}
+
<!--Categories where indicated at the bottom of this page, please; interwikis at Wikidata (see [[Wikipedia:Wikidata]])-->
===Arkiv===
+
<!-- Redirect regex: [Dd]ead[ _]+link|[Dd]l|[Dd]eadlink|[Cc]leanup-link|[Dd]l-s|404|[Bb]roken[ _]+link|[Bb]rokenlink -->
 +
{{Template shortcut|404|dl|deadlink|dead|Broken link|broken}}
  
{{Arkiv}}
+
== Usage ==
 +
Editors occasionally encounter [[WP:Link rot|dead link]]s either within a paragraph or a [[WP:Citing sources |reference citation]].
  
 +
Before considering whether to use the {{tl|dead link}} template it is often useful to make a search for an [[Wikipedia:LR#Internet archives|archive copy]] of the dead link and thereby avoid using the tag altogether. All {{tl|cite}} templates have the facility for adding {{para|archive-date}} and {{para|archive-url}} parameters for linking to an archive copy. Non-{{tl|cite}} citations can use {{tl|webarchive}}.
  
==Usage==
+
Using {{Tl|Dead link}} will place a note by the URL and add the article to one of the [[:Category:Articles with dead external links]] categories.
Use {{T|Dad link}} when you find a [[WP:Linkrot|dead link]] to a website within a paragraph or a [[WP:CITE|reference citation]]. Doing so will place a note by the URL and add the article to one of the [[:Category:Articles with dead external links]] categories.
 
  
Append this template '''directly after''' the link or template, leaving the original link intact.  Not doing so will prevent detection from automated tools.  If the citation contains multiple URLs (e.g. chapterurl and url) in a template, and only one is broken, you can use <code><nowiki><!-- hidden text --></nowiki></code> to explain which one is broken.
+
Append this template '''directly after''' the link (after the link code's terminating <code>]</code> if you are using [[wikitext]]), or, if you are using a {{tl|cite}} template, '''directly after''' the {{tl|cite}} transclusion (not inside it), but inside the reference, if any, i.e. before the <code></ref></code>, in all cases leaving the original link intact:
  
If the article uses [[WP:Footnotes|clickable footnotes]], then this tag shoul''Italic text''d be placed just before the <code>&lt;/ref&gt;</code> that contains the dead link. The notice will then correctly appear in the reference section (instead of in the body of the text, which is not recommended).
+
: <code><nowiki><ref>{{cite web|url=http://www.example.org|title=The Example Website|access-date=22 September 2012}}</nowiki><span style="color:red"><nowiki>{{Dead link|date=</nowiki>{{CURRENTMONTHNAME}} {{CURRENTYEAR}}<nowiki>}}</nowiki></span><nowiki></ref></nowiki></code>
  
Avoid using this template to identify dead [[WP:External links]] that are ''not'' used as references for article content.  Instead, dead external links should normally be removed. See [[WP:EL#What_can_be_done_with_a_dead_external_link|the guideline for External links]].
+
Not doing so might hinder detection by automated tools. If the citation contains multiple URLs (e.g. chapterurl and url) in a template, and only one is broken, you can use <code><nowiki><!-- hidden text --></nowiki></code> to explain which one is broken.
 +
 
 +
If the article uses [[WP:Footnotes|clickable footnotes]], then this tag should be placed just before the <code>&lt;/ref&gt;</code> that contains the dead link. The notice will then correctly appear in the reference section instead of in the body of the text, and so [[WP:Link rot]] bots can properly find and fix the link.
 +
 
 +
Avoid using this template when the reference is fully adequate without the link. In this case, simply remove the link. For example, if a <code>{{tl|cite journal}}</code> template is used with a [[Digital object identifier|DOI]], remove the {{para|url}} parameter.
  
 
;Common form (with current date)
 
;Common form (with current date)
<tt>{&#123;Dead link|date={{CURRENTMONTHNAME}} {{CURRENTYEAR}}}}</tt>
+
{{Tlx|Dead link|date{{=}}{{CURRENTMONTHNAME}} {{CURRENTYEAR}}}}
  
===Optional parameters===
+
=== Optional parameters ===
;url: Provides a history of the linked page via [[Wayback Machine]]. Set '''only''' if history actually exists, as otherwise it is misleading to users and editors.
+
; <code>url</code>: Provides a history of the linked page via the [[Wayback Machine]]. Set '''only''' if history actually exists, as otherwise it is misleading to users and editors.
;date: Month name followed by year, for use by the categorization system.  Use <code>date={{CURRENTMONTHNAME}} {{CURRENTYEAR}}</code> <br/>If you don't add a date parameter, a bot will date your entry with the month and year at a later time.
+
; <code>date</code>: The date parameter consists of the full English name of the current month with initial capital, a space, and the year, not full dates; e.g., "January 2013", but not "jan13". ''Any deviation from these two rules will result in an "invalid date parameter" error''.
;bot: [[WP:BOTS|Bot accounts]] specify the |bot= parameter as a sign that the tag was added by an automated process. Set as <code>bot=<bot name></code>.
+
; <code>bot</code>: [[WP:Bots|Bot accounts]] specify the <code>|bot=</code> parameter as a sign that the tag was added by an automated process. Set as <code>bot=<bot name></code>.
 +
; <code>fix-attempted</code>: Set this to "yes" if you have tried unsuccessfully to find an archived copy, or a copy with a different URL. This will put the page in [[:Category:Articles with permanently dead external links]]. Note that a link that is not in the [[Internet Archive]] (Wayback machine) [[WP:DEADREF|can very often be found]], e.g. by a search for the full title, in quotes, on the original Web site or the Internet at large, if the Wayback machine fails.
  
==Examples==
+
'''Notes''':
*<code><nowiki><ref>{{Cite web
+
* The date-substitution template may be used to automatically generate the date, e.g., <code><nowiki>{{Dead link|{{subst:DATE}}}}</nowiki></code>. See [[Help:Substitution]] for more information.
|url=http://example.org
+
* The <code>date=</code> parameter need not be added by the editor: if not entered, a [[Wikipedia:Bots|bot]] will soon add it.
|title=title
+
 
|accessdate=2000-01-01
+
== Examples ==
}} {{dead link
+
* <code><nowiki><ref>{{cite web |url=http://www.example.org |title=Web page title |website=Example.com |access-date=22 September 2012}} {{Dead link |date=September 2012}}</ref></nowiki></code> <br />→ <span style="background:white"><ref>{{cite web |url=http://www.example.org |title=Web page title |website=Example.com |access-date=22 September 2012}} {{Dead link |date=September 2012}}</ref></span>
|date=April 2005
+
* <code><nowiki><ref>{{cite news |title=Sorrell accuses Murdoch of panic buying |author=Plunkett, John |url=http://media.guardian.co.uk/site/story/0,14173,1601858,00.html |newspaper=[[The Guardian]] |date=27 October 2005 |access-date=22 September 2012}} {{Dead link}}</ref></nowiki></code> <br />→ <span style="background:white"><ref>{{cite news |title=Sorrell accuses Murdoch of panic buying |author=Plunkett, John |url=http://media.guardian.co.uk/site/story/0,14173,1601858,00.html |newspaper=[[The Guardian]] |date=27 October 2005 |access-date=22 September 2012}} {{Dead link}}</ref></span>
}}</ref></nowiki></code><br/>→ <span style="background:white"><ref>{{Cite web
 
|url=http://example.org
 
|title=title
 
|accessdate=2000-01-01
 
}} {{Dead link
 
|date=April 2005
 
}}</ref></span>
 
*<code><nowiki><ref>Plunkett, John. [http://media.guardian.co.uk/site/story/0,14173,1601858,00.html "Sorrell accuses Murdoch of panic buying"],{{dead link}} ''The Guardian'', London, 27 October 2005. Retrieved 5 June 2008.</ref></nowiki></code><br/>→ <span style="background:white"><ref>Plunkett, John. [http://media.guardian.co.uk/site/story/0,14173,1601858,00.html "Sorrell accuses Murdoch of panic buying"],{{Dead link}} ''The Guardian'', London, 27 October 2005. Retrieved 5 June 2008.</ref></span>
 
  
 
<references />
 
<references />
  
===Caveats===
+
=== Caveats ===
* Avoid using free links (e.g. <code>http://example.org/{{dead link<nowiki />}}</code>) as software unable to handle templates may read an incorrect link. Add brackets if necessary.
+
* Avoid using free links (e.g. <code><nowiki>http://www.example.org/{{Dead link}}</nowiki></code>) as software unable to handle templates may read an incorrect link. Add brackets if necessary.
 
* Avoid complicated formatting. Nesting inside a template is generally not supported well.   
 
* Avoid complicated formatting. Nesting inside a template is generally not supported well.   
* Avoid using <tt>[ ] { | } < ></tt> character between the end of the external link and <nowiki>{{dead link}}</nowiki>, as they are often used to format text
+
* Avoid using <kbd>[ ] { | } < ></kbd> characters between the end of the external link and <nowiki>{{Dead link}}</nowiki>, as they are often used to format text.
  
==See also==
+
== TemplateData ==
* {{Tl|Dead links}} header
+
{{TemplateData header}}
* {{Tl|Cleanup-link rot}} header
+
<templatedata>
 +
{
 +
"description": "A template to indicate that the preceding URL is dead",
 +
"params": {
 +
"date": {
 +
"label": "Month and year",
 +
"description": "The month and year the URL was found to be dead, like \"June 2013\"",
 +
"type": "string",
 +
"autovalue": "{{subst:CURRENTMONTHNAME}} {{subst:CURRENTYEAR}}",
 +
"suggested": true
 +
},
 +
"bot": {
 +
"label": "Bot name",
 +
"description": "The name of the bot used to identify the dead link (not used by regular editors)",
 +
"type": "wiki-user-name"
 +
},
 +
"url": {
 +
"label": "Wayback URL",
 +
"description": "The dead URL, used only if there is a Wayback Machine archive",
 +
"type": "url"
 +
},
 +
"fix-attempted": {
 +
"label": "Fix attempted",
 +
"description": "Used to indicate that no archive copy is available",
 +
"type": "boolean",
 +
"example": "yes"
 +
}
 +
},
 +
"format": "inline"
 +
}
 +
</templatedata>
 +
 
 +
== See also ==
 +
* {{Tl|Full citation needed}} (inline) to be used when a reference suffers from a more severe problem than a mere [[HTTP 404|broken link]]
 +
* {{Tl|Citations broken}}
 +
* {{Tl|Cleanup bare URLs}} header
 +
* {{Tl|Closed access}} and {{Tl|Open access}} citation flags
 
* {{Tl|Registration required}} citation flag
 
* {{Tl|Registration required}} citation flag
 +
* {{Tl|Subscription or libraries}} citation flag for when a subscription or library access may be required
 
* {{Tl|Subscription required}} citation flag
 
* {{Tl|Subscription required}} citation flag
* {{Tl|Failed verification}} citation flag
+
* {{Tl|Webarchive}}
 
* [[WP:DEADREF|What to do when a reference link goes dead]]
 
* [[WP:DEADREF|What to do when a reference link goes dead]]
* {{Tl|Wayback}}
 
  
===Dead link tools===
+
=== Dead link tools ===
 
* [[User:Dispenser/Checklinks|Checklinks]]
 
* [[User:Dispenser/Checklinks|Checklinks]]
 
* [[User:DeadLinkBOT|DeadLinkBOT]]
 
* [[User:DeadLinkBOT|DeadLinkBOT]]
 
* [[User:WebCiteBOT|WebCiteBOT]]
 
* [[User:WebCiteBOT|WebCiteBOT]]
  
<includeonly><!-- CATEGORIES AND INTERWIKIS HERE, THANKS -->
+
{{Inline cleanup tags}}
 
 
[[Category:External link maintenance templates|{{PAGENAME}}]]
 
[[Category:External link templates|{{PAGENAME}}]]
 
[[Category:Inline cleanup templates|{{PAGENAME}}]]
 
  
[[ar:قالب:وصلة مكسورة]]
+
<includeonly>{{Sandbox other||
[[es:Plantilla:Enlace roto]]
+
<!--Categories below this line, please; interwikis at Wikidata-->
[[fa:الگو:پیوند مرده]]
+
[[Category:External link maintenance templates]]
[[fr:Modèle:Lien brisé]]
+
[[Category:Inline citation cleanup templates]]
[[hu:Sablon:Halott link]]
+
}}</includeonly>
[[id:Templat:Dead link]]
 
[[it:Template:Collegamento interrotto]]
 
[[lv:Template:Dead link]]
 
[[lt:Šablonas:Neveikianti nuoroda]]
 
[[ja:Template:リンク切れ]]
 
[[ka:თარგი:მკვდარი ბმული]]
 
[[ko:틀:죽은 바깥 고리]]
 
[[mk:Шаблон:Мртва врска]]
 
[[ms:Templat:dead link]]
 
[[pl:Szablon:Martwy link]]
 
[[pt:Predefinição:dead link]]
 
[[ru:Шаблон:Недоступная ссылка]]
 
[[simple:Template:dead link]]
 
[[fi:Malline:Vanhentunut linkki]]
 
[[sv:Mall:Dead link]]
 
[[tr:Şablon:Ölü bağlantı]]
 
</includeonly>
 

Latest revision as of 11:14, 11 November 2020

Template:Pp-semi

Usage

Editors occasionally encounter dead links either within a paragraph or a reference citation.

Before considering whether to use the {{dead link}} template it is often useful to make a search for an archive copy of the dead link and thereby avoid using the tag altogether. All {{cite}} templates have the facility for adding |archive-date= and |archive-url= parameters for linking to an archive copy. Non-{{cite}} citations can use {{webarchive}}.

Using {{Dead link}} will place a note by the URL and add the article to one of the Category:Articles with dead external links categories.

Append this template directly after the link (after the link code's terminating ] if you are using wikitext), or, if you are using a {{cite}} template, directly after the {{cite}} transclusion (not inside it), but inside the reference, if any, i.e. before the </ref>, in all cases leaving the original link intact:

<ref>{{cite web|url=http://www.example.org|title=The Example Website|access-date=22 September 2012}}{{Dead link|date=January 2026}}</ref>

Not doing so might hinder detection by automated tools. If the citation contains multiple URLs (e.g. chapterurl and url) in a template, and only one is broken, you can use <!-- hidden text --> to explain which one is broken.

If the article uses clickable footnotes, then this tag should be placed just before the </ref> that contains the dead link. The notice will then correctly appear in the reference section instead of in the body of the text, and so WP:Link rot bots can properly find and fix the link.

Avoid using this template when the reference is fully adequate without the link. In this case, simply remove the link. For example, if a {{cite journal}} template is used with a DOI, remove the |url= parameter.

Common form (with current date)

{{Dead link|date=January 2026}}

Optional parameters

url
Provides a history of the linked page via the Wayback Machine. Set only if history actually exists, as otherwise it is misleading to users and editors.
date
The date parameter consists of the full English name of the current month with initial capital, a space, and the year, not full dates; e.g., "January 2013", but not "jan13". Any deviation from these two rules will result in an "invalid date parameter" error.
bot
Bot accounts specify the |bot= parameter as a sign that the tag was added by an automated process. Set as bot=<bot name>.
fix-attempted
Set this to "yes" if you have tried unsuccessfully to find an archived copy, or a copy with a different URL. This will put the page in Category:Articles with permanently dead external links. Note that a link that is not in the Internet Archive (Wayback machine) can very often be found, e.g. by a search for the full title, in quotes, on the original Web site or the Internet at large, if the Wayback machine fails.

Notes:

  • The date-substitution template may be used to automatically generate the date, e.g., {{Dead link|{{subst:DATE}}}}. See Help:Substitution for more information.
  • The date= parameter need not be added by the editor: if not entered, a bot will soon add it.

Examples

  • <ref>{{cite web |url=http://www.example.org |title=Web page title |website=Example.com |access-date=22 September 2012}} {{Dead link |date=September 2012}}</ref>
    [1]
  • <ref>{{cite news |title=Sorrell accuses Murdoch of panic buying |author=Plunkett, John |url=http://media.guardian.co.uk/site/story/0,14173,1601858,00.html |newspaper=[[The Guardian]] |date=27 October 2005 |access-date=22 September 2012}} {{Dead link}}</ref>
    [2]
  1. "Web page title". Example.com. Retrieved 22 September 2012.[dead link]
  2. Plunkett, John (27 October 2005). "Sorrell accuses Murdoch of panic buying". The Guardian. Retrieved 22 September 2012.[dead link]

Caveats

  • Avoid using free links (e.g. http://www.example.org/{{Dead link}}) as software unable to handle templates may read an incorrect link. Add brackets if necessary.
  • Avoid complicated formatting. Nesting inside a template is generally not supported well.
  • Avoid using [ ] { | } < > characters between the end of the external link and {{Dead link}}, as they are often used to format text.

TemplateData

This is the TemplateData documentation for this template used by VisualEditor and other tools; see the monthly parameter usage report for this template.

TemplateData for Dead link

A template to indicate that the preceding URL is dead

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Month and yeardate

The month and year the URL was found to be dead, like "June 2013"

Auto value
{{subst:CURRENTMONTHNAME}} {{subst:CURRENTYEAR}}
Stringsuggested
Bot namebot

The name of the bot used to identify the dead link (not used by regular editors)

Useroptional
Wayback URLurl

The dead URL, used only if there is a Wayback Machine archive

URLoptional
Fix attemptedfix-attempted

Used to indicate that no archive copy is available

Example
yes
Booleanoptional

See also

Dead link tools