How to get User count per room in CuteChat V5

Last post 04-09-2009, 10:37 PM by Kenneth. 1 replies.
Sort Posts: Previous Next
  •  04-03-2009, 3:03 PM 50780

    How to get User count per room in CuteChat V5

    What's the easiest way to get the user count for each chat rooms in V5?  I scanned all the tables and did not see the users i there.
     
    I thought I saw something about that somewhere but now I can't find it.
     
    Is the User and LocationID stored anywhere as the user is in a room?  I thougt it would be in the Users table.
     
    Anyone know?
     
    Thanks,
     
    Jess
  •  04-09-2009, 10:37 PM 50956 in reply to 50780

    Re: How to get User count per room in CuteChat V5

    Hi jbergeron9,
     
    You can use 'ClientCount' properties, like below:
     
    private void rptLobbies_ItemDataBound(object sender, DataListItemEventArgs e)
      {
       if (e.Item.DataItem == null)
       {
        return;
       }
       LobbyInfo lobby = (LobbyInfo)e.Item.DataItem;
       HyperLink lnkLobby = e.Item.FindControl("lnkLobby") as HyperLink;
       lnkLobby.NavigateUrl = CuteChat.ChatWebUtility.ResolveResource(this.Context, "Channel.Aspx") + "?Place=Lobby-" +   lobby.Lobby.LobbyId;
       lnkLobby.Target = "_blank";
       String sOnlineChater = lobby.JoinClient(",");
       Label lblOnlineChater = e.Item.FindControl("lblOnlineChater") as Label;
       lblOnlineChater.Text = lobby.ClientCount.ToString();
       lnkLobby.ToolTip = sOnlineChater;
      }
     
     
     
    You can find complete code in chat.aspx of our download examples
     
    download:
     
     
     
    Regards,
     
    Ken
View as RSS news feed in XML