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
  #32  
Old 04-21-2004, 11:20 PM
RichieBoy67's Avatar
RichieBoy67 RichieBoy67 is offline
 
Join Date: Apr 2004
Location: CT - Down in a hole..
Posts: 3,057
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Awesome!!!!

You are the man Gary!!!

Thanks!!
Reply With Quote
  #33  
Old 04-22-2004, 05:52 AM
Skaterscafe.com Skaterscafe.com is offline
 
Join Date: Mar 2004
Posts: 49
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Skaterscafe.com
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?
Reply With Quote
  #34  
Old 04-22-2004, 04:47 PM
Jolten Jolten is offline
 
Join Date: Mar 2004
Posts: 749
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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:
                pmBox.bgColor='$stylevar[thead_bgcolor]';
Instead of thead_bgcolor insert your new style.
Reply With Quote
  #35  
Old 06-17-2004, 08:31 AM
Onkel_Tom's Avatar
Onkel_Tom Onkel_Tom is offline
 
Join Date: Mar 2002
Location: Stuttgart- Germany
Posts: 208
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks for this hack, works great !
Reply With Quote
  #36  
Old 06-17-2004, 03:41 PM
imported_350Chevy imported_350Chevy is offline
 
Join Date: Feb 2003
Location: Tampa, FL
Posts: 16
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ScottW
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:
                pmBox.bgColor='$stylevar[thead_bgcolor]';
Instead of thead_bgcolor insert your new style.
or..

Code:
                pmBox.bgColor='red';
Or whatever color of your choice..
Reply With Quote
  #37  
Old 06-18-2004, 09:15 AM
imported_zahco imported_zahco is offline
 
Join Date: Aug 2003
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #38  
Old 06-20-2004, 10:22 PM
Onkel_Tom's Avatar
Onkel_Tom Onkel_Tom is offline
 
Join Date: Mar 2002
Location: Stuttgart- Germany
Posts: 208
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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" 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:
PHP 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==&& set==1)
    {
        
pmBox.bgColor='$stylevar[tcat_bgcolor]';
        
x=1;
        
set=0;
    }
    if (
x==&& set==1)
    {
        
pmBox.bgColor='$stylevar[thead_bgcolor]';
        
x=0;
        
set=0;
    }
}
-->
</
script></if> 
replace it with:
PHP Code:
<if condition="$show['pmstats']"><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==&& set==1)
    {
        
pmBox.bgColor='$stylevar[tcat_bgcolor]';
        
x=1;
        
set=0;
    }
    if (
x==&& set==1)
    {
        
pmBox.bgColor='$stylevar[thead_bgcolor]';
        
x=0;
        
set=0;
    }
}
-->
</
script></if></if> 
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.
Reply With Quote
  #39  
Old 06-23-2004, 06:20 PM
Bounce's Avatar
Bounce Bounce is offline
 
Join Date: Mar 2004
Location: Edinburgh,Scotland
Posts: 919
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

brilliant stuff gary

installed and working treat
Reply With Quote
  #40  
Old 06-24-2004, 01:35 PM
imported_Infopro imported_Infopro is offline
 
Join Date: Feb 2004
Posts: 2
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Very nice, thank you.
Reply With Quote
  #41  
Old 07-02-2004, 03:39 PM
Baptizer Baptizer is offline
 
Join Date: Nov 2001
Posts: 96
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Got it. Installed it. Customized it. Loving it. Thanks.
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 11:32 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.08911 seconds
  • Memory Usage 2,326KB
  • 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
  • (3)bbcode_code
  • (4)bbcode_html
  • (2)bbcode_php
  • (2)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