Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases

Reply
 
Thread Tools
PM RedAlert - show unread PMs on every page Details »»
PM RedAlert - show unread PMs on every page
Version: 1.00, by Overgrow Overgrow is offline
Developer Last Online: Jun 2004 Show Printable Version Email this Page

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.

Comments
  #22  
Old 03-20-2002, 10:24 PM
trainer trainer is offline
 
Join Date: Nov 2001
Posts: 160
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #23  
Old 03-22-2002, 02:07 AM
trainer trainer is offline
 
Join Date: Nov 2001
Posts: 160
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
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.
Reply With Quote
  #24  
Old 03-22-2002, 07:20 PM
trainer trainer is offline
 
Join Date: Nov 2001
Posts: 160
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

bump to the top for some answers

thanks
Reply With Quote
  #25  
Old 03-23-2002, 03:27 PM
trainer trainer is offline
 
Join Date: Nov 2001
Posts: 160
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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

any suggestions or ideas?
Reply With Quote
  #26  
Old 03-25-2002, 08:59 PM
trainer trainer is offline
 
Join Date: Nov 2001
Posts: 160
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

anyone?
Reply With Quote
  #27  
Old 04-05-2002, 02:25 PM
WallStreat WallStreat is offline
 
Join Date: Oct 2001
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

To Trainer:

This is how u add the blinking imgae:

PHP Code:
if ($bbuserinfo[userid] > and $bbuserinfo[pmunread]==1)
{        
$pm="<div><p><A HREF=\"private.php?s=$session[sessionhash]\"><img src=\"https://vborg.vbsupport.ru/green/blinkingpm.gif\" border=0></A></p></div>";

Reply With Quote
  #28  
Old 04-05-2002, 02:40 PM
trainer trainer is offline
 
Join Date: Nov 2001
Posts: 160
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by WallStreat
To Trainer:

This is how u add the blinking imgae:

PHP Code:
if ($bbuserinfo[userid] > and $bbuserinfo[pmunread]==1)
{        
$pm="<div><p><A HREF=\"private.php?s=$session[sessionhash]\"><img src=\"https://vborg.vbsupport.ru/green/blinkingpm.gif\" border=0></A></p></div>";

ok i put that code in my phpinclude template

how do i call it in the header?

using pm-button.gif as the non-flashing button

using pm-button_ani.gif as the flashing button
Reply With Quote
  #29  
Old 11-19-2002, 08:07 AM
350Chevy's Avatar
350Chevy 350Chevy is offline
 
Join Date: Nov 2002
Location: Tampa, FL
Posts: 258
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Still no straight answer..

Where is this supposed to go!??

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;\"";"
Reply With Quote
  #30  
Old 11-20-2002, 12:21 AM
350Chevy's Avatar
350Chevy 350Chevy is offline
 
Join Date: Nov 2002
Location: Tampa, FL
Posts: 258
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Anyone?

I don't understand how this can be called a final release when there are no instructions on where to place the last peice of code.

I'm using an animated .gif. Currently I just have a simple edited header template that shows a button and link to PM's. I've tried to place

Code:
if ($bbuserinfo[userid] > 0 and $bbuserinfo[pmunread]==1)
$pmstyle="{ imagesfolder }/pmgif1.gif"
{ else }
$pmstyle="{ imagesfolder }/pmgif.gif"

<a href="private.php?s=$session[sessionhash]"><img src="$pmstyle" alt="Here you can view your private messages" border="0"></a>
(without the spaces of course...)

Into the header but as you can tell it will not work. Any help on this half released mod would be appreciative.
Reply With Quote
  #31  
Old 11-20-2002, 02:07 PM
Aaron1's Avatar
Aaron1 Aaron1 is offline
 
Join Date: Oct 2002
Location: Amsterdam
Posts: 200
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
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?

Thanks in advance...
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 05:08 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04454 seconds
  • Memory Usage 2,314KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_code
  • (3)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete