Code by RMcGirr83
This code can be used to show specific content to specific groups, or the other way around.
It could be that you want to display ads for registered users, but not your VIP Group.
Open includes/functions.php
Find:
Code: Select all
// The following assigns all _common_ variables that may be used at any point in a template.
Code: Select all
if ( !function_exists('group_memberships') )
{
include($phpbb_root_path . 'includes/functions_user.'.$phpEx);
}
$groups = group_memberships(false,$user->data['user_id']);
foreach ($groups as $grouprec)
{
$template->assign_vars(array(
'S_GROUP_' . $grouprec['group_id'] => true
));
}
If you you want to show some content to a specific group:
Code: Select all
<!-- IF S_GROUP_ID -->Content here<!-- ENDIF -->
Code: Select all
<!-- IF not S_GROUP_ID -->Content here<!-- ENDIF -->