Add Automatic Log In back to AWC
(Versions: 2.0+)In version 1.9 of Avacweb Chat automatic log in is removed and instead must be added via the onload or onopen events.
The reason they were removed was to make more room in the AWC core code. Less code means better and faster.
So now using the event system we can log in on certain events.
To automatically log in when you first open the chat then we must use the 'onopen' event:
- Code:
[panda=js]avacweb_chat_config.add_event('onopen', function() {
if(!this.logged_in) {
this.log_in();
}
});
Or to automatically log in when you first log in to the forum then we use the onload event:
- Code:
[panda=js]avacweb_chat_config.add_event('onload', function() {
if(!this.logged_in) {
this.log_in();
}
});
Simple! This simplicity of the event system is why it has been moved out of the core.
Enjoy!
#awc1-9