this will count all your folders, but I had a 35 limit and had 38 messages so Im not sure if this is correct...maybe admins arent limited, i havent had a chance to check
PHP Code:
//PM GAUGE HACK BY GOBLIN
$inboxpms=$DB_site->query_first("SELECT COUNT(*) AS messages FROM privatemessage WHERE userid=$bbuserinfo[userid]$ignoreusers");
if ($inboxpms < 1) {
$pmpercent = "1"; // stop divisions by zero
} else {
$pmpercent = round(($inboxpms[messages] / $pmquota) * 100,2);
}
if ($pmpercent>50) {
$barimg="{imagesfolder}/yellow.gif";
} elseif ($pmpercent>75) {
$barimg="{imagesfolder}/red.gif";
} else {
$barimg="{imagesfolder}/green.gif";
}
//PM GAUGE HACK BY GOBLIN
Admins aren't limited. Also, even a normal member can go over by sending messages. e.g., if total messages in all folders = limit, the user cannot receive, but can still send messages. when he sends it, a copy is kept in sent items, adding to the total.
But when using my admin account, the indicator works on the index page but fails to work in the PM page. There, the percentage is always 30% more than the actual percentage. Even after clearing all folders, it still shows that I've used 30% of my inbox.
Originally posted by Arathorn Using a normal user account, all works well.
But when using my admin account, the indicator works on the index page but fails to work in the PM page. There, the percentage is always 30% more than the actual percentage. Even after clearing all folders, it still shows that I've used 30% of my inbox.
yeah thats what Ive noticed, I havent had the chance to look into it, but I think copies are saved in a sent items folder and it reads from that
Can't be, cause I cleaned out the sent items. Plus, the extra 30% only occurs with my admin account AND in the PM screen. Kinda odd... I'll go try it on another server tomorrow.
Originally posted by Arathorn Admins aren't limited. Also, even a normal member can go over by sending messages. e.g., if total messages in all folders = limit, the user cannot receive, but can still send messages. when he sends it, a copy is kept in sent items, adding to the total.
Anyways, off to try the code. Thanks!
then that must be why it is inbox.
if he can send and that will add to the folders, that will defeate the purpose of this hack by adding all folders to it. the count will always be off
if he can send and that will add to the folders, that will defeate the purpose of this hack by adding all folders to it. the count will always be off
Are you saying that it should only count the inbox? To me, this hack reminds a user that he has reached his PM limit, and that others can't send to him. Alot of users happily PM away, then get curious when one day no one replies them (cause they can't). Since all a user's PMs in all folders count towards the limit, this hack should also take all folders into account.