The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

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

3 posters

Go down

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

Post by Van-Helsing 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
Van-Helsing
Hyperactive

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

http://itexperts.forumgreek.com/

Back to top Go down

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

Post by Wagner' 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'
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 February 11th 2015, 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

http://itexperts.forumgreek.com/

Back to top Go down

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

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

Topic solved and archived


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

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

Male Posts : 51463
Reputation : 3519
Language : English
Location : United States

https://forumsclub.com/gc/128-link-directory/

Back to top Go down

Back to top


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