PDA

View Full Version : Moderators have more PM space hack


Cloud Strife
08-12-2002, 11:48 AM
I would have thought that this hack would have already been here, but I searched for ages and not found a thing...

Currently users only have 20 PM messages space, as admin, mine is automatically unlimited, but I want Supermods and Mods to have a pm space of 100 PMs... They currently only have 20...

Thanks

[D]Vincent
08-12-2002, 11:57 AM
Ummm... what's the point? Just give all your users 100...

[D]Vincent
08-12-2002, 12:05 PM
Vincent]I'm not 100% sure this will work but try this.
Open vb/private.php and find:
if ($pmquota>0 and $touserinfo[usergroupid] != 6 and $bbuserinfo[usergroupid] != 6) {
$msgcount = $DB_site->query_first("SELECT COUNT(*) AS messages FROM privatemessage WHERE userid=$touserinfo[userid]");

if ($msgcount[messages]>=$pmquota) {
// mailbox full. email user and display error

eval("\$emailmsg = \"".gettemplate("email_pmboxfull",1,0)."\";");
eval("\$emailsubject = \"".gettemplate("emailsubject_pmfullbox",1,0)."\";");
mail($touserinfo[email],$emailsubject,$emailmsg,"From: \"$bbtitle Mailer\" <$webmasteremail>");

eval("standarderror(\"".gettemplate("error_pmfullmailbox")."\");");
exit;
}
}
Replace that with:
if ($pmquota>0 and $touserinfo[usergroupid] <= 4 and $bbuserinfo[usergroupid] <= 4) {
$msgcount = $DB_site->query_first("SELECT COUNT(*) AS messages FROM privatemessage WHERE userid=$touserinfo[userid]");

if ($msgcount[messages]>=$pmquota) {
// mailbox full. email user and display error

eval("\$emailmsg = \"".gettemplate("email_pmboxfull",1,0)."\";");
eval("\$emailsubject = \"".gettemplate("emailsubject_pmfullbox",1,0)."\";");
mail($touserinfo[email],$emailsubject,$emailmsg,"From: \"$bbtitle Mailer\" <$webmasteremail>");

eval("standarderror(\"".gettemplate("error_pmfullmailbox")."\");");
exit;
}
} elseif ($pmquota>0 and ($touserinfo[usergroupid] == 5 or $touserinfo[usergroupid] == 7) and ($bbuserinfo[usergroupid] == 5 and $bbuserinfo[usergroupid] == 7)) {
$msgcount = $DB_site->query_first("SELECT COUNT(*) AS messages FROM privatemessage WHERE userid=$touserinfo[userid]");

if ($msgcount[messages]>=100) {
// mailbox full. email user and display error

eval("\$emailmsg = \"".gettemplate("email_pmboxfull",1,0)."\";");
eval("\$emailsubject = \"".gettemplate("emailsubject_pmfullbox",1,0)."\";");
mail($touserinfo[email],$emailsubject,$emailmsg,"From: \"$bbtitle Mailer\" <$webmasteremail>");

eval("standarderror(\"".gettemplate("error_pmfullmailbox")."\");");
exit;
}
}
This might not work though.

[D]Vincent
08-12-2002, 12:34 PM
Vincent]Also you might want to do this, just noticed private2.php

Anyways open vb/private2.php
Find:
// check pm quotas
if (($pmquota > 0) && ($touserinfo[usergroupid] != 6) && ($bbuserinfo[usergroupid] != 6)) {
if ($touserinfo[messagecount] >= $pmquota) {
// no further private messages allowed
eval("\$email_message = \"".gettemplate("email_pmboxfull",1,0)."\";");
eval("\$email_subject = \"".gettemplate("emailsubject_pmfullbox",1,0)."\";");
mail($touserinfo[email],$email_subject,$email_message,"From: \"$bbtitle Mailer\" <$webmasteremail>");
$errormessages .= "<li>$touserinfo[username] <smallfont>($touserinfo[messagecount] messages in folder)</smallfont></li>";
// go straight to the next recipient in the list
continue;
}
} // end check quotas
Replace that with:
// check pm quotas
if (($pmquota > 0) && ($touserinfo[usergroupid] <= 4) && ($bbuserinfo[usergroupid] <= 4)) {
if ($touserinfo[messagecount] >= $pmquota) {
// no further private messages allowed
eval("\$email_message = \"".gettemplate("email_pmboxfull",1,0)."\";");
eval("\$email_subject = \"".gettemplate("emailsubject_pmfullbox",1,0)."\";");
mail($touserinfo[email],$email_subject,$email_message,"From: \"$bbtitle Mailer\" <$webmasteremail>");
$errormessages .= "<li>$touserinfo[username] <smallfont>($touserinfo[messagecount] messages in folder)</smallfont></li>";
// go straight to the next recipient in the list
continue;
}
} elseif (($pmquota > 0) && ($touserinfo[usergroupid] == 5) or ($touserinfo[usergroupid] == 7) && ($bbuserinfo[usergroupid] == 5) or ($bbuserinfo[usergroupid] == 7)) {
if ($touserinfo[messagecount] >= 100) {
// no further private messages allowed
eval("\$email_message = \"".gettemplate("email_pmboxfull",1,0)."\";");
eval("\$email_subject = \"".gettemplate("emailsubject_pmfullbox",1,0)."\";");
mail($touserinfo[email],$email_subject,$email_message,"From: \"$bbtitle Mailer\" <$webmasteremail>");
$errormessages .= "<li>$touserinfo[username] <smallfont>($touserinfo[messagecount] messages in folder)</smallfont></li>";
// go straight to the next recipient in the list
continue;
}
} // end check quotas
Next find:
// if to-user's PM quota is exceded by sending these messages...
if (($pmquota > 0) && (($touserinfo[messages] + $nummessages) > $pmquota) && ($bbuserinfo[usergroupid] != 6) && ($touserinfo[usergroupid] != 6)) {
eval("\$email_message = \"".gettemplate("email_pmboxfull",1,0)."\";");
eval("\$email_subject = \"".gettemplate("emailsubject_pmfullbox",1,0)."\";");
mail($touserinfo[email],$email_subject,$email_message,"From: \"$bbtitle Mailer\" <$webmasteremail>");
eval("standarderror(\"".gettemplate("error_pmfullmailbox")."\");");
exit;
}
And replace that with:
// if to-user's PM quota is exceded by sending these messages...
if (($pmquota > 0) && (($touserinfo[messages] + $nummessages) > $pmquota) && ($bbuserinfo[usergroupid] <= 4) && ($touserinfo[usergroupid] <= 4)) {
eval("\$email_message = \"".gettemplate("email_pmboxfull",1,0)."\";");
eval("\$email_subject = \"".gettemplate("emailsubject_pmfullbox",1,0)."\";");
mail($touserinfo[email],$email_subject,$email_message,"From: \"$bbtitle Mailer\" <$webmasteremail>");
eval("standarderror(\"".gettemplate("error_pmfullmailbox")."\");");
exit;
} elseif (($pmquota > 0) && (($touserinfo[messages] + $nummessages) > 100) && (($touserinfo[usergroupid] == 5) or ($touserinfo[usergroupid] == 7)) && (($bbuserinfo[usergroupid] == 5) or ($bbuserinfo[usergroupid] == 7))){
eval("\$email_message = \"".gettemplate("email_pmboxfull",1,0)."\";");
eval("\$email_subject = \"".gettemplate("emailsubject_pmfullbox",1,0)."\";");
mail($touserinfo[email],$email_subject,$email_message,"From: \"$bbtitle Mailer\" <$webmasteremail>");
eval("standarderror(\"".gettemplate("error_pmfullmailbox")."\");");
exit;
}

Remember this may not work.

Cloud Strife
08-12-2002, 12:53 PM
I tried the first one and it didnt work, then I was about to tell you and saw this message, but it still doesnt work???

[D]Vincent
08-12-2002, 01:02 PM
Try it once more because I edited the first one.

Cloud Strife
08-13-2002, 09:21 AM
It works, but it seems that the mods and super mods have unlimited PM space rather than 100...

Is there anyway to fix that???

Thanks alot.. I appreciate your help

[D]Vincent
08-13-2002, 04:53 PM
Hmmmm... give me a day or two and I'll come up with something.

Cloud Strife
08-13-2002, 04:59 PM
Thanks alot!
I really appreciate your help here!

Cloud Strife

Cloud Strife
08-16-2002, 12:51 PM
Im really sorry to bother you [D]Vincent, but have you managed to finish that hack yet?

Its just that its quite urgent...

Thanks
Cloud strife

[D]Vincent
08-16-2002, 01:29 PM
Sorry nothing yet =\ I don't know what's wrong.

[D]Vincent
08-16-2002, 05:02 PM
Okay I found the problem. I had the user groups wrong =\ I'm going to go edit it now.

[D]Vincent
08-16-2002, 05:15 PM
Okay I updated them both, try applying both of those.

EZ-Dozet
11-09-2002, 12:48 AM
Thank you guys. I have been looking for this for some time aswell. Just came across it. Will try it for sure.

Erwin
11-09-2002, 02:59 AM
There's a hack out to do this already. :)

https://vborg.vbsupport.ru/showthread.php?s=&threadid=43148