Template:Archive basics/sandbox
![]() | This is the template sandbox page for Template:Archive basics (diff). |
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
[edit]Copy & paste the code below for numbered archives:
Simple
[edit]{{Archive basics
|archive = {{SAFESUBST:#titleparts:{{SAFESUBST:FULLPAGENAME}}}}/Archive %(counter)d
|counter = 1
}}
|
All parameters
[edit]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
[edit]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
[edit]The counter is not used for nonstandard archive names:
{{Archive basics
|archive = User talk:Username/Archive template notices
}}
|
Date-based archives
[edit]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
[edit]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
[edit]TemplateData for Archive basics
Config for OneClickArchiving scripts
Parameter | Description | Type | Status | |
---|---|---|---|---|
Archive | archive | WikiPath to where you want the archives stored. | String | required |
Counter | counter | 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. | Number | required |
Maximum Size | maxsize 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.
| Number | optional |
Header Level | headerlevel | HTML heading level to create buttons for
| String | optional |
Archive Header | archiveheader | Header banner to add at the top of archived pages.
| Unknown | optional |