Topbar
Topbar
Sign in
|
Join
|
Client Center
Home
Products
Client Center
Contact
Purchase
Support forums
»
Products
»
Cute Chat and Cute Web Messeng...
»
Getting total of users in chatroom
Getting total of users in chatroom
Last post 07-19-2011, 8:54 PM by
Jeff
. 2 replies.
Sort Posts:
Oldest to newest
Newest to oldest
Previous
Next
07-18-2011, 1:48 PM
68593
chajo10
Joined on 07-08-2011
Posts 1
Getting total of users in chatroom
Reply
Quote
Greetings,
Currently I'm trying to make a Stored Procedure that will get a list of chatrooms that a user has permissions to. I have that much thus far, but I also need to get the number of users within each chatroom. I'm not using the API due that what I need to do would take about 3-4 calls and thought it might be easier to just compress it into one straight shot. My question is, what table and fields determines a user is online in a chatroom? I'm guessing it's possibly the Users table, but not sure. Anyways, I'm just trying to figure out how to detect those numbers. Any help would be appreciated. Thanks.
~Chad Johnson
07-19-2011, 7:49 AM
68610
in reply to
68593
Kenneth
Joined on 02-13-2008
Posts 3,886
Re: Getting total of users in chatroom
Reply
Quote
Hi Greetings,
Please try the code below, it shows you how to get all online users of the chat room.
protected override void OnLoad(EventArgs e)
{
CuteChat.ChatPortal portal = CuteChat.ChatSystem.Instance.GetCurrentPortal();
lock (portal)
{
//Lobby_2 is the querystring find at the end of the chat room url
foreach (CuteChat.ChatPlaceUser user in portal.GetPlace("Lobby-2").GetAllUsers())
{
//label1.Text += user.DisplayName;
}
}
base.OnLoad(e);
}
Regards,
ken
07-19-2011, 8:54 PM
68622
in reply to
68593
Jeff
Joined on 02-22-2011
Posts 126
Re: Getting total of users in chatroom
Reply
Quote
Hi Chad Johnson,
The database does not save the online user information.
I think you can create a new table, use
Kenneth's method to save online users into the table,
then you can get this data in Stored Procedure.
Regards,
Jeff