PDA

View Full Version : Remove users ability to remove private messages


Skyrider
12-13-2014, 04:32 PM
Anyone happens to know if this one exists? If not, would someone fancy creating one?

Dave
12-13-2014, 04:39 PM
private_managepm_start hook:

if($vbulletin->GPC['dowhat'] == 'delete'){
$vbulletin->GPC['dowhat'] = 'nothing';
}

Untested, but should do the trick. Will prevent everyone from deleting PM's.

Skyrider
12-13-2014, 06:03 PM
Awesome, appears to be working with a message:

Invalid Action specified. If you followed a valid link, please notify the administrator

Any idea how to include this code to specific usergroups? And perhaps a custom text? <3 Really appreciate it btw!

ForceHSS
12-13-2014, 06:46 PM
So when a user gets to their max allowed pms and can't delete any what are you going to do did you ever think about that problem

Dave
12-13-2014, 06:57 PM
The array is an array of usergroupid's which are allowed to delete PM's.

if($vbulletin->GPC['dowhat'] == 'delete' && !in_array($vbulletin->userinfo['usergroupid'], array(6))){
eval(standard_error('You may not delete private messages. <a href="private.php">Return</a>'));
}

Skyrider
12-13-2014, 06:59 PM
So when a user gets to their max allowed pms and can't delete any what are you going to do did you ever think about that problem
I highly doubt that'll be a problem with tons of PM space.

The array is an array of usergroupid's which are allowed to delete PM's.

if($vbulletin->GPC['dowhat'] == 'delete' && !in_array($vbulletin->userinfo['usergroupid'], array(6))){
eval(standard_error('You may not delete private messages. <a href="private.php">Return</a>'));
}
Appears to be working perfectly, thanks!

ForceHSS
12-13-2014, 07:24 PM
I highly doubt that'll be a problem with tons of PM space.


Appears to be working perfectly, thanks!
Even if you allow each member 1000's it will one day fill up and if it takes years by then you will forget that you added this code. You would be best to fix the code now for that problem in the future

Skyrider
12-15-2014, 09:13 AM
Even if you allow each member 1000's it will one day fill up and if it takes years by then you will forget that you added this code. You would be best to fix the code now for that problem in the future
The thing is that the banned users can't send private messages either way, but they were able to remove them due to our changes in the banned usergroup(s). So this code fits perfectly with what we actually want ;).

squidsk
12-15-2014, 01:58 PM
Just because they can't send them doesn't mean they can't receive them, either way one day their inbox will fill up.