The extension provide a template variable for every group the current user is in. They are all put under the template variable marttiphpbb_grouptempvars
I.e:
{%- if marttiphpbb_grouptempvars.8 -%}
This content is only visible when the user is in group with id 8.
{%- endif -%}
In the previous version (for phpBB 3.1) this extension the variables were available in the form of:
S_GROUP_<group_id>
This format is still available but depreciated.
This extension might be useful together with the Custom Code extension.
- phpBB 3.3+
- PHP 7.1+
You can install this on the latest release of phpBB by following the steps below:
- Create
marttiphpbb/grouptempvars
in theext
directory. - Download and unpack the repository into
ext/marttiphpbb/grouptempvars
- Enable
Group Template Variables
in the ACP atCustomise -> Manage extensions
.
- Disable
Group Template Variables
in the ACP atCustomise -> Extension Management -> Extensions
. - To permanently uninstall, click
Delete Data
. Optionally delete the/ext/marttiphpbb/grouptempvars
directory.
- Report bugs and other issues to the Issue Tracker.