The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
PM RedAlert - show unread PMs on every page Details »» | |||||||||||||||||||||||||||
PM RedAlert - show unread PMs on every page
Developer Last Online: Jun 2004
Disclaimer:
-No support is offered for this hack. If you PM or email for support, it will be joyfully ignored. When I have time, I will answer questions in this thread. PM RedAlert Problem: PM Popups are OK but not everyone likes them or uses them. Sometimes you'll cancel them and forget you have new ones to read. Solution: If your site has a "Private Messages" link on every page, like mine, then an effective way to notify people that they have new PMs is to subtly change that link. PM Popup will still work if they have that activated.. and this is not like Chen's hack since that is only concerned with the index page. This hack is meant for site wide private message links that you would likely have in the header. (See attached screenshot) Design Spec: Alert users that they have new PMs on every page by subtly changing a link style. Steps for installation: -add one field to table user 'unreadpm' -edit two files 'private.php' 'private2.php' -upload the two files -edit header Tested on: 2.2.1 Show Your Support
|
Comments |
#2
|
||||
|
||||
screenshot-- when a user has a new private message, the "Private Msgs" link will turn yellow and stay yellow until the user goes into Private Messaging. Of course it doesn't have to be "yellow" -- by checking the new variable $bbuserinfo[pmunread], you can do whatever you want.. make something animate, blink, turn fuscia, etc.
|
#3
|
|||
|
|||
its nice, and thanks!
but I think I will stick with fireflys hack |
#4
|
||||
|
||||
Two different goals with two different hacks.. Firefly's affects the index.php home page. Mine is meant if you have a "Private Messaging" link in your header on every page.
|
#5
|
|||
|
|||
thanks, was planing on doing this for my board but now it dont have to, very nice
|
#6
|
|||
|
|||
I wrote this hack for my board but didn't add another table to the database...think my way is a little more simple since it requires no DB change but the end result is the same.
In global.php after: // parse PHP include ################## eval(gettemplate('phpinclude',0,0)); I put: PHP Code:
If you are using an image you can change the attribute for $pmglow to swap out the image or put an effect on it...whatever you like. |
#7
|
||||
|
||||
Got a link to it? Or mind describing what you checked to see if there were unread PMs? I didn't use the pmpopup since it gets turned off once the javascript runs. If you don't use a new field (not a table) then you have to query the PM table each page load, which would be rough on a big site. I'm curious to your solution! thanks..
|
#8
|
|||
|
|||
Overgrow,
Yes my solution does add that one extra query to each page. Guess it's a tradeoff depending on your site load versus wanting to add the extra DB field? It's fast query as userid is an indexed key in the pm table though. |
#9
|
||||
|
||||
Ah yea, I avoided the extra query by including it in $bbuserinfo. For sites concerned about their database load, adding a new user field is preferable to adding a new query.. though your solution works just as well! Thanks.
And as Freddie pointed out to me somewhere else, I should remember to check what fields are indexed before determining what would be a slow query or not. |
#10
|
|||
|
|||
Just read through your hack and that extra query will be saved as you said. Just 2 different ways to skin a cat.
If a site is really loaded heavy I'd go Overgrow's route to save the one query but otherwise either works nicely. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|