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