Quote:
Originally Posted by Andreas
If you want to send PMs no matter if the PM box of the recipient is full or not:
PHP Code:
$botpermissions['adminpermissions'] = 2;
|
Thx for the wonderful tutorial. I've used your guide to develop an
add-on to one of my products.
The only item that I can't get working is overriding the mailbox full restriction. I've used the code above but setting adminpermissions to 2 doesn't seem to work. In class_dm_pm.php, $overridequota = false seems to need to be set to "true" but I can't figure out how to do that.
If you have a few minutes, I'd really appreciate help in figuring out how to set the variables so that the user will receive the PM even if his mailbox is full and he receives PMs only from buddies and sender is not on the list and not board staff.
I'm pretty sure that can be achieved by setting $overridequota = true, just can't figure out how to do that.
In class_dm_pm.php, line 80:
PHP Code:
var $overridequota = false;
while starting at line 370:
PHP Code:
// run through recipients to check if we can insert the message
foreach ($users AS $lowname => $user)
{
if (!($user['options'] & $this->registry->bf_misc_useroptions['receivepm']) AND !$this->overridequota)
{
// recipient has private messaging disabled
$this->error('pmrecipturnedoff', $user['username']);
return false;
}
else if (($user['options'] & $this->registry->bf_misc_useroptions['receivepmbuddies']) AND strpos(" $user[buddylist] ", " $fromuser[userid] ") === false AND !can_moderate() AND !$this->overridequota)
{
// recipient receives PMs only from buddies and sender is not on the list and not board staff
$this->error('pmrecipturnedoff', $user['username']);
return false;
}
else
{
But I don't see anyway to set $overridequota without hacking class_dm_pm.php.
Thx!