The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Blink the Welcome Bar when receiving a new PM! Details »» | |||||||||||||||||||||||||||
Blink the Welcome Bar when receiving a new PM!
Developer Last Online: Aug 2014
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: HTML Code:
<td class="alt2" valign="top" nowrap="nowrap">
HTML Code:
<td valign="top" nowrap="nowrap" <if condition="$bbuserinfo['pmunread']">id="pmBox"<else />class="alt2"</if>> HTML Code:
<else /> <td class="alt2" nowrap="nowrap" style="padding:0px"> HTML Code:
<if condition="$bbuserinfo['pmunread']"> <script type="text/javascript"> <!-- <!-- blink navbar on new pms --> pmBox.bgColor='$stylevar[thead_bgcolor]'; setInterval("Timer()", 500); x=1; function Timer() { set=1; if (x==0 && set==1) { pmBox.bgColor='$stylevar[tcat_bgcolor]'; x=1; set=0; } if (x==1 && set==1) { pmBox.bgColor='$stylevar[thead_bgcolor]'; x=0; set=0; } } --> </script></if> All done! You can view the hack in action by viewing the attached screenshot! (Meaning that it will blink like it's supposed to ) Show Your Support
|
Comments |
#62
|
|||
|
|||
I have modified it to be like in vbulletin.org, no javascript is needed.
post is here if anyone wants it: https://vborg.vbsupport.ru/showpost....28&postcount=6 |
#63
|
|||
|
|||
Thanks muchly appreciated
|
#64
|
|||
|
|||
Thanks GaryW I like this feature alot and so do all my forum members. Great work.
|
#65
|
||||
|
||||
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
|
#66
|
||||
|
||||
Nice one
|
#67
|
|||
|
|||
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. |
#68
|
|||
|
|||
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:
</td> <if condition="$bbuserinfo['userid']"> <td valign="top" nowrap="nowrap" <if condition="$bbuserinfo['pmunread']">id="pmBox"<else />class="alt2"</if>> <div class="smallfont"> <!--<span style="float:$stylevar[right]">[<a href="login.phtml?$session[sessionurl]do=logout&u=$bbuserinfo[userid]" onclick="return log_out()">$vbphrase[log_out]</a>]</span>--> Code:
<if condition="$bbuserinfo['pmunread']"> <script type="text/javascript"> <!-- <!-- blink navbar on new pms --> document.getElementById('pmBox').bgColor='$stylevar[thead_bgcolor]'; setInterval("Timer()", 500); x=1; function Timer() { set=1; if (x==0 && set==1) { document.getElementById('pmBox').bgColor='$stylevar[tcat_bgcolor]'; x=1; set=0; } if (x==1 && set==1) { document.getElementById('pmBox').bgColor='$stylevar[thead_bgcolor]'; x=0; set=0; } } --> </script></if> <else /> <td class="alt2" nowrap="nowrap" style="padding:0px"> Edit 2: In the third attachment you can see a couple extra frames that I don't think should be there. |
#69
|
|||
|
|||
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? |
#70
|
|||
|
|||
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. Quote:
|
#71
|
|||
|
|||
i've just installed the mod and it works perfectly.
thanks a lot. |
Thread Tools | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|