Jump to content
Wikipedia The Free Encyclopedia

Template:Archive basics

From Wikipedia, the free encyclopedia
Template documentation[view] [edit] [history] [purge]

One click archiving scripts add buttons beside discussions on talk pages and noticeboards. When clicked, the button will archive that discussion onto the page specified. Most pages are archived by lowercase sigmabot III, and the script will use the values in that bot's config. On pages archived by another bot or not archived by any bot, this template will provide the archive name and counter number used by the archiving script. This template and the OneClickArchiver scripts work with archives that end with a number. They do not work with monthly archives or idiosyncratic archive naming schemes.

Examples

Copy & paste the code below for numbered archives:

Simple

{{Archive basics
|archive = {{SAFESUBST:#titleparts:{{SAFESUBST:FULLPAGENAME}}}}/Archive %(counter)d
|counter = 1
}}

All parameters

All parameters with default values:

{{Archive basics
|archive = {{SAFESUBST:#titleparts:{{SAFESUBST:FULLPAGENAME}}}}/Archive %(counter)d
|counter = 1
|headerlevel = 2
|maxarchivesize = 
|archiveheader = {{archive}}
}}

Specify archives location

To manually choose the archive page location, replace "User talk:Username/Archive" and increment the |counter= as needed in the example below:

{{Archive basics
|archive = User talk:Username/Archive %(counter)d
|counter = 1
}}

Specify archive names

The counter is not used for nonstandard archive names:

{{Archive basics
|archive = User talk:Username/Archive template notices
}}

Date-based archives

For annual archives copy and paste the example below. The text %(year)d will be interpreted by the script as the current year.

{{Archive basics
|archive = {{SAFESUBST:#titleparts:{{SAFESUBST:FULLPAGENAME}}}}/Archive %(year)d
}}

For monthly archives:

{{Archive basics
|archive = {{SAFESUBST:#titleparts:{{SAFESUBST:FULLPAGENAME}}}}/Archives/%(year)d/%(monthname)s
}}

Shortcut

There is a shortcut setup template to make it easier to apply defaults for one-click archiving. Archives typically begin at "Archive 1". If archives already exist, you can specify the number of the current highest archive. To move discussions to "Archive X", change the number "1" below to whatever number you want for a counter number:

{{subst:oca|1}}

TemplateData

This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools. See a monthly parameter usage report for Template:Archive basics in articles based on its TemplateData.

TemplateData for Archive basics

Config for OneClickArchiving scripts

Template parameters[Edit template data ]

ParameterDescriptionTypeStatus
Archivearchive

WikiPath to where you want the archives stored.

Stringrequired
Countercounter

This is what numbered archive the OneClickArchiver will archive to. If you are archiving at User talk:Example/Archive 1, for example, this parameter must be set at 1. Otherwise, the OneClickArchiver will archive to the wrong page.

Numberrequired
Maximum Sizemaxsize maxarchivesize

Size at which a "nag" notice will show up on page letting users know that the size of the current archive (defined by archive and counter parameters) is above and to suggest that the archive be incremented.

Default
153600
Numberoptional
Header Levelheaderlevel

HTML heading level to create buttons for

Default
2
Stringoptional
Archive Headerarchiveheader

Header banner to add at the top of archived pages.

Default
{{archive}}
Unknownoptional

See also

Templates for archiving
Recommended
Headers
With
navigation
Without
navigation
With
search
  • {{Talk header }} (contains an automatically appearing archive search box and nav)
Content
formatting
Lists
Discussion
Automatic
archiving
systems
lowercase
sigmabot III

(MiszaBot)
ClueBot III
other
general
The above documentation is transcluded from Template:Archive basics/doc. (edit | history)
Editors can experiment in this template's sandbox (edit | diff) and testcases (create) pages.
Add categories to the /doc subpage. Subpages of this template.

AltStyle によって変換されたページ (->オリジナル) /