Release status: stable
|Description||Display a list of pages matching a given prefix together with additional information on top of pages.|
|Author(s)||Mathias Ertl (Mati talk)|
|MediaWiki||1.11.0 or later|
|License||GPL v3 or any later version.|
|Parameters||$wgSimilarNamedArticlesHeaderEnable, $wgSimilarNamedArticlesHeaderOnNamespaces, $wgSimilarNamedArticlesHeaderOnSubpages, $wgSimilarNamedArticlesHeaderIncludeSubpages, $wgSimilarNamedArticlesHeaderPREG|
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 https://github.com/mathiasertl/SimilarNamedArticlesHeader.git 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
- This extension uses the SimilarNamedArticles-extension and up until 2.0, this extension was part of it.
The whole matching is a bit strange:
- TU Wien:Fundamentals at TU Wien 1 VO (me) lists TU Wien:Fundamentals at TU Wien 1 (me) but not the other way round. This is not really a bug in code, but a not-quite-thought-through specification.
GPL v3 or any later version.