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

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
User avatar
milkman
Registered User
Posts: 165
Joined: Mon Nov 29, 2004 1:55 am
Location: Loughborough, UK
Contact:

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

Post by milkman » Sun Oct 28, 2007 2:18 pm

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.
Milkman [MilkHub]

User avatar
milkman
Registered User
Posts: 165
Joined: Mon Nov 29, 2004 1:55 am
Location: Loughborough, UK
Contact:

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

Post by milkman » Thu Nov 01, 2007 8:07 pm

New French translations, no version change. Download from milk-hub.net. Thanks to Alex.
Milkman [MilkHub]

User avatar
milkman
Registered User
Posts: 165
Joined: Mon Nov 29, 2004 1:55 am
Location: Loughborough, UK
Contact:

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

Post by milkman » Wed Mar 05, 2008 10:35 am

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.
Milkman [MilkHub]

oacblack
Registered User
Posts: 61
Joined: Tue Mar 27, 2007 6:33 am

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

Post by oacblack » Fri Aug 22, 2008 9:22 am

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'],

User avatar
milkman
Registered User
Posts: 165
Joined: Mon Nov 29, 2004 1:55 am
Location: Loughborough, UK
Contact:

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

Post by milkman » Fri Aug 22, 2008 9:35 am

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?
Milkman [MilkHub]

oacblack
Registered User
Posts: 61
Joined: Tue Mar 27, 2007 6:33 am

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

Post by oacblack » Fri Aug 22, 2008 9:39 am

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,

oacblack
Registered User
Posts: 61
Joined: Tue Mar 27, 2007 6:33 am

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

Post by oacblack » Fri Aug 22, 2008 9:41 am

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

oacblack
Registered User
Posts: 61
Joined: Tue Mar 27, 2007 6:33 am

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

Post by oacblack » Fri Aug 22, 2008 10:03 am

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'];
                }

User avatar
milkman
Registered User
Posts: 165
Joined: Mon Nov 29, 2004 1:55 am
Location: Loughborough, UK
Contact:

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

Post by milkman » Fri Aug 22, 2008 10:15 am

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'];
}
//...
 
Milkman [MilkHub]

oacblack
Registered User
Posts: 61
Joined: Tue Mar 27, 2007 6:33 am

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

Post by oacblack » Fri Aug 22, 2008 10:29 am

sweet that worked now when I wake up i'll attempt to add the colors. thanks allot :)

Post Reply

Return to “[2.0.x] MODs in Development”