How to enable page archiving

edit

The general format for the archive template:

{{User:JohnFLBot/ArchiveConf
 |archiveprefix=
 |format=
 |age=
 |index=
 }}

The archiveprefix parameter should be set to a subdirectory under the page you wish to archive. For example, if I were archiving User talk:John F. Lewis, I would set it to User talk:John F. Lewis/Archives/. The format parameter should be set to a valid argument to PHP's date() function. You may also include an %%i value. This is for numbered archives instead of dated archives, and is replaced with the archive number. This is the name of the archive page. The age parameter should be set to the number of hours a thread can go without a reply before it should be archived. The index parameter should be set to yes if you wish the bot to dump an index in place of the template. This is useful if you have wrapped the template with an {{archive box}}. Otherwise it should be set to no.

Other parameters

edit

These are all optional.

minarchthreads
Type: unsigned integer
Default: 0
Description: The bot will not archive unless this many or more sections need archival.


minkeepthreads
Type: unsigned integer
Default: 0
Description: The bot will not archive if there will be this many or less sections left on the page.


header
Type: string
Default: "{{Talkarchive}}"
Description: When creating a new archive page, the bot will put this at the top of the new page.


archivenow
Type: comma delimited array of strings
Default: "{{User:JohnFLBot/ArchiveNow}}"
Description: If any of the strings are found in the thread, the bot will archive this section immediately. The bot will also convert {{templates}} in this list to {{tl|escaped templates}} upon archival. This could be useful for pages where {{resolved}} or such is used.


headerlevel
Type: unsigned integer, between 1 and 7 inclusive
Default: 2
Description: This is the header level for the threads the bot will archive. Anything on the page before the first header of this level will not be archived. A level 1 header is = Header =, a default thread (level 2) header is == Header ==, and the highest level header is a level 7: ======= Header =======.


maxkeepthreads
Type: unsigned integer
Default: 0
Description: If greater than 0, this is the maximum number of threads to keep on the page. Older threads are forcibly archived if there are more than this number of threads on the page. If 0, this option is disabled.


maxkeepbytes
Type: unsigned integer
Default: 0
Description: If greater than 0, this is the maximum number of thread content bytes to keep on the talk page. Older threads are forcibly archived if there are more than this number of thread content bytes on the page. If 0, this option is disabled.


maxarchsize
Type: unsigned integer, greater than 10000
Default: 0
Description: The maximum size of the archive in bytes before %%i (see format) is incremented. If 0, this is disabled.


numberstart
Type: unsigned integer
Default: 1
Description: Default value for %%i in format.


Dated Example (without archive box)

{{User:JohnFLBot/ArchiveConf
 |archiveprefix=User talk:John F. Lewis/Archives/
 |format=Y/F
 |age=72
 |index=yes
 }}

Dated Example (with archive box)

{{User:JohnFLBot/ArchiveConf
 |archiveprefix=User talk:John F. Lewis/Archives/
 |format=Y/F
 |age=72
 |index=yes
 |archivebox=yes
 |box-advert=yes
 }}

Numbered Example (without archive box)

{{User:JohnFLBot/ArchiveConf
 |archiveprefix=User talk:John F. Lewis/Archive
 |format= %%i
 |age=72
 |index=yes
 |maxarchsize=150000
 |numberstart=23
 }}