vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=246)
-   -   Miscellaneous Hacks - Additional Notification Alert [jQuery] (https://vborg.vbsupport.ru/showthread.php?t=262940)

boydy 04-30-2011 10:00 PM

Additional Notification Alert [jQuery]
 
1 Attachment(s)
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

evilTone 05-01-2011 03:51 PM

installed and working fine, thanks

boydy 05-01-2011 04:19 PM

Quote:

Originally Posted by evilTone (Post 2190726)
installed and working fine, thanks

No problem :) Remember and mark as installed to keep up-to-date with future updates.

Juggernaut 05-01-2011 06:11 PM

Installed, and looks very good. :)

goxy63 05-01-2011 10:21 PM

This is great, but with pop-up window regarding to message its bit too much...how to remove pop up window?

boydy 05-02-2011 08:41 AM

Which popup window? There is not popup involved in this mod?

goxy63 05-02-2011 09:26 AM

Quote:

Originally Posted by boydy (Post 2190966)
Which popup window? There is not popup involved in this mod?

Not regarding this mod, there is default pop up (small) window with VB, and together with this notification its bit too much.

boydy 05-02-2011 10:29 AM

Ok mate, i know what you mean, i'll look into it for you.

boydy 05-02-2011 11:38 AM

Quote:

Originally Posted by goxy63 (Post 2190972)
Not regarding this mod, there is default pop up (small) window with VB, and together with this notification its bit too much.

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 :)

COL NIL SATIS 05-02-2011 05:41 PM

top man Boydy,will install this now...amazing work

rates 5

goxy63 05-02-2011 05:51 PM

Quote:

Originally Posted by boydy (Post 2191002)
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

boydy 05-02-2011 06:39 PM

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.

goxy63 05-03-2011 12:43 AM

Quote:

Originally Posted by boydy (Post 2191002)
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 :(

boydy 05-03-2011 05:45 AM

Can you show a printscreen of what you mean?

goxy63 05-03-2011 01:56 PM

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)
https://vborg.vbsupport.ru/

I know that this is not part of this mod, but together with this mod default pop up window is unnecessary

boydy 05-03-2011 05:05 PM

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.

goxy63 05-04-2011 12:38 PM

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

boydy 05-04-2011 01:23 PM

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.

goxy63 05-08-2011 12:19 PM

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

UKCE_Hitman 05-08-2011 04:26 PM

Installed thx

zonaenlinea 05-09-2011 01:39 PM

thansk very very good

Delphiprogrammi 06-03-2011 08:21 PM

Quote:

Originally Posted by goxy63 (Post 2191343)
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)
http://img843.imageshack.us/img843/6920/unled1w.gif

I know that this is not part of this mod, but together with this mod default pop up window is unnecessary

then turn it off profile.php?do=editoptions

8thos 07-09-2011 08:03 PM

Can you add quote notifications to this modification please?

For example: https://vborg.vbsupport.ru/showthread.php?t=242358

BaanFarsang 07-18-2011 04:12 PM

Doesn't work in Version 4.1.5 Beta 1!

boydy 07-19-2011 04:57 PM

What's wrong with it, can you provide more info or a screenshot as i am not running 4.1.5

I will be releasing this as a product shortly to avoid manual template changes, it will work a bit different and be in a different location but will do the same job. I'll post in here when it's done.

boydy 07-21-2011 02:26 PM

This is no longer supported, product is now available here - https://vborg.vbsupport.ru/showthread.php?t=267180


All times are GMT. The time now is 06:27 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.01200 seconds
  • Memory Usage 1,804KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code_printable
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (26)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete