[BETA] The TRI FORCE (Username Color / User Level / ModCP)

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.
Famitsu
Registered User
Posts: 774
Joined: Mon Aug 25, 2003 7:59 pm
Location: Account disabled -> see my signature to contact me
Contact:

Post by Famitsu »

fubarweb wrote: Figured it was something simple like that, just don't like fiddling with others code in case I screw something up

i choose SUPPORT (Support Team) and BOT (Bot) as an example

You can choose your own LEVEL and replace SUPPORT everywhere it is located by VIP or GOLD_MEMBER, etc...

i know it's not so easy to add new level and there is no automation
Currently this is the way i choose, because i don't want to add SQL queries where it's not needed :)
Don't PM me, i won't answer anymore

My Contibs: Online-Offline-Hidden | Email Confirmation
The TRI FORCE (Username Color | User Level | ModeratorCP)
...

My new/current account: contact me here
ayusuf
I've Been Banned!
Posts: 917
Joined: Fri Feb 06, 2004 11:00 pm
Location: Orlando,Fl
Contact:

Post by ayusuf »

so famitsu when are you going to come out with the new version.
Famitsu
Registered User
Posts: 774
Joined: Mon Aug 25, 2003 7:59 pm
Location: Account disabled -> see my signature to contact me
Contact:

Post by Famitsu »

ayusuf wrote: so famitsu when are you going to come out with the new version.
Currently, i'm taking a break :D
The only Mod which needs an update and improvement is User Level
A new release could be arrive tomorrow, or in few weeks ???
depends of my time and my mood :)
Don't PM me, i won't answer anymore

My Contibs: Online-Offline-Hidden | Email Confirmation
The TRI FORCE (Username Color | User Level | ModeratorCP)
...

My new/current account: contact me here
ayusuf
I've Been Banned!
Posts: 917
Joined: Fri Feb 06, 2004 11:00 pm
Location: Orlando,Fl
Contact:

Post by ayusuf »

LOL okay no body is rushing you. where do you live by the way? france.
cifroes
Registered User
Posts: 108
Joined: Wed Mar 27, 2002 4:09 pm

Post by cifroes »

nice mod mate, you should submit it to mods-database :)
TequilaTown
Registered User
Posts: 96
Joined: Wed Jun 23, 2004 11:28 am
Contact:

Post by TequilaTown »

Quality Mod!

Just one thing.....I want to give other user levels access to the Moderators Control Panel Just like the Moderators!

Now I know it's a little fussy but I'd like the Support group to have access to it all as well.....but I don't want to make them Moderators and have loads of names set against my rooms!

I've browsed all the file changes that were made and I've tried to make similar changes to allow the Support access but I'm a bit of a novice and it all went wrong! I'm sure it's just a case of a couple of lines of script....but I'll be damned if I can work it out!

Could someone point me in the right direction!?

Cheers!
Famitsu
Registered User
Posts: 774
Joined: Mon Aug 25, 2003 7:59 pm
Location: Account disabled -> see my signature to contact me
Contact:

Post by Famitsu »

ayusuf wrote: LOL okay no body is rushing you. where do you live by the way? france.
i was behind L. Armstrong, not so far of the Tour de France ^_^
cifroes wrote: nice mod mate, you should submit it to mods-database :)
First part (Username Color) was validated yesterday :)

TequilaTown wrote: Quality Mod!

Just one thing.....I want to give other user levels access to the Moderators Control Panel Just like the Moderators!

Now I know it's a little fussy but I'd like the Support group to have access to it all as well.....but I don't want to make them Moderators and have loads of names set against my rooms!

I've browsed all the file changes that were made and I've tried to make similar changes to allow the Support access but I'm a bit of a novice and it all went wrong! I'm sure it's just a case of a couple of lines of script....but I'll be damned if I can work it out!

Could someone point me in the right direction!?

Cheers!
If you give SUPPORT level to any user, then you have to edit includes/page_tail.php
Where you have

Code: Select all

$admin_link = ( $userdata['user_level'] == ADMIN ) ? '<a href="admin/index.' . $phpEx . '?sid=' . $userdata['session_id'] . '">' . $lang['Admin_panel'] . '</a><br /><br />' : ( ( $userdata['user_level'] == MOD ) ? '<a href="modcp/index.' . $phpEx . '?sid=' . $userdata['session_id'] . '">' . $lang['Mod_CP'] . '</a><br /><br />' : '' );
Replace with

Code: Select all

$admin_link = ( $userdata['user_level'] == ADMIN ) ? '<a href="admin/index.' . $phpEx . '?sid=' . $userdata['session_id'] . '">' . $lang['Admin_panel'] . '</a><br /><br />' : ( ( ( $userdata['user_level'] == MOD ) || ( $userdata['user_level'] == SUPPORT ) ) ? '<a href="modcp/index.' . $phpEx . '?sid=' . $userdata['session_id'] . '">' . $lang['Mod_CP'] . '</a><br /><br />' : '' );
Support Team's users will have the same panel as Moderators, except for moderations rights on your forum :)
Don't PM me, i won't answer anymore

My Contibs: Online-Offline-Hidden | Email Confirmation
The TRI FORCE (Username Color | User Level | ModeratorCP)
...

My new/current account: contact me here
ayusuf
I've Been Banned!
Posts: 917
Joined: Fri Feb 06, 2004 11:00 pm
Location: Orlando,Fl
Contact:

Post by ayusuf »

maybe i asked this question before but here i go again. Are the permission for the Support Team , Bot, and Registered user the same or are they different.
kazango
Registered User
Posts: 50
Joined: Fri Jul 23, 2004 3:42 pm
Location: Holland
Contact:

Post by kazango »

When I use this code

Code: Select all

$admin_link = ( $userdata['user_level'] == ADMIN ) ? '<a href="admin/index.' . $phpEx . '?sid=' . $userdata['session_id'] . '">' . $lang['Admin_panel'] . '</a><br /><br />' : ( ( ( $userdata['user_level'] == MOD ) || ( $userdata['user_level'] == SUPPORT ) ) ? '<a href="modcp/index.' . $phpEx . '?sid=' . $userdata['session_id'] . '">' . $lang['Mod_CP'] . '</a><br /><br />' : '' );
I see the link to the Moderator panel But I see this:
:arrow: You are not authorised to administer this board
By moderators it works fine
User avatar
Lord 0f The Lanyards
Registered User
Posts: 222
Joined: Fri Jan 09, 2004 2:33 am
Location: cheeseland
Contact:

Post by Lord 0f The Lanyards »

Hey, famitsu i have added some stuff of my own onto your mod, http://rant-board.com i have super developer vip and sponsor using your mod for 3, the super moderator i used global mod hack combined with my add-on for it http://phpbb.com/phpBB/viewtopic.php?t=205252&start=40 but i know some people are wondering how did you get a level mod to work with something such as a super mod level or another type of admin so he can get into the admin panel and edit posts etc, which is what i did here:
I will use Support as an example (this code is primarily made from the global moderator hack, however some lines are completely mine),

Code: Select all

#
#--------------[ Open ]--------------------------------------------
#
admin/admin_ug_auth.php

#
#--------------[ Find ]--------------------------------------------
#
				$optionlist_acl = '<select name="private[' . $forum_id . ']">';

				if ( $is_admin || $user_ary['auth_mod'] )
#
#--------------[ Replace With ]------------------------------------
#
				$optionlist_acl = '<select name="private[' . $forum_id . ']">';

				if ( $is_admin || $is_support || $user_ary['auth_mod'] )
#
#--------------[ Find ]--------------------------------------------
#
if ( isset($auth_field_acl[$forum_id][$field_name]) && !($is_admin || $user_ary['auth_mod']) )
#
#--------------[ Replace With ]------------------------------------
#
if ( isset($auth_field_acl[$forum_id][$field_name]) && !($is_admin || $is_support || $user_ary['auth_mod']) )
#
#--------------[ Find ]--------------------------------------------
#
							else
							{
								if ( $is_admin || $user_ary['auth_mod'] )
								{
									$optionlist_acl_adv[$forum_id][$k] .= '<option value="1">' . $lang['ON'] . '</option>';
#
#--------------[ Replace With ]-------------------------------------
#
							else
							{
								if ( $is_admin || $is_support || $user_ary['auth_mod'] )
								{
									$optionlist_acl_adv[$forum_id][$k] .= '<option value="1">' . $lang['ON'] . '</option>';
#
#--------------[ Open ]--------------------------------------------
#(this is to give the user leve support in this case access to the admin panel)
admin/pagestart.php
#
#--------------[ Find ]---------------------------------------------
#
else if ($userdata['user_level'] != ADMIN)
#
#--------------[ Replace With ]---------------------------------------------
#
else if( $userdata['user_level'] != SUPPORT &&
		$userdata['user_level'] != ADMIN )
#
#--------------[ Open ]---------------------------------------------
#
root/includes/auth.php
#
#--------------[ Find ]---------------------------------------------
#
	$is_admin = ( $userdata['user_level'] == ADMIN && $userdata['session_logged_in'] ) ? TRUE : 0;
#
#--------------[ After, Add ]---------------------------------------
#
	$is_support = ( $userdata['user_level'] == SUPPORT && $userdata['session_logged_in'] ) ? TRUE : 0;
#
#--------------[ Find ]---------------------------------------------
#
					$auth_user[$key] = ( $userdata['session_logged_in'] ) ? auth_check_user(AUTH_ACL, $key, $u_access, $is_admin) : 0;
#
#--------------[ Replace With ]-------------------------------------
#
					$auth_user[$key] = ( $userdata['session_logged_in'] ) ? auth_check_user(AUTH_ACL, $key, $u_access, $is_support || $is_admin) : 0;
#
#--------------[ Find ]---------------------------------------------
#
					$auth_user[$key] = ( $userdata['session_logged_in'] ) ? auth_check_user(AUTH_MOD, 'auth_mod', $u_access, $is_admin) : 0;
#
#--------------[ Replace With ]-------------------------------------
#
					$auth_user[$key] = ( $userdata['session_logged_in'] ) ? auth_check_user(AUTH_MOD, 'auth_mod', $u_access, $is_support || $is_admin) : 0;
#
#--------------[ Find ]---------------------------------------------
#
# // Don't do this part if you don't want to give support access to admin only forums
#
					$auth_user[$key] =  $is_admin;
#
#--------------[ Replace With ]-------------------------------------
#
# // Don't do this part if you don't want to give support access to admin only forums
#
					$auth_user[$key] =  $is_support || $is_admin;
#
#--------------[ Find ]---------------------------------------------
#
						$auth_user[$f_forum_id][$key] = ( $userdata['session_logged_in'] ) ? auth_check_user(AUTH_ACL, $key, $u_access[$f_forum_id], $is_admin) : 0;
#
#--------------[ Replace With ]-------------------------------------
#
						$auth_user[$f_forum_id][$key] = ( $userdata['session_logged_in'] ) ? auth_check_user(AUTH_ACL, $key, $u_access[$f_forum_id], $is_support || $is_admin) : 0;
#
#--------------[ Find ]---------------------------------------------
#
						$auth_user[$f_forum_id][$key] = ( $userdata['session_logged_in'] ) ? auth_check_user(AUTH_MOD, 'auth_mod', $u_access[$f_forum_id], $is_admin) : 0;
#
#--------------[ Replace With ]-------------------------------------
#
						$auth_user[$f_forum_id][$key] = ( $userdata['session_logged_in'] ) ? auth_check_user(AUTH_MOD, 'auth_mod', $u_access[$f_forum_id], $is_support || $is_admin) : 0;
#
#--------------[ Find ]---------------------------------------------
#
# // Don't do this part if you don't want to give support access to admin only forums
#
						$auth_user[$f_forum_id][$key] =  $is_admin;
#
#--------------[ Replace With ]-------------------------------------
#
# // Don't do this part if you don't want to give support access to admin only forums
#
						$auth_user[$f_forum_id][$key] =  $is_support || $is_admin;
#
#--------------[ Find ]---------------------------------------------
#
		$auth_user['auth_mod'] = ( $userdata['session_logged_in'] ) ? auth_check_user(AUTH_MOD, 'auth_mod', $u_access, $is_admin) : 0;
#
#--------------[ Replace With ]--------------------------------------
#
		$auth_user['auth_mod'] = ( $userdata['session_logged_in'] ) ? auth_check_user(AUTH_MOD, 'auth_mod', $u_access, $is_support || $is_admin) : 0;
#
#--------------[ Find ]----------------------------------------------
#
			$auth_user[$f_forum_id]['auth_mod'] = ( $userdata['session_logged_in'] ) ? auth_check_user(AUTH_MOD, 'auth_mod', $u_access[$f_forum_id], $is_admin) : 0;
#
#--------------[ Replace With ]--------------------------------------
#
			$auth_user[$f_forum_id]['auth_mod'] = ( $userdata['session_logged_in'] ) ? auth_check_user(AUTH_MOD, 'auth_mod', $u_access[$f_forum_id], $is_support || $is_admin) : 0;
#
#--------------------------------------------------------------------
#
# // Don't do the rest if you don't want support to have access to admin only forums
#
#--------------[ Find ]----------------------------------------------
#
					$result = $result || $is_admin;
#
#--------------[ Replace With ]--------------------------------------
#
					$result = $result || $is_support || $is_admin;
#
#--------------[ Find ]----------------------------------------------
#
		$auth_user = $is_admin;
#
#--------------[ Replace With ]--------------------------------------
#
		$auth_user = $is_support || $is_admin;
#
#--------------[ Open ]----------------------------------------------
#ONLY EDIT THIS FILE IF YOU WISH TO SHOW THE ADMIN LINK TO SUPPORT (IN THIS CASE)
includes/page_tail.php
#
#--------------[ Find ]----------------------------------------------
#
$admin_link = ( $userdata['user_level'] == ADMIN ) ? '<a href="admin/index.' . $phpEx . '?sid=' . $userdata['session_id'] . '">' . $lang['Admin_panel'] . '</a><br /><br />' : '';
#
#--------------[ After, Add ]----------------------------------------------
#
$support_link = ( $userdata['user_level'] == SUPPORT ) ? '<a href="admin/index.' . $phpEx . '?sid=' . $userdata['session_id'] . '">' . $lang['Admin_panel'] . '</a><br /><br />' : '';
#
#--------------[ Find ]----------------------------------------------
#
	'ADMIN_LINK' => $admin_link)
#
#--------------[ Before, Add ]----------------------------------------------
#
	'SUPPORT_LINK' => $support_link,
#
#--------------[ Open ]----------------------------------------------
# do this to all templates
templates/subSilver/overall_footer.tpl
#
#--------------[ Find ]----------------------------------------------
#
{ADMIN_LINK}
#
#--------------[ After, Add ]----------------------------------------------
#
<br />{SUPPORT_LINK}
#
#--------------------------------------------------------------------
#
# EoM
hey guys please report errors and stuff to my board, http://www.rant-board.com/viewtopic.php?p=269 , you need to be registered, i might've wrote some stuff down wrong so please report it

anyone who wants to see this in action go to http://rant-board.com my username is a living example of the mod working as i am a developer and i can access teh admin panel fine and do anything i want in it and also i am able to edit posts and view topics that should only be seen by admins etc... good luck guys

Also, Famitsu, i think the modcp should instead of allowing mods to ban people, to ban people from THEIR forum :-D, can you make this an option in mod cp i would greatly appreciate it by the way i tried saying the name famitsu to my baby brother and he thinks its really funny lol
Last edited by Lord 0f The Lanyards on Thu Jul 29, 2004 10:06 pm, edited 1 time in total.
TequilaTown
Registered User
Posts: 96
Joined: Wed Jun 23, 2004 11:28 am
Contact:

Post by TequilaTown »

Cheers lads! I shall have a go at both your ideas and get back to you with my warmest regards when I succeed!
TequilaTown
Registered User
Posts: 96
Joined: Wed Jun 23, 2004 11:28 am
Contact:

Post by TequilaTown »

Okay, with regret, I'm having no joy!!

Famitsu - Your changes do add the MCP link but, as kazango said you are unable are to you told that You are not authorised to administer this board

Lord 0f The Lanyards - I made the changes you suggest.....with a little difficult I might add. I use the find function of text editors to find the pieces of script that I desire. I had great trouble finding the lines that you indicate. I got an error on the control panel of the ACP saying that there was a parse error in the admin/admin_ug_auth.php file! I went over the data a manually typed in the changes, rather than cut and paste, and this seemed to fix it all!

Once done I have similar problems as with Famitsu's suggestion! I'm getting the You are not authorised to administer this board

I'm gonna endevour to see if I can fix it....I'm sure it's just a simple typo somewhere, or a line I failed to edit!

Cheers once again! Any comments, get in touch!
TequilaTown
Registered User
Posts: 96
Joined: Wed Jun 23, 2004 11:28 am
Contact:

Post by TequilaTown »

Nope....been over it all again and again! There's no typos and everything is where it should be, but I still can't gain access!

Is there a chance that there is a line of code missing from the changes that you suggested Lord 0f The Lanyards???
Famitsu
Registered User
Posts: 774
Joined: Mon Aug 25, 2003 7:59 pm
Location: Account disabled -&gt; see my signature to contact me
Contact:

Post by Famitsu »

TequilaTown wrote: Okay, with regret, I'm having no joy!!

Famitsu - Your changes do add the MCP link but, as kazango said you are unable are to you told that You are not authorised to administer this board


Once done I have similar problems as with Famitsu's suggestion! I'm getting the You are not authorised to administer this board

I'm gonna endevour to see if I can fix it....I'm sure it's just a simple typo somewhere, or a line I failed to edit!

Cheers once again! Any comments, get in touch!

:oops: sorry each time i forgot this line
in modcp/pagestart.php
REPLACE

Code: Select all

else if ( $userdata['user_level'] != MOD && $userdata['user_level'] != ADMIN )
WITH

Code: Select all

else if ( ( $userdata['user_level'] != MOD ) && ( $userdata['user_level'] != ADMIN ) && ( $userdata['user_level'] != SUPPORT ) )
Now, i assume that should work

About permission, i have my own code for User Level Mod
Not release yet cause very unstable and need to be improved :?

Lord 0f The Lanyards wrote: Also, Famitsu, i think the modcp should instead of allowing mods to ban people, to ban people from THEIR forum :-D, can you make this an option in mod cp i would greatly appreciate it by the way i tried saying the name famitsu to my baby brother and he thinks its really funny lol
How you think is it possible to ban a user from one forum when he can access to all ???
Your question is weird

lol Famitsu isn't my original nickname, it's
kooky but J. Abela never answered to my request to activate my inactive account (cause no email activation received)
Famitsu is the name a Japonese weekly magazine first about Famicom world then about all the Big N video games 8)
Don't PM me, i won't answer anymore

My Contibs: Online-Offline-Hidden | Email Confirmation
The TRI FORCE (Username Color | User Level | ModeratorCP)
...

My new/current account: contact me here
kazango
Registered User
Posts: 50
Joined: Fri Jul 23, 2004 3:42 pm
Location: Holland
Contact:

Post by kazango »

It works :D
Last edited by Kazango on Thu Jul 29, 2004 6:35 am; edited 458 times in total
Post Reply

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