@Xelation & Frozen Dreams
to make this work with the pm quota by usergroup hack you have to do some changes to private.php and private2.php
in my instructions there is this part of code, that you have to put in both private and private2.php:
Code:
//////////////////////////////////////////////////////////////////////////////hack//////////////////////////////////////////////////////////////
// PM GAUGE ENHANCED by WWW.TOTAL-IMPACT.COM aka princeton
// Original PM GAUGE by GOBLIN
// if you want to ignore admin convert the line below to --> if ($pmquota>0 and $bbuserinfo[usergroupid] != 6) {
if ($pmquota>0 ) {
$ignoreusers="";
if (trim($bbuserinfo['ignorelist'])!="") {
$ignoreusers='AND fromuserid<>'.implode(' AND fromuserid<>',explode(' ', trim($bbuserinfo['ignorelist'])));
}
$msgcount = $DB_site->query_first("SELECT COUNT(*) AS messages FROM privatemessage WHERE userid=$bbuserinfo[userid] $ignoreusers");
if ($msgcount < 1) {
$pmpercent = "1"; // stop divisions by zero
} else {
$pmpercent = round(($msgcount[messages] / $pmquota) * 100,2);
}
if ($pmpercent>75) {
$barimg="{imagesfolder}/red.gif";
} elseif ($pmpercent>50) {
$barimg="{imagesfolder}/yellow.gif";
} else {
$barimg="{imagesfolder}/green.gif";
}
}
//check if there is message in folder(s) and if yes displays gauge
// if you want to ignore admin convert the line below to --> if ($pmquota>0 and $bbuserinfo[usergroupid] != 6) {
if ($msgcount[messages]>0 and $pmquota>0) {
eval("\$pmgauge=\"".gettemplate("privfolder_pmgauge")."\";");
}
// PM GAUGE ENHANCED by WWW.TOTAL-IMPACT.COM aka princeton
// Original PM GAUGE by GOBLIN
//////////////////////////////////////////////////////////////////////////////hack//////////////////////////////////////////////////////////////
you go to that code and put this:
Code:
$pmboxlmt = $DB_site->query_first("SELECT pmlimit FROM usergroup WHERE usergroupid='$bbuserinfo[usergroupid]'");
$pmboxlimit = $pmboxlmt[pmlimit];
directly after the commented out area, means, before:
after that, you change all 3 (THREE) instances of
in this piece of code to
this worked fine for me
greetz
kreftt