PDA

View Full Version : PM Box Usage (in Percent)


Gamingforce
11-11-2001, 03:52 PM
I thought a pretty useful feature would be to show what percent of your PM Inbox is being used in your PM Inbox display screen.

A simple formula like:
(number of current PMs) / (number of max PMs) * 100 can probably be used. Even creating a bar to show the percentage wouldn't be difficult either ;) as you can use table width in percent for that bar.

It would be awesome if someone can do it, or if you can tell me the variables to show the max number of PMs someone can have and their current, I can put a hack together myself.

Thanks a lot.

Admin
11-11-2001, 05:24 PM
For the main forum page (index.php), total PMs is $allpm[messages].
For the inbox display page (private.php), you'll need to add it yourself:
$ignoreusers="";
if (trim($bbuserinfo['ignorelist'])!="") {
$ignoreusers='AND fromuserid<>'.implode(' AND fromuserid<>',explode(' ', trim($bbuserinfo['ignorelist'])));
}
$allpm=$DB_site->query_first("SELECT COUNT(*) AS messages FROM privatemessage WHERE userid=$bbuserinfo[userid] $ignoreusers");
then use $allpm[messages].

In any file/template, $pmquota is the total PMs allowed.