Extension:ShortUrl

From MediaWiki.org
Jump to: navigation, search
Translate this page; This page contains changes which are not marked for translation.

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

Release status:Extension status beta

ImplementationTemplate:Extension#type Special page
DescriptionTemplate:Extension#description Adds a special page that redirects to an article based on the given base36-encoded ID
Author(s)Template:Extension#username Yuvi Panda
Latest versionTemplate:Extension#version 1.2.0 (2014-03-28)
MediaWikiTemplate:Extension#mediawiki 1.16+
Database changesTemplate:Extension#needs-updatephp Yes
LicenseTemplate:Extension#license BSD 3-clause "Modified" License
Download
ParametersTemplate:Extension#parameters
  • $wgShortUrlTemplate

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

Check usage and version matrix.

Issues:

Open tasks · Report a bug

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]

  • Download and place the file(s) in a directory called ShortUrl in your extensions/ folder.
  • Add the following code at the bottom of your LocalSettings.php:
wfLoadExtension( 'ShortUrl' );
  • Run the update script which will automatically create the necessary database tables that this extension needs.
  • YesY Done - Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

To users running MediaWiki 1.24 or earlier:

The instructions above describe the new way of installing extensions using wfLoadExtension(), since MediaWiki 1.25. If you need to install this extension in earlier versions, instead of wfLoadExtension( 'ShortUrl' );, you need to use:

require_once "$IP/extensions/ShortUrl/ShortUrl.php";

Usage[edit]

  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]

  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]