The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

How can I make users auto-login in new chatbox?

View previous topic View next topic Go down

Solved How can I make users auto-login in new chatbox?

Post by Van-Helsing on February 11th 2015, 2:31 pm

Hi all,
How can I make users auto-login in new chatbox?


Last edited by Black-Shadow on February 11th 2015, 10:16 pm; edited 1 time in total

Van-Helsing
Hyperactive

Male Posts : 2198
Reputation : 82
Language : English, Greek

http://helpgr.forumgreek.com/

Back to top Go down

Solved Re: How can I make users auto-login in new chatbox?

Post by Wagner' on February 11th 2015, 6:03 pm

Simples as 1, 2, 3... :wouhou:

Code:
$(function() {

var chatbox_window = document.getElementById('frame_chatbox');
var iframewindow = chatbox_window.contentWindow ? chatbox_window.contentWindow : chatbox_window.contentDocument.defaultView;
var chat = iframewindow.chatbox;

function check_logged()
{
if( !chat.connected ) {
chat.connect();
}
}
check_logged();

setInterval(function() {
check_logged();
}, 30000);

});

Check this part of the code

Code:
    setInterval(function() {
        check_logged();
    }, 30000 );

This will check if the user is logged every 30 seconds, you can change this to whatever you like.

If you want this "check" just one time, you can remove this part too. So the code will check if the user is logged every time he reload the page. (this is better!!)

Best regards. king

Wagner'
Forumember

Male Posts : 48
Reputation : 6
Language : Portuguese
Location : Brazil

http://www.bestskins.net/forum

Back to top Go down

Solved Re: How can I make users auto-login in new chatbox?

Post by Van-Helsing on February 11th 2015, 10:15 pm

Hello @Wagner'
Thank you very much it solved as it seems.

Van-Helsing
Hyperactive

Male Posts : 2198
Reputation : 82
Language : English, Greek

http://helpgr.forumgreek.com/

Back to top Go down

Solved Re: How can I make users auto-login in new chatbox?

Post by SLGray on February 12th 2015, 12:02 am

Topic solved and archived


When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.


SLGray
Administrator
Administrator

Male Posts : 35672
Reputation : 2375
Language : English
Location : United States

http://fmthemes.forumotion.com/

Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum