Extension:ShortUrl

From MediaWiki.org
Jump to: navigation, search

Other languages:
Deutsch • ‎English • ‎español • ‎français • ‎עברית • ‎日本語 • ‎polski • ‎português • ‎português do Brasil • ‎русский • ‎中文
MediaWiki extensions manual
Crystal Clear action run.png
ShortUrl

Release status: beta

Implementation Special page
Description Adds a special page that redirects to an article based on the given base36-encoded ID
Author(s) Yuvi Panda
Latest version 1.2.0 (2014-03-28)
MediaWiki 1.16+
Database changes Yes
License BSD
Download
Parameters
  • $wgShortUrlTemplate

Translate the ShortUrl extension if it is available at translatewiki.net

Check usage and version matrix; code metrics
Bugs: list open list all report

ShortUrl is a special page extension that helps create shortened URLs for wiki pages, using their base36 encoded IDs. Adds a 'Short URL' link to the Toolbox. Primarily developed for use in the Indic Language Wikipedias.

Installation[edit | edit source]

  • Download and extract the file(s) in a directory called ShortUrl in your extensions/ folder. If you're a developer and this extension is in a Git repository, then instead you should clone the repository.
  • Add the following code at the bottom of your LocalSettings.php:
require_once "$IP/extensions/ShortUrl/ShortUrl.php";
  • Run the update script which will automatically create the necessary database tables that this extension needs.
  • Done! Navigate to "Special:Version" on your wiki to verify that the extension is successfully installed.

Usage[edit | edit source]

  1. When installed redirects are available under Special:ShortUrl/<base36>.
  2. Links to redirects can be found in the Toolbox and under the heading (JavaScript only)

Configuration[edit | edit source]

  1. (Optional) Run populateShortUrlTable.php maintenance script. Fills the shorturl database table with entries for all namespace/title parts of all currently existing articles.
  2. Set $wgShortUrlTemplate to the template of the path for generating short URLs. $1 is replaced with the actual short URL ID.

See also[edit | edit source]