RANK switch

Discussions about the phpBB3 Forum. How to get the best from this powerful script.
Note that there is no official support for phpBB3 here, a place to share more than to ask for.

Moderator: Moderators

RANK switch

Postby lionheart » Thu Feb 04, 2010 4:04 pm

Hello,

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
lionheart
 
Posts: 32
Joined: Thu Mar 08, 2007 11:52 pm

Advertisement

Return to phpBB Forum

 


  • Related topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 18 guests