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

Reply
 
Thread Tools
Blinking notifier in welcome bar when receiving a new pm Details »»
Blinking notifier in welcome bar when receiving a new pm
Version: 1.2, by Fusion.nl Fusion.nl is offline
Developer Last Online: Nov 2007 Show Printable Version Email this Page

Version: 3.0.7 Rating:
Released: 05-24-2005 Last Update: 05-25-2005 Installs: 86
 
No support by the author.

Don't you just hate it sending a pm to someone and he/she never reads it untill some weeks later? Using the build in pop-up bar from vB that problem is easily solved, but has to be turned on by the user since it is not a default setting.

VB.org offered me two sollutions, but were both (sound on pm, or that ugly blinking red message that is used by this forum) a bit over the top. I then found JohnBee's cleaner version which did the trick in Internet Explorer, but didnt function when using Firefox. Plus there was a lot of code that needed to be added, so even though I had zero experience in Javascript, i started crafting one myself.

Now this version works both in Internet Explorer as in Firefox, they look exactly the same (as in speeds) plus only 17 lines of code are added to one single template style. You can change the blink color to any color you like and also change the speed of the blinking. (setInterval("doBlink()",500, where 500 is the speed in milliseconds)

installation
In AdminCP, in your navbar template, find
Code:
ht = document.getElementsByTagName("html");
	ht[0].style.filter = "progid:DXImageTransform.Microsoft.BasicImage(grayscale=1)";
	if (confirm('$vbphrase[sure_you_want_to_log_out]'))
	{
		return true;
	}
	else
	{
		ht[0].style.filter = "";
		return false;
	}
}
//-->
After add
Code:
<!-- [Fusion's `ing PM mod :: http://ut2004.titaninternet.co.uk] -->
function doBlink() {
  var blink = document.all.tags("blink")
  for (var i=0; i<blink.length; i++)
    blink[i].style.visibility = blink[i].style.visibility == "" ? "hidden" : ""
}

//fix by Piglet
function startBlink() {
	window.preblinkonload();
	setInterval("doBlink()",500)
}

if (document.all && ! window.preblinkonload){
	window.preblinkonload = window.onload;
	window.onload = startBlink;
}

//-->
In the same template, find
Code:
<if condition="$show['pmstats']"><br /><phrase 1="$vbphrase[unread_x_nav_compiled]" 2="$vbphrase[total_x_nav_compiled]" 3="$session[sessionurl]">$vbphrase[private_messages_nav]</phrase></if>
Replace with
Code:
<if condition="$show['pmstats']"><br />
			<if condition="$bbuserinfo['pmunread']">
			<phrase 1="<blink><font color=#ff0000>$vbphrase[unread_x_nav_compiled]</font></blink>" 2="$vbphrase[total_x_nav_compiled]" 3="$session[sessionurl]">$vbphrase[private_messages_nav]</phrase>
			<br />
			<else />
			<phrase 1="$vbphrase[unread_x_nav_compiled]" 2="$vbphrase[total_x_nav_compiled]" 3="$session[sessionurl]">$vbphrase[private_messages_nav]</phrase><br /></if></if>
This gives you a red (#ff0000) blinking message when having a pm in your box, after which you are done.

---------------------------optional---------------------------

Alternatively, if you just want blinking text (so text with default font color blinking on and off) simply skip the last step and do this one in stead.

In the same template, find
Code:
<if condition="$show['pmstats']"><br /><phrase 1="$vbphrase[unread_x_nav_compiled]" 2="$vbphrase[total_x_nav_compiled]" 3="$session[sessionurl]">$vbphrase[private_messages_nav]</phrase></if>
Replace with
Code:
<if condition="$show['pmstats']"><br />
			<if condition="$bbuserinfo['pmunread']">
			<phrase 1="<blink>$vbphrase[unread_x_nav_compiled]</blink>" 2="$vbphrase[total_x_nav_compiled]" 3="$session[sessionurl]">$vbphrase[private_messages_nav]</phrase>
			<br />
			<else />
			<phrase 1="$vbphrase[unread_x_nav_compiled]" 2="$vbphrase[total_x_nav_compiled]" 3="$session[sessionurl]">$vbphrase[private_messages_nav]</phrase><br /></if></if>
The end result should look like this, in your own board colors ofcourse.

Dont forget to press install if you like this little mod.

Update (26-5-2005): This mod had a conflict in IE with an other mod, namely a 2nd breadcrumb we've added at the bottom for easy scrolling, which caused us to have an overflow error in Internet Explorer. So basicly, this mod should have worked for other forums, it just gave us specificly a slight hickup cause of the nature of our board. Still, the code has been updated so that it works now for both us and other forums that may have messed with the onload command.

Show Your Support

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

Comments
  #32  
Old 07-25-2005, 03:33 AM
MThornback MThornback is offline
 
Join Date: Apr 2005
Location: Canada
Posts: 388
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

*Installed* but it doesn't blink when pop-ups are enabled on PMs....not until the pop-up is actioned anyway...after that...works like a dream
Reply With Quote
  #33  
Old 08-09-2005, 01:54 PM
Peace_Hope Peace_Hope is offline
 
Join Date: Jul 2005
Location: MN, USA
Posts: 44
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I get an error saying: stack overflow on line 368

Anyone know what is going on?
Reply With Quote
  #34  
Old 08-09-2005, 01:56 PM
Peace_Hope Peace_Hope is offline
 
Join Date: Jul 2005
Location: MN, USA
Posts: 44
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok, it is fixed. I accidently had the onload function in there twice.
Reply With Quote
  #35  
Old 08-13-2005, 05:42 PM
kregger kregger is offline
 
Join Date: Jul 2005
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Didn't realize I needed this until here recently. hehe Thanks! *clicks Install*

Craig
Reply With Quote
  #36  
Old 08-13-2005, 05:47 PM
kregger kregger is offline
 
Join Date: Jul 2005
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How can I make the part that's flashing clickable? The first thing people will do is try to click on the flashing part. Or I did anyway. hehe
Reply With Quote
  #37  
Old 09-05-2005, 04:15 AM
MRGTB MRGTB is offline
 
Join Date: Dec 2004
Posts: 548
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Very cool, works with both IE and Firefox. And also works across my whole site on the vBGallery and vBadvanced CMPS 2 RC2 pages becuase it only requires navbar hack.

Installed clicked
Reply With Quote
  #38  
Old 09-05-2005, 03:07 PM
o0Hubba0o's Avatar
o0Hubba0o o0Hubba0o is offline
 
Join Date: Mar 2005
Location: Minnesota
Posts: 263
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by kregger
How can I make the part that's flashing clickable? The first thing people will do is try to click on the flashing part. Or I did anyway. hehe
Lol I did that too, even though I've used it thousands of times before this hack, I still tried clicking the pretty flashing words first lol. Though it's not that big of deal for me, people will figure it out heh.
Reply With Quote
  #39  
Old 09-05-2005, 04:46 PM
Snake's Avatar
Snake Snake is offline
 
Join Date: Mar 2005
Location: Cleveland, OH
Posts: 3,832
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm wondering if this hack will work just fine on 3.5 RC2?
Reply With Quote
  #40  
Old 09-05-2005, 04:59 PM
MRGTB MRGTB is offline
 
Join Date: Dec 2004
Posts: 548
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

if the code is the same that you search, but check the code is exactly the same word for word. I don't see why not.

You aways backup templates etc anyway with notepad for restoring back if it doesn't work.
Reply With Quote
  #41  
Old 09-05-2005, 05:55 PM
Fusion.nl's Avatar
Fusion.nl Fusion.nl is offline
 
Join Date: Apr 2005
Location: Netherlands
Posts: 37
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Once we got 3.5 installed, ill install this again anyway. Maybe even make an installer once I figure out how to do it.
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 07:36 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.08190 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
  • (6)bbcode_code
  • (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