Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Template Modifications

Reply
 
Thread Tools
Blink the Welcome Bar when receiving a new PM! Details »»
Blink the Welcome Bar when receiving a new PM!
Version: 1.00, by Gary W Gary W is offline
Developer Last Online: Aug 2014 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 02-14-2004 Last Update: Never Installs: 32
 
No support by the author.

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">
Replace with
HTML Code:
        <td valign="top" nowrap="nowrap" <if condition="$bbuserinfo['pmunread']">id="pmBox"<else />class="alt2"</if>>
Find:
HTML Code:
    <else />

 

        <td class="alt2" nowrap="nowrap" style="padding:0px">
Above, add
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

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #62  
Old 01-25-2005, 07:44 PM
Guy G Guy G is offline
 
Join Date: Nov 2004
Posts: 250
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #63  
Old 01-25-2005, 08:07 PM
peterska2 peterska2 is offline
 
Join Date: Oct 2003
Location: Manchester, UK
Posts: 6,504
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks muchly appreciated
Reply With Quote
  #64  
Old 02-09-2005, 05:03 PM
Motoscene Motoscene is offline
 
Join Date: Feb 2005
Posts: 15
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks GaryW I like this feature alot and so do all my forum members. Great work.
Reply With Quote
  #65  
Old 02-16-2005, 05:53 AM
mholtum's Avatar
mholtum mholtum is offline
 
Join Date: May 2004
Location: Arizona
Posts: 697
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #66  
Old 02-16-2005, 07:38 AM
Electronic Punk's Avatar
Electronic Punk Electronic Punk is offline
 
Join Date: Dec 2001
Location: StoneHenge
Posts: 37
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice one
Reply With Quote
  #67  
Old 06-01-2005, 10:07 AM
GSX-Racing GSX-Racing is offline
 
Join Date: May 2005
Posts: 69
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #68  
Old 06-04-2005, 01:04 AM
GSX-Racing GSX-Racing is offline
 
Join Date: May 2005
Posts: 69
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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&amp;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 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.
Reply With Quote
  #69  
Old 06-14-2005, 12:41 AM
tscbh tscbh is offline
 
Join Date: Jun 2005
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #70  
Old 07-13-2005, 03:30 PM
SlipNslide281 SlipNslide281 is offline
 
Join Date: May 2005
Posts: 51
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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:
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.
Reply With Quote
  #71  
Old 07-20-2005, 11:10 PM
ciocsy ciocsy is offline
 
Join Date: Jun 2005
Posts: 22
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i've just installed the mod and it works perfectly.
thanks a lot.
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 03:44 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.05741 seconds
  • Memory Usage 2,308KB
  • 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
  • (2)bbcode_code
  • (4)bbcode_html
  • (1)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
  • (4)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