Extension:LinkSuggest2

From MediaWiki.org
Jump to navigation Jump to search


MediaWiki extensions manual
OOjs UI icon advanced.svg
LinkSuggest2
Release status: unmaintained
Implementation Page action
Description Provides the user with article title suggestions as they type in wikilinks.
Author(s) (TK-999talk)
Latest version 0.1
MediaWiki 1.19+
License GPL
Download
Parameters
  • $wgLinkSuggestMaxSuggestions
  • $wgEnableEditFormLinkSuggest
Hooks used
BeforePageDisplay
GetPreferences
EditPage::showEditForm:initial
Translate the LinkSuggest2 extension if it is available at translatewiki.net
Check usage and version matrix.

The LinkSuggest2 extension provides the user with article title suggestions as they type in wikilinks. It is functionally identical to Extension:LinkSuggest, but has been rewritten from the ground up to support recent versions of MediaWiki.

Installation[edit]

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

Configuration parameters[edit]

$wgLinkSuggestMaxSuggestions
The maximum amount of suggestions to show for each link (default 3).
$wgEnableEditFormLinkSuggest
Whether to enable LinkSuggest on edit forms (default true).

Extending[edit]

The extension exposes a simple API which can be used by other extensions to add LinkSuggest support to arbitrary elements:

LinkSuggest::singleton()->addSelectors( array(  '#foo', '.bar', '.my-extension textarea' ) );