Timeout and who is online

Last post 04-11-2007, 3:02 PM by AnthonyLondon. 6 replies.
Sort Posts: Previous Next
  •  03-29-2007, 9:01 AM 27857

    Timeout and who is online

    Adam,

    I'm still evaluating the chatroom and have a few questions:

    -I'd like to set the timeout in the admin page. Can you confirm it has to be entered in seconds?

    -How do I know how many people are in a given chatroom programmatically ? It looks like I could query the CuteChatUser table and check the ContactSyncTime field but that would only give me the list of people who are online (not the list of people who are online in a given chatroom). Also is it possible to do this in .Net (using the CuteChat dll) or do I have to write my own SQL query?

    -I've integrated CuteChat with my own website so that the users don't have to login again when they enter the chat room. The login names are stored in the CuteChatUser table. To keep the size of this table minimal, is it ok to delete the login names directly in that table (eg to delete the login names of people who have not accessed the chatroom recently: delete from CuteChatUser where ContactSyncTime<'My Date'). If I do this, will it affect anything else? Is there a better way to do this?

    -I'd like to delete the messages without using the Admin page (so that it can be done automatically). Is it ok if I do something like this or will it affect anything else:
    delete from CutechatMessage where MessageTime < 'MyDate'

    -How do I know in which ChatRoom a message stored in CutechatMessage was said? It looks like I need to join the ChannelId field of the CuteChatMessage table to the LobbyId field of the CuteChatLobby table. Is this correct? If so, why did you call the 2 fields differently?

    Thanks,

    Anthony.

  •  03-30-2007, 4:54 PM 27906 in reply to 27857

    Re: Timeout and who is online

    Adam, could you get back to me about the above?

    Thanks,

    Anthony.

  •  04-02-2007, 1:06 PM 27925 in reply to 27906

    Re: Timeout and who is online

    Adam, could you get back to me about the above?

    Thanks,

    Anthony.

  •  04-02-2007, 4:24 PM 27938 in reply to 27857

    Re: Timeout and who is online

    AnthonyLondon,
     
    >>-I'd like to set the timeout in the admin page. Can you confirm it has to be entered in seconds?
     
    It's not controled by the admin page. If the current user log out or the current user don't have admin access, the user will be automatically redirected to the login page right away.
     
    >>How do I know how many people are in a given chatroom programmatically ? It looks like I could query the CuteChatUser table and check the ContactSyncTime field but that would only give me the list of people who are online (not the list of people who are online in a given chatroom). Also is it possible to do this in .Net (using the CuteChat dll) or do I have to write my own SQL query?
     
    Demo is here:
     
     
    The code is below:
     
       String sOnlineChater = "";
       int len=0;
       foreach(CuteChatClient chater in ChatApi.GetLobbyClientArray(lobby.LobbyId))
       {
        if(chater.ActiveTime > DateTime.Now-TimeSpan.FromSeconds(30) )
        {
         sOnlineChater += chater.DisplayName + "  ";
         len++;
        }
       }
       Label lblOnlineChater = e.Item.FindControl("lblOnlineChater") as Label;
       lblOnlineChater.Text = len.ToString();
       lnkLobby.ToolTip = sOnlineChater;


    >>'ve integrated CuteChat with my own website so that the users don't have to login again when they enter the chat room. The login names are stored in the CuteChatUser table. To keep the size of this table minimal, is it ok to delete the login names directly in that table (eg to delete the login names of people who have not accessed the chatroom recently: delete from CuteChatUser where ContactSyncTime<'My Date'). If I do this, will it affect anything else? Is there a better way to do this?
     
    You can delete the recoreds of that table.  But if a registered user login again, the record of this user will be populated again.
     
    >>'d like to delete the messages without using the Admin page (so that it can be done automatically). Is it ok if I do something like this or will it affect anything else:
    delete from CutechatMessage where MessageTime < 'MyDate'
     
    Yes. You can do whatever you want with this table.
     
    >>hw do I know in which ChatRoom a message stored in CutechatMessage was said? It looks like I need to join the ChannelId field of the CuteChatMessage table to the LobbyId field of the CuteChatLobby table. Is this correct? If so, why did you call the 2 fields differently?
    Please check the following fields:
     
    SenderUserId
    SenderDisplayName
    TargetUserId
    TargetDisplayName
     
    Hope it helps.

    Let me know if you have any further questions.
     
     
     

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  04-03-2007, 4:20 AM 27944 in reply to 27938

    Re: Timeout and who is online

    Hi Adam,

    Thank you for your reply. I'm not sure I understand 2 of your answers:

    >>-I'd like to set the timeout in the admin page. Can you confirm it has to be entered in seconds?
     
    It's not controled by the admin page. If the current user log out or the current user don't have admin access, the user will be automatically redirected to the login page right away.


    =>What is the purpose of the Timeout field in the admin page then?



    >>how do I know in which ChatRoom a message stored in CutechatMessage was said? It looks like I need to join the ChannelId field of the CuteChatMessage table to the LobbyId field of the CuteChatLobby table. Is this correct? If so, why did you call the 2 fields differently?

    Please check the following fields:
     
    SenderUserId
    SenderDisplayName
    TargetUserId
    TargetDisplayName


    =>Those 4 fields don't tell me in which chatroom the message was said. You've lost me.


    Anthony.


  •  04-03-2007, 6:52 PM 27967 in reply to 27944

    Re: Timeout and who is online

    >>=>What is the purpose of the Timeout field in the admin page then?
     
    Where did you find thie timeout field?
     
    =>Those 4 fields don't tell me in which chatroom the message was said. You've lost me.
     
    I am sorry. Yes, you are correct. You need to join the ChannelId field of the CuteChatMessage table to the LobbyId field of the CuteChatLobby table.
     
     

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  04-11-2007, 3:02 PM 28173 in reply to 27967

    Re: Timeout and who is online

    >>=>What is the purpose of the Timeout field in the admin page then?
     
    Where did you find thie timeout field?

    ==>On the admin page....

     
    =>Those 4 fields don't tell me in which chatroom the message was said. You've lost me.
     
    I am sorry. Yes, you are correct. You need to join the ChannelId field of the CuteChatMessage table to the LobbyId field of the CuteChatLobby table


    ==>Ok. Out of curiosity why did you call the field ChannelId in one table and LobbyId in the other one? If chatroom="Channel"=Lobby then it's very confusing to have tables and fields called differently when they mean the same thing.
View as RSS news feed in XML