PDA

View Full Version : Easy Add Forum Moderator


Revan
07-16-2005, 10:00 PM
Easy Add Forum Moderator v1.1

This hack was inspired by this thread (http://www.vbulletin.com/forum/showthread.php?t=143099), and is a port of this Extension (https://vborg.vbsupport.ru/showthread.php?t=92351). I found this to be a rather useful feature, so I decided to add it.

What this mod does:
It enables you to add a single user to multiple forums at once.
The new moderator will have the same permissions everywhere, so fine-tuned permissions still need to be done individually.

Features:

Detecting of Category or parent-less forums
Add the moderator to any combination of your forum list
Same detailed configuration options as if you were adding the Moderator manually
Username existance check to prevent nonexistant users from being moderators
Fully phrased



Screenshot attached.

Install instructions:

Click install (you want your precious support, don't you?).
Upload the files.
Run /admincp/forummod_install.php.
Delete above file.
Perform the file edit as detailed in install.txt.
Enjoy.



https://vborg.vbsupport.ru/ (https://www.paypal.com/xclick/business=newrevan%40start.no&item_name=Mass+Add+Moderator+Donation&no_shipping=1&return=/)
All Your Money Are Belong To Me :)

yoyoyoyo
07-17-2005, 12:12 PM
very cool- the old way was kind of tedious. good work.

Milchi
07-17-2005, 02:47 PM
Installed, Thx!

bigcurt
07-17-2005, 05:15 PM
Thanks alot for doing this Revan

Rich
07-18-2005, 04:16 PM
Hello,

Great idea. I found some problems though. :disappointed:


Change line 39 of forummod_install.php to read:

print_description_row('<center><a href="forummod_install.php?do=install">Install</a> | <a href="forummod_install.php?do=uninstall">Uninstall</a></center>');

The link you have there is not correct and the uninstall feature doesn't work currently.

The second problem is that it didn't work on my site. I ran the installer, made the edit, and everything appeared. When I added a mod to all of the forums, it added one of my admins, user ID=2 instead of the user I added. I figured what the hell, and tried another user. It didn't even add that user. It gives the "ok", but didn't add the user. (I haven't looked at the code yet, but will do so following this post.

If I may suggest an improvement in functionality, could we add a "Select All Forums" at the top of the list? This would autopopulate each box as being checked for those of us with 100+ forums that we are adding each mod too. I think that would be a great feature and a MASSIVE time saver.

I look forward to the upgrade for this. I really would like to use it. I have a ton of hand adding to do as I upgrade, and this would make life so much easier!

Rich
07-18-2005, 04:50 PM
Hello,

I have isolated the problem to be line 181 of forummod.php. Currently, the line dictates values. I am fairly new to this, so I am playing with the code to see if it works the way I have it written.

The first number after values is specifying the user ID that is being assigned to the forums. In my case, that was user ID=2. I have changed that to read: $userid

The second value is correct and the third value reads: 1279. I am testing it with that value to see if it works. If it doesn't, I was thinking $perms, but I don't know if that is accurate. Anyone know?

Here is the string:

$DB_site->query("INSERT INTO " . TABLE_PREFIX . "moderator (userid, forumid, permissions) VALUES ('$userid', '$forumid', '1279')");


I played for a bit and tried to get it sorted by I couldn't. I need someone with more experience to resolve this. Sorry.

csidlernet
07-20-2005, 07:31 AM
very cool- the old way was kind of tedious. good work.
you couldnt have put it better

Rich
07-22-2005, 11:21 AM
Hello,

I will click uninstall and check in on this when more people are trying it out I guess.

Neutral Singh
07-22-2005, 12:08 PM
gr8!! looking for this hack since ages... as i am upgrading to vB3.5.0, i will love to see this hack in vB 3.5.0!! Please !! :)

Rich
07-23-2005, 11:26 AM
Hello,

Just bumping this so it doesn't get lost in the shuffle. Anyone want to take a stab at repairing this?

Revan
07-29-2005, 10:46 PM
Sorry, I have been away because of computer problems.
Ill investigate this tomorrow, as its now 2 AM.

Revan
07-30-2005, 10:54 AM
Hello,

Great idea. I found some problems though. :disappointed:


Change line 39 of forummod_install.php to read:

print_description_row('<center><a href="forummod_install.php?do=install">Install</a> | <a href="forummod_install.php?do=uninstall">Uninstall</a></center>');

The link you have there is not correct and the uninstall feature doesn't work currently.

The second problem is that it didn't work on my site. I ran the installer, made the edit, and everything appeared. When I added a mod to all of the forums, it added one of my admins, user ID=2 instead of the user I added. I figured what the hell, and tried another user. It didn't even add that user. It gives the "ok", but didn't add the user. (I haven't looked at the code yet, but will do so following this post.

If I may suggest an improvement in functionality, could we add a "Select All Forums" at the top of the list? This would autopopulate each box as being checked for those of us with 100+ forums that we are adding each mod too. I think that would be a great feature and a MASSIVE time saver.

I look forward to the upgrade for this. I really would like to use it. I have a ton of hand adding to do as I upgrade, and this would make life so much easier!Fixed the installer problem.
The Check All function is currently not possible, because a Check All box would also check ALL usergroups in the "Make Moderator member of". I will work on this later though, I might yet be able to do it.

Hello,

I have isolated the problem to be line 181 of forummod.php. Currently, the line dictates values. I am fairly new to this, so I am playing with the code to see if it works the way I have it written.

The first number after values is specifying the user ID that is being assigned to the forums. In my case, that was user ID=2. I have changed that to read: $userid

The second value is correct and the third value reads: 1279. I am testing it with that value to see if it works. If it doesn't, I was thinking $perms, but I don't know if that is accurate. Anyone know?

Here is the string:

$DB_site->query("INSERT INTO " . TABLE_PREFIX . "moderator (userid, forumid, permissions) VALUES ('$userid', '$forumid', '1279')");


I played for a bit and tried to get it sorted by I couldn't. I need someone with more experience to resolve this. Sorry.Must be some hardcoded stuff from my testing, I fixed this now.

Also, I tried to make multiple moderator adding possible, like I did with the 3.5 version. This has failed, and cannot be added to the 3.0.x version.

Yorixz
08-20-2005, 06:19 AM
Thanks a lot.

Yorixz
09-18-2005, 07:04 AM
Little bump; could you upgrade this mod for vB3.5 aswell? :)

Revan
09-19-2005, 08:57 AM
This is a backport from my 3.5.0 version, check my profile.