Page 3 of 3

Re: [BETA] The TRI FORCE (User Class + Moderator CP)

Posted: Sun Oct 28, 2007 2:18 pm
by milkman
Moderator CP is now 1.2.8.

2007/10/28 - Version 1.2.8 (Milkman)
  • Fixed modcp/pagestart.php - Login redirects really should now work!
Download from milk-hub.net.

This version is dedicated to TheInquistor and bhpepper.

Re: [BETA] The TRI FORCE (User Class + Moderator CP)

Posted: Thu Nov 01, 2007 8:07 pm
by milkman
New French translations, no version change. Download from milk-hub.net. Thanks to Alex.

Re: [BETA] The TRI FORCE (User Class + Moderator CP)

Posted: Wed Mar 05, 2008 10:35 am
by milkman
Moderator CP is now 1.2.9.

2008/03/05 - Version 1.2.9 (Milkman)
  • admin/admin_modcp.php now checks and inserts $board_config['modcp_levels_used']
  • Removed SQL instruction from install file
Download from milk-hub.net.

Re: [BETA] The TRI FORCE (User Class + Moderator CP)

Posted: Fri Aug 22, 2008 9:22 am
by oacblack
Hey milkman I currently need to make User levels to work for a Staff members block I got the colors part down pretty much but here is the line I need to edit for the levels to work

Code: Select all

$template->assign_block_vars('staff', array(
		'L_NAME' => $row['username'],
		'U_NAME' => append_sid('profile.' . $phpEx . '?mode=viewprofile&' . POST_USERS_URL . '=' . $row['user_id']),
		'USER_LEVEL' => ( $row['user_level'] == ADMIN ) ? $lang['SB_Founder'] : $lang['SB_Administrators'],
		'ONLINE_STATUS' => (!$row['user_allow_viewonline']) ? $lang['SB_Hidden'] : (($row['user_session_time'] >= (time() - 300)) ? $lang['SB_Online'] : $lang['SB_Offline']))
	);
'USER_LEVEL' => ( $row['user_level'] == ADMIN ) ? $lang['SB_Founder'] : $lang['SB_Administrators'],

Re: [BETA] The TRI FORCE (User Class + Moderator CP)

Posted: Fri Aug 22, 2008 9:35 am
by milkman
oacblack wrote:Hey milkman I currently need to make User levels to work for a Staff members block I got the colors part down pretty much but here is the line I need to edit for the levels to work
Hi oacblack, could you perhaps explain what you area asking me to help with. The code you have pasted there looks like it should work fine?

Re: [BETA] The TRI FORCE (User Class + Moderator CP)

Posted: Fri Aug 22, 2008 9:39 am
by oacblack
nvm I can just do

Code: Select all

if ( $db_select['user_level'] == ADMIN ) {
                        $user_level = ['SB_Administrators'];
                }
        else if ( $db_select['user_level'] == MOD ) {
                        $user_level = ['SB_mod'];
                }
and so on then just do

Code: Select all

'USER_LEVEL' => $user_level,

Re: [BETA] The TRI FORCE (User Class + Moderator CP)

Posted: Fri Aug 22, 2008 9:41 am
by oacblack
that code I pasted only displayed 2 levels in the staff block but I wanted it to display all the different levels I just recently installed via User Class

Re: [BETA] The TRI FORCE (User Class + Moderator CP)

Posted: Fri Aug 22, 2008 10:03 am
by oacblack
okay since founder in the userclass script isn't defined in levels I would assume I would have do do something like this? Cause one can be a founder and an admin at the same time.

Code: Select all

if ( $db_select['user_id'] == 2 ) {
                        $user_level = ['SB_Founder'];
 }
if ( $db_select['user_level'] == ADMIN ) {
                        $user_level = ['SB_Administrators'];
                }
        else if ( $db_select['user_level'] == MOD ) {
                        $user_level = ['SB_mod'];
                }

Re: [BETA] The TRI FORCE (User Class + Moderator CP)

Posted: Fri Aug 22, 2008 10:15 am
by milkman
You'll probably want an else if there not an if. It depends how you want to highlight the founder and whether that's important to your widget. Some scripts only consider the founder if they are an admin still...

Code: Select all

if ( $db_select['user_level'] == ADMIN ) {
    $user_level = ( $db_select['user_id'] == 2 ) ? $lang['SB_Founder'] : $lang['SB_Administrators'];
}
//...
 

Re: [BETA] The TRI FORCE (User Class + Moderator CP)

Posted: Fri Aug 22, 2008 10:29 am
by oacblack
sweet that worked now when I wake up i'll attempt to add the colors. thanks allot :)