Page 1 of 1

Notifications Pop Up

PostPosted: 24 Aug 2010, 17:16
by TSilva
I have a intern notification system on my site, that pops up a little box with the content of notification.

How can I make this pops up using the AC query?

The code for call it is just some simple thing like
<script>$.notification("msg");</script>

Where can I add this on AC ajax calls?

Re: Notifications Pop Up

PostPosted: 25 Aug 2010, 02:10
by Jason
I'm extremely confused what you're trying to do. Could you please explain a bit more?

Re: Notifications Pop Up

PostPosted: 25 Aug 2010, 03:08
by TSilva
I am using this jQuery plugin:
http://www.stanlemon.net/projects/jgrowl.html

It's a nice plugin that display some notification style boxes.

I have this implemented on my site to display some stuff, so I would like that when there is a new notification message, it was displayed using this plugin.

At this moment, when there is a new notification message, AC only increases shows up a number (saying, there is a new notification).

I would like to implement this plugin on AC, so when there is a new notification, AC would increase the number on right corner of chat bar, and it would also pop up the notification box from jGrowl.

So.. let's suppose..

I send a private message to a person... that person that get the notification increased on AC bar and also gets a message from the little pop up (using jGrowl) saying "You got a new message".


I think this is one of the features for the next update of AC, but I would like to use the same notification box (jGrolw) - to keep all the notification/boxes of whole site the same.

Re: Notifications Pop Up

PostPosted: 25 Aug 2010, 11:52
by Jason
Ok I see, yeah that will be in the next update but will match the style of the bar more.

You'll want to search for this in the arrowchat_core.js file:
Code: Select all
if(e=="notifications"){a.each(l,function(f,h){


Inside there is where notifications are dealt with when they are received. h.alert_id will give you the alert id of the notifications and h.markup will give you the HTML markup of the message as defined in the ArrowChat admin panel.

Re: Notifications Pop Up

PostPosted: 25 Aug 2010, 14:38
by TSilva
Thanks!

Works perfect now.

This is as simple as the follow...

Code: Select all
if(e=="notifications"){a.each(l,function(f,h){ a.jGrowl(h.markup);


:)

Re: Notifications Pop Up

PostPosted: 26 Oct 2010, 16:38
by TSilva
Jason... how do I edit this on the last version?

I want implement my own notification style instead.

I do search by:

Code: Select all
if(e=="notifications"){a.each(l,function(f,h){


But it does not exists...
So I suppose it is now this...

Code: Select all
if(e=="notifications"){var markup2;a.each(l,function(f,h){


So.. how do I avoid your notification to appears?

Re: Notifications Pop Up

PostPosted: 26 Oct 2010, 16:50
by Jason
Removing...

Code: Select all
a("body").append('<div id="arrowchat_notification_alert"><div class="arrowchat_notification_alert_content">'+markup2+'</div></div>');


...should do the trick.

Re: Notifications Pop Up

PostPosted: 26 Oct 2010, 19:29
by TSilva
It does ;)

Thanks!

Re: Notifications Pop Up

PostPosted: 27 Oct 2010, 04:58
by dbarreca
demo???

Re: Notifications Pop Up

PostPosted: 27 Oct 2010, 06:22
by TSilva
Attached.

arrowchat_jgrowl.jpg

Topic Closed

PostPosted: 07 Nov 2012, 12:40
by Staff Bot
This thread has been locked because the last post is greater than six months old. There is a good chance that the information in this thread is outdated. Please open a new topic if you wish to discuss this further.