SimilarNamedArticlesHeader: Unterschied zwischen den Versionen

Aus Free Software
Zur Navigation springen Zur Suche springen
Zeile 20: Zeile 20:

=== Download ===
=== Download ===

=== Installation & Configuration ===
=== Installation & Configuration ===

Aktuelle Version vom 14. November 2014, 20:06 Uhr

Manual on MediaWiki Extensions
List of MediaWiki Extensions
Crystal Clear action run.png

Release status: stable

Implementation Special page
Description Display a list of pages matching a given prefix together with additional information on top of pages.
Author(s) Mathias Ertl (Mati talk)
Version 2.0.1 (2008-04-18)
MediaWiki 1.11.0 or later
License GPL v3 or any later version.
Download see Download
Parameters $wgSimilarNamedArticlesHeaderEnable, $wgSimilarNamedArticlesHeaderOnNamespaces, $wgSimilarNamedArticlesHeaderOnSubpages, $wgSimilarNamedArticlesHeaderIncludeSubpages, $wgSimilarNamedArticlesHeaderPREG
Hooks used


This is a very simple extension that extends the SimilarNamedArticles-Extension. It prints the list much like the list given by Special:SimilarNamedArticles on top of each page. The functionality of this extension was provided by SimilarNamedArticles until version 2.0 of that extension.


The source code of this extension is managed on GitHub. You can find the repository at mathiasertl/SimilarNamedArticlesHeader. To get the most recent version of this extension, fetch the current HEAD:

git clone SimilarNamedArticlesHeader

Older versions are marked as tags, you can view available tags with git tag -l and move back to the current HEAD with git checkout <tag-name>. Versions for older versions of MediaWiki, if available, are managed as branches, use git branch and git checkout <branch> to move to a specific branch. To move back to the newest version, use git checkout master.

Note that GitHub allows you to download older different commits as tarball if you do not want to install git.

Installation & Configuration

You need to require_once the .php file and set a few configuration variables:

require_once( "extensions/SimilarNamedArticlesHeader/SimilarNamedArticlesHeader.php" );

# set to false to disable:
$wgSimilarNamedArticlesHeaderEnable = true;

# we want the list on the same namespaces asSimilarNamedArticles. 
$wgSimilarNamedArticlesHeaderOnNamespaces = $wgSimilarNamedArticlesNamespaces;

# set to true to also print on subpages:
$wgSimilarNamedArticlesHeaderOnSubpages = false;

# set to false to exclude subpages from list
$wgSimilarNamedArticlesHeaderIncludeSubpages = true;

# Search for articles with a pagename up to this regular expression (see extra documentation below):
$wgSimilarNamedArticlesHeaderPREG = '/ (VO|VU|VL|VD|UE|LU|PS|SE|PR|AR|AG|KO|KU).*/';

Of course, the search for similar named articles cannot use the whole pagename as the search word, it would always find only itself. To compute the search string, the extension takes the name of the current page and replaces the given regular expression with an empty string.


  • improved handling of pages that look like subpages
<= 2.0

See also

  • This extension uses the SimilarNamedArticles-extension and up until 2.0, this extension was part of it.


The whole matching is a bit strange:


GPL v3 or any later version.