Modèle:Update

De Wikisisar
Aller à : navigation, rechercher

{{#switch:

 {{#if: 
 |     
 | {{#ifeq:Modèle|
   | main
   | other
   }} 
 }}
| main = {{#ifeq:{{{small}}}|left|}

| other

| #default =

}}

Template documentation[view] [edit] [history] [purge]

{{#ifeq:update |doc

    | 

{{#ifeq:show |show

|
        }}{{#if: |
         |   {{#ifexist:Modèle:Update
                  | [[Category:{{#switch:Modèle |Template=Template |Module=Module |User=User |#default=Wikipedia}} documentation pages]]
                  |
                 }}
        }}
    | 
   }}
{{#if:||{{#ifeq:Update|Update|}}}}

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 |{{#if:part|part=}} or number it |{{#if:1|1=}}):
{{{{#if:Update|Update| tnull|...}}{{#if:part=the later-life and death material and the [[#Legacy|Legacy]] section||part=the later-life and death material and the [[#Legacy|Legacy]] section|}}{{#if:date=mai 2024||date=mai 2024|}}{{#if:||{{{4}}}|}}{{#if:||{{{5}}}|}}{{#if:||{{{6}}}|}}{{#if:||{{{7}}}|}}{{#if:||{{{8}}}|}}{{#if:||{{{9}}}|}}}}
To use the template in one specific section, and change its wording to refer to the section instead of the page, use |{{#if:|=}}section (this is a special case of |{{#if:1|1=}} a.k.a. |{{#if:part|part=}}, above). Insert the template at the top of the page:
{{{{#if:Update|Update| tnull|...}}{{#if:section||section|}}{{#if:date=mai 2024||date=mai 2024|}}{{#if:||{{{4}}}|}}{{#if:||{{{5}}}|}}{{#if:||{{{6}}}|}}{{#if:||{{{7}}}|}}{{#if:||{{{8}}}|}}{{#if:||{{{9}}}|}}}}
To display the date (in whatever format) of the last significant update to the page, use the second unnamed parameter (or name it |{{#if:updated|updated=}} or number it |{{#if:2|2=}}):
{{{{#if:Update|Update| tnull|...}}{{#if:updated={{#time:j F Y|-1 month}}||updated={{#time:j F Y|-1 month}}|}}{{#if:date=mai 2024||date=mai 2024|}}{{#if:||{{{4}}}|}}{{#if:||{{{5}}}|}}{{#if:||{{{6}}}|}}{{#if:||{{{7}}}|}}{{#if:||{{{8}}}|}}{{#if:||{{{9}}}|}}}}
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:
{{{{#if:Update|Update| tnull|...}}{{#if:date=mai 2024||date=mai 2024|}}{{#if:||{{{3}}}|}}{{#if:||{{{4}}}|}}{{#if:||{{{5}}}|}}{{#if:||{{{6}}}|}}{{#if:||{{{7}}}|}}{{#if:||{{{8}}}|}}{{#if:||{{{9}}}|}}}}
You can also do: {{Update|{{subst:DATE}}}}
To explain that the article now has inaccuracies (not just missing information) due to being outdated, use |{{#if:inaccurate|inaccurate=}}yes:
{{{{#if:Update|Update| tnull|...}}{{#if:inaccurate=yes||inaccurate=yes|}}{{#if:date=mai 2024||date=mai 2024|}}{{#if:||{{{4}}}|}}{{#if:||{{{5}}}|}}{{#if:||{{{6}}}|}}{{#if:||{{{7}}}|}}{{#if:||{{{8}}}|}}{{#if:||{{{9}}}|}}}}
To link to a particular section of the talk page where the update is being discussed, use |{{#if:talk|talk=}}Section title (|{{#if:talksection|talksection=}} and |{{#if:discuss|discuss=}} are equivalent to |{{#if:talk|talk=}}):
{{{{#if:Update|Update| tnull|...}}{{#if:talk=Shall we update this for 2024?||talk=Shall we update this for 2024?|}}{{#if:date=mai 2024||date=mai 2024|}}{{#if:||{{{4}}}|}}{{#if:||{{{5}}}|}}{{#if:||{{{6}}}|}}{{#if:||{{{7}}}|}}{{#if:||{{{8}}}|}}{{#if:||{{{9}}}|}}}}
To display a reason (after the added phrase "In particular:"), use |{{#if:reason|reason=}}a short comment here, e.g.:
{{{{#if:Update|Update| tnull|...}}{{#if:reason=Is missing the mai 2024 election results||reason=Is missing the mai 2024 election results|}}{{#if:date=mai 2024||date=mai 2024|}}{{#if:||{{{4}}}|}}{{#if:||{{{5}}}|}}{{#if:||{{{6}}}|}}{{#if:||{{{7}}}|}}{{#if:||{{{8}}}|}}{{#if:||{{{9}}}|}}}}
These parameters can be combined, of course:
{{{{#if:Update |Update | tnull|...}}{{#if:part=The [[#Production|Production]] section and follow-on material ||part=The [[#Production|Production]] section and follow-on material |}}{{#if:reason=the film is released, so this needs a "Critical reception" section, too ||reason=the film is released, so this needs a "Critical reception" section, too |}}{{#if:inaccurate=yes ||inaccurate=yes |}}{{#if:talk=Post-release updating ||talk=Post-release updating |}}{{#if:updated={{#time:F Y|-3 month}} ||updated={{#time:F Y|-3 month}} |}}{{#if:date=mai 2024||date=mai 2024|}}{{#if:||{{{8}}}|}}{{#if:||{{{9}}}|}}}}

Example

{{{{#if: |subst:}}Update{{#if:documentation ||documentation}}{{#if:date=mai 2024 ||date=mai 2024}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||}}}} {{#switch:

 {{#if: 
 |     
 | {{#ifeq:Modèle|
   | main
   | other
   }} 
 }}
| main = {{#ifeq:{{{small}}}|left|}

| other

| #default =

}}

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

Article {{#switch:
 {{#if:main 
main main other
   }} 
 }}
main = {{#ifeq:{{{small}}}|left|} other #default =

}}

Category {{#switch:
 {{#if:category 
category main other
   }} 
 }}
main = {{#ifeq:{{{small}}}|left|} other #default =

}}

Template {{#switch:
 {{#if:template 
template main other
   }} 
 }}
main = {{#ifeq:{{{small}}}|left|} other #default =

}}

{{{{#if: |subst:}}Update{{#if:section ||section}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||}}}} produces:

Article {{#switch:
 {{#if:main 
main main other
   }} 
 }}
main = {{#ifeq:{{{small}}}|left|} other #default =

}}

Category {{#switch:
 {{#if:category 
category main other
   }} 
 }}
main = {{#ifeq:{{{small}}}|left|} other #default =

}}

Template {{#switch:
 {{#if:template 
template main other
   }} 
 }}
main = {{#ifeq:{{{small}}}|left|} other #default =

}}

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.

{{{{#if: |subst:}}Update{{#if:inaccurate=yes ||inaccurate=yes}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||}}}} {{#switch:

 {{#if:main 
 | main    
 | {{#ifeq:Modèle|
   | main
   | other
   }} 
 }}
| main = {{#ifeq:{{{small}}}|left|}

| other

| #default =

}}

Alternatives

See also

{{#ifeq:Update|sandbox | | }}