Open main menu

Extension:CheckGroup

MediaWiki extensions manual
OOjs UI icon advanced.svg
CheckGroup
Release status: beta
Implementation Parser extension
Description Parser function for detecting whether the owner of a user page belongs to a certain group
Author(s) Toni Hermoso Pulido (Tonihertalk)
Latest version 0.1
MediaWiki 1.16?, 1.17
PHP 5.2.x, 5.3.x
License GNU General Public License 2.0 or later
Download Git Repository
Translate the CheckGroup extension if it is available at translatewiki.net
Check usage and version matrix.

Extension to be used in user profiles, normally inside templates, in order to check whether that page belongs to a user within a certain group.

UsageEdit

This parser tag should be used in a user profile page.

{{#checkgroup|{{FULLPAGENAME}}|nameofthegroup}} where nameofthegroup can be, for instance, sysop for wiki administrators.

Please, keep the first parameter always as {{FULLPAGENAME}}. With this, pagename + namespace of the current page is retrieved, which is used for checking whether the user belongs to a group specified in the second parameter.

In case of match, 1 is returned. If not, nothing is returned.

  • Example: {{#checkgroup|{{FULLPAGENAME}}|sysop}} This can be used to show in user profiles which users are wiki administrators.

InstallationEdit

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

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

See alsoEdit