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

Go down

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

Post by Van-Helsing on 11/02/15, 02:31 pm

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


Last edited by Black-Shadow on 11/02/15, 10:16 pm; edited 1 time in total
Van-Helsing
Van-Helsing
Hyperactive

Male Posts : 2431
Reputation : 116
Language : English, Greek

View user profile http://itexperts.forumgreek.com/

Back to top Go down

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

Post by Wagner' on 11/02/15, 06: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'
Wagner'
Forumember

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

View user profile 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 11/02/15, 10:15 pm

Hello @Wagner'
Thank you very much it solved as it seems.
Van-Helsing
Van-Helsing
Hyperactive

Male Posts : 2431
Reputation : 116
Language : English, Greek

View user profile http://itexperts.forumgreek.com/

Back to top Go down

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

Post by SLGray on 12/02/15, 12:02 am

Topic solved and archived


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

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

Male Posts : 48099
Reputation : 3380
Language : English
Location : United States

View user profile https://help.forumotion.com/

Back to top Go down

Back to top


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