Extension:WarnNoCategories

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

Release status: experimental

Implementation Page action
Description Warns user if she did not specify any category when editing a page
Author(s) MikhailGusarovtalk
Latest version 0.2 (2009-01-26)
MediaWiki 1.12-1.15
License GPLv3 or later
Download git repo
log
Hooks used
EditFilter

EditPage::showEditForm:fields

Translate the WarnNoCategories extension if possible

Check usage and version matrix; code metrics

What can this extension do?[edit | edit source]

This extension warns user if she did not specify any category when editing a page. It does not block user from saving the uncategorized page, though.

Usage[edit | edit source]

Just download and install and select namespaces for displaying warnings.

Download instructions[edit | edit source]

Clone a git repository from [1], extension is in extensions/WarnNoCategories directory.

Copy this directory to your $IP/extensions/. Note: $IP stands for the root directory of your MediaWiki installation, the same directory that holds LocalSettings.php.

Simpler instructions[edit | edit source]

Go to this specific page and, on the two raw links, right-click and select download. You will need to name the files WarnNoCategories.i18n.php and WarnNoCategories.php

Installation[edit | edit source]

To install this extension, add the following to LocalSettings.php:

require_once("$IP/extensions/WarnNoCategories/WarnNoCategories.php");

Configuration parameters[edit | edit source]

This extension has single parameter: $wgWarnNoCategoriesOnNamespace - set (array) of namespaces for which warnings are enabled. By default it is empty.

To enable warnings on some namespace, add the namespace to array. For example, enabling warnings in main namespace:

$wgWarnNoCategoriesOnNamespace[NS_MAIN] = true;

This line is to be added to LocalSettings.php, after extension including directive.