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.