i would like to hide/show information on my forum based on member RANK using switches.
I found the following code that works for GROUPS but i would like to modify it to work based on user RANK.
FIND
- Code: Select all
'A_COOKIE_SETTINGS' => addslashes('; path=' . $config['cookie_path'] . ((!$config['cookie_domain'] || $config['cookie_domain'] == 'localhost' || $config['cookie_domain'] == '127.0.0.1') ? '' : '; domain=' . $config['cookie_domain']) . ((!$config['cookie_secure']) ? '' : '; secure')),
));
AFTER ADD
- 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
));
}
- Code: Select all
<!-- IF S_GROUP_2 -->some stuff here<!-- ENDIF -->
any help would be appreciated!
thank you

English |
French