i have a slight improvement to this hack because of the following problem. when you have a user in your ignore list and he has sent you a pm (which wont show in your private messages, because you are ignoring him) the pop-up will say when getting a new pm that you have 2 new pms, although your only seeing one.
thats because the sql is not ignoring the useres in your ignore list.
here the modification I made (which seems to work):
above twtcommisch hack add:
Code:
if (trim($bbuserinfo['ignorelist'])!="") {
$ignoreusers='AND fromuserid<>'.implode(' AND
fromuserid<>',explode(' ', trim($bbuserinfo['ignorelist'])));
}
then change the sql to:
Code:
$latest_pm = $DB_site->query("SELECT
p.privatemessageid AS pm_popup_id, p.title AS pm_popup_title,
u.username AS pm_popup_username FROM privatemessage p,
user u WHERE messageread = 0 AND p.userid = $bbuserinfo
[userid] AND p.fromuserid = u.userid $ignoreusers ORDER BY dateline DESC");
tina