PHP Web Host - Quality Web Hosting For All PHP Applications Clan Themes! We make clans look good!!
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
Author Message
Palbin
Site Admin


Joined: Mar 30, 2006
Posts: 2456
Location: Pittsburgh, Pennsylvania

PostPosted: Mon Dec 29, 2008 7:14 am Reply with quote Back to top

Well the only real question is what to do when a user is a moderator of a group. You can't simply delete him/her because then it makes the group editable in phpbb.

What do you think of adding a screen that displays any groups that the users is a moderator of and gives the Admin a choice to delete the group or set a new moderator?
View user's profile Send private message
montego
Site Admin


Joined: Aug 29, 2004
Posts: 9136
Location: Arizona

PostPosted: Tue Dec 30, 2008 7:30 am Reply with quote Back to top

Or, possibly use the current Admin (the one doing the deleting) to be the moderator.
View user's profile Send private message Visit poster's website
Palbin
Site Admin


Joined: Mar 30, 2006
Posts: 2456
Location: Pittsburgh, Pennsylvania

PostPosted: Tue Dec 30, 2008 10:55 am Reply with quote Back to top

I thought of that, but an Admin is not a User. The moderator has to be a user.

What do you think about just deleting a group if the user is the moderator?

Or do you think we should go through the trouble of adding another screen that asked for a user to replace the current moderator. I really didn't want to get into adding language files, but what does everyone think?
View user's profile Send private message
Guardian2003
Site Admin


Joined: Aug 28, 2003
Posts: 6373
Location: Vsetin, Czech Republic

PostPosted: Tue Dec 30, 2008 1:03 pm Reply with quote Back to top

There is no way to know in advance what permissions etc have been given to a group or why the webmaster set that specific group so deleting a group completely could be a potential disaster.
Imagine a very active site where there are maybe 20 support staff allocated to a group 'Support', the Moderator of this 'Support' group says he can no longer participate and the admin deletes his account.........
View user's profile Send private message Send e-mail Visit poster's website
Palbin
Site Admin


Joined: Mar 30, 2006
Posts: 2456
Location: Pittsburgh, Pennsylvania

PostPosted: Tue Dec 30, 2008 1:50 pm Reply with quote Back to top

Well I am not sure what to do. I have everything done other than changing the user_id for the group moderator and I am not sure what to do about that. Ideas anyone? I wish I could do what Montego suggested but that doesn't work Sad
View user's profile Send private message
montego
Site Admin


Joined: Aug 29, 2004
Posts: 9136
Location: Arizona

PostPosted: Wed Dec 31, 2008 7:15 am Reply with quote Back to top

First of all, hopefully you all have compared the code to the pre-RNYA (pre 2.3.0) too... I do see that it does not handle the moderator either. Sad

The only thing I can suggest is maybe taking the earliest created user_id (that is still active) that is an admin/moderator and assigning the forum to it. The reason I say this is that for most cases wouldn't this be the initial admin?

Look at it this way, even prior to RN 2.3, the YA module did not handle this case, basically leaving that forum hanging out to dry... The above would be a major improvement IMO.

Hopefully my reasoning is "sound", but I will admit that I am NO phpBB expert.
View user's profile Send private message Visit poster's website
Palbin
Site Admin


Joined: Mar 30, 2006
Posts: 2456
Location: Pittsburgh, Pennsylvania

PostPosted: Wed Dec 31, 2008 9:42 am Reply with quote Back to top

One thing we could be is search for a forum admin. This is defined by the user_level field (not sure on name) in the user table. We could set the moderator to the first admin that it comes across. Then maybe default to the earliest user.

The only thing I don't like is that there is no way of knowing if the first (active) user is really an admin/owner/whatever.

Since the RN installer does make the user it creates a forum admin it is very possible that there are no forum admins.

I think searching for a forum admin will cover most situations there is still the IF factor.
View user's profile Send private message
kguske
Site Admin


Joined: Jun 04, 2004
Posts: 6044

PostPosted: Wed Dec 31, 2008 12:46 pm Reply with quote Back to top

Making the current admin the moderator wouldn't work because there is no guarantee that the admin = a user ID, which is what is required for moderator.

Why not give an error preventing the removal of the user until the admin resolves the situation?
View user's profile Send private message
Palbin
Site Admin


Joined: Mar 30, 2006
Posts: 2456
Location: Pittsburgh, Pennsylvania

PostPosted: Wed Dec 31, 2008 4:25 pm Reply with quote Back to top

OK i will just add a warning on the confirmation screen (remove confirm button) telling the admin what groups they are a moderator of.
View user's profile Send private message
Palbin
Site Admin


Joined: Mar 30, 2006
Posts: 2456
Location: Pittsburgh, Pennsylvania

PostPosted: Thu Jan 01, 2009 6:00 pm Reply with quote Back to top

kguske, here it is:
Only registered users can see links on this board!
Get registered or login to the forums!


I changed the group deletion around, fixed the $prefix problem, and added a message on the confirmation screen about being a group moderator.

The following two language definitions will need to be added to the 4 language files.
Code:

if(!defined('_IS_MODERATOR')) define('_IS_MODERATOR','is the moderator of the following groups.');
if(!defined('_NEED_NEW_MODERATOR')) define('_NEED_NEW_MODERATOR','A new moderator must be set before the user can be deleted.');


Also I found a notice while adding users to test this.

Notice: Undefined variable: user_points in /*****/modules/Your_Account/admin/adduserconf.php on line 68

Code:

$user_points = intval($user_points);


I think that is just left over code from previous versions. The forum form adduser.php uses $add_points. I did a seach and couldn't find an other reference to $user_points

So that line needs to be removed or commented out.
View user's profile Send private message
Palbin
Site Admin


Joined: Mar 30, 2006
Posts: 2456
Location: Pittsburgh, Pennsylvania

PostPosted: Fri Jan 02, 2009 5:53 pm Reply with quote Back to top

kguske, I have access to mantis now and have add the files to the issue and also created a new issue for $user_points.
View user's profile Send private message
Display posts from previous:       
Post new topic   Reply to topic

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2011 by Raven

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::
:: fisubice Theme Modified by the RavenNuke™ Team ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum