PDA

View Full Version : Blink the Welcome Bar when receiving a new PM!


Gary W
15 Feb 2004, 03:30
Some tiny bits and pieces of this hack was adapted from Chen's vB 2 version of this hack, so kudos to him



What this hack does is it makes the 'Welcome, $username' box in the navbar blink by changing colors whenever a user has a new PM, so that it will catch their attention and they won't miss the PM



You can view the hack in action by viewing the attached screenshot to this post! (Meaning that it will blink like it's supposed to )



Anyways, here are the instructions:



Open up the navbar template and find:

Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------

Replace with

Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------

Find:

Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------

Above, add

Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------





All done! You can view the hack in action by viewing the attached screenshot! (Meaning that it will blink like it's supposed to )

AN-net
15 Feb 2004, 04:21
nice hack, also plz format hack into a text file(forum rules):D

Gary W
15 Feb 2004, 14:11
Okay I will right now, sorry about that this is my first mod released here :p

Gary W
15 Feb 2004, 14:16
I also added the cool new screenshot I made :p

Azhrialilu
15 Feb 2004, 16:41
I get a debug error everytime I install this hack... says pmuser isn't specified? really odd lol

Gary W
15 Feb 2004, 16:44
Strange it's not like that for me, could you give me a screenshot?

Azhrialilu
15 Feb 2004, 17:23
Sure.. I'll reinstall it and grab a snapshot for you :)

btekcan
16 Feb 2004, 10:18
Yes same problem here......something is wrong...

rms10
17 Feb 2004, 16:19
I like this idea but will wait until the above issue is resolved :)

imported_badpacket
17 Feb 2004, 17:21
Same here.. I'd like to apply this when its working :)

rms10
18 Feb 2004, 20:08
I went ahead and installed the mod. Works like a charm :) Thanks:)

Gary W
18 Feb 2004, 20:59
Sorry about that guys, problem fixed ;)

btekcan
18 Feb 2004, 21:16
Yesss,great now works...


Thanks

sabret00the
24 Feb 2004, 11:54
very nice :)

Natch
24 Feb 2004, 12:32
Cos the original one had some bugs, I went away and did this in a slightly different way GaryW - I used the same script that I had for my onmouseover thread/forum bgcolor changer from this thread (http://www.vbulletintemplates.com/mods/showthread.php?t=5397) - and I extended the effect to make the pmBox and the breadcrumb box alternate colours when a new pm is there ...

Major props for the idea - I love the effect and have sent myself numerous PM's just to test and re-test it :) :) :D

/me clicks install cos u gave me the idea :)

rms10
24 Feb 2004, 13:32
Gary is it possible for you to also add some effect to this when the PM's box gets full?

Thanks :)

Natch
24 Feb 2004, 13:57
It could flash faster in that case witha simple conditional around the timer statement ...

Boofo
06 Mar 2004, 17:21
Cos the original one had some bugs, I went away and did this in a slightly different way GaryW - I used the same script that I had for my onmouseover thread/forum bgcolor changer from http://www.vbulletintemplates.com/mods/showthread.php?t=5397]this thread - and I extended the effect to make the pmBox and the breadcrumb box alternate colours when a new pm is there ...

Major props for the idea - I love the effect and have sent myself numerous PM's just to test and re-test it :) :) :D

* Natch clicks install cos u gave me the idea :)
Can we see yours?

rebelsrock06
06 Mar 2004, 18:54
i cant get mine to work ? ?

i replaced

<td class="alt2" valign="top" nowrap="nowrap">

with

<td valign="top" nowrap="nowrap" <if condition="$bbuserinfo['pmunread']">id="pmBox"<else />class="alt2"</if>>

but the last instruction doesnt make much sense.

i found

<else />



<td class="alt2" nowrap="nowrap" style="padding:0px">

and then i put the other tags Where ? ? ? ??

rebelsrock06
06 Mar 2004, 18:56
heheheh never mins, i had 2 colors thae same so i could see the blinking :lol:

Gary W
06 Mar 2004, 19:34
Okay then you can just change the colour variables to a specified colour by replacing them with colour codes :)

Alzeimer
09 Mar 2004, 10:11
Great, Installed and working, thanks!!!

Natch
10 Mar 2004, 07:24
Can we see yours?
I'll try to mate - my gif animation skillz are a bit rusty ;)

BBL with it hopefully :) :)

Grab the JS file - the chgclass.js file - upload it to forumhome/clientscript and load that in your headinclude template.



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



Then in the navbar template, make the following alterations ...

Find the first instance of:


Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



ADD AFTER:


Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



Example:
http://www.mobileforces.org/pm-bar-blink.gif

It works with whatever colours you have in your style for alt1 and alt2, so translates across your board without trouble :)

Mr. Brian
18 Mar 2004, 23:43
I don't think it works for gamma.

imported_Diana Notacat
25 Mar 2004, 10:11
As spectacularly awesome as this is, it doesn't seem work in Mozilla or Netscape! It's only working on my IE. Anyway to spiff it up to work on other browsers?

wolfgang3
10 Apr 2004, 18:20
nice add on! thx

Gary W
10 Apr 2004, 19:43
Doesn't work for Netscape/Mozilla type browsers; I think the browsers are like that, they don't like the scripting that makes this work.

Natch
11 Apr 2004, 00:28
This one (http://www.vbulletintemplates.com/mods/showpost.php?p=47441&postcount=23) (post #23 in this thread) does work in Mozilla / Netscrape .... the animation was recorded on Firebird ...

Props to Gary for the concept...

Jolten
11 Apr 2004, 19:19
Works like a charm. I had to add an extra id to accomodate an extra table cell in my suctom header, but it works fabulously. Thanks Gary.

Skaterscafe.com
15 Apr 2004, 06:46
Works great for me also, thanks!

My site is in black & white, is there a easy way to change the blink color to red or yellow?

RichieBoy67
22 Apr 2004, 01:20
Awesome!!!!

You are the man Gary!!!


Thanks!!

Skaterscafe.com
22 Apr 2004, 07:52
Works great for me also, thanks!

My site is in black & white, is there a easy way to change the blink color to red or yellow?

Anyone?

Jolten
22 Apr 2004, 18:47
Skater.. jsut set up a new custom style in the Main CSS. Then change the The script to use yoru new style in this line



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



Instead of thead_bgcolor insert your new style.

Onkel_Tom
17 Jun 2004, 10:31
thanks for this hack, works great !

imported_350Chevy
17 Jun 2004, 17:41
Skater.. jsut set up a new custom style in the Main CSS. Then change the The script to use yoru new style in this line



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



Instead of thead_bgcolor insert your new style.

or..



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



Or whatever color of your choice.. ;)

imported_zahco
18 Jun 2004, 11:15
dir Gary W
Thanks a lot for this hack and i have istaled it and it working Great .

And i thanks a lot to Dir / 350Chevy
who showed me this thread

best regards
zahco

Onkel_Tom
21 Jun 2004, 00:22
Hi, a small problem with this hack if the access to the PN system is not allowed by the admin for a special usergroup like "awaiting confirmation" and having the "New user welcome PN (http://www.vbulletin.org/forum/showthread.php?t=63269)" Hack installed.
The user get's the blinking PN area but can't read the mail unless he confirms his registration and an admin has activated his account.

Solution:

find in template navbar:


Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



replace it with:


Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



With this change vB first check if the PN system is activated and then let blink the PN area. Otherwise no blinking will be done.

Bounce
23 Jun 2004, 20:20
brilliant stuff gary :)

installed and working treat :D

imported_Infopro
24 Jun 2004, 15:35
Very nice, thank you. :)

Baptizer
02 Jul 2004, 17:39
Got it. Installed it. Customized it. Loving it. Thanks.

Bryan Ex
26 Jul 2004, 05:36
Worked great and especially once I changed the background classes to alt1 & 2 except that I use the vB nav bar in my photopost gallery and it created all kinds of script errors. I had to uninstall but will be keeping this bookmarked for a stand alone board I'm working on next.

Littlebit
01 Aug 2004, 21:11
Worked great and especially once I changed the background classes to alt1 & 2 except that I use the vB nav bar in my photopost gallery and it created all kinds of script errors. I had to uninstall but will be keeping this bookmarked for a stand alone board I'm working on next. You can also keep an eye out at http://vbadvanced.com . They're coming out with a gallery that is seamless with vB and for less money.

Eagle Creek
11 Aug 2004, 11:48
//Installed

It's not working well with all skins :(

YLP1
15 Aug 2004, 21:30
Hi all,

I am getting this broken code on my PM box...how do I fix it?

I am also getting an error on the page

Line 434
Char 1
Error: 'pmBox' is undefined
Code" 0

Natch
16 Aug 2004, 01:39
It's a broken conditional statement - probably you have an extra > inside your conditional?

Re-check your postbit / postbit_legacy modification.

hdaniel1
20 Aug 2004, 21:40
Here is what I did so this mod works on every browser.

First, as usual open up the navbar template and find this.


Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



You replace it with this.



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



That is all!


I replaced pmBox.bgColor with document.getElementById('pmBox').bgColor.

EDIT: Also this works with 3.0.3.

SaN-DeeP
01 Sep 2004, 00:08
Here is what I did so this mod works on every browser.


That is all!


I replaced pmBox.bgColor with document.getElementById('pmBox').bgColor.

EDIT: Also this works with 3.0.3.thnx dude.
works perfect on vb 3.0.3

Regards

DarknessDivine
08 Sep 2004, 18:02
Works like a dream

mholtum
08 Sep 2004, 21:08
Works great in IE but not in Mozilla

hdaniel1
08 Sep 2004, 21:40
Works great in IE but not in Mozilla
Did you follow my updated instructions on how to make it work on all browsers?

mholtum
08 Sep 2004, 22:14
Here is what I did so this mod works on every browser.

First, as usual open up the navbar template and find this.


Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



You replace it with this.



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



That is all!




EDIT: Also this works with 3.0.3.
Yes, I followed these instructions

imported_Zen
08 Sep 2004, 22:45
Yes, I followed these instructions


small errors in the code above.. works great BTW

extra spaces have crept in at $styleva
:


Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



:)

mholtum
09 Sep 2004, 00:44
Fixed that, thanks

djjeffa
17 Oct 2004, 01:42
installed and work great thanks guys

Randyjc
23 Nov 2004, 15:56
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



so weird i have it like this but it won't work for 3.0.3

TwinsForMe
23 Nov 2004, 19:49
Works for me. Thanks. :)

vb 3.0.3 in Netscape

secret1980
24 Nov 2004, 02:38
it's really a nice hack..Thx! for it :D

just now I noticed that after installing this hack...I am getting log in forum again in the middle even though after logging on..I have captured a screen shot here it is :

http://img99.exs.cx/img99/5316/copy21.jpg

waiting for ur help...

Thanking u,
Pavan Kumar

Rocket_Cowboy
29 Nov 2004, 04:22
Nevermind ... if I'd read the entire thread, I'd see what I was missing ...

LOL

Mechanical Mind
18 Dec 2004, 01:45
Okay then you can just change the colour variables to a specified colour by replacing them with colour codes :)

Can anybody point out the color variables? I am not sure where to install the color codes in that section of code?

imported_Gottcha
22 Dec 2004, 00:15
Got it working and looks great...will be a big help. Anyway to have it work with vbportal installed? My start page is vbportal and it doesnt notify through there. Any mod to get it working?

Guy G
25 Jan 2005, 21:44
I have modified it to be like in vbulletin.org, no javascript is needed.

post is here if anyone wants it:
http://www.vbulletin.org/forum/showpost.php?p=602028&postcount=6

peterska2
25 Jan 2005, 22:07
Thanks muchly appreciated

Motoscene
09 Feb 2005, 19:03
Thanks GaryW I like this feature alot and so do all my forum members. Great work.

mholtum
16 Feb 2005, 07:53
I am trying to remove this as I found one I would rather use and cant find the code in my navbar template.. Weird. Yet it still works

Electronic Punk
16 Feb 2005, 09:38
Nice one :D

GSX-Racing
01 Jun 2005, 12:07
I couldn't get it to flash. It only changed the bg colour, didn't flash it back and forth.


EDIT: Got it working, just had some extra spaces in the code.

Thanks, looks tight.

GSX-Racing
04 Jun 2005, 03:04
I had it installed once, then had to re import stuff so lost my mods. I just did it again (like 3 times) and I'm not sure what I did wrong however, if you look at the attached screenshot you will see the problem.

It flashes just fine, but there is a little area to the right that doesn't flash. I can't seem to get rid of that little blank space. Can anyone please help?

Here is what my template looks like where I made the changes.



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------





Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



Edit 1:In the second attachment you can see a bit better how the table extends too far.

Edit 2: In the third attachment you can see a couple extra frames that I don't think should be there.

tscbh
14 Jun 2005, 02:41
I read through the forum, but it didn't work.. I got this error:

line: 381
car: 1
error: 'pmBox' is undefined
Code: 0
URL: ...forumdisplay.php?f=3

even if I undo all changes. I still got that error.

What I did was, open dreamweaver, open file, "vbulletin-style.xml, I do a search replace & replace:

search:
<td class="alt2" valign="top" nowrap="nowrap">
replace with:
<td valign="top" nowrap="nowrap" <if condition="$bbuserinfo['pmunread']">id="pmBox"<else /> class="alt2"</if>>
<if condition="$bbuserinfo['pmunread']">
<script type="text/javascript">
<!--
<!-- blink navbar on new pms -->
document.getElementById('pmBox').bgColor='$styleva r[thead_bgcolor]';
setInterval("Timer()", 500);
x=1;
function Timer()
{
set=1;
if (x==0 && set==1)
{
document.getElementById('pmBox').bgColor='$styleva r[tcat_bgcolor]';
x=1;
set=0;
}
if (x==1 && set==1)
{
document.getElementById('pmBox').bgColor='$styleva r[thead_bgcolor]';
x=0;
set=0;
}
}
-->
</script></if>

nothing else is done. Now, I hate the error java script message. By the way, does this work for vb3.0.7?

SlipNslide281
13 Jul 2005, 17:30
I got it to flash, but if I want it to flash Red, and background color what do I change in the code? I did this:

<!--
<!-- blink navbar on new pms -->
pmBox.bgColor='thead_bgcolor';
setInterval("Timer()", 500);
x=1;
function Timer()
{
set=1;
if (x==0 && set==1)
{
pmBox.bgColor='$stylevar[red]';
x=1;
set=0;
}
if (x==1 && set==1)
{
pmBox.bgColor='$stylevar[thead_bgcolor]';
x=0;
set=0;
}
}

but it still flashes dark grey and light grey.

nothing else is done. Now, I hate the error java script message. By the way, does this work for vb3.0.7?
Yes I have it working on 3.0.7 Just not the color I want.

ciocsy
21 Jul 2005, 01:10
i've just installed the mod and it works perfectly.
thanks a lot.

Shaun M
22 Jul 2005, 22:37
i've just installed the mod and it works perfectly.
thanks a lot.

Well I know it works as it's on one of the forums I visit but for the life of me I cant get it to work on mine.

Have I done something really dumb?



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------

Tony G
23 Jul 2005, 02:58
What's the problem you're getting? It just doesn't appear?

Shaun M
24 Jul 2005, 11:41
What's the problem you're getting? It just doesn't appear?


Thats rignt. There's no flashing? I wonder if I've put the code in incorectly? :confused:

Loki12
24 Jul 2005, 12:32
Tested and working on version 3.5.0 Beta 4. :)

Tony G
24 Jul 2005, 12:57
Thats rignt. There's no flashing? I wonder if I've put the code in incorectly? :confused:

What version are you using? I'd say that's the case as many have reported it working on later 3.0x versions. Just double check over the added code.

Shaun M
24 Jul 2005, 13:18
What version are you using? I'd say that's the case as many have reported it working on later 3.0x versions. Just double check over the added code.


I'm on 3.0.7 I'll revert back to the old code (before I modified it) and try it again. Glad I made backups :)

Tony G
24 Jul 2005, 13:35
I wouldn't advise ever installing a modification and not making backups. ;)

Shaun M
24 Jul 2005, 13:35
I'm on 3.0.7 I'll revert back to the old code (before I modified it) and try it again. Glad I made backups :)

Well I've redone the additions and it still doesn't work :ermm:

Tony G
24 Jul 2005, 13:36
Are you making sure that you have unread messages and that when testing this? Tried sending new, fresh PM's and testing it like that?

Shaun M
24 Jul 2005, 13:43
That's the way I tested it. I sent myself a new message. :/ I just cant see where the code is different to that give here. :(

chariotdriver
24 Jul 2005, 20:49
I have had this installed, and it works, but at what point is it supposed to stop blinking?
Mine keeps blinking until I get to the part where it is "Send notification of recieving PM" or whatever that last message is. It does not stop blinking even when I have opened the PM. Is this how it supposed to work?

Blackhat
26 Jul 2005, 10:39
I dont think it works with firefox

DrewzR/T
26 Jul 2005, 18:36
Yeah I dont think it does either. It worked for the IE users though. All it does it turn red when i have a new PM. Ive also added in the new codes and still didnt work.

Shaun M
28 Jul 2005, 02:43
Well when I checked in IE it's working :D

Shame it doesn't in FF though :(

hotwheels
19 Aug 2005, 02:22
kewl hack, i added it to the blinking red light..............schweet

ManagerJosh
30 Sep 2005, 04:03
Gonna give this a quick bump and let everyone know this is vBulletin 3.5 Compatible :)

Colejo
03 Oct 2005, 01:14
Gonna give this a quick bump and let everyone know this is vBulletin 3.5 Compatible :)

Thanks I just added it and it works.

rb290
16 Oct 2005, 23:33
this is not for vB 3.5.0 ?

EDIT: just saw the post saying its allowed with 3.5.0

thanks.

AtoZ
06 Nov 2005, 01:18
Excellent! Just upgraded to 3.5 and it works!!

If it doesn't blink, check your stylevars - If tcat and thead are the same color it won't blink. I changed the javascript code so it uses alt1 and alt2 instead.

Nitewalker
07 Dec 2005, 03:38
does it work on 3.0.10 ? i dun think so

docvader
07 Jan 2006, 05:21
It won't blink on FF or Netscape. Anyone know how to fix the code for us FF users??

cloyal
07 Jan 2006, 10:16
Yes could some one please figure this out? Please? I've installed this one and this one.

http://www.vbulletin.org/forum/showthread.php?t=68135&highlight=blinking+pm

And Neither work in FF. Btw the one created in this thread will blink but locks up the other one in the other thread in IE.

kellyandmike
07 Apr 2006, 05:15
Perfect! Thanks for the easy explanation too...

TheUGN.com
04 Jun 2006, 22:55
I am Using Vb 3.5.4

I added this script to Navbar, but its not blinking :( Can anyone please direct me to what i need to add to make this work. Thanks



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------

TheUGN.com
05 Jun 2006, 03:44
For some weird reason i cannot find this script in my Navbar <td class="alt2" valign="top" nowrap="nowrap">

i searched and searched and searched and still i cannot find it.

What do i need to do

thefullmaza
01 Jan 2008, 18:40
install this hack...

Loki12
03 Oct 2008, 16:17
This is my fav PM notification hack ... can anyone perhaps make this work for 3.7?

I just tried to do this on the navbar template but can't seem to get it to work.

Medina
30 Dec 2008, 20:36
Is it possible to create a blink not only for the PM. But also for other notifications such as profile messages, social group messages etc. etc.

Medina
18 Feb 2009, 16:53
Hello,

Is there anybody how can help me to work this with vb 3.8, please.

Thank you very much for helping.