Template:Autoarchive resolved section/doc
This is a documentation subpage for Template:Autoarchive resolved section. It contains usage information, categories, and other content that is not part of the original template page. |
Template for automatic archiving.
For the target (archive) only its current notation is valid. This type of archiving is done by SpBot (not by ArchiverBot).
Usage
{{Autoarchive resolved section
|age =
|archive =
|show =
|level =
|timecompare =
|timeout =
|width =
}}
SpBot archiving requires the use of either {{Section resolved}} or the timeout
parameter of this template (usual archiving like by ArchiverBot).
It does not matter where the template {{Section resolved|…}}
is placed within the section. It will always refer to the last/previous heading of the section to be archived (see parameter level
).
The template relies on a certain time stamp format, for more see in Signature format.
To quickly use a standard setup to archive your user talk page, see Template:Autoarchive resolved section/usertalksetup (see own description).
Template parameters
Parameter | Description | Default | Status | |
---|---|---|---|---|
age | The parameter age defines the required age of the template block {{Section resolved|…}} in days. After this amount of days the section will be archived. | empty | required | |
archive | Path to archive. You can use variables in your archive parameter as listed below.Path inclusion with ASCII apostrophes (') is not necessary, but allowed for historic reasons. | empty | required | |
overview | The parameter overview can be used to display a link to the location of the archive page. Example code: overview=[[Commons:Village pump/Archive]]/ results in“For the archive overview, see Commons:Village pump/Archive.” An alternative to this parameter is the use of template {{Archive box}}. | empty | optional | |
latest archive | The parameter latest archive can be used to display a link to the current archive. The archive parameter variables can be used. Example code: latest archive=[[Commons:Village pump/Archive/2011/02]] results in:“The latest archive is located under Commons:Village pump/Archive/2011/02.” | empty | optional | |
show | The parameter show defines, whether the template should display anything or not: show=yes (default) or show=no . This parameter can be used, if the template is used on a page which has an own intro explaining the archiving parameters. | yes | optional | |
level | Parameter level defines which heading level should be archived. Deeper heading levels are treated as part of the specified level.
== talk page section level II ==
: Such a heading is level 2.
==== talk page section level IV ====
: Such a heading is level 4.
| 2 | optional | |
timecompare | The parameter timecompare specifies which timestamp should be used for distribution into the archives. In the parameter archive you can use variables referring to the date. timecompare defines which timestamp is used for archiving.
| empty | optional | |
timeout | The parameter timeout specifies the number of days having to pass by to consider a section as “resolved” automatically, even if no {{Section resolved}} block was set. Archiving will be only proceeded, if the parameter is set and the specified period of time (timeout) has passed since the last comment (note: with value 0 it gets inactive). The template {{DNAU}} is supported.By setting this parameter you can get almost the same service as given by ArchiverBot (see User:MiszaBot/Archive HowTo, different name for bot for historic reasons). In this case, it is no longer necessary to use this template and additional {{User:MiszBot/config}} , which are processed by two different bots. Instead, only {{Autoarchive resolved section}} for SpBot is needed. | empty | optional | |
width | Width of the archive box | 100% | optional |
Additional information
The template is intended to be used in the following namespaces: all talk namespaces and noticeboards
The template is intended to be used by the following user groups: all users
Localization
العربية | বাংলা | Deutsch | English | español | فارسی | français | magyar | Bahasa Indonesia | italiano | 日本語 | 한국어 | Lëtzebuergesch | македонски | Nederlands | polski | português | português do Brasil | русский | سنڌي | slovenščina | svenska | українська | Tiếng Việt | 中文 |
This template makes use of {{Autotranslate}} and the translate extension.
“archive” parameter variables
You can use the following variables in the archive
parameter:
variable | meaning |
---|---|
((year)) | year, e.g. 2024 |
((month:long)) | full monthname in English, e.g. February |
((month:short)) | short monthname in English, e.g. Feb |
((month:##)) | month as two digits, e.g. 02 |
((week)) | European week date as a number, e.g. 4 or 53 (per ISO 8601) |
((week:##)) | European week date as a two digits number, e.g. 04 or 53 (per ISO 8601) |
((day:##)) | day of month as two digits, e.g. 07 or 31 |
((quarter)) | quarter, e.g. 3 |
((quarter:##)) | quarter as two digits (redundant), e.g. 03 |
((quarter:i)) | quarter as lowercase Roman numerals, e.g. iii or iv |
((quarter:I)) | quarter as uppercase Roman numerals, e.g. III or IV |
((half-year)) | half-year, e.g. 2 |
((half-year:i)) | half-year as lowercase Roman numeral, e.g. ii |
((half-year:I)) | half-year as uppercase Roman numeral, e.g. II |
((FULLPAGENAME)) | the full page name (namespace + actual page) of the current page. Same as {{FULLPAGENAME}} , but with normal brackets. Use this instead of hard coding your page name.
|
- Examples:
archive=((FULLPAGENAME))/Archive/((year))/((month:short))
archive=Commons:Village pump/Archive/((year))/((month:##))
Example
⧼Seealso⧽: Template:Autoarchive resolved section/usertalksetup
The following example is derived from the archiving setup of dewiki’s Wikipedia:Redaktion Chemie. All marked/tagged sections with level 2 (that is ==
) will be archived seven days after placement of a {{Section resolved}} block. The archive is at Wikipedia:Redaktion Chemie/Archiv. The archiving will be done to Wikipedia:Redaktion Chemie/Archiv/2007/Januar if the first comment in this section was made in January.
{{Autoarchive resolved section
|age=7
|archive='((FULLPAGENAME))/Archive/((year))'
|overview=[[{{FULLPAGENAME}}/Archive|Archive]]
}}
That will look like this::
SpBot archives all sections tagged with {{Section resolved|1=~~~~}} after 7 days. For the archive overview, see Archive. |
Signature format
The date and time part of the signature is important for recognition of the timestamp. The default format specified by MediaWiki and automatically created, when ~~~~
or ~~~~~
is entered, is sufficient: 13:18, 6 October 2024 (UTC), also with abbreviated month: Oct. This corresponds to the following structure with MediaWiki variables: {{CURRENTTIME}}, {{CURRENTDAY}} {{CURRENTMONTHNAME}} {{CURRENTYEAR}} (UTC)
(short month name: {{CURRENTMONTHABBREV}}
. When directly entered these variables must be substituted (the according {{LOCAL…}}
variants can be used, as well).
All any other format in not supported.
Error lists
Talk pages containing errors in their main template usage or in {{Section resolved}} are shown in the following lists and on the corresponding talk page.
- error messages reported by the bot – please remove the last line after the problem is solved
- parameter error in {{Section resolved}}
- no age set
- no archive set
- Informational lists