Difference between revisions of "Template:Update/doc"

From Warwick Student Cinema
Jump to: navigation, search
 
Line 1: Line 1:
 
{{Documentation subpage}}
 
{{Documentation subpage}}
  +
{{High-use| 18908 }}
<!-- Categories go at the bottom of this page and interwikis go in Wikidata. -->
 
  +
{{Twinkle standard installation}}
  +
{{Lua|Module:Unsubst}}
  +
<!-- EDIT TEMPLATE DOCUMENTATION BELOW THIS LINE -->
  +
==Usage==
  +
This template can be used to mark articles or sections with old or out-of-date information.
   
  +
* To specify what parts of the page need updating, use the first unnamed parameter (or name it {{para|part}} or number it {{para|1}}): {{tlc|{{BASEPAGENAME}}|part{{=}}the later-life and death material and the <nowiki>[[#Legacy|Legacy]]</nowiki> section|date{{=}}{{CURRENTMONTHNAME}} {{CURRENTYEAR}}}}
== Usage ==
 
  +
* To use the template in one specific section, and change its wording to refer to the section instead of the page, use {{para||section}} and insert the template at the top of the section: {{tlc|{{BASEPAGENAME}}|section|date{{=}}{{CURRENTMONTHNAME}} {{CURRENTYEAR}}}}
Use TNT:
 
  +
* To display the date (in whatever format) of the last significant update to the page, use the second unnamed parameter (or name it {{para|updated}} or number it {{para|2}}): {{tlc|{{BASEPAGENAME}}|updated{{=}}{{#time:j F Y|-1 month}}|date{{=}}{{CURRENTMONTHNAME}} {{CURRENTYEAR}}}}
* <code><nowiki>{{TNT|Update}}</nowiki></code>
 
  +
*: Note: The parameter name or number must be used if the first numbered/unnamed parameter is not used.
  +
* To add the date when the tag was added (this is used for cleanup categorization), use: {{tlc|{{BASEPAGENAME}}|date{{=}}{{CURRENTMONTHNAME}} {{CURRENTYEAR}}}}
  +
*: You can also do: {{tlc|{{BASEPAGENAME}}|{{tls|DATE}}}}
  +
* To explain that the article now has inaccuracies (not just missing information) due to being outdated, use {{para|inaccurate|yes}}: {{tlc|{{BASEPAGENAME}}|inaccurate{{=}}yes|date{{=}}{{CURRENTMONTHNAME}} {{CURRENTYEAR}}}}
  +
* To link to a particular section of the talk page where the update is being discussed, use {{para|talk|{{var|Section title}}}} ({{para|talksection}} and {{para|discuss}} are equivalent to {{para|talk}}): {{tlc|{{BASEPAGENAME}}|talk{{=}}Shall we update this for {{CURRENTYEAR}}?|date{{=}}{{CURRENTMONTHNAME}} {{CURRENTYEAR}}}}
  +
* To display a reason (after the added phrase "In particular{{colon}}"), use {{para|reason|{{var|a short comment here}}}}, e.g. {{tlc|{{BASEPAGENAME}}|reason{{=}}Is missing the {{CURRENTMONTHNAME}} {{CURRENTYEAR}} election results|date{{=}}{{CURRENTMONTHNAME}} {{CURRENTYEAR}}}}
  +
* These parameters can be combined, of course: {{tnull|{{BASEPAGENAME}}|part{{=}}The <nowiki>[[#Production|Production]]</nowiki> section and follow-on material|reason{{=}}the film is released, so this needs a "Critical reception" section, too|inaccurate{{=}}yes|talk{{=}}Post-release updating|updated{{=}}{{#time:F Y|-3 month}}|date{{=}}{{CURRENTMONTHNAME}} {{CURRENTYEAR}}}}
   
== See also ==
+
==Example==
  +
{{tlc|{{BASEPAGENAME}}|documentation|date{{=}}{{CURRENTMONTHNAME}} {{CURRENTYEAR}}}}
* {{tl|historical}}
 
  +
{{{{BASEPAGENAME}}|documentation}}
* {{tl|outdated}}
 
   
  +
The template detects which [[Wikipedia:Namespace|namespace]] it is used in and changes accordingly:
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox||
 
  +
{| class="wikitable"
<!-- Categories go here and interwikis go in Wikidata. -->
 
  +
! Article
  +
| {{{{BASEPAGENAME}}|type=article|demospace=main|date={{CURRENTMONTHNAME}} {{CURRENTYEAR}}}}
  +
|-
  +
! Category
  +
| {{{{BASEPAGENAME}}|type=category|demospace=category|date={{CURRENTMONTHNAME}} {{CURRENTYEAR}}}}
  +
|-
  +
! Template
  +
| {{{{BASEPAGENAME}}|type=template|demospace=template|date={{CURRENTMONTHNAME}} {{CURRENTYEAR}}}}
  +
|}
   
  +
{{tlc|{{BASEPAGENAME}}|section}} produces:
  +
{| class="wikitable"
  +
! Article
  +
| {{{{BASEPAGENAME}}|section|type=article|demospace=main|date={{CURRENTMONTHNAME}} {{CURRENTYEAR}}}}
  +
|-
  +
! Category
  +
| {{{{BASEPAGENAME}}|section|type=category|demospace=category|date={{CURRENTMONTHNAME}} {{CURRENTYEAR}}}}
  +
|-
  +
! Template
  +
| {{{{BASEPAGENAME}}|section|type=template|demospace=template|date={{CURRENTMONTHNAME}} {{CURRENTYEAR}}}}
  +
|}
  +
  +
This template will add [[WP:mainspace|mainspace]] articles to [[:Category:Wikipedia articles in need of updating]] (this category is not populated by pages in other [[WP:namespace|namespace]]s).
  +
  +
For factual inaccuracies, stronger wording is used and mainspace articles will be added to [[:Category:Articles with obsolete information]].
  +
  +
{{tlc|{{BASEPAGENAME}}|2=inaccurate=yes}}
  +
{{{{BASEPAGENAME}}|type=article|demospace=main|inaccurate=yes}}
  +
  +
==TemplateData==
  +
{{TemplateDataHeader}}
  +
<templatedata>
  +
{
  +
"description": "Use this tag to alert readers that the article is out of date and may need updating.",
  +
"params": {
  +
"date": {
  +
"label": "Month and year",
  +
"description": "Provides the month and year of the citation request; e.g., 'January 2018', but not 'jan18'",
  +
"type": "string",
  +
"required": false,
  +
"autovalue": "{{subst:CURRENTMONTHNAME}} {{subst:CURRENTYEAR}}",
  +
"suggested": true
  +
},
  +
"updated": {
  +
"aliases": [
  +
"2"
  +
],
  +
"label": "Last updated",
  +
"description": "Date of last significant update",
  +
"type": "date"
  +
},
  +
"inaccurate": {
  +
"label": "Inaccurate?",
  +
"description": "Use 'yes' if the article has inaccuracies due to being out of date.",
  +
"example": "yes",
  +
"type": "boolean"
  +
},
  +
"talksection": {
  +
"aliases": [
  +
"discuss",
  +
"talk"
  +
],
  +
"label": "Talk page section",
  +
"description": "Section name on talk page where the discussion takes place",
  +
"type": "string"
  +
},
  +
"reason": {
  +
"label": "Reason",
  +
"description": "Explanation why the article is out of date",
  +
"type": "content",
  +
"suggested": true
  +
},
  +
"type": {
  +
"aliases": [
  +
"part",
  +
"1"
  +
],
  +
"label": "Type (section)",
  +
"description": "Part that needs updating (e.g. to replace the word \"article\", often \"section\")",
  +
"example": "section",
  +
"type": "string",
  +
"default": "article",
  +
"autovalue": "",
  +
"suggested": true
  +
}
  +
},
  +
"format": "inline",
  +
"paramOrder": [
  +
"type",
  +
"date",
  +
"updated",
  +
"inaccurate",
  +
"talksection",
  +
"reason"
  +
]
  +
}
  +
</templatedata>
  +
  +
==Alternatives==
  +
* {{tl|Update after}} is an alternative for individual statements that will be out-of-date at a specifiable future date. It is a more recent and preferred alternative to [[Wikipedia:As of]]. It also adds articles to [[:Category:Wikipedia articles in need of updating]].
  +
* See [[Wikipedia:Template messages/Cleanup#Time-sensitive]] for alternatives unrelated to out-of-date information.
  +
  +
==See also==
  +
* {{tl|As of}}
  +
* {{tl|Current}}
  +
* {{tl|Recentism}}
  +
* {{tl|Show by date}}/{{tls|Show by}}
  +
* {{tl|Time-context}}
  +
* {{tl|Update inline}}
  +
* {{tl|Updated}}
  +
* {{tl|When}}
  +
* {{tl|Missing information}}
  +
  +
<includeonly>{{sandbox other||
  +
<!-- ADD CATEGORIES BELOW THIS LINE -->
  +
[[Category:Cleanup templates]]
  +
[[Category:Dispute templates]]
  +
[[Category:Temporal templates]]
  +
[[Category:Time and date maintenance templates]]
  +
[[Category:Templates needing talk links and other improvements]]
 
}}</includeonly>
 
}}</includeonly>

Revision as of 23:12, 2 December 2018

Usage

This template can be used to mark articles or sections with old or out-of-date information.

  • To specify what parts of the page need updating, use the first unnamed parameter (or name it |part= or number it |1=): {{Update|part=the later-life and death material and the [[#Legacy|Legacy]] section|date=November 2024}}
  • To use the template in one specific section, and change its wording to refer to the section instead of the page, use |section and insert the template at the top of the section: {{Update|section|date=November 2024}}
  • To display the date (in whatever format) of the last significant update to the page, use the second unnamed parameter (or name it |updated= or number it |2=): {{Update|updated=22 October 2024|date=November 2024}}
    Note: The parameter name or number must be used if the first numbered/unnamed parameter is not used.
  • To add the date when the tag was added (this is used for cleanup categorization), use: {{Update|date=November 2024}}
    You can also do: {{Update|{{subst:DATE}}}}
  • To explain that the article now has inaccuracies (not just missing information) due to being outdated, use |inaccurate=yes: {{Update|inaccurate=yes|date=November 2024}}
  • To link to a particular section of the talk page where the update is being discussed, use |talk=Section title (|talksection= and |discuss= are equivalent to |talk=): {{Update|talk=Shall we update this for 2024?|date=November 2024}}
  • To display a reason (after the added phrase "In particular:"), use |reason=a short comment here, e.g. {{Update|reason=Is missing the November 2024 election results|date=November 2024}}
  • These parameters can be combined, of course: {{Update|part=The [[#Production|Production]] section and follow-on material|reason=the film is released, so this needs a "Critical reception" section, too|inaccurate=yes|talk=Post-release updating|updated=August 2024|date=November 2024}}

Example

{{Update|documentation|date=November 2024}}

The template detects which namespace it is used in and changes accordingly:

Article
Category
Template

{{Update|section}} produces:

Article
Category
Template

This template will add mainspace articles to Category:Wikipedia articles in need of updating (this category is not populated by pages in other namespaces).

For factual inaccuracies, stronger wording is used and mainspace articles will be added to Category:Articles with obsolete information.

{{Update|inaccurate=yes}}

TemplateData

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

TemplateData for Update

<templatedata> { "description": "Use this tag to alert readers that the article is out of date and may need updating.", "params": { "date": { "label": "Month and year", "description": "Provides the month and year of the citation request; e.g., 'January 2018', but not 'jan18'", "type": "string", "required": false, "autovalue": "{{subst:CURRENTMONTHNAME}} {{subst:CURRENTYEAR}}", "suggested": true }, "updated": { "aliases": [ "2" ], "label": "Last updated", "description": "Date of last significant update", "type": "date" }, "inaccurate": { "label": "Inaccurate?", "description": "Use 'yes' if the article has inaccuracies due to being out of date.", "example": "yes", "type": "boolean" }, "talksection": { "aliases": [ "discuss", "talk" ], "label": "Talk page section", "description": "Section name on talk page where the discussion takes place", "type": "string" }, "reason": { "label": "Reason", "description": "Explanation why the article is out of date", "type": "content", "suggested": true }, "type": { "aliases": [ "part", "1" ], "label": "Type (section)", "description": "Part that needs updating (e.g. to replace the word \"article\", often \"section\")", "example": "section", "type": "string", "default": "article", "autovalue": "", "suggested": true } }, "format": "inline", "paramOrder": [ "type", "date", "updated", "inaccurate", "talksection", "reason" ] } </templatedata>

Alternatives

See also