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)
-   -   Private Messages Enhancements - TW7S - New Way To Display Notifications (jQuery,CSS,jGrowl) (https://vborg.vbsupport.ru/showthread.php?t=254231)

LifesGreatestGift 11-24-2010 10:00 PM

TW7S - New Way To Display Notifications (jQuery,CSS,jGrowl)
 
1 Attachment(s)
https://vborg.vbsupport.ru/external/2010/11/16.png

Description:
This mod changes the way notifications are displayed. It disables the default dropdown menu listed in the toplinks in the header and uses a free open script called jGrowl to display them on the bottom left of the screen no matter where you are on a page. Helps with people "not noticing" the notifications. Enjoy. TheWindows7Site

Instructions:

1) Upload files in attachment to forum root

2) Open template headinclude

Paste the following code at the bottom
Code:

<!-- TW7S - New Way To Display Notifications (jQuery,CSS,jGrowl) -->
    <script type="text/javascript" src="jscripts/tw7s_notifications/jquery-1.4.2.js"></script>
    <script type="text/javascript" src="jscripts/tw7s_notifications/jquery.jgrowl.js"></script>
    <link href="jscripts/tw7s_notifications/jquery.jgrowl.css" rel="stylesheet" type="text/css"/>
<!-- TW7S - New Way To Display Notifications (jQuery,CSS,jGrowl) -->

3) Open template header

Find the following:
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>

Replace with:

Code:

<!-- TW7S - New Way To Display Notifications (jQuery,CSS,jGrowl) -->
<vb:if condition="$notifications_total">
<script type="text/javascript">

$.jGrowl('{vb:raw notifications_menubits} <br />You must view your notification(s) before this box will disappear.' , { sticky: true, header : 'New Notification(s)' } );

</script>
</vb:if>

<li><a href="private.php{vb:raw session.sessionurl_q}">{vb:rawphrase inbox}</a></li>
<!-- TW7S - New Way To Display Notifications (jQuery,CSS,jGrowl) -->


Done!

Have fun customizing this to fit your needs.

Arabic Translation by Dr.osamA
Spanish Translation by Destron

steve1966 11-25-2010 08:00 PM

thanks will try this

Juggernaut 11-25-2010 08:28 PM

Looks very good, tagged for later :D

The Death [LK] 11-26-2010 01:19 AM

]good mod :)

Dr.osamA 11-26-2010 02:45 AM

1 Attachment(s)
thanxxx man

good mod

installed + 5 stars

translated to Arabic

code in header

PHP Code:

<!-- TW7S - New Way To Display Notifications (jQuery,CSS,jGrowl) --> 
<
vb:if condition="$notifications_total">
<
script type="text/javascript">

$.
jGrowl('{vb:raw notifications_menubits} <br />يجــب عليك قــراءة الرسائل الخاصة لتختفــي هذه النافـذه.' , { stickytrueheader 'الرسائل الجديدة' } );

</
script>
</
vb:if>

<
li><a href="private.php{vb:raw session.sessionurl_q}">{vb:rawphrase inbox}</a></li>
<!-- 
TW7S - New Way To Display Notifications (jQuery,CSS,jGrowl) --> 


files in attashment

keep it up :D

LifesGreatestGift 11-26-2010 02:52 AM

Thanks for the translation. Added to original post.

blake247 11-26-2010 04:31 AM

Great mod! Thank you!

Juggernaut 11-26-2010 04:45 AM

I like this one very much as well, thank you :D

RobbieZ 11-26-2010 05:00 AM

I like the way it wont disappear unless you click as some do go ignored..

Iroc88 11-26-2010 06:01 AM

Very Nice, Thank you!

Skyrider 11-26-2010 09:05 PM

Can this be set by usergroup? So only specific usergroups will get this notification box?

LifesGreatestGift 11-26-2010 09:13 PM

Quote:

Originally Posted by FF|Skyrider (Post 2126109)
Can this be set by usergroup? So only specific usergroups will get this notification box?

Yes, but why?

Skyrider 11-26-2010 09:41 PM

Quote:

Originally Posted by TheWindows7Site (Post 2126111)
Yes, but why?

Because I personally don't prefer to force our users to view their new messages if they don't want to check it right now. Plus, we have a usergroup (inteam) for developing a game and we need every single of our staff to check their messages. This would greatly help with that.

basilrath 11-26-2010 09:42 PM

i cant see why you would want a specific usergroup to be able to access or recieve notification ...... given the notifications are targetted specifically anyway?

Nice mod good work

preemz10314 11-26-2010 09:59 PM

I tried to install it.. but It didnt excatly work? but it did not cause any errors? Does this work on custom themes? Or maybe i did something wrong..do you have to enable in it options?

Skyrider 11-26-2010 10:00 PM

Quote:

Originally Posted by basilrath (Post 2126127)
i cant see why you would want a specific usergroup to be able to access or recieve notification ...... given the notifications are targetted specifically anyway?

Nice mod good work

Isn't this mod meant (created / default) for everyone, all usergroups?

LifesGreatestGift 11-26-2010 10:08 PM

Quote:

Originally Posted by FF|Skyrider (Post 2126137)
Isn't this mod meant (created / default) for everyone, all usergroups?

Yes. If you want to set it up for specific user groups then go ahead. I will not be posting the code. My code is for ALL usergroups. Enjoy. :)

Skyrider 11-26-2010 10:18 PM

Yea, that's the problem.. I don't know how to target specific usergroups XD

Dr.osamA 11-26-2010 10:30 PM

Quote:

Originally Posted by TheWindows7Site (Post 2125827)
Thanks for the translation. Added to original post.


thank you sir

Juggernaut 11-26-2010 11:24 PM

Here is my spanish header translation if anyone is interested :D

Code:

<!-- TW7S - New Way To Display Notifications (jQuery,CSS,jGrowl) -->
<vb:if condition="$notifications_total">
<script type="text/javascript">

$.jGrowl('{vb:raw notifications_menubits} <br />Debes ver tus notificaciones para que este mensaje desaparezca.' , { sticky: true, header : 'Aviso del foro' } );

</script>
</vb:if>

<li><a href="private.php{vb:raw session.sessionurl_q}">{vb:rawphrase inbox}</a></li>
<!-- TW7S - New Way To Display Notifications (jQuery,CSS,jGrowl) -->


LifesGreatestGift 11-26-2010 11:28 PM

Quote:

Originally Posted by Destron (Post 2126174)
Here is my spanish header translation if anyone is interested :D

Thanks, link added to mod.

seeson 11-27-2010 12:46 AM

Works perfectly. Thank you!

Juggernaut 11-27-2010 12:51 AM

Quote:

Originally Posted by FF|Skyrider (Post 2126151)
Yea, that's the problem.. I don't know how to target specific usergroups XD

You can use a conditional for that, I used a conditional to exclude an admin who didn't like the new notifications, but the rest of my members love it.

basilrath 11-27-2010 02:17 PM

Strange this works when in the private.php

but not when on the forumhome?

so if you go into the inbox or to the private.php it shows bottom left but then return to forumhome still nothing

any ideas?

basilrath 11-27-2010 02:52 PM

Update

works on the index page on cms but not the forumhome page

Skyrider 11-27-2010 03:51 PM

Quote:

Originally Posted by Destron (Post 2126205)
You can use a conditional for that, I used a conditional to exclude an admin who didn't like the new notifications, but the rest of my members love it.

Yea, I also did that. Works good then. Would be great if users can enable/disable this in their control panel.

LifesGreatestGift 11-27-2010 05:11 PM

Quote:

Originally Posted by basilrath (Post 2126359)
Update

works on the index page on cms but not the forumhome page

Registered, couldn't find the mod in use.

Skyrider 11-27-2010 10:32 PM

For those who prefer not that the messages are being displayed while reading your PM list or while reading a PM, use this code:

Code:

<vb:if condition="THIS_SCRIPT != 'private'"><!-- TW7S - New Way To Display Notifications (jQuery,CSS,jGrowl) -->
<vb:if condition="$notifications_total">
<script type="text/javascript">

$.jGrowl('{vb:raw notifications_menubits} <br />Debes ver tus notificaciones para que este mensaje desaparezca.' , { sticky: true, header : 'Aviso del foro' } );

</script>
</vb:if>

<li><a href="private.php{vb:raw session.sessionurl_q}">{vb:rawphrase inbox}</a></li>
<!-- TW7S - New Way To Display Notifications (jQuery,CSS,jGrowl) --></vb:if>

I've only added
Code:

<vb:if condition="THIS_SCRIPT != 'private'"></vb:if>
To prevent the pop-up being shown while in private.php (the PM list & messages).. If there is something wrong with this code, please let me know.. I never actually used this before and it works fine for me.

Would be great if a modification is being made of this. So an option can be set to use the advanced (this one) pop-up or the original. Also would be nice if you can actually close the pop-up and won't appear again until you get a new PM.

LifesGreatestGift 11-27-2010 11:09 PM

Thats fine. No problem with me. I leave my code as is incase there are friend requests, visitor messages etc, the user can then jump to those notifications right from PM.

basilrath 11-28-2010 09:10 AM

ill re- add the mod today and you can see what i mean ................:)

Many thanks

basilrath 11-28-2010 09:14 AM

Ok mod added and you will see what i mean for cms

horussjr 11-28-2010 12:40 PM

Romanian translation:) Good mod but i don't like how it is shown. Letters, color etc. I'm gonna keep it but edit it to my style:)

Code:

<!-- TW7S - New Way To Display Notifications (jQuery,CSS,jGrowl) -->
<vb:if condition="$notifications_total">
<script type="text/javascript">

$.jGrowl('{vb:raw notifications_menubits} <br />Trebuie sa iti verifici notificarea(ile) inainte ca aceasta caseta sa dispara.' , { sticky: true, header : 'New Notification(s)' } );

</script>
</vb:if>

<li><a href="private.php{vb:raw session.sessionurl_q}">{vb:rawphrase inbox}</a></li>
<!-- TW7S - New Way To Display Notifications (jQuery,CSS,jGrowl) -->


basilrath 11-28-2010 01:13 PM

i agree so let me know the edits lol

im assuming its in the css

basilrath 11-28-2010 04:36 PM

Resolved - conflict between lightbox on tutorials ..............

Fixed

Cheers Krypto

LifesGreatestGift 11-28-2010 04:45 PM

If you want to style the fonts

Code:

$.jGrowl('<div style="font-weight:normal;color:#ffffff;">{vb:raw notifications_menubits}</div> <br /><div style="font-weight:normal;color:#ffffff;">You must view your notification(s) before this box will disappear.</div>' , { sticky: true, header : '<div style="font-weight:normal;color:#ffffff;">New Notification(s)</div>' } );
Then mess around with using div styles like pictured above. To change the black/transparent bg then you will need to edit the .css file

FReeSTER 11-29-2010 12:29 AM

Not working for me

LifesGreatestGift 11-29-2010 12:40 AM

Quote:

Originally Posted by El Intocable (Post 2126945)
Not working for me

How so? Forum link?

FReeSTER 11-29-2010 01:26 AM

Quote:

Originally Posted by TheWindows7Site (Post 2126951)
How so? Forum link?

It was not working on Forumhome page. Let me do the edits again and let you know URL

thanks :D

bada_bing 11-29-2010 01:33 AM

Does anyone know how to make this work with vb 3.x

Diehardshorty 11-29-2010 02:06 AM

Nice cant wait to see what an update would look like


All times are GMT. The time now is 06:18 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.01578 seconds
  • Memory Usage 1,837KB
  • 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
  • (8)bbcode_code_printable
  • (1)bbcode_php_printable
  • (11)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete