vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   PM RedAlert - show unread PMs on every page (https://vborg.vbsupport.ru/showthread.php?t=35607)

trainer 03-20-2002 10:24 PM

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

trainer 03-22-2002 02:07 AM

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.

trainer 03-22-2002 07:20 PM

bump to the top for some answers

thanks

trainer 03-23-2002 03:27 PM

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?

trainer 03-25-2002 08:59 PM

anyone?

WallStreat 04-05-2002 02:25 PM

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>";



trainer 04-05-2002 02:40 PM

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

350Chevy 11-19-2002 08:07 AM

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;\"";"

350Chevy 11-20-2002 12:21 AM

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.

Aaron1 11-20-2002 02:07 PM

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...


All times are GMT. The time now is 01:46 AM.

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.01194 seconds
  • Memory Usage 1,752KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (3)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete