Difference between revisions of "Template:Delmon/doc"

From blackwiki
Jump to navigation Jump to search
imported>Swpb
imported>Swpb
 
(13 intermediate revisions by the same user not shown)
Line 2: Line 2:
  
 
{{intricate template}}
 
{{intricate template}}
 
+
'''Delmon''' (short for '''deletion monitor''') is used to monitor articles that have been proposed or nominated for deletion. It shows at a glance:
This template (short for '''deletion monitor''') monitors articles that have been proposed or nominated for deletion. It shows at a glance:
+
*Whether a particular page <u>exists</u>, and whether it is a <u>redirect</u>
*Whether the page <u>exists</u>, and whether it is a <u>redirect</u>
 
 
**Pages which do not exist, or are redirects, are indicated with a small marker ('''■''' or <small>'''R'''</small> respectively).  
 
**Pages which do not exist, or are redirects, are indicated with a small marker ('''■''' or <small>'''R'''</small> respectively).  
 
*For pages that exist and are ''not'' redirects:
 
*For pages that exist and are ''not'' redirects:
Line 10: Line 9:
 
**Whether the page has been <u>edited</u> since being tagged for deletion
 
**Whether the page has been <u>edited</u> since being tagged for deletion
 
**Whether the page has an <u>expired prod</u> and may be deleted
 
**Whether the page has an <u>expired prod</u> and may be deleted
 +
 +
===Example use===
 +
{{tl|Delmon}} called repeatedly to monitor several pages at a glance:
 +
 +
<div style="background: white; border:1px solid black;">
 +
'''■■<small>R</small>■■■<small>R</small>■■[[redlink|<small>R</small>]][[redlink|■]]''' [[WP:TEST|Made up article 1]]<sup>'''[[WP:TEST|AfD]]'''</sup> • '''[[redlink|<small>R</small>]][[redlink|■]][[redlink|■]]''' [[WP:TEST|Made up article 2]]<sup>'''overdue'''</sup> • '''[[redlink|■]]''' [[WP:TEST|Made up article 3]]<span style="color:red;"><sup>'''recreated/untagged'''</sup></span> • [[WP:TEST|Made up article 4]]<sup>'''[https://en.wikipedia.org/w/index.php?title=made_up_article_4&action=history (ed)]'''</sup> • [[WP:TEST|Made up article 5]] • [[WP:TEST|Made up article 6]]<span style="color:red;"><sup>'''prev nom!'''</sup></span>
 +
</div>
  
 
{{tocright}}
 
{{tocright}}
===Usage===
+
===Parameters===
The template may be used with all arguments empty, useful for when article titles will be inserted later.
+
The template may be used with all parameters empty, useful for when article titles will be inserted later.
  
 
{|
 
{|
Line 19: Line 25:
 
| Typical: || <code><nowiki>{{delmon | <article> | <timestamp of deletion tag> }}</nowiki></code>
 
| Typical: || <code><nowiki>{{delmon | <article> | <timestamp of deletion tag> }}</nowiki></code>
 
|-
 
|-
| Full: || <code><nowiki>{{delmon | <article> | <timestamp of deletion tag> | linkfor=<value> | nocheck }}</nowiki></code>
+
| Full: || <code><nowiki>{{delmon | <article> | <timestamp of deletion tag> | nocheck | linkfor=<value> }}</nowiki></code>
 
|}
 
|}
  
 
{| class="wikitable" style="max-width: 1100px"
 
{| class="wikitable" style="max-width: 1100px"
! Argument !! width="12%" | Value !! Required? !! width="20%" | Use !! Notes
+
! Parameter !! width="25%" | Value !! Required? !! Notes
 
|-
 
|-
| style="text-align: center;" | '''1''' || page title || style="text-align: center;" | '''Optional''' || Article to be tracked || If no argument is given, template will show nothing rather than giving an error
+
| style="text-align: center;" | '''1''' || page title || style="text-align: center;" | '''Optional''' || Article to be tracked (If no argument is given, template will show nothing rather than giving an error)
 
|-
 
|-
| style="text-align: center;" | '''2''' || timestamp of deletion tag || style="text-align: center;" | '''Optional''' || Allows:<br/>1) Linking of recent entries<br/>2) Independent tracking of PROD expiration || '''Copy from the substituted deletion tag, or insert with <nowiki>{{subst:CURRENTTIMESTAMP}}</nowiki>'''<br/>1) Template will only link to nonexistent/redirect pages if they were tagged recently, to reduce the number of expensive function calls<br/>2) If timestamp is absent or invalid, template looks for text indicating that prod has expired
+
| style="text-align: center;" | '''2''' || timestamp of deletion tag || style="text-align: center;" | '''Optional''' || '''Copy from the substituted deletion tag, or insert with <nowiki>{{subst:CURRENTTIMESTAMP}}</nowiki>'''<br/>(Allows recently tagged pages to be linked)
 
|-
 
|-
| style="text-align: center;" | '''linkfor''' || numeric || style="text-align: center;" | '''Optional''' || Number of days for which deleted or redirected pages will remain linked || Default is 60 days
+
| style="text-align: center;" | '''3''' || "nocheck" || style="text-align: center;" | '''Optional''' || Disables check of most recent page editor; must be third unnamed argument
 
|-
 
|-
| style="text-align: center;" | '''3''' || "nocheck" || style="text-align: center;" | '''Optional''' || Disables check of most recent page editor || Must be third unnamed argument
+
| style="text-align: center;" | '''linkfor''' || Number of days for which deleted or redirected pages are linked || style="text-align: center;" | '''Optional''' || Default is 60 days
 
|}
 
|}
  
Line 46: Line 52:
 
| colspan=2 | '''''Tags for existing pages''''':
 
| colspan=2 | '''''Tags for existing pages''''':
 
|-
 
|-
| <sup>'''AfD'''</sup> || Page has an AfD tag (links to latest AfD)
+
| <sup>'''AfD'''</sup> || Page has an AfD tag (links to latest AfD using {{tl|LatestAfD}})
 
|-
 
|-
| <span style="color:red;"><sup>'''del tag removed!'''</sup></span> || No prod, AfD, or CSD tag is present on the page
+
| <span style="color:red;"><sup>'''recreated/untagged'''</sup></span> || No prod, AfD, or CSD tag is present on the page
 
|-
 
|-
 
| <span style="color:red;"><sup>'''prev nom!'''</sup></span> || Page has been to AfD previously; prod cannot be used to delete it
 
| <span style="color:red;"><sup>'''prev nom!'''</sup></span> || Page has been to AfD previously; prod cannot be used to delete it
Line 56: Line 62:
 
| <sup>'''overdue'''</sup> || Page has been prod tagged for over seven days, and may be deleted
 
| <sup>'''overdue'''</sup> || Page has been prod tagged for over seven days, and may be deleted
 
|}
 
|}
 
====Example output====
 
In this example of typical use, {{tl|delmon}} is called multiple times, to monitor several articles at once. In this way, several hundred articles can be monitored at a glance:
 
 
<div style="background: white; border:1px solid black;">
 
'''■■<small>R</small>■■■<small>R</small>■■[[redlink|<small>R</small>]][[redlink|■]]''' [[WP:TEST|Made up article 1]]<sup>'''[[WP:TEST|AfD]]'''</sup> • '''[[redlink|<small>R</small>]][[redlink|■]][[redlink|■]]''' [[WP:TEST|Made up article 2]]<sup>'''overdue'''</sup> • '''[[redlink|■]]''' [[WP:TEST|Made up article 3]]<span style="color:red;"><sup>'''del tag removed!'''</sup></span> • [[WP:TEST|Made up article 4]]<sup>'''[https://en.wikipedia.org/w/index.php?title=made_up_article_4&action=history (ed)]'''</sup> • [[WP:TEST|Made up article 5]] • [[WP:TEST|Made up article 6]]<span style="color:red;"><sup>'''prev nom!'''</sup></span>
 
</div>
 
  
 
===Logical flow===
 
===Logical flow===
Line 80: Line 79:
 
** '''If no prod or CSD template is present:'''
 
** '''If no prod or CSD template is present:'''
 
***If the page is tagged with an AfD template, <sup>'''AfD'''</sup> is shown, linked to the latest AfD
 
***If the page is tagged with an AfD template, <sup>'''AfD'''</sup> is shown, linked to the latest AfD
***{{Tree list/final branch}} Otherwise, <span style="color:red;"><sup>'''del tag removed!'''</sup></span> is shown
+
***{{Tree list/final branch}} Otherwise, <span style="color:red;"><sup>'''recreated/untagged'''</sup></span> is shown
 
**{{Tree list/final branch}} '''If the page is tagged with a prod or CSD template:'''
 
**{{Tree list/final branch}} '''If the page is tagged with a prod or CSD template:'''
 
***If page has been to AfD before, <span style="color:red;"><sup>'''prev nom!'''</sup></span> is shown, indicating that proposed deletion is not allowed
 
***If page has been to AfD before, <span style="color:red;"><sup>'''prev nom!'''</sup></span> is shown, indicating that proposed deletion is not allowed

Latest revision as of 19:46, 19 December 2018

Delmon (short for deletion monitor) is used to monitor articles that have been proposed or nominated for deletion. It shows at a glance:

  • Whether a particular page exists, and whether it is a redirect
    • Pages which do not exist, or are redirects, are indicated with a small marker ( or R respectively).
  • For pages that exist and are not redirects:
    • Whether the page is tagged for AfD, proposed deletion, or speedy deletion
    • Whether the page has been edited since being tagged for deletion
    • Whether the page has an expired prod and may be deleted

Example use

{{Delmon}} called repeatedly to monitor several pages at a glance:

■■R■■■R■■R Made up article 1AfDR Made up article 2overdue Made up article 3recreated/untaggedMade up article 4(ed)Made up article 5Made up article 6prev nom!

Template:Tocright

Parameters

The template may be used with all parameters empty, useful for when article titles will be inserted later.

Typical: {{delmon | <article> | <timestamp of deletion tag> }}
Full: {{delmon | <article> | <timestamp of deletion tag> | nocheck | linkfor=<value> }}
Parameter Value Required? Notes
1 page title Optional Article to be tracked (If no argument is given, template will show nothing rather than giving an error)
2 timestamp of deletion tag Optional Copy from the substituted deletion tag, or insert with {{subst:CURRENTTIMESTAMP}}
(Allows recently tagged pages to be linked)
3 "nocheck" Optional Disables check of most recent page editor; must be third unnamed argument
linkfor Number of days for which deleted or redirected pages are linked Optional Default is 60 days

Outputs

Output Meaning
Page does not exist (links to page if tagged less than [linkfor] days ago)
R Page is a redirect (links to page if tagged less than [linkfor] days ago)
[Page title] Page exists and is not a redirect
Tags for existing pages:
AfD Page has an AfD tag (links to latest AfD using {{LatestAfD}})
recreated/untagged No prod, AfD, or CSD tag is present on the page
prev nom! Page has been to AfD previously; prod cannot be used to delete it
(ed) Most recent page editor differs from that of the page where this template is deployed (links to article history) (disable with "nocheck")
overdue Page has been prod tagged for over seven days, and may be deleted

Logical flow

The template performs a branching series of conditional checks to determine page status, as shown in the adjacent flowchart:

Template:Tree list

  • If page does not exist:
  • If page is a redirect:
  • If page exists and is not a redirect:
    • A link to the page is shown
    • If no prod or CSD template is present:
    • Template:Tree list/final branch If the page is tagged with a prod or CSD template:
      • If page has been to AfD before, prev nom! is shown, indicating that proposed deletion is not allowed
      • Template:Tree list/final branch Otherwise:
        • If the most recent editor differs from that of the page where this template is deployed, (ed) is shown ("nocheck" argument disables this)
        • Template:Tree list/final branch If timestamp is valid and greater than 7 days old, or text indicating expired prod is present, overdue is shown

Template:Tree list/end