Extension:ArchiveLinks

From MediaWiki.org
Jump to: navigation, search
MediaWiki extensions manual - list
Crystal Clear action run.png
ArchiveLinks

Release status: experimental

Implementation User interface, Special page
Description Enables archival of external links with the aim of preventing Link Rot.
Author(s) Kevin Browntalk
Last version 0.1
Database changes yes
License No license specified
Download SVN
Parameters

$wgArchiveLinksConfig

Hooks used
ArticleSaveComplete

LinkerMakeExternalLink
LoadExtensionSchemaUpdates
UnitTestsList

Check usage and version matrix

Archive Links is an extension designed to fight link rot by preemptively archiving external links so that in the event that they go down a copy will still be available.

Contents

Installation [edit]

As is standard with other MediaWiki extensions, you may install this extension by:

  • extracting the extension in the extensions folder
  • adding require_once( "$IP/extensions/ArchiveLinks/ArchiveLinks.php" ); to LocalSettings.php
  • and creating the tables (or running install.php or update.php).

Configuration [edit]

All configuration values are put in to a single global variable $wgArchiveLinksConfig as an array. It is important to remember when you are configuring the array not to remove all the values by redefining it by using the array() keyword.

Yes check.svg Correct

$wgArchiveLinksConfig['config_value_1'] = true;
$wgArchiveLinksConfig['config_value_2'] = false;


X mark.svg Incorrect

$wgArchiveLinksConfig = array(
     'config_val_1' => true,
     'config_val_2' => false,
);

Configuration Options [edit]

The following is a list of the valid configuration options for $wgArchiveLinksConfig.

Config Value Valid Options Description of Value
archive_service
  • internet_archive
  • wikiwix
  • local
  • webcitation
  • archive.org's archival service
  • wikiwix.org's archival service (archiving new links real time on some wikipedia, and all from the past )
  • if you would like to run a local spider this is the option that should be chosen
  • webcitation.org's archival service
generate_feed
  • true
  • false
If this option is set to true the queue table will be used to generate an archive feed that can be accessed via the API by bots and external services. If you would like to run your own local spider this must be set to false.
Example Example

See Also [edit]