We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

Chat box notification | Forum

Lee
Lee Aug 25 '13
Does any one know how to make a notification box that appear when receive a message from friend in the chat to stay longer?See attach picture.


 

Attachments:
  Box.png (78.61Kb)
JB TECH
JB TECH Aug 26 '13
Whoa, when did the IM start doing that?
ross Team
ross Aug 26 '13
Topic was moved from General Questions.
Kieron H Leader
Kieron H Aug 26 '13
yeah when did that start happening 
S. Bourdon
S. Bourdon Aug 26 '13
Hello,


Look at this file:

ow_plugins\ajaxim\static\js\ajaxim.js


Replace line 1175 from:

        }, 7000); // TODO Select autohide time


to:

        }, 10000); // TODO Select autohide time


if you want it to stay visible for 10 seconds.

Choose any number you like!  ;)


As for me, I have completely removed that function so that the notification never disappears (at least until the member goes to another page!)


If you would like to do the same, remove the following code:

        setTimeout(function(){

            notification_container.fadeOut('slow', function(){

                notification_container.remove();

            })

        }, 7000); // TODO Select autohide time



Hope this helps!



The Forum post is edited by S. Bourdon Aug 26 '13
Lee
Lee Aug 26 '13
Thank you S. Bourdon. IT working.

And I have a new question for you,  do you know how to make the chat box to open in new window when receive a new massage from friend like facebook for the.


( Or do you know how I can make Instant chat box to pop up every time my members login to my site? please see the attack picture)

Attachments:
  chat box.png (392.27Kb)
S. Bourdon
S. Bourdon Aug 27 '13
You're welcome!


Unfortunately, I don't know how to open up a new window when a new message comes in but here's what I did to make the notification box pops up at all times!


Open:

ow_plugins\ajaxim\static\js\ajaxim.js


Replace:

            if (OW_InstantChat_App.contactManager.isActiveMode())

            {

                this.createNewMessageNotification(message);

            }


With:

            this.createNewMessageNotification(message);



Also, you could make that little notification box stand out a little more by modifying its colors or by displaying it fully.


To achieve that, open:

ow_themes\YOUR_THEME\base.css


Replace:

.ow_chat_notification .ow_author_block{

height:39px;

margin:2px;

overflow:hidden;

padding:0;

position:relative;


With:

.ow_chat_notification .ow_author_block{

height:39px;

margin:2px;

padding:0;

position:relative;

background:#ff6d08;


Using the Origin theme, here's the result:





I guess the end result is the same as what you asked for!  ;)


The Forum post is edited by S. Bourdon Aug 27 '13
Lee
Lee Aug 27 '13
Thank You S. Bourdon your code are working.


Ricky
Ricky Aug 31 '13

Quote from S. Bourdon You're welcome!


Unfortunately, I don't know how to open up a new window when a new message comes in but here's what I did to make the notification box pops up at all times!


Open:

ow_plugins\ajaxim\static\js\ajaxim.js


Replace:

            if (OW_InstantChat_App.contactManager.isActiveMode())

            {

                this.createNewMessageNotification(message);

            }


With:

            this.createNewMessageNotification(message);



Also, you could make that little notification box stand out a little more by modifying its colors or by displaying it fully.


To achieve that, open:

ow_themes\YOUR_THEME\base.css


Replace:

.ow_chat_notification .ow_author_block{

height:39px;

margin:2px;

overflow:hidden;

padding:0;

position:relative;


With:

.ow_chat_notification .ow_author_block{

height:39px;

margin:2px;

padding:0;

position:relative;

background:#ff6d08;


Using the Origin theme, here's the result:





I guess the end result is the same as what you asked for!  ;)



please which line can i do the popup
S. Bourdon
S. Bourdon Aug 31 '13
This little window pops-up by default, but only when the Chat box is maximized.

With the little code modification provided above, it will always pop-up!


Give it a try!  ;)

Lee
Lee Sep 11 '13
It in line 1300
fbkca
fbkca Sep 26 '13
This is neat, but if the main chat box is maximized but hidden (the auto slide to the right) then you can't see the message at all...


is there any way to chat where the popup message appears?

S. Bourdon
S. Bourdon Sep 26 '13
I see it!




That's not what you get?

fbkca
fbkca Sep 26 '13
oh I spose I see that... but you can read the message without it expanding...
Chris
Chris Jan 5 '14
Hey guys, I added the the customizations to allow the notification to stay open for 20 seconds, and to have the notification appear even when the chat box is minimized but it's not working.
Austeyr
Austeyr Feb 25 '14
I've never seen this popup this is cool wish my site did this right now you have no idea if someone has sent you a message.