[ABD] Super Moderators

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.
Locked
User avatar
Rawly
Registered User
Posts: 218
Joined: Sun Mar 10, 2002 7:33 pm
Location: Manchester, UK
Contact:

Post by Rawly »

This is my admin_ug_auth.php around the area you are talking about, and this is what gatekeep2 meant by commenting out the code

Code: Select all

		//
		// Update user level to user for appropriate users
		// 
//		switch ( SQL_LAYER )
//		{
//			case 'postgresql':
//				$sql = "SELECT u.user_id 
//					FROM " . USERS_TABLE . " u, " . USER_GROUP_TABLE . " ug, " . AUTH_ACCESS_TABLE . " aa
//					WHERE ug.user_id = u.user_id 
//						AND aa.group_id = ug.group_id 
//						AND u.user_level NOT IN (" . USER . ", " . ADMIN . ")
//					GROUP BY u.user_id 
//					HAVING SUM(aa.auth_mod) = 0 
//					UNION (
//						SELECT u.user_id  
//						FROM " . USERS_TABLE . " u 
//						WHERE NOT EXISTS ( 
//							SELECT aa.auth_mod 
//							FROM " . USER_GROUP_TABLE . " ug, " . AUTH_ACCESS_TABLE . " aa 
//							WHERE ug.user_id = u.user_id 
//								AND aa.group_id = ug.group_id
//						)
//						AND u.user_level NOT IN (" . USER . ", " . ADMIN . ")  
//						GROUP BY u.user_id
//					)";
//				break;
//			case 'oracle':
//				$sql = "SELECT u.user_id 
//					FROM " . USERS_TABLE . " u, " . USER_GROUP_TABLE . " ug, " . AUTH_ACCESS_TABLE . " aa 
//					WHERE ug.user_id = u.user_id(+)
//						AND aa.group_id = ug.group_id(+) 
//						AND u.user_level NOT IN (" . USER . ", " . ADMIN . ")
//					GROUP BY u.user_id 
//					HAVING SUM(aa.auth_mod) = 0";
//				break;
//			default:
//				$sql = "SELECT u.user_id 
//					FROM ( ( " . USERS_TABLE . " u  
//					LEFT JOIN " . USER_GROUP_TABLE . " ug ON ug.user_id = u.user_id ) 
//					LEFT JOIN " . AUTH_ACCESS_TABLE . " aa ON aa.group_id = ug.group_id ) 
//					WHERE u.user_level NOT IN (" . USER . ", " . ADMIN . ")
//					GROUP BY u.user_id 
//					HAVING SUM(aa.auth_mod) = 0";
//				break;
//		}


switch ( SQL_LAYER ) 
{ 
   case 'postgresql': 
      $sql = "SELECT u.user_id 
         FROM " . USERS_TABLE . " u, " . USER_GROUP_TABLE . " ug, " . AUTH_ACCESS_TABLE . " aa 
         WHERE ug.user_id = u.user_id 
            AND aa.group_id = ug.group_id 
            AND u.user_level NOT IN (" . USER . ", " . ADMIN . ", " . LESS_ADMIN . ") 
         GROUP BY u.user_id 
         HAVING SUM(aa.auth_mod) = 0 
         UNION ( 
            SELECT u.user_id  
            FROM " . USERS_TABLE . " u 
            WHERE NOT EXISTS ( 
               SELECT aa.auth_mod 
               FROM " . USER_GROUP_TABLE . " ug, " . AUTH_ACCESS_TABLE . " aa 
               WHERE ug.user_id = u.user_id 
                  AND aa.group_id = ug.group_id 
            ) 
            AND u.user_level NOT IN (" . USER . ", " . ADMIN . ", " . LESS_ADMIN . ")  
            GROUP BY u.user_id 
         )"; 
      break; 
   case 'oracle': 
      $sql = "SELECT u.user_id 
         FROM " . USERS_TABLE . " u, " . USER_GROUP_TABLE . " ug, " . AUTH_ACCESS_TABLE . " aa 
         WHERE ug.user_id = u.user_id(+) 
            AND aa.group_id = ug.group_id(+) 
            AND u.user_level NOT IN (" . USER . ", " . ADMIN . ", " . LESS_ADMIN . ") 
         GROUP BY u.user_id 
         HAVING SUM(aa.auth_mod) = 0"; 
      break; 
   default: 
      $sql = "SELECT u.user_id 
         FROM ( ( " . USERS_TABLE . " u  
         LEFT JOIN " . USER_GROUP_TABLE . " ug ON ug.user_id = u.user_id ) 
         LEFT JOIN " . AUTH_ACCESS_TABLE . " aa ON aa.group_id = ug.group_id ) 
         WHERE u.user_level NOT IN (" . USER . ", " . ADMIN . ", " . LESS_ADMIN . ") 
         GROUP BY u.user_id 
         HAVING SUM(aa.auth_mod) = 0"; 
      break; 
}
Xeon
Registered User
Posts: 42
Joined: Sat May 25, 2002 2:31 pm

Post by Xeon »

I don't understand... shall I change the first "chapter" to the second??
dookie
Registered User
Posts: 32
Joined: Mon Feb 11, 2002 2:51 pm
Location: Germany
Contact:

Post by dookie »

Hi

Is this Mod still in development or have you given up?

It still doesn´t work fine. :(
gatekeep2
Registered User
Posts: 173
Joined: Sat Feb 16, 2002 5:26 am
Location: /dev/null
Contact:

Post by gatekeep2 »

do you mind telling us how it doesnt work?
Please, do not conact me for phpBB support.
dookie
Registered User
Posts: 32
Joined: Mon Feb 11, 2002 2:51 pm
Location: Germany
Contact:

Post by dookie »

dookie wrote:
Akro wrote:Most of this Mod is now working fairly well.
Though, I am experiencing one small, but annoying glitch.

In my Forums, I have absolutely no users set to 'Is Moderator' for any Forum. Instead, I have made Groups, and those groups I have set to 'Is Moderator' for the Forums that I select, and then I add appropriate users to those Groups.

Ok, good so far. I then select a couple users and promote them to SuperModerator. Excellent... that works too.

Now here's the problem...
If I change ANY permissions for any of the Groups that a SuperMod happens to be a member of, those users lose their SuperMod status. I then need to go back into UserAdmin->Perms and reset their status to 'SuperMod'.

Any hope on clearing up this little glitch?
I hope so ... this is an otherwise excellent Mod!!!


Yes, that´s exactly my problem too.

Supermods turn back to normal Moderators when I change any permissions in my usergroups.
User avatar
Jameson
Registered User
Posts: 35
Joined: Thu May 16, 2002 5:36 am

Post by Jameson »

I don´t know if this Problem already anyone have post!When i give in Forum Permissons only Mods the auth to post a stickys only th Super Mods can Post a sticky and not the normal Mods!!

Is this problem already fixed in the new version of this Mod?I have still the first version of this mod :oops:

Jameson
User avatar
Rawly
Registered User
Posts: 218
Joined: Sun Mar 10, 2002 7:33 pm
Location: Manchester, UK
Contact:

Post by Rawly »

I havent heard of this problem before.

HAve you been playng around with the user auths? (other than gatekeeps2 edit)
User avatar
Jameson
Registered User
Posts: 35
Joined: Thu May 16, 2002 5:36 am

Post by Jameson »

No i don´t have playing around with it :)
I have look into my DB on auth_sticky table the auth is on 3 also Super Mod :o

Jameson
whackyshack
Registered User
Posts: 81
Joined: Tue May 28, 2002 4:47 pm
Contact:

Small bugs

Post by whackyshack »

First off I would like to thank you for all your hard work.

I have a small problem with the permissions thing thou. Just like others have said before about the group thing. Mine is with single users.

Say I have one super moderator. I can set him up as a super moderator fine. THat works, but when I want to change his status in the permissions for the forums to 'Is Moderator' for a particular forum (basically just so his name shows up under forum topic) I get one of a few problems. I have three private forums, if I set it so that he can view all of them and hit submit he is bumped up to an 'Administrator' If I set it so that he 'Is Allowed' for 2 of them and 'Not Allowed' for one of them he is bumped down to user with Mod status in the one forum that I set him to be a mod of. Now if I do not set him as 'IS Moderator' of any of the forums then he will remain as a "Super Moderator" and I can set him to 'Not allowed' access to the private forum that I do not want him to enter.

I hope you understand all of this because I would really like to see this thing get all ironed out. This is a really great mod.

BTW while I am still rambling on.
Could you add something in the Mod so that if a user has the "Level in Membership" mod installed it will show these Super Moderators in there too instead of showing them as users in the memberlist. I got it figured out on my forum, but it might be nice for others. Just a suggestion. Thanks again for all the hard work.
Night4554
Registered User
Posts: 99
Joined: Sun Apr 07, 2002 3:09 am

Post by Night4554 »

1) wacky could you share how you did the "level in memberlist" with the rest of us?

2) When i try and update the styles I get "Could not update themes table!" even if i didn't change the Font Color #4 setting
whackyshack
Registered User
Posts: 81
Joined: Tue May 28, 2002 4:47 pm
Contact:

Post by whackyshack »

Night4554 wrote: 1) wacky could you share how you did the "level in memberlist" with the rest of us?

2) When i try and update the styles I get "Could not update themes table!" even if i didn't change the Font Color #4 setting


sure. if you look in the original code for the "Level in membership" you will see this about half way down. Edit: this is the part you put in memberlist.php

Code: Select all


# 
#-----[ FIND ]------------------------------------------ 
# 

$posts = ( $row['user_posts'] ) ? $row['user_posts'] : 0;

# 
#-----[ AFTER, ADD ]------------------------------------------ 
#
 
	if( $row['user_level'] == 1)
	{
$level = "<font color=#" . $theme['fontcolor3'] . "><b>Admin</b>";
$username = "<font color=#" . $theme['fontcolor3'] . "><b>" . $row['username'] . "</b>";
$from = ( !empty($row['user_from']) ) ? "<font color=#" . $theme['fontcolor3'] . "><b>" . $row['user_from'] . "</b>" : '&nbsp;';
$joined = "<font color=#" . $theme['fontcolor3'] . "><b>" . create_date($lang['DATE_FORMAT'], $row['user_regdate'], $board_config['board_timezone']) . "</b>";
$posts = ( $row['user_posts'] ) ? "<font color=#" . $theme['fontcolor3'] . "><b>" . $row['user_posts'] : 0 . "</b>";
	}
	elseif( $row['user_level'] == 0)
	{
$level = User;
$username = $row['username'];
$from = ( !empty($row['user_from']) ) ? $row['user_from'] : '&nbsp;';
$joined = create_date($lang['DATE_FORMAT'], $row['user_regdate'], $board_config['board_timezone']);
$posts = ( $row['user_posts'] ) ? $row['user_posts'] : 0;
	}
	elseif( $row['user_level'] == 2)
	{
$level = "<font color=#" . $theme['fontcolor2'] . "><b>Mod</b>";
$username = "<font color=#" . $theme['fontcolor2'] . "><b>" . $row['username'] . "</b>";
$from = ( !empty($row['user_from']) ) ? "<font color=#" . $theme['fontcolor2'] . "><b>" . $row['user_from'] . "</b>" : '&nbsp;';
$joined = "<font color=#" . $theme['fontcolor2'] . "><b>" . create_date($lang['DATE_FORMAT'], $row['user_regdate'], $board_config['board_timezone']) . "</b>";
$posts = ( $row['user_posts'] ) ? "<font color=#" . $theme['fontcolor2'] . "><b>" . $row['user_posts'] : 0 . "</b>";
	}

Just add this in there

Basically all i did was cut and paste the Admin section and change the appropriate variables.

Code: Select all

elseif( $row['user_level'] == 3)
	{
$level = "<font color=#" . $theme['fontcolor4'] . "><b>Super Mod</b>";
$username = "<font color=#" . $theme['fontcolor4'] . "><b>" . $row['username'] . "</b>";
$from = ( !empty($row['user_from']) ) ? "<font color=#" . $theme['fontcolor4'] . "><b>" . $row['user_from'] . "</b>" : '&nbsp;';
$joined = "<font color=#" . $theme['fontcolor4'] . "><b>" . create_date($lang['DATE_FORMAT'], $row['user_regdate'], $board_config['board_timezone']) . "</b>";
$posts = ( $row['user_posts'] ) ? "<font color=#" . $theme['fontcolor4'] . "><b>" . $row['user_posts'] : 0 . "</b>";
	}
And that is all I did so the Super Mod shows up as the persons Level
You can change the text of Super Mod to whatever you want it to say.
User avatar
Jameson
Registered User
Posts: 35
Joined: Thu May 16, 2002 5:36 am

Post by Jameson »

There is everywhere an Bug in this Mod ;) When the Super Mod change over SCP a Users Preferences and the User than himself logged in he became the dialog "You have been banned from this Forum"!Anyone an idea how i can fix it?

Jameson
Night4554
Registered User
Posts: 99
Joined: Sun Apr 07, 2002 3:09 am

Post by Night4554 »

worked like a charm wacky, thanks!
adam s
Registered User
Posts: 215
Joined: Fri Apr 05, 2002 3:21 am

Post by adam s »

i found a bug in admin_users.php int he super_mod folder. for some reason, if a supermod goes into user management, and changes a user's e-mail address or password, it bans the user instead.

all i did was copy admin_users.php from my admin folder over the copy that came with this mod in the super_mod folder. it works fine now.
User avatar
Jameson
Registered User
Posts: 35
Joined: Thu May 16, 2002 5:36 am

Post by Jameson »

thx it works fine :)

Jameson
Locked

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