I wrote this as a result of our conversation here.
This little hack will prevent sending of private messages on your forums by user groups. It’s simple to install and can be be applied in various files by modifying the ubbT authinication script. In this example it is for sending PM’s .
All credit should be given to ubbdev.com and it’s members. Special thanks to JoshPet and Dave_L also to the owner and staff of ubbdev.com who so graciously provides the medium for all to learn.
Open your sendprivate.php file
Find this code
//--------------------------------------------------------------------------------------------------------
// Get the user info
$userob = new user;
$user = $userob -> authenticate("U_TextCols,U_TextRows,U_Preview,");
$Username = $user['U_Username'];
changed it to this
//-------------------------------------------------------------------------------------------------------
// Get the user info
$userob = new user;
$user = $userob -> authenticate("U_TextCols,U_TextRows,U_Preview,U_Groups");
$Username = $user['U_Username'];
$UserGroups = $user['U_Groups'];
if (preg_match("/-7-/",$UserGroups)) { //Edit the number 7 to match your user group.
$html = new html;
$html -> not_right('You are currently not allowed to use this feature.',$Cat); }
//You can edit the 'You are currently not allowed to use this feature.' Message to something else if you like.
Additional Steps to find out user groups number.
Go to the admin control panel of your forums. Click on sql commands under databse management.
In the window frame type this command
SELECT G_Id
FROM w3t_Groups
WHERE G_Name = 'groupnamehere'
Simple, quick, and functional hack for your threads management needs. Have Fun
If you find any bugs let me know.