User:MiszaBot/config

From Wikibooks, open books for an open world
Jump to: navigation, search
Documentation[edit] [history] [purge]
{{User:MiszaBot/config
|archive             =
|algo                =
|counter             =
|maxarchivesize      =
|minthreadsleft      =
|minthreadstoarchive =
|archiveheader       =
|key                 =
}}

Meanings of parameters are:

archive              Name of the page to which archived threads will be put.
                     Must be a subpage of the current page. Variables are
                     supported.
algo                 specifies the maximum age of a thread. Must be in the form
                     old(<delay>) where <delay> specifies the age in
                     seconds (s), hours (h), days (d), weeks(w), or years (y)
                     like 24h or 5d.
                     Default is old(24h).
counter              The current value of a counter which could be assigned as
                     variable. Will be actualized by bot. Initial value is 1.
maxarchivesize       The maximum archive size before incrementing the counter.
                     Value can be given with appending letter like K or M which
                     indicates KByte or MByte. Default value is 1000M.
minthreadsleft       Minimum number of threads that should be left on a page.
                     Default value is 5.
minthreadstoarchive  The minimum number of threads to archive at once. Default
                     value is 2.
archiveheader        Content that will be put on new archive pages as the
                     header. This parameter supports the use of variables.
                     Default value is {{talkarchive}}
key                  A secret key that (if valid) allows archives to not be
                     subpages of the page being archived.

Variables below can be used in the value for "archive" in the template above:

%(counter)d          the current value of the counter
%(year)d             year of the thread being archived
%(isoyear)d          ISO year of the thread being archived
%(isoweek)d          ISO week number of the thread being archived
%(quarter)d          quarter of the year of the thread being archived
%(month)d            month (as a number 1-12) of the thread being archived
%(monthname)s        English name of the month above
%(monthnameshort)s   first three letters of the name above
%(week)d             week number of the thread being archived

The ISO calendar starts with the Monday of the week which has at least four
days in the new Gregorian calendar. If January 1st is between Monday and
Thursday (including), the first week of that year started the Monday of that
week, which is in the year before if January 1st is not a Monday. If it's
between Friday or Sunday (including) the following week is then the first week
of the year. So up to three days are still counted as the year before.
Popular Archival Templates
Basic Description Code to copy
Page archiving, numbered with Archive #
{{User:MiszaBot/config
|archive = {{subst:FULLPAGENAME}}/Archive %(counter)d
|algo = old(7d) <!-- This means the last time someone made a signed reply (used ~~~~) has to be seven days -->
|counter = 1 <!-- For Archive 1. Replace with the number you are now on. -->
}}
Page archiving, numbered with Archive #. Also has automatic archive navigation
{{User:MiszaBot/config
|archive = {{subst:FULLPAGENAME}}/Archive %(counter)d
|algo = old(7d) <!-- This means the last time someone made a signed reply (used ~~~~) has to be seven days -->
|counter = 1 <!-- For Archive 1. Replace with the number you are now on. -->
|archiveheader = {{aan}}
}}
Page archiving, with every year being an archive
{{User:MiszaBot/config
|archive = {{subst:FULLPAGENAME}}/Archive/%(year)d
|algo = old(7d) <!-- This means the last time someone made a signed reply (used ~~~~) has to be seven days -->
}}
Page archiving, with every year being an archive. Has automatic navigation
{{User:MiszaBot/config
|archive = {{subst:FULLPAGENAME}}/Archive/%(year)d
|algo = old(7d) <!-- This means the last time someone made a signed reply (used ~~~~) has to be seven days -->
|archiveheader = {{aan}}
}}
Page archiving similar to the one on Wikibooks:Reading room/General
{{User:MiszaBot/config
|minthreadsleft = 1
|archive = {{subst:FULLPAGENAME}}/Archives/%(year)d/%(monthname)s
|algo = old(7d)
|minthreadstoarchive = 1
}}
Page archiving similar to the one on Wikibooks:Reading room/General, with automatic navagation
{{User:MiszaBot/config
|minthreadsleft = 1
|archive = {{subst:FULLPAGENAME}}/Archives/%(year)d/%(monthname)s
|algo = old(7d)
|minthreadstoarchive = 1
|archiveheader = {{aan}}
}}