Template:Auto archive

From Wikiversity
Jump to navigation Jump to search
On this page, sections containing at least 2 signed contributions are automatically archived, if the last contribution is at least {{{age}}} days old.

Usage[edit source]

This templates marks talk pages that should be automatically archived. The template should be applied at the top of the page before the first section. The following parameters can be used:

  • age: the number of days after which a section should archived, counted from the timestamp of the last contribution.
  • target: describes the pattern of archive pages to be created. In the easiest case, this is just something lile Talk:Topic/Archive which will cause all archived sections to appear at that page. However, more complex patterns are possible as well to archive by day, week, quarter, and more. To do that, you can combine the following placeholders:
    • ((Day)): day of the month, e.g. 1, 24
    • ((Day:##)): two-digit day of the month, e.g. 01, 24
    • ((Day:short)): shortened day of the week (lower case), e.g. mo, fr
    • ((Day:Short)): shortened day of the week (capital case), e.g. Mo, Fr
    • ((Day:SHORT)): shortened day of the week (upper case), e.g. MO, FR
    • ((Day:long)): full day of the week (lowercase), e.g. monday, friday
    • ((Day:Long)): full day of the week (capital case), e.g. Monday, Friday
    • ((Day:LONG)): full day of the week (upper case), e.g. MONDAY, FRIDAY
    • ((Month)): month, e.g. 1, 10
    • ((Month:##)): two-digit month, e.g. 01, 10
    • ((Month:short)): shortened month name (lower case), e.g. jan, oct
    • ((Month:Short)): shortened month name (capital case), e.g. Jan, Oct
    • ((Month:SHORT)): shortened month name (upper case), e.g. JAN, OCT
    • ((Month:long)): full month name (kleingeschrieben), e.g. january, october
    • ((Month:Long)): full month name (capital case), e.g. January, October
    • ((Month:LONG)): full month name (großgeschrieben), e.g. JANUARY, OCTOBER
    • ((Quarter)): quarter, e.g. 1, 3
    • ((Quarter:##)): two-digit quarter, e.g. 01, 03
    • ((Quarter:i)): quarter (lower case roman numerals), e.g. i, iv
    • ((Quarter:I)): quarter (upper case roman numerals), e.g. I, IV
    • ((Semester)): semester, e.g. 1, 2
    • ((Semester:##)): two-digit semester, e.g. 01, 02
    • ((Semester:i)): semester (lower case roman numerals), e.g. i, ii
    • ((Semester:I)): semester (upper case roman numerals), e.g. I, II
    • ((Week)): week, e.g. 1, 43
    • ((Week:##)): two-digit week, e.g. 01, 43
    • ((Year)): year, e.g. 2006, 2007
  • minor: if set to true, archiving edits will be marked as minor. On user talk pages, this will suppress the new messages reminder. (default: false)
  • header: if a new archive page has to be created by the bot, it will typically transclude {{archive}} at the top. If this parameter is set, the bot will transclude the given template instead.
  • mincontributions: number of signed contributions necessary for a section before it can be archived. (default: 2)
  • display: if set to false, this template will be hidden and no notice regarding automatic archiving will be presented. (default: true)

Examples[edit source]

{{auto archive|age=1|target='Wikiversity:Colloquium/Archive'}}
all sections whose last contribution is at least one day old will be moved to
{{auto archive|age=7|target='User talk:Sebmol/Archive/((Year))/((Month:Short))'}}
all sections whose last contribution is at least seven days old will be moved to subpages following the pattern
{{auto archive|age=2|target='Wikiversity:Help desk/Archive/((Year))/Week ((Week:##))'}}
all sections whose last contribution is at least two days old will be moved to subpages following the pattern

Keeping nested sections together[edit source]

To ensure that nested sections are archived together, the parent section must not be empty. Empty sections are disregarded when analyzing the page and will not be archived.