Help
Discuss or request ArrowChat modifications
User avatar
TSilva
Customer
 
Posts: 35
Joined: 04 Jun 2010, 05:58

 

by TSilva 24 Aug 2010, 17:16

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?
User avatar
Jason
Customer
 
Posts: 2333
Joined: 12 Dec 2009, 16:06

 

by Jason 25 Aug 2010, 02:10

I'm extremely confused what you're trying to do. Could you please explain a bit more?
User avatar
TSilva
Customer
 
Posts: 35
Joined: 04 Jun 2010, 05:58

 

by TSilva 25 Aug 2010, 03:08

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.
User avatar
Jason
Customer
 
Posts: 2333
Joined: 12 Dec 2009, 16:06

 

by Jason 25 Aug 2010, 11:52

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.
User avatar
TSilva
Customer
 
Posts: 35
Joined: 04 Jun 2010, 05:58

 

by TSilva 25 Aug 2010, 14:38

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


:)
User avatar
TSilva
Customer
 
Posts: 35
Joined: 04 Jun 2010, 05:58

 

by TSilva 26 Oct 2010, 16:38

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?
User avatar
Jason
Customer
 
Posts: 2333
Joined: 12 Dec 2009, 16:06

 

by Jason 26 Oct 2010, 16:50

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.
User avatar
TSilva
Customer
 
Posts: 35
Joined: 04 Jun 2010, 05:58

 

by TSilva 26 Oct 2010, 19:29

It does ;)

Thanks!
User avatar
dbarreca
Customer
 
Posts: 61
Joined: 30 Sep 2010, 03:58

 

by dbarreca 27 Oct 2010, 04:58

demo???
User avatar
TSilva
Customer
 
Posts: 35
Joined: 04 Jun 2010, 05:58

 

by TSilva 27 Oct 2010, 06:22

Attached.

arrowchat_jgrowl.jpg
You do not have the required permissions to view the files attached to this post.
User avatar
Staff Bot
ArrowChat Team
 
Posts: 8996
Joined: 07 Nov 2012, 13:41

 

by Staff Bot 07 Nov 2012, 12:40

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.