I have several user groups in LocalSettings.php
:
$wgGroupPermissions["SM_p1"]["createaccount"] = false;
$wgGroupPermissions["SM_p1"]["edit"] = false;
$wgGroupPermissions["SM_p1"]["read"] = true;
$wgGroupPermissions["SM_p2"]["createaccount"] = false;
$wgGroupPermissions["SM_p2"]["edit"] = false;
$wgGroupPermissions["SM_p2"]["read"] = true;
I would like to show page content which depends on logged user with help of function #ifingroup
.
I put lines of code in my main mage:
<strong>MediaWiki has been installed.</strong>
{{#ifingroup: SM_p1|Welcome, SM_p1 User!|This content is for SM_p1 users only.}}
{{#expr: 5+5 }}
Line {{#expr: 5+5 }}
brings 10
as expected. But line {{#ifingroup: SM_p1|Welcome, SM_p1 User!|This content is for SM_p1 users only.}}
is displayed as text.
What extension brings function #ifingroup
?
I have several user groups in LocalSettings.php
:
$wgGroupPermissions["SM_p1"]["createaccount"] = false;
$wgGroupPermissions["SM_p1"]["edit"] = false;
$wgGroupPermissions["SM_p1"]["read"] = true;
$wgGroupPermissions["SM_p2"]["createaccount"] = false;
$wgGroupPermissions["SM_p2"]["edit"] = false;
$wgGroupPermissions["SM_p2"]["read"] = true;
I would like to show page content which depends on logged user with help of function #ifingroup
.
I put lines of code in my main mage:
<strong>MediaWiki has been installed.</strong>
{{#ifingroup: SM_p1|Welcome, SM_p1 User!|This content is for SM_p1 users only.}}
{{#expr: 5+5 }}
Line {{#expr: 5+5 }}
brings 10
as expected. But line {{#ifingroup: SM_p1|Welcome, SM_p1 User!|This content is for SM_p1 users only.}}
is displayed as text.
What extension brings function #ifingroup
?
1 Answer
Reset to default 0What extension brings function
#ifingroup
?
That is Extension:UserFunctions (MediaWiki).
You may have it already enabled, however this note about the namespace (and there is also something about the side-bar):
By default, functions are only enabled in
NS_MEDIAWIKI
namespace, for enabling them in other namespaces, see the examples below. (ebd.)