Extension:ShortUrl

From MediaWiki.org
Jump to: navigation, search
Other languages:
Deutsch 58% • ‎English 100% • ‎español 92% • ‎français 100% • ‎עברית 83% • ‎日本語 100% • ‎português 50% • ‎português do Brasil 100% • ‎русский 8% • ‎中文 58%
MediaWiki extensions manual - list
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 possible

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 files 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]