Content deleted Content added
ChandlerMap (talk | contribs) m +interwiki:ko --- ko:틀:죽은 바깥 고리 |
Add commented out sample code, noted how to use </ref> |
||
Line 3: | Line 3: | ||
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE --> |
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE --> |
||
Use {{tl|dead link}} when you find a dead external link within a paragraph or a reference citation. Append this template ''after'' the link, leaving the original link intact. |
Use {{tl|dead link}} when you find a dead external link within a paragraph or a reference citation. Append this template ''after'' the link, leaving the original link intact. The template needs to be place directly after the external link or citation template. Not doing so will prevent automated tools from detecting which link is dead. If desired <code></ref></code> could be place in-between so the template appears in the body of the text.<!-- |
||
<source lang="python"> |
|||
# Convert templates containing parameters url=, archiveurl=, and title= to [http://url title] |
|||
# This is language dependent |
|||
# {{template | archiveurl= ... | title= ... }} → [http://archiveurl «archiveurl» title] |
|||
text = re.sub( |
|||
ur'(?is)\{\{[^}]*?\|\s*archiveurl\s*=\s*([^|}\s]*)[^}]*?\|\s*title\s*=\s*([^\n{|}]*)[^}]*?\}\}', |
|||
ur"[\1 «archiveurl» \2]", |
|||
text) |
|||
text = re.compile( |
|||
ur'(?is)\{\{[^}]*?\|\s*title\s*=\s*([^\n{|}]*)[^}]*?\|\s*archiveurl\s*=\s*([^|}\s]*)[^}]*?\}\}', |
|||
ur"[\2 «archiveurl» \1]", |
|||
text) |
|||
# {{template | url= ... | title= ... }} → [http://url title] |
|||
text = re.compile(ur'(?is)(\{\{[^}]*?)\|\s*url\s*=\s*([^|}\s]*)([^}]*?)\|\s*title\s*=\s*([^\n{|}]*)([^}]*?\}\})', |
|||
ur'\1\3\5 [\2 \4]', |
|||
text) |
|||
text = re.compile(ur'(?is)(\{\{[^}]*?)\|\s*title\s*=\s*([^\n{|}]*)([^}]*?)\|\s*url\s*=\s*([^|}\s]*)([^}]*?\}\})', |
|||
ur'\1\3\5 [\4 \2]', |
|||
text) |
|||
</source> |
|||
Regex for matching dead links |
|||
[(?P<url>\w+://[^[\]<>"\s]+) *(?P<title> [^]]+)\]\s*(</ref>\s*)?\{\{Dead link[^}]*\}\} |
|||
--> |
|||
== Parameters == |
== Parameters == |
||
Line 30: | Line 58: | ||
| {{cite web|url=http://example.org|title=title}}{{dead link|url=http://example.org/|date={{CURRENTMONTHNAME}} {{CURRENTYEAR}}}} |
| {{cite web|url=http://example.org|title=title}}{{dead link|url=http://example.org/|date={{CURRENTMONTHNAME}} {{CURRENTYEAR}}}} |
||
|} |
|} |
||
==Redirects== |
==Redirects== |
||
<!-- regex |
<!-- regex [Dd]ead[ _]+link|[Dd]l|[Dd]eadlink|[Cc]leanup-link|[Dd]l-s|404|[Bb]roken[ _]+link|[Bb]rokenlink --> |
||
<!-- simple Dead[ _]*link|Dl|404|Broken[ _]+link --> |
|||
⚫ | |||
#{{Tl|Deadlink}} |
#{{Tl|Deadlink}} |
||
⚫ | |||
⚫ | |||
#{{Tl|404}} |
#{{Tl|404}} |
||
#{{Tl|Broken link}} |
#{{Tl|Broken link}} |
||
#{{T1|Brokenlink}} |
#{{T1|Brokenlink}} |
||
<!-- |
|||
;Deprecated |
|||
⚫ | |||
⚫ | |||
⚫ | |||
--> |
|||
== Tools == |
|||
* [[User:Dispenser/Link checker]] — Designed for the management links, support add/remove tag and fixing dead link. |
|||
* [[User:DumZiBoT/refLinks]] — Support of automatically tagging links if it is found in a dead link file. |
|||
==See also== |
==See also== |
||
* [[Wikipedia:Dead external links]] |
* [[Wikipedia:Dead external links]] |
||
* [[WP:DEADREF]] |
* [[WP:DEADREF]] |
||
* [[:Category:Articles with dead external links]] |
|||
<includeonly><!-- CATEGORIES AND INTERWIKIS HERE, THANKS --> |
<includeonly><!-- CATEGORIES AND INTERWIKIS HERE, THANKS --> |
Revision as of 17:37, 15 June 2008
Use {{dead link}} when you find a dead external link within a paragraph or a reference citation. Append this template after the link, leaving the original link intact. The template needs to be place directly after the external link or citation template. Not doing so will prevent automated tools from detecting which link is dead. If desired </ref>
could be place in-between so the template appears in the body of the text.
Parameters
- url (optional)
- 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.
- date (optional)
- Given in month name followed by year for use by the categorization system. Use
{{subst:DATE}}
which yieldsdate=May 2024
. If not set it will be filled in by a bot.
Examples
Dead external links:
[http://example.org/ title] {{cite web|url=http://example.org|title=title}}
Replaced with:
[http://example.org/ title]{{dead link}} {{cite web|url=http://example.org|title=title}}{{dead link|url=http://example.org/|date=May 2024}}
Produces:
title[dead link] |
"title".[dead link] |
Redirects
- {{Deadlink}}
- {{404}}
- {{Broken link}}
- {{Brokenlink}}
Tools
- User:Dispenser/Link checker — Designed for the management links, support add/remove tag and fixing dead link.
- User:DumZiBoT/refLinks — Support of automatically tagging links if it is found in a dead link file.
See also