Extension:TitleKey

From MediaWiki.org
Jump to: navigation, search
MediaWiki extensions manual
Crystal Clear action run.png
TitleKey

Release status: stable

Implementation Search
Description Title prefix search suggestion backend
Author(s) Brion Vibber (Brion VIBBERtalk)
Latest version continuous updates
MediaWiki 1.12+
Database changes Yes
Tables titlekey
License GPL v2 or later
Download
README
Hooks used
ArticleDelete

ArticleDeleteComplete
ArticleInsertComplete
ArticleUndelete
TitleMoveComplete
ParserTestTables
LoadExtensionSchemaUpdates
PrefixSearchBackend
SearchGetNearMatch

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

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

The TitleKey extension provides a case-insensitive title prefix search. It uses a separate table for the keys, so if it works cleanly it can be deployed without an expensive rebuild of core tables, and dumped when Wikimedia gets a nicer backend through Extension:LuceneSearch (pre 1.13) or Extension:MWSearch (1.13+).

For the average site administrator, the benefit of this extension is that it allows search suggestions (e.g. from Opensearch API) to be case-insensitive.

Installation[edit | edit source]

  • Download and extract the file(s) in a directory called TitleKey in your extensions/ folder. If you're a developer and this extension is in a Git repository, then instead you should clone the repository using:
git clone https://gerrit.wikimedia.org/r/p/mediawiki/extensions/TitleKey.git
  • Add the following code at the bottom of your LocalSettings.php:
require_once "$IP/extensions/TitleKey/TitleKey.php";
$wgEnableMWSuggest = true; #Not needed if using MediaWiki 1.20+
  • Run the update script which will automatically create the necessary database tables that this extension needs.
  • Run the rebuildTitleKeys.php script (this requires command-line access):
php extensions/TitleKey/rebuildTitleKeys.php
  • Done! Navigate to "Special:Version" on your wiki to verify that the extension is successfully installed.

Troubleshooting[edit | edit source]

If you put, e.g., require_once( "/home/stauffenbergssh/extensions/TitleKey/TitleKey.php" ); you might get "Failed opening required '/home/stauffenbergssh/extensions/TitleKey/../../maintenance/Maintenance.php'"". To fix it, you would put a copy of the Titlekey directory under your wiki extensions folder (rather than in an extensions folder outside of webroot).


Language: English  • français