Extension:AnchorHandler

From MediaWiki.org
Jump to: navigation, search
MediaWiki extensions manualManual:Extensions
Crystal Clear action run.png
AnchorHandler

Release status:Extension status beta

ImplementationTemplate:Extension#type Tag
DescriptionTemplate:Extension#description Allows inserting <a> anchor tags into wikitext
Author(s)Template:Extension#username Ike Hecht (tosfostalk)
Latest versionTemplate:Extension#version 0.2 (September 2014)
MediaWikiTemplate:Extension#mediawiki > 1.21, likely earlier versions as well
PHPTemplate:Extension#php 5.3+
Database changesTemplate:Extension#needs-updatephp No
LicenseTemplate:Extension#license GNU General Public License 2.0 or later
Download
ParametersTemplate:Extension#parameters

$egAnchorNamespaces

Hooks usedTemplate:Extension#hook
ParserFirstCallInitManual:Hooks/ParserFirstCallInit

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

Check usage and version matrix.

The AnchorHandler extension allows inserting <a> anchor tags into wikitext. By default, it simply passes through the text within the <a>...</a> tags. It can be configured to actually parse and convert the anchor tags to working links in certain namespaces. This is especially helpful when importing raw HTML into a wiki.

Installation[edit]

  • Download and place the file(s) in a directory called AnchorHandler in your extensions/ folder.
  • Add the following code at the bottom of your LocalSettings.php:
    require_once "$IP/extensions/AnchorHandler/AnchorHandler.php";
    
  • YesY Done - Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

Configuration parameters[edit]

$egAnchorNamespaces
Tells the extension to actually convert the anchor tags to links in the specified namespaces. Example:
$egAnchorNamespaces = array ( NS_MAIN );
See this list of namespace constants.

See also[edit]