The tutorial shows how to show different information depending on what group a user is in
Full credit goes to RMcGirr83 for this code
# #-----[ OPEN ]------------------------------------------ # includes/functions.php # #-----[ FIND ]------------------------------------------ #
// application/xhtml+xml not used because of IE header('Content-type: text/html; charset=UTF-8');
# #-----[ BEFORE, ADD ]------------------------------------------ #
// Check what group a user is in if ( !function_exists('group_memberships') ) { include_once($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 )); }
Now on any page, you should be able to use this switch
<!-- IF S_GROUP_X -->
Just replace X with ID of the group. You can also expand on that and add multiple groups and/or any other template function that is built into phpBB
If user is in either of the groups
<!-- IF S_GROUP_1 or S_GROUP_2 -->
User has to be in both groups to return true
<!-- IF S_GROUP_1 and S_GROUP_2 -->
Show for all except that group
<!-- IF not S_GROUP_X -->