Author: martti
Extension Description:
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:
Code: Select all
{%- if marttiphpbb_grouptempvars.4 -%}
This content is only visible when the user is in group with id 4.
{%- endif -%}
Code: Select all
<div class="panel">
<h3>
all group ids:
</h3>
<p>
{%- for group_id, value in marttiphpbb_grouptempvars -%}
{{- group_id -}}
{%- if not loop.last -%}, {%- endif -%}
{%- endfor -%}
</p>
</div>
In the previous version (for phpBB 3.1) of this extension the variables were available in the form of:
Code: Select all
S_GROUP_ID
ID
was to be replaced with the id number of the group.This format is still available but depreciated.
This extension can be used together with my extension Custom Code for inserting custom template code in a non destructive way.
How to determine the group ids?
Extension Version: 1.1.0
Requirements:
- phpBB 3.3+
- PHP 7.1+
The files are to be put in
ext/marttiphpbb/grouptempvars
Github repository: https://github.com/marttiphpbb/phpbb-ext-grouptempvars
Languages: n/a
Templates: n/a (all)