Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Template Modifications
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Additional Notification Alert [jQuery] Details »»
Additional Notification Alert [jQuery]
Version: 1.00, by boydy boydy is offline
Developer Last Online: Dec 2014 Show Printable Version Email this Page

Category: Miscellaneous Hacks - Version: 4.x.x Rating:
Released: 04-30-2011 Last Update: Never Installs: 32
Template Edits
Additional Files Translations  
No support by the author.

Hi guys,

This mod/hack started off as a PM notification but after some requests i've extended it for all notifications and thrown in some jQuery just to make things smooth and look good

Anyway on to the mod itself, when a user recieves a notification a red bar will show at the top of the forum telling the user they have a notification and there is a clickable link which will extend the red box using jQuery giving the user links to specific notifications. 2 Demo gif's i've made here to help people understand, the actual jQuery animation isn't shown in the gif's but i've made it clear what it does,

DEMO 1 - Notification Alert (Extension Closed)
DEMO 2 - Notification Alert (Extension Open)

(Ignore the image movement, just an un-even cut lol)

=|= Install =|=

- Download and unzip attached file.
- Upload contents of the UPLOAD folder to the forum root.

Open Template - header

Add at Top -

Code:
<!-- Notification Alert -->
<style type="text/css">
.alert {
    background-color:#F00;
    width:100%;
    height:30px;
    color:#fff;
    font-size:14px;
    display:block;
}
.alert p {
    padding:5px;
}
.alert a {
    color:#ccc;
    text-decoration:none; 
}
.alert a:hover {
    color:#fff;
    text-decoration:underline; 
}
#slidealert {
    display: none;
    height:auto;
    padding-bottom:5px;
    background-color: #F00;
}
#slidealert a {
    text-decoration:none;
    color:#CCC;
    padding:5px;
}
#slidealert a:hover {
    text-decoration:underline;
    color:#fff;
}
</style>
<script src="jquery.js" type="text/javascript"></script>
<script type="text/javascript">
//<![CDATA[
function ShowHide(){
$("#slidealert").animate({"height": "toggle"}, { duration: 1000 });
}
//]]>
</script>
<vb:if condition="$notifications_total">
<div class="alert">
<p><span style="text-decoration:blink; font-weight:bold;">ATTENTION! {vb:raw bbuserinfo.username}</span> You've got {vb:raw notifications_total} new notification(s), click <a onclick="ShowHide(); return false;" href="#">here</a> to view.</div><div id="slidealert">{vb:raw notifications_menubits}<a onclick="ShowHide(); return false;" href="#">Close</a></div></p>                    
</vb:if>
<!-- Notification Alert End -->
And that's it installed! Any questions or issues just post in here.

Enjoy! And remember to mark as installed for future updates and support!

Boydy

Download Now

File Type: zip Additional Notification Alert.zip (30.6 KB, 184 views)

Screenshots

File Type: gif closednot.gif (37.1 KB, 0 views)
File Type: gif opennot.gif (49.7 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Благодарность от:
mohammadxxx

Comments
  #12  
Old 05-02-2011, 05:51 PM
goxy63 goxy63 is offline
 
Join Date: Oct 2008
Location: its like another planet:D
Posts: 657
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by boydy View Post
Ok mate, to remove the vbulletin built in notification dropdown do the following,

Open template - header

Find and remove
Thanks a lot, love our mod...changed few colors and its perfect now
Just small information, part of notification that is blinking its not working with IE 8
Not problem for me tho as I "hate" IE and most of my users don't use it
Great mod, rated and nominated
Keep up the good work, cant wait some more from you ....cheers
Reply With Quote
  #13  
Old 05-02-2011, 06:39 PM
boydy's Avatar
boydy boydy is offline
 
Join Date: Jan 2011
Location: UK
Posts: 98
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yeh i realised IE may cause problems because it is without doubt the worst browser on the planet. I'll look into that though and thanks for the comments.
Reply With Quote
  #14  
Old 05-03-2011, 12:43 AM
goxy63 goxy63 is offline
 
Join Date: Oct 2008
Location: its like another planet:D
Posts: 657
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by boydy View Post
Ok mate, to remove the vbulletin built in notification dropdown do the following,

Open template - header

Find and remove -
Code:
<vb:if condition="$notifications_total">
				<li class="popupmenu notifications" id="notifications">
					<a class="popupctrl" href="usercp.php{vb:raw session.sessionurl_q}">{vb:rawphrase your_notifications}: <span class="notifications-number"><strong>{vb:raw notifications_total}</strong></span></a>
					<ul class="popupbody popuphover">
						{vb:raw notifications_menubits}
					</ul>
				</li>
				<vb:else />
				<li class="popupmenu nonotifications" id="nonotifications">
					<a class="popupctrl" href="usercp.php{vb:raw session.sessionurl_q}">{vb:rawphrase your_notifications}</a>
					<ul class="popupbody popuphover">
						<li>{vb:rawphrase no_new_messages}</li>
						<li><a href="private.php{vb:raw session.sessionurl_q}">{vb:rawphrase inbox}</a></li>
					</ul>
				</li>
				</vb:if>
That's you
Removed but damn thing still pops out
Reply With Quote
  #15  
Old 05-03-2011, 05:45 AM
boydy's Avatar
boydy boydy is offline
 
Join Date: Jan 2011
Location: UK
Posts: 98
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Can you show a printscreen of what you mean?
Reply With Quote
  #16  
Old 05-03-2011, 01:56 PM
goxy63 goxy63 is offline
 
Join Date: Oct 2008
Location: its like another planet:D
Posts: 657
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Think that from start we did not understand each others, I was not thinking about drop down or... just pop up window which notifies member about new pm, this is presented to a user just once and even if he don't check message when next time he logs in it will not be there (if no new pm's)


I know that this is not part of this mod, but together with this mod default pop up window is unnecessary
Reply With Quote
  #17  
Old 05-03-2011, 05:05 PM
boydy's Avatar
boydy boydy is offline
 
Join Date: Jan 2011
Location: UK
Posts: 98
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ah ok I understand now, is that a default setting within bulletin as I have a clean test install of vbulletin 4.1.3 and I don't get that popup :s . I'm not available tonight but I will get straight on it tomorrow at some point.

Cheers.
Reply With Quote
  #18  
Old 05-04-2011, 12:38 PM
goxy63 goxy63 is offline
 
Join Date: Oct 2008
Location: its like another planet:D
Posts: 657
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have VB 4.1.3 also, but pop ups are there (you see only once pop up per message)
Will check my settings and at vb.com, maybe its cause of some settings, there is 1000 settings withing VB and maybe I am missing something. Thanks
Reply With Quote
  #19  
Old 05-04-2011, 01:23 PM
boydy's Avatar
boydy boydy is offline
 
Join Date: Jan 2011
Location: UK
Posts: 98
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Goxy, i've had a look around my templates, if you cannot find the setting then try the following:

Open template - Private Message Templates -> pm_popup_script

Delete content of template and save. Like i said i think it must be an option as i don't get it at all.
Reply With Quote
  #20  
Old 05-08-2011, 12:19 PM
goxy63 goxy63 is offline
 
Join Date: Oct 2008
Location: its like another planet:D
Posts: 657
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi again

Well I found how to take care about mentioned problem with pop up message, it was in VB options
AdminCP > Settings > Options > User Registration Options > Default Registration Options
and
AdminCP > Maintenance > Execute SQL Query

...and select the 'No - Pop up a Notification Box When a Private Message is Received' from the dropdown and press 'Continue'.

As VB support suggested and it worked for me

But then another problem was found, with your notification code I had problem with "Radio and TV Player 4.x"mod which is one of my favourite
Problem was that within radio and station pages I could not choose any stations or whatever, think its releted to JS....but its beyond me how to resolve that
I love your way of notification but with jQuery its making trouble for mods like one I mentioned

Thanks
Reply With Quote
  #21  
Old 05-08-2011, 04:26 PM
UKCE_Hitman UKCE_Hitman is offline
 
Join Date: Jan 2008
Posts: 47
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Installed thx
Reply With Quote
Reply


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:12 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.05094 seconds
  • Memory Usage 2,344KB
  • Queries Executed 28 (?)
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
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (11)post_thanks_box
  • (1)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (3)postbit_attachment
  • (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_postinfo_query
  • fetch_postinfo
  • 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
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete