Version: 1.00, by Overgrow
Developer Last Online: Jun 2004
Version: 2.2.x
Rating:
Released: 03-01-2002
Last Update: Never
Installs: 14
No support by the author.
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
This modification may not be copied, reproduced or published elsewhere without author's permission.
could someone explain how to use a image? i can not figure it out and would really like to add this to my site
right now i have a image in the header that points to the members PM. how would i change this to another image (a flashing image) when that user has a new PM
this is a great hack just stuck on the end part
thanks
Originally posted by streamzone i like the looks of this. i did everythin up til this point here:
"4) Change your site-wide Private Messaging link. Mine is located in my PHP
parsed header file and I do something like this:
if ($bbuserinfo[userid] > 0 and $bbuserinfo[pmunread]==1)
$pmstyle=" style=\"color:#ffdc00;\"";"
I am terribly n00b on that. I honestly have no clue what that means or where to look for it.
<shame>
haha
i am in the same stop you are. i have everything upto that point figured out and done but no luck understanding the last part
already have a PM image and a flashing PM image all ready to go! maybe some of the more experience guys can help us out.
went with just the straight text to make sure this hack was working correctly before trying to change it over to a gif.
the text highlights only on the first page loaded when there is a new PM. hit i hit another page then the text is no longer highlighted even when i still have unread PM's
Originally posted by mvigod 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:
// Start Glow PM in Header Hack
$unreadpm=$DB_site->query_first("SELECT COUNT(*) AS messages FROM privatemessage WHERE userid=$bbuserinfo[user id] AND messageread=0 AND folderid=0 $ignoreusers");
if ($unreadpm['messages']==0) {
$pmglow='PM';
} else {
$pmglow='<font color="red">New PM\'s</font>';
}
then in the header file just replace where the text that says PM is with the variable $pmglow and if the messages are unread it glows in red New PM's and if all messages have been read than it just reads "PM" in the regular color.
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.
Your hack works well if you're a registered user on the forum.
But when you're not logged in (guest user), the status will show, that you have unread private messages! Weird :-)
I don't think thats ok, do you think you can solve that matter/problem?