Extension:FlexiblePrefix

Category:Unmaintained extensions#FlexiblePrefix Category:Extensions without an imageCategory:Extensions without a compatibility policyCategory:MIT licensed extensions
MediaWiki extensions manual
FlexiblePrefix
Release status: unmaintainedCategory:Unmaintained extensions
Implementation Special page Category:Special page extensions, Hook Category:Hook extensions
Description A more flexible version of Special:Prefixindex that lets you omit namespaces and redirects if there is only one result.
Author(s) (Gittenburgtalk)
Latest version 0.1.0 (2019-05-04)
MediaWiki Category:Extensions without MediaWiki version
License MIT License
Download Category:Extensions in GitHub version control
Example example using FlexiblePrefixDetails hook
$wgFlexiblePrefixNamespaces
Category:All extensionsCategory:Extensions not in ExtensionJson

The FlexiblePrefix extension provides a more flexible version of Special:PrefixIndex that lets you omit namespaces and redirects if there is only one result.

Usage

  • Special:FlexiblePrefix/Title
Searches across $wgFlexiblePrefixNamespaces.
  • Special:FlexiblePrefix/Namespace:Title
Searches in the given namespace.
  • Special:FlexiblePrefix/:Title
Searches in the main namespace.

Installation

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

Configuration parameters

$wgFlexiblePrefixNamespaces
Array of ids of the enabled namespaces.

Tips

  • The FlexiblePrefixDetails(Title $title, &$details, $context) hook lets you add details to results (details is an associative array mapping keys to HTML strings).
  • The FlexiblePrefixBeforeDisplay(&$items, $context) hook lets you modify the result list before display.
  • The SpecialFlexiblePrefix class can be integrated elsewhere (either by direct instantiation or inheritance).

Credits

This extension is a rewrite of SimilarNamedArticles by Mathias Ertl.

Category:All extensions Category:Extensions in GitHub version control Category:Extensions not in ExtensionJson Category:Extensions without MediaWiki version Category:Extensions without a compatibility policy Category:Extensions without an image Category:Hook extensions Category:MIT licensed extensions Category:Special page extensions Category:Unmaintained extensions