Fandom Developers Wiki
Advertisement

ArchiveTool allows for the easy archiving of talk pages on your Wiki.

Features

Select single lines, sections or the whole talk page simply by clicking.
Simply hit the "archive" button, select the lines/sections you want to archive, then hit "save".
Multi-language support
Supports ISO 639-1 localization (see "Adding translations").

Usage

Installation

If you would like to use the script with the default options, simply add the following to your wiki's MediaWiki:Common.js:

importScriptPage('MediaWiki:ArchiveTool/code.js', 'dev');

If you would like to change the options, insert the following instead:

var ArchiveToolConfig = { 
   archiveListTemplate: 'Archives',
   archivePageTemplate: 'Archivepage',
   archiveSubpage: 'Archive',
   userLang: true
};
importScriptPage('MediaWiki:ArchiveTool/code.js', 'dev');

For an explanation of the available options, see "Options" below.

Please note that the ArchiveList template requires the DynamicPageList extension to be enabled on your wiki and this script automatically assumes it is present. You can find out if this extension is enabled by searching for "DynamicPageList" on Special:Version at your wiki. If it is not present, you will need to contact Wikia to request that it be enabled, otherwise the ArchiveList template will not generate any results and display raw code.

Options

archiveListTemplate
The name of the template that will be placed on top of the talk page, linking to the different archives.
archivePageTemplate
The name of the template that will be placed on top of the archive page, explaining that it is an archive.
archiveSubpage
The subpage name of archived pages on your wiki. For example, setting this to "Storage" would mean archived talk pages on your wiki are named "Talk:Example/Storage 1" etc.
userLang
By default, the script tries to display messages in the following languages:
  1. The user's language (specified in his/her preferences)
  2. The wiki's content language
  3. English if there are no messages in a desired language.
You can disable this by setting the userLang option to false.
langCode
Localized messages can be added using the language code as a key (e.g. ArchiveToolConfig.en) and then creating an object for the messages. See example below for how to override the default messages used for the English language.
Example:
var ArchiveToolConfig = { 
   'en': {
      buttonArchiveTool: "Archive",
      buttonArchiveToolTooltip: "Archive this page",
      buttonSelectAll: "Select all",
      buttonDeselectAll: "Deselect all",
      buttonSaveArchive: "Save archive",
      buttonAbort: "Abort",
      labelLines: "Lines",
      labelSections: "Sections",
      summaryArchiveFrom: "ArchiveTool: Archiving from",
      summaryArchiveTo: "ArchiveTool: Archiving to"
   }
}

Adding translations

The following messages are used by the script:

  • "Archive"
  • "Archive this page"
  • "Select all"
  • "Deselect all"
  • "Save archive"
  • "Abort"
  • "Lines"
  • "Sections"
  • "ArchiveTool: Archiving from"
  • "ArchiveTool: Archiving to"

If you would like to help out, please post translations for these on the script's talk page (or add them to code.js directly if you are comfortable with doing so).

Updates

21 November 2011
MarkosBoss: Added Polish translation.
20 November 2011
Porter21: Fixed bug which prevented saving archives with numbers greater than 10.
5 September 2011
Porter21: Update for new user page masthead (Wikia skin).
30 June2011
Porter21: Removed enclosing '' for "archiving from/to" messages.
24 May 2011
Porter21: Added check for user blog comments and tidied up variable names for skin-specific settings.
22 May 2011
Porter21: Small change to address warnings which appeared in the error console of certain browsers.
14 December 2010
Porter21: Cosmetic changes.
29 November 2010
Porter21: Made script use proper button mechanism for each skin
25 November 2010
Porter21: Added support for multiple languages (using function by Dantman)
Porter21: Changed config mechanism & added option to specify name of archive pages
24 November 2010
Porter21: Added support for Monobook & Oasis
Porter21: Added "abort" button
Porter21: Fix for script not recognizing custom "ArchiveList" template on target page
30 June 2009
Dantman: ArchiveTool finished and posted up
Advertisement