View Full Version : Users Only Allowed to Send PMs to Staff (staff excluded)
Gary King
12-13-2003, 10:00 PM
Requested here: https://vborg.vbsupport.ru/showthread.php?t=59131
What does this hack do?
It restricts the user's usage of private messages, so that they can only send/receive private messages from administrators, supermoderators or moderators.
You are also able to turn this on or off at will, in the settings area of the admincp.
Instructions
Run the following query:INSERT INTO `setting` ( `settingid` , `settinggroupid` , `title` , `varname` , `value` , `description` , `optioncode` , `displayorder` ) VALUES ('', '19', 'Only allow staff to send PMs/users to send PMs to staff?', 'staffsendspms', '0', 'Do you want to only allow staff (moderators, supermoderators and administrators) to be allowed to send PMs, and only allow users to send PMs to staff?', 'yesno', '25');
Open private.php and find $signature=iif($signature=="yes",1,0);
Above, add // [Gary W] only allow staff to send / only allow users to send to staff
if ($staffsendspms and ($bbuserinfo['usergroupid'] != 5 and $bbuserinfo['usergroupid'] != 6 and $bbuserinfo['usergroupid'] != 7) and ($touserinfo['usergroupid'] != 5 and $touserinfo['usergroupid'] != 6 and $touserinfo['usergroupid'] != 7))
{
eval("standarderror(\"".gettemplate("error_canonlypmstaff")."\");");
exit;
}Create a new template named error_canonlypmstaff with the following contentYou can only send PMs to a member of the forum staff (administrator, supermoderator or moderator!)
Enjoy! :D
Nice hack Gary :D Won't use it though since it is for vB2
MindTrix
12-15-2003, 03:46 PM
Nice idea mate! Thanks alot
Shell Geeks
12-26-2003, 11:39 PM
wow that was an easy install :) great hack, this will be great to fight off all the lamers who register at boards just to blanket it with PM's
Gary King
12-27-2003, 12:39 AM
Could people please click on Install if you installed it, just for courtesy, thanks :D
BabesAndStuff
12-28-2003, 03:58 PM
can u use this with permissions to give some people normal rights and others the hacks limited to staff rights only
midnightz
01-23-2004, 01:11 PM
Is there away, to have it where only accepted groups numbers can PM admins. I get a lot of PM's from newbies and groups and just don't want them. But I would like to kep in touch with the usergroups i feel choice.. ?
Possible,
Thanks
Gary King
01-23-2004, 02:44 PM
Is there away, to have it where only accepted groups numbers can PM admins. I get a lot of PM's from newbies and groups and just don't want them. But I would like to kep in touch with the usergroups i feel choice.. ?
Possible,
Thanks
Modify if ($staffsendspms and ($bbuserinfo['usergroupid'] != 5 and $bbuserinfo['usergroupid'] != 6 and $bbuserinfo['usergroupid'] != 7 and $bbuserinfo['usergroupid'] != X) and ($touserinfo['usergroupid'] != 5 and $touserinfo['usergroupid'] != 6 and $touserinfo['usergroupid'] != 7))
]
Replace the X with whatever usergroupid you want to allow to send PMs :)
midnightz
01-23-2004, 03:03 PM
Great thanks :)
If I'm not mistaken before installing this will still block users from sending pms to other users?
and also allow myself to PM'ed by shosen usergroups.
Will the above code (i'm not sure) allow Pm's to fully operate as normal, meaning all users can pm all users, except admins (unless the usergroup is listed)
Thanks again for such a quick response :)
Gary King
01-23-2004, 06:40 PM
Great thanks :)
If I'm not mistaken before installing this will still block users from sending pms to other users?
and also allow myself to PM'ed by shosen usergroups.
Will the above code (i'm not sure) allow Pm's to fully operate as normal, meaning all users can pm all users, except admins (unless the usergroup is listed)
Thanks again for such a quick response :)
This will allow one extra usergroup to send PMs freely to anyone they want.
midnightz
01-23-2004, 06:47 PM
I am guessing I could maybe repeat the X part of the code and add more groups if needed? Or is this a no-no
firas
03-14-2004, 10:34 AM
thanx alot..
i have a question..
how can i give the staff the ability to reply????
Gary King
03-14-2004, 12:53 PM
thanx alot..
i have a question..
how can i give the staff the ability to reply????
They already CAN reply.
firas
03-21-2004, 01:06 PM
They already CAN reply.
i just installed it when i tried to send a message to a member that i created, it did not allow me.
any clue?
Gary King
03-21-2004, 01:42 PM
i just installed it when i tried to send a message to a member that i created, it did not allow me.
any clue?
Strange, it works fine for me I just tested and installed right now on a fresh 2.3.4; just make sure you are either mod, smod, or admin.
firas
03-21-2004, 02:36 PM
got it...
i did not change the permissions for the "Register" group.
it is working now fine
it is really gooooood
thanx again
Merjawy
04-22-2004, 04:48 PM
Nice hack I just had the need for it today, Thanks
is there a way I can make it they can only send to ADMIN group or maybe SMOD but no MODs?
Thnx
Installsssss
Gary King
04-22-2004, 06:46 PM
Use this conditional line: if ($staffsendspms and ($bbuserinfo['usergroupid'] != 5 and $bbuserinfo['usergroupid'] != 6) and ($touserinfo['usergroupid'] != 5 and $touserinfo['usergroupid'] != 6)) replacing
// [Gary W] only allow staff to send / only allow users to send to staff
if ($staffsendspms and ($bbuserinfo['usergroupid'] != 5 and $bbuserinfo['usergroupid'] != 6 and $bbuserinfo['usergroupid'] != 7) and ($touserinfo['usergroupid'] != 5 and $touserinfo['usergroupid'] != 6 and $touserinfo['usergroupid'] != 7))
Merjawy
04-23-2004, 02:15 AM
great.. thnx mate
firas
03-15-2005, 09:14 AM
is there a version for 3.0???
firas
05-04-2005, 11:16 AM
?????
Up
Gary King
05-04-2005, 06:57 PM
Nope, none are available right now. And I don't have the time to make it yet.
firas
05-05-2005, 09:05 AM
Thanks Gary for your reply and please consider this if you have any time in the future. this is very imoprtant for me.
firas
08-25-2005, 10:23 AM
hi again. i just wanna ask if you by any chance had time to make one vor v3?
Is there anything like this for 3.6.8?
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.