Extension:CheckGroup
From MediaWiki.org
|
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) |
| Last version | 0.1 |
| MediaWiki | 1.16?, 1.17 |
| PHP | 5.2.x, 5.3.x |
| License | GPLv2 or higher |
| Download | Git Repository |
| 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.
Usage [edit]
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.
Installation [edit]
To install this extension, add the following to LocalSettings.php:
require_once("$IP/extensions/CheckGroup/CheckGroup.php");
See also [edit]
- UserFunctions. Informs about the current user.