Reason for this hack:
I find the PM system lacked some additional information on the navbar the 0 X Unread, Total X isn't enough, as i wanted to know who sent the PM and how many they sent.
How it works:
When you get a PM the "Private Messages: x Unread, Total x." disappears and is replaced with a little blinking icon, if the user that sent the PM is a mod the icon will blink a teal color, if its a normal user, it will blink yellow. along with this you can view who sent the message, and if multiple people sent you PMs it will show their names.. If they sent you more than one, it will tell you that too. It will also take you directly to the PM without having to go to your inbox first.. After you've read all your PMs (or you dont have any) the "Private Messages: x Unread, Total x." returns to normal.
Queries: i know a lot of people are worried when it comes to adding hacks (especially me) because of additional queries.. this hack is sort of different. It only executes 1 query IF the user has unread PMs.. if they have no new PMs then 0 queries.
I've included two blinking gifs, you can use your own, put them in your images misc directory.
Read the txt file for installtion which takes 30 seconds.
I plan to expand this addons, but depends how many find it usefull, so click install plz.
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
I installed it and it worked on all my pages but not on my vbadvanded cmps portal page. I have a global.php require in my index.php, both my root and my forums but if there are any PMs that line disappears.... No PMs and it looks normal.. again, only on the portal page.... any thoughts?
i tired to install it and i got the same database error i had to un-install it
there are a couple of missing TABLE_PREFIX's...
the sql script needed an additional two prefix's (in bold below):
Code:
$getmessages = $DB_site->query("
SELECT pmtext.pmtextid, pmtext.fromusername, pmtext.fromuserid, pmtext.dateline, pm.pmid, user.userid, user.usergroupid,
COUNT(pmtext.fromuserid) AS fromusertotal FROM " . TABLE_PREFIX . "pmtext AS pmtext
LEFT JOIN " . TABLE_PREFIX . "pm AS pm USING(pmtextid)
LEFT JOIN " . TABLE_PREFIX . "user AS user ON (user.userid=pmtext.fromuserid)
WHERE pm.userid=$bbuserinfo[userid] AND messageread=0
GROUP BY pmtext.fromusername ORDER BY user.usergroupid ASC
");
doh, i forgot about the left joins.. i updated the zip,.. those that got the sql error and have table prefix on vb are the only ones that should get the updated version.
I get this error. Any idea on what the problem is?
Database error in vBulletin 3.0.6:
Invalid SQL:
SELECTpmtext.pmtextid, pmtext.fromusername, pmtext.fromuserid,pmtext.dateline, pm.pmid, user.userid, user.usergroupid,
COUNT(pmtext.fromuserid) AS fromusertotal FROMvb3_pmtext AS pmtext
LEFT JOIN vb3_pm AS pm USING(pmtextid)
LEFT JOIN vb3_user ON(user.userid=pmtext.fromuserid)
WHERE pm.userid=135 AND messageread=0
GROUP BY pmtext.fromusername ORDER BYuser.usergroupid ASC