Like SystemiConnectFri 15 Oct 2021, 04:50
Auto Save MessagesLGforumFri 26 Feb 2021, 13:31
New tutorial questionTheCrowMon 15 Feb 2021, 08:12
Support iOS Emojis (and other platforms)LGforumSun 14 Feb 2021, 01:25
LGforum (2806)
[PLUG-IN] Automatically open the chat when receive a new message Vote_lcap[PLUG-IN] Automatically open the chat when receive a new message Voting_bar[PLUG-IN] Automatically open the chat when receive a new message Vote_rcap 
Mr.Easybb (1587)
[PLUG-IN] Automatically open the chat when receive a new message Vote_lcap[PLUG-IN] Automatically open the chat when receive a new message Voting_bar[PLUG-IN] Automatically open the chat when receive a new message Vote_rcap 
Bloodbath (745)
[PLUG-IN] Automatically open the chat when receive a new message Vote_lcap[PLUG-IN] Automatically open the chat when receive a new message Voting_bar[PLUG-IN] Automatically open the chat when receive a new message Vote_rcap 
Rukiafan (533)
[PLUG-IN] Automatically open the chat when receive a new message Vote_lcap[PLUG-IN] Automatically open the chat when receive a new message Voting_bar[PLUG-IN] Automatically open the chat when receive a new message Vote_rcap 
Dom (513)
[PLUG-IN] Automatically open the chat when receive a new message Vote_lcap[PLUG-IN] Automatically open the chat when receive a new message Voting_bar[PLUG-IN] Automatically open the chat when receive a new message Vote_rcap 
puppycheese (446)
[PLUG-IN] Automatically open the chat when receive a new message Vote_lcap[PLUG-IN] Automatically open the chat when receive a new message Voting_bar[PLUG-IN] Automatically open the chat when receive a new message Vote_rcap 
pedro (330)
[PLUG-IN] Automatically open the chat when receive a new message Vote_lcap[PLUG-IN] Automatically open the chat when receive a new message Voting_bar[PLUG-IN] Automatically open the chat when receive a new message Vote_rcap 
Neymar (301)
[PLUG-IN] Automatically open the chat when receive a new message Vote_lcap[PLUG-IN] Automatically open the chat when receive a new message Voting_bar[PLUG-IN] Automatically open the chat when receive a new message Vote_rcap 
Hitsu (281)
[PLUG-IN] Automatically open the chat when receive a new message Vote_lcap[PLUG-IN] Automatically open the chat when receive a new message Voting_bar[PLUG-IN] Automatically open the chat when receive a new message Vote_rcap 
Flora (275)
[PLUG-IN] Automatically open the chat when receive a new message Vote_lcap[PLUG-IN] Automatically open the chat when receive a new message Voting_bar[PLUG-IN] Automatically open the chat when receive a new message Vote_rcap 


[PLUG-IN] Automatically open the chat when receive a new message

LGforumLGforum
Status : Working to restore AWC!

Posts : 2806
Join date : 2011-10-05
Age : 30
Location : UK
Sat 12 Jan 2013, 06:36

Automatically open the chat when receive a new message

(AWC Versions 1.6+)

This plug in will automatically open the chatbox if the user has it closed when they receive a new message. Meaning they will definitely spot it and should reply quickly.

[bspoiler=Versions 1.6-1.8]
Code:
avacweb_chat_config.add_event('onnew', function(e) {
  if(!avacweb_chat.open) avacweb_chat.toggle();
});
[/bspoiler]

[bspoiler=Versions 1.9+]
Code:
avacweb_chat_config.add_event('onnew', function() {
    if( !this.settings.on('open') ) {
        this.settings.toggle('open');
    }
});
[/bspoiler]

Simple.
Mr.EasybbMr.Easybb
Status : Love this site, that's why I'm back each day again... lol Samantha's co-owner now. Well deserved!

Posts : 1587
Join date : 2013-01-04
Sat 12 Jan 2013, 07:27
hey could i make a suggestion of adding the users set option to this? I like it very much, now I just have to integrate it lol. Oh and btw the CSS was the issue, it works fine now Wink thanks for that
Taha HusseinTaha Hussein
Status : www.battash.com

Posts : 188
Join date : 2012-10-11
Age : 41
Location : www.battash.com
Sat 12 Jan 2013, 08:43
very nice LG
Thanks a lot for all of these
Ivy_2819Ivy_2819
Status : No status yet...

Posts : 60
Join date : 2012-12-20
Age : 25
Location : Houston, TX, USA
Sat 12 Jan 2013, 14:59
Anyway to make this optional to user?
Thanks a lot for this ^_^ It's very cool ^_^
avatarGuest
Sat 12 Jan 2013, 16:31
WOW! That saves lot's of clicks a year! Razz Thank you!
LGforumLGforum
Status : Working to restore AWC!

Posts : 2806
Join date : 2011-10-05
Age : 30
Location : UK
Sat 12 Jan 2013, 19:52
You can make it an option for the user, but there is a bit more work involved and now we're getting into bigger plug-ins here. That's okay, it will only help demonstrate how AWC can be completely moulded and modified. I'll hopefully get round to writing that tomorrow then.
Mr.EasybbMr.Easybb
Status : Love this site, that's why I'm back each day again... lol Samantha's co-owner now. Well deserved!

Posts : 1587
Join date : 2013-01-04
Sat 12 Jan 2013, 20:55
if we can use a plugin maybe I'll try writing something
LGforumLGforum
Status : Working to restore AWC!

Posts : 2806
Join date : 2011-10-05
Age : 30
Location : UK
Sun 13 Jan 2013, 09:06
The code in this post won't work for 1.9+ let me know if you want an updated version.

Here's the plug in with the option added to the "User option" menu.

Code:
(function(awc) {
   
   awc.add_event('onnew', function(e) {
      if(!avacweb_chat.open && avacweb_chat.auto_popup_value) avacweb_chat.toggle();
   });
   
   //add an onload event to add our new option.
   awc.add_event('onload', function(e) {
      var value = avacweb_chat.cookie('auto_popup');
      avacweb_chat.auto_popup_value = (value !== null) ? parseInt(value) : 0;
      avacweb_chat.id('achat_user_prefs').innerHTML += '<div class="achat_user_setting"><span>' + avacweb_chat.t('Pop up automatically') + '</span><input type="checkbox" onclick="parent.avacweb_chat.toggle_auto_popup()" id="ac_auto_pop_checkbox"' + (avacweb_chat.auto_popup_value ? ' checked="checked"' : '') + '></div>';   
      
      avacweb_chat.toggle_auto_popup = function() {
         var checkbox = avacweb_chat.id('ac_auto_pop_checkbox'), value = checkbox.checked ? 1 : 0;
         avacweb_chat.cookie('auto_popup', value, 1);
         avacweb_chat.auto_popup_value = value;
      };
   });
   
})(avacweb_chat_config);

If you need to, you can add [ic]"pop up automatically" : "Pop Up Automatically"[/ic] to the AWC translation object in order to translate that line. It doesn't need to be translated in the above script, as it is passed to the [ic]avacweb_chat.t()[/ic] function which translates it for you.

I think in a far future release, a way of adding your own options a bit easier might be a nice idea.
avatartommycoo
Status : No status yet...

Posts : 205
Join date : 2011-12-03
Age : 28
Location : indonesia
Sat 04 May 2013, 13:46
i think that will be nice if there is plugin that show new message on tab display, like facebook Smile
mangakamangaka
Status : What I'll type, I don't have any idea :/

Posts : 132
Join date : 2013-06-26
Location : Indonesia
Mon 12 Aug 2013, 05:44
tommycoo wrote:[quotelink="http://www.avacweb.com/t763-plug-in-automatically-open-the-chat-when-receive-a-new-message#11832"]i think that will be nice if there is plugin that show new message on tab display, like facebook Smile
tommycoo wrote:[quotelink="http://www.avacweb.com/t763-plug-in-automatically-open-the-chat-when-receive-a-new-message#11832"]i think that will be nice if there is plugin that show new message on tab display, like facebook Smile
Well yes that be great! Very Happy
Ch@lo ValdezCh@lo Valdez
Status : :)

Posts : 218
Join date : 2013-04-21
Age : 48
Location : Mexico City
Thu 08 May 2014, 05:21
this plugin not works with 1.9
LGforumLGforum
Status : Working to restore AWC!

Posts : 2806
Join date : 2011-10-05
Age : 30
Location : UK
Thu 08 May 2014, 10:45
This plug-in has been updated with a 1.9+ code. With documentation on 1.9 here: http://chat.avacweb.net/develop surely simple plug-ins like this are easy for you to guys out, no?
Ch@lo ValdezCh@lo Valdez
Status : :)

Posts : 218
Join date : 2013-04-21
Age : 48
Location : Mexico City
Thu 08 May 2014, 15:29
LGforum wrote:[quotelink="http://www.avacweb.com/t763-plug-in-automatically-open-the-chat-when-receive-a-new-message#7584"]The code in this post won't work for 1.9+ let me know if you want an updated version.

Here's the plug in with the option added to the "User option" menu.

Code:
(function(awc) {
   
   awc.add_event('onnew', function(e) {
      if(!avacweb_chat.open && avacweb_chat.auto_popup_value) avacweb_chat.toggle();
   });
   
   //add an onload event to add our new option.
   awc.add_event('onload', function(e) {
      var value = avacweb_chat.cookie('auto_popup');
      avacweb_chat.auto_popup_value = (value !== null) ? parseInt(value) : 0;
      avacweb_chat.id('achat_user_prefs').innerHTML += '<div class="achat_user_setting"><span>' + avacweb_chat.t('Pop up automatically') + '</span><input type="checkbox" onclick="parent.avacweb_chat.toggle_auto_popup()" id="ac_auto_pop_checkbox"' + (avacweb_chat.auto_popup_value ? ' checked="checked"' : '') + '></div>';   
      
      avacweb_chat.toggle_auto_popup = function() {
         var checkbox = avacweb_chat.id('ac_auto_pop_checkbox'), value = checkbox.checked ? 1 : 0;
         avacweb_chat.cookie('auto_popup', value, 1);
         avacweb_chat.auto_popup_value = value;
      };
   });
   
})(avacweb_chat_config);

If you need to, you can add [ic]"pop up automatically" : "Pop Up Automatically"[/ic] to the AWC translation object in order to translate that line. It doesn't need to be translated in the above script, as it is passed to the [ic]avacweb_chat.t()[/ic] function which translates it for you.

I think in a far future release, a way of adding your own options a bit easier might be a nice idea.

yes please updated this plugin
LGforumLGforum
Status : Working to restore AWC!

Posts : 2806
Join date : 2011-10-05
Age : 30
Location : UK
Thu 08 May 2014, 16:56
Okay I'll try and get round to that for you tomorrow Smile

Hey the last line of that post is the moment I decided to do something to better control the settings of AWC. Well over a year ago. A historical moment of AWC? Razz
Ch@lo ValdezCh@lo Valdez
Status : :)

Posts : 218
Join date : 2013-04-21
Age : 48
Location : Mexico City
Fri 09 May 2014, 12:13
Smile bump
Ch@lo ValdezCh@lo Valdez
Status : :)

Posts : 218
Join date : 2013-04-21
Age : 48
Location : Mexico City
Sun 11 May 2014, 02:21
Sad
LGforumLGforum
Status : Working to restore AWC!

Posts : 2806
Join date : 2011-10-05
Age : 30
Location : UK
Sun 11 May 2014, 16:23
Here is the updated version of this plug-in which also adds a 'User option' for the user to turn this on or off.
(V1.9+)

Code:
[panda=js](function(awc) {
   awc.add_event('onnew', function(e) {
      if(!this.settings.on('open') && this.settings.on('open automatically')) {
         this.settings.toggle('open');
      }
   });
   
   awc.add_event('onload', function() {
      this.settings.add('open automatically', 0, true).add_ui('open automatically');
   });
})(avacweb_chat_config);
As you can see its a lot shorter and easier than the last.
avatarStr0ng
Status : No status yet...

Posts : 95
Join date : 2012-11-26
Mon 26 May 2014, 16:56
Hmm something is wrong with it, since when I unchecked it the chat still pooping up! Phpbb3 version.
avatarStr0ng
Status : No status yet...

Posts : 95
Join date : 2012-11-26
Thu 29 May 2014, 13:24
Never mind! I fixed it sorry!
avatar----- fighter -----
Status : No status yet...

Posts : 4
Join date : 2015-01-06
Tue 06 Jan 2015, 14:41
Lg can u
LGforum wrote:[quotelink="http://www.avacweb.com/t763-plug-in-automatically-open-the-chat-when-receive-a-new-message#7509"]

Automatically open the chat when receive a new message

(AWC Versions 1.6+)

This plug in will automatically open the chatbox if the user has it closed when they receive a new message. Meaning they will definitely spot it and should reply quickly.

[bspoiler=Versions 1.6-1.8]
Code:
avacweb_chat_config.add_event('onnew', function(e) {
  if(!avacweb_chat.open) avacweb_chat.toggle();
});
[/bspoiler]

[bspoiler=Versions 1.9+]
Code:
avacweb_chat_config.add_event('onnew', function() {
    if( !this.settings.on('open') ) {
        this.settings.toggle('open');
    }
});
[/bspoiler]

Simple.

lg can u tell me where put this code ?
LGforumLGforum
Status : Working to restore AWC!

Posts : 2806
Join date : 2011-10-05
Age : 30
Location : UK
Wed 07 Jan 2015, 11:10
Read about plugins on the AWC website, once you understand what they are follow the 'Installing Plug Ins' link.
BloodbathBloodbath
Status : No status yet...

Posts : 745
Join date : 2013-05-31
Age : 28
Wed 07 Jan 2015, 22:03
Bloodbath wrote:[quotelink="http://www.avacweb.com/t875p15-plug-in-prevent-external-links-in-the-chatbox#21672"]If you look at the Sticky topic in this subforum you'd have realized that this is answered in this topic here. I will reply to this as only answer to the total three times you posted this.

This has been my reply to him before.
Ch@lo ValdezCh@lo Valdez
Status : :)

Posts : 218
Join date : 2013-04-21
Age : 48
Location : Mexico City
Thu 05 Mar 2015, 23:15
Code:
[panda=js](function(awc) {
  awc.add_event('onnew', function(e) {
      if(!this.settings.on('open') && this.settings.on('open automatically')) {
        this.settings.toggle('open');
      }
  });
 
  awc.add_event('onload', function() {
      this.settings.add('open automatically', 0, true).add_ui('open automatically');
  });
})(avacweb_chat_config);

works with 2.0
Sponsored content