Extension:RelativePageLinks

From Linux Web Expert

Revision as of 20:18, 15 March 2024 by imported>Pppery (alt) (→‎Installation: Category:Pages using deprecated enclose attributes, removed: enclose="div")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

MediaWiki extensions manual
RelativePageLinks
Release status: unmaintained
Implementation Parser function
Description A MediaWiki extension that shortens long page links to relative links, if possible.
Author(s) Simon Heimler (Fannontalk)
Latest version 0.1.0 (April 2015)
MediaWiki 1.19+
PHP 5.2+
Database changes No
License MIT License
Download
README
Quarterly downloads Lua error in Module:Extension at line 172: bad argument #1 to 'inNamespace' (unrecognized namespace name 'skin').
Public wikis using Lua error in Module:Extension at line 172: bad argument #1 to 'inNamespace' (unrecognized namespace name 'skin').

RelativePageLinks shortens link titles on the current wiki page to relative paths, if possible. The current page name / url is used as a reference and will be substituted by . . The RelativePageLinks extension uses JavaScript to do so therefore processes the end result that is generated by MediaWiki. This should ensure compatibility with all extensions.

This extension may come in handy if links are autogenerated and a short title can't be given. (e.g. links from SMW ASK query results)

Example: On the page Germany/Augsburg is a link to Germany/Augsburg/University. The link title will be automatically shortened to ./University.

Installation

  • <translate> <tvar name=1>Download</tvar> and place the file(s) in a directory called <tvar name=name>RelativePageLinks</tvar> in your <tvar name=ext>extensions/</tvar> folder.</translate>
  • <translate> Add the following code at the bottom of your <tvar name=1>LocalSettings.php </tvar> file:</translate>
    require_once "$IP/extensions/RelativePageLinks/RelativePageLinks.php";
    
  • File:OOjs UI icon check-constructive.svg <translate> Done</translate> – <translate> Navigate to <tvar name=special>Special:Version</tvar> on your wiki to verify that the extension is successfully installed.</translate>


Instead of downloading the zip archive you may also check this extension out via Git:

git clone https://github.com/Fannon/RelativePageLinks.git

Configuration

There are no options.

Usage

Simply include and activate this extension and it should work.