Template:Update after: Difference between revisions

From Vigyanwiki
Template>SMcCandlish
m (Cat. fixes.)
m (150 revisions imported from alpha:Template:Update_after)
 
(62 intermediate revisions by 32 users not shown)
Line 1: Line 1:
<includeonly><!--
{{SAFESUBST:<noinclude />#invoke:Unsubst||$B=<!--


   ##### param 1 is the year
   ##### param 1 is the year
Line 5: Line 5:
   ##### param 3 is the day of the month
   ##### param 3 is the day of the month
   ##### optional param 4 is the category
   ##### optional param 4 is the category
   ##### optional named parameter COMMENT= is ignored
   ##### optional named parameter reason= changes the tooltip text
  ##### optional named parameter BANNER=Y creates a banner message instead of an inline message


--><!--
-->{{#ifexpr: {{JULIANDAY| {{CURRENTYEAR}} | {{CURRENTMONTH}} | {{CURRENTDAY}} }}  >
  ##### The next line is the tooltip #####
   {{JULIANDAY| {{{1|{{CURRENTYEAR}}-1}}} | {{{2|{{CURRENTMONTH}}}}} | {{{3|{{CURRENTDAY}}}}} + {{{delay|0}}} }}  
--><sup title="The text in the vicinity of this tag needs to be updated on [[{{{1}}}-{{{2}}}-{{{3}}}]]." <!--
|{{update inline span
  ##### The next line causes the message to not appear when printed #####
  |date={{#if:{{{1|}}}|{{#if:{{{2|}}}|{{MONTHNAME|{{{2}}}}}|January}} {{{1}}}}}
-->class="noprint"><!--
  |text = {{{text|}}}
  ##### Next line shows up on day pages  #####
   |reason={{{reason|The text near this tag is dated.}}}
-->[[Wikipedia:Updating information/{{{1}}}/{{{2}}}/{{{3}}}|<s />]]<!--
}}{{#if:{{{4|}}}|{{main other|[[Category:{{{4}}}]]}}}}|{{{text|}}}{{main other|[[Category:Wikipedia articles scheduled for update tagging]]}}
  ##### Next line shows up on month pages #####
  }}}}{{#invoke:Check for unknown parameters|check|unknown={{main other|[[Category:Pages using update after template with unknown parameters|_VALUE_{{PAGENAME}}]]}}|preview=Page using [[Template:Update after]] with unknown parameter "_VALUE_"|ignoreblank=y| 1 | 2 | 3 | 4 | delay | reason | text }}<noinclude>
-->[[Wikipedia:Updating information/{{{1}}}/{{{2}}}|<s />]]<!--
{{Documentation}}
  ##### Next line shows up on year pages  #####
<!-- Add categories and inter-wikis to the /doc subpage, please, not here! -->
-->[[Wikipedia:Updating information/{{{1}}}|<s />]]<!--
  ##### This section causes the message or banner to appear in the text, with specified date offset. #####
-->{{#ifexpr: {{JULIANDAY| {{CURRENTYEAR}} | {{CURRENTMONTH}} | {{CURRENTDAY}} }}  >=
   {{JULIANDAY| {{{1}}} | {{{2}}} | {{{3}}} }} + 0  <!--
  ##### (Change 0 above to 1, 7, or 31 to cause the message or banner to appear a day, week, or month late) #####
-->|{{#ifeq: {{uc:{{{BANNER| {{{banner| {{{Banner|N}}} }}} }}} }}| Y |<!--
  ##### Following is the banner; note that pipe characters are "escaped" as {{!}}. #####
-->{{{!}} class="messagebox current" style="width: auto;"
{{!}}-
{{!}} [[Image:Current event marker.svg|50px| ]]
{{!}} '''This article or section needs to be updated.''' <br> Parts of this article or section have been identified as no longer being up to date.
 
Please update the article to reflect recent events, and remove this template when finished.
{{!}} [[Image:Nuvola apps important.svg|50px| ]]
{{!}}}<!--
  ##### End of banner #####
-->|&#91;[[Wikipedia:Updating information|''update needed'']]&#93;}} }}<!--
  ##### This section causes the category to appear at the specfied time, if someone edits (or maybe views) the page. #####
-->{{#if:{{{4|}}}|{{#ifexpr: {{JULIANDAY| {{CURRENTYEAR}} | {{CURRENTMONTH}} | {{CURRENTDAY}} }} >=
  {{JULIANDAY| {{{1}}} | {{{2}}} | {{{3}}} }} + 0   <!--
  ##### (Change 0 above to 1, 7, or 31 to cause the category to appear a day, week, or month late) #####
-->|[[Category:{{{4}}}|{{PAGENAME}}]]}}}}<!--
  ##### This section connects to [[:Category:Wikipedia articles in need of updating]] at the specfied time. #####
-->{{#if:{{{4|}}}|{{#ifexpr: {{JULIANDAY| {{CURRENTYEAR}} | {{CURRENTMONTH}} | {{CURRENTDAY}} }}  >=
  {{JULIANDAY| {{{1}}} | {{{2}}} | {{{3}}} }} + 0  <!--
  ##### (Change 0 above to 1, 7, or 31 to cause the category to appear a day, week, or month late) #####
-->|[[Category:Wikipedia articles in need of updating|{{PAGENAME}}]]}}}}<!--
  ##### This section connects to the appropriate [[As of nnnn]] page.
-->[[As of {{{1}}}|<s />]]<!--
 
--></sup></includeonly><noinclude><!--
  ##### The next line is our documentation sample #####
--><sup>&#91;''[[Wikipedia:Updating information|update needed]]''&#93;</sup>
 
 
== Usage ==
 
*Parameter 1 is the year
*Parameter 2 is the month number
*Parameter 3 is the day of the month
*Optional parameter 4 is the category
*Optional named parameter COMMENT= is for leaving a note to the next editor about what exactly needs to be changed (if it's not obvious or if there are multiple items) and where to find the new information.
*Optional named parameter BANNER=Y is for showing a banner (same as the banner for [[Template:Update|<nowiki>{{Update}}</nowiki>]]) instead of "update needed".  This is for marking an entire article or section as needing update.  Please write this parameter in UPPER-CASE.
 
This template shows the <sup>[''[[Wikipedia:Updating information|update needed]]'']</sup> note shown above (or a banner, if that is enabled), but the message is only visible on or after the specified (future) date.  The date is specified as a year, followed by a month (1-12; leading zero is okay), followed by a day (again, leading zero is okay), for example
 
:'''<nowiki>{{Update after | 2008 | 11 | 4}}</nowiki>'''
 
for [[November 4]], [[2008]].  An optional 4th parameter is for a category for the article to be put into on the specified date, although the page probably needs to be viewed before this occurs.  An example of this would be
 
:'''<nowiki>{{Update after | 2008 | 11 | 4 | United States Government articles in need of updating}}</nowiki>'''
 
If the nature of the needed update(s) or the source of the updated information might not be clear, this should be mentioned also by adding a '''COMMENT=''' parameter.  An example of this might be:
 
:'''<nowiki>{{Update after | 2008 | 11 | 4 | COMMENT=Show name of new president, and list the election statistics, such as how many Electoral College votes there were for each candidate (perhaps broken down by state), and how the actual votes compared to predictions; information will be available on virtually all U.S. news sites.  May also want voter and other reactions.  Check talk page to see if there's anything else which should be mentioned}}</nowiki>'''.
 
For clarity, named parameters should follow unnamed parameters, as in:
 
:'''<nowiki>{{</nowiki>Update after | 2008 | 11 | 4'''
:'''| United States Government articles in need of updating'''
:'''| COMMENT=Show name of new president, and list the election statistics, such as how many Electoral College votes there were for each candidate (perhaps broken down by state), and how the actual votes compared to predictions; information will be available on virtually all U.S. news sites.  May also want voter and other reactions.  Check talk page to see if there's anything else which should be mentioned<nowiki>}}</nowiki>'''.
 
Note that the sample above is broken into multiple lines for readability; it should still work fine.
 
A banner can be shown, instead of "update needed", by using the '''BANNER=Y''' named parameter:
 
:'''<nowiki>{{Update after | 2008 | 11 | 4 | United States Government articles in need of updating | BANNER=Y | COMMENT=If G.W. Bush gets elected to a third term, this article will need massive rewriting}}</nowiki>'''.
 
 
Please read [[Wikipedia:Avoid statements that will date quickly]]; use [[template:update after|update after]] only in exceptional cases.  Do not use [[template:update after|update after]] on pages which simply need to be reviewed later to see if they might need updating. It should only be used when there is a '''100% probability''' that an update is needed.  (A [[Template:Review after]] may be created for articles whose need for updates is uncertain.)  Do not use this template on [[Help:talk page|talk page]]s.  It is probably not necessary to use this template on frequently edited articles such as for current events.  Never add this template referring to the current day or any date in the past.  Do not use this template within section headers, as it will break the header.
 
It is acceptable to continue to use this template when an expected event does not occur; the date can be updated to expire a reasonable time later (such as a week, month, or quarter; this should be fairly commonsensical) after which an editor can check again; by that time, if the event still has not occurred, the source material should at least have an explanation of the reason and a new target date.  For the benefit of readers, a note can be provided to indicate that the expected event has not occurred as of such-n-such a date, so that they will know that someone is keeping on top of the matter.
 
== Effects ==
* When the template is added to an article, the article is linked to [[As of]] [[yyyy]] (where "yyyy" is the expiration year); a list of such pages can be found at [[As of]].
* At approximately the expiration date (the exact day can be varied with changes to the template formulas), the article is linked to [[Wikipedia:Updating information\yyyy]], [[Wikipedia:Updating information\yyyy\mm]] (where "mm" is the expiration month), [[Wikipedia:Updating information\yyyy\mm\dd]] (where "dd" is the expiration day), [[:Category:Wikipedia articles in need of updating]], and the category (if any) which is specified as a parameter.  The phrase "update needed", or a banner, also appears in the text of the article at the indicated spot.
 
See [[Wikipedia:Updating information]] for a list of pages currently needing updates.
 
== Related templates ==
* [[Template:Update]] can be used to mark an entire article or section needing to be updated.  This template adds the article to [[:Category:Wikipedia articles in need of updating]].
* [[Template:Out of date]] is used to mark an article whose factual accuracy may be compromised (although this may be disputed) due to out of date information.  This template adds the article to [[:Category:Articles with obsolete information]].
 
== Discussion ==
Developmental discussion was originally at [[Wikipedia talk:As of#Template:Update after]] but is now at [[Template talk:Update after]].
 
== Developmental notes ==
This template was developed in order to resolve a number of problems seen with the [[As of]] links.
* The template is outside of the standard Wikipedia namespace; there is no sign of it in "flattened" print or CD versions except maybe when the prose passes the expiration date.
* Carefully-planned usage instructions, which are partially enforced by the template mechanism.
* Can be extended and/or modified, and all pages that it is already used on will show the changes.
* Prose does not need to be altered to accommodate it; it is invisible to readers until the "due date".
* NO maintenance is needed; the built-in Wikipedia "what links here' mechanism is used to determine which pages need to be updated for a particular day, and a formula is used to generate the correct links.
* The template is very simple to use, and it is very simple to [[Wikipedia:Updating information|find pages needing update]].
* <s>Can be</s> Has been modified to work with other techniques, such as <nowiki>{{update}}</nowiki>, <nowiki>{{Out of date}}</nowiki>, and [[As of]].
* The template itself is modular and heavily commented, in case future changes to the template are desired.
* The dates of the text display, linking to [[Wikipedia:Updating information]] subpages, and linking to categories are all calculated independently, so that each of these events can be set to occur on different days.
* A full date is required; this helps force/remind editors to be careful to select and specify a date when a change WILL be needed.
 
== Notes for future reference ==
* The <sup>[''[[Wikipedia:Updating information|update needed]]'']</sup> message or the banner currently appear on the day specified, but does not need to; as a cosmetic issue with regards to non-editors (readers), the template can be modified to show this at a later day than the date on which the article is scheduled to be updated.  Specifically, it may be desirable to have the message or banner not appear until the next day or so, to give update editors a chance to update the page before readers see the notice.
* A [[Template:Review after]] template will probably be created later, once [[Template:Update after]] appears to be working satisfactorily.
[[Category:Cleanup templates|{{PAGENAME}}]]
[[Category:Temporal templates|{{PAGENAME}}]]
[[Category:Inline templates|{{PAGENAME}}]]
</noinclude>
</noinclude>

Latest revision as of 13:35, 2 February 2023

[needs update]

Template documentation