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.
Can I get someone to help me with my code? I think mycode is modded already and this is why I'm not sure where to put thishacked code. THanks in advance!
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
SELECT pmtext.pmtextid, pmtext.fromusername, pmtext.fromuserid, pmtext.dateline, pm.pmid, " . TABLE_PREFIX . "user.userid, " . TABLE_PREFIX . "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 ON (" . TABLE_PREFIX . "user.userid=pmtext.fromuserid)
WHERE pm.userid=$bbuserinfo[userid] AND messageread=0
GROUP BY pmtext.fromusername ORDER BY " . TABLE_PREFIX . "_user.usergroupid ASC
How got I the "2 Minutes ago" thing working? I just got "New PM from xyz, Today!".
Many thanks, works nicely.
One slight hiccup though, when there is no PM for the member all displays normally in vBAdvanced portal, but when there IS a PM that whole section disappears from the nav panel (but as I say works perfectly in the forums.)
Nothing to worry about, i'll figure it all out when my brain returns from it's winter holidays!!