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:[sql]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');[/sql]
Open private.php and find
PHP Code:
$signature=iif($signature=="yes",1,0);
Above, add
PHP Code:
// [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 content
HTML Code:
You can only send PMs to a member of the forum staff (administrator, supermoderator or moderator!)
Enjoy!
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
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.. ?
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
PHP Code:
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
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)
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.