Difference between revisions of "Template:Delmon/doc"
Jump to navigation
Jump to search
imported>Swpb (→Usage) |
imported>Swpb |
||
| Line 13: | Line 13: | ||
{{tocright}} | {{tocright}} | ||
===Parameters=== | ===Parameters=== | ||
| − | The template may be used with all | + | The template may be used with all parameters empty, useful for when article titles will be inserted later. |
{| | {| | ||
| Line 23: | Line 23: | ||
{| class="wikitable" style="max-width: 1100px" | {| class="wikitable" style="max-width: 1100px" | ||
| − | ! | + | ! Parameter !! width="12%" | Value !! Required? !! width="20%" | Use !! 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 | ||
Revision as of 13:47, 25 May 2017
| This is a documentation subpage for Template:Delmon. It contains usage information, categories and other content that is not part of the original template page. |
| File:Ambox warning yellow.svg | This template employs intricate features of template syntax.
You are encouraged to familiarise yourself with its setup and parser functions before editing the template. If your edit causes unexpected problems, please undo it quickly, as this template may appear on a large number of pages. You can conduct experiments, and should test all major changes, in either this template's sandbox, the general template sandbox, or your user space before changing anything here. |
This template (short for deletion monitor) monitors articles that have been proposed or nominated for deletion. It shows at a glance:
- Whether the 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
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> | linkfor=<value> | nocheck }}
|
| Parameter | Value | Required? | Use | 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 | Allows: 1) Linking of recent entries 2) Independent tracking of PROD expiration |
Copy from the substituted deletion tag, or insert with {{subst:CURRENTTIMESTAMP}} 1) Template will only link to nonexistent/redirect pages if they were tagged recently, to reduce the number of expensive function calls 2) If timestamp is absent or invalid, template looks for text indicating that prod has expired |
| linkfor | numeric | Optional | Number of days for which deleted or redirected pages will remain linked | Default is 60 days |
| 3 | "nocheck" | Optional | Disables check of most recent page editor | Must be third unnamed argument |
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) |
| del tag removed! | 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 |
Example output
In this example of typical use, {{delmon}} is called multiple times, to monitor several articles at once. In this way, several hundred articles can be monitored at a glance:
■■R■■■R■■R■ Made up article 1AfD • R■■ Made up article 2overdue • ■ Made up article 3del tag removed! • Made up article 4(ed) • Made up article 5 • Made up article 6prev nom!
Logical flow
The template performs a branching series of conditional checks to determine page status, as shown in the adjacent flowchart:
- If page does not exist:
- A "■" marker is shown
- Template:Tree list/final branch If timestamp is valid and less than [linkfor] days old, the marker is linked to the page
- If page is a redirect:
- An "R" marker is shown
- Template:Tree list/final branch If timestamp is valid and less than [linkfor] days old, the marker is linked to the page
- If page exists and is not a redirect:
- A link to the page is shown
- If no prod or CSD template is present:
- If the page is tagged with an AfD template, AfD is shown, linked to the latest AfD
- Template:Tree list/final branch Otherwise, del tag removed! is shown
- 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