Re: Display UserList on another page

  •  10-09-2009, 5:12 AM

    Re: Display UserList on another page

    The function to use is GetLobbyInfoArray like this:
                         
    1.                         <div id="channellistwithusers" style="margin: 6px">
                              Channel List<br />
                              <%LobbyInfo[] lobbies=ChatApi.GetLobbyInfoArray();%>
                              <%foreach(LobbyInfo lobby in lobbies)%>
                              <%{
                                  string sOnlineChater = lobby.JoinClient(",");

                              %>
                              Lobby-ID:
                              <%=lobby.LobbyId%>,
                              Title:<%=lobby.Name%>,
                              Users:
                              <%=sOnlineChater%>,
                              numOnline:<%=lobby.ClientCount.ToString()%><br />
                              <%}%>
                            </div>
     
    But you need to poll it to keep it up to date. Would be nice to have Javascript update it. In SupportClient.js it looks like SUI_HandleChatEvent("USER" ...) does just this but I haven't tried it.
     
     
View Complete Thread