Showing the number of users online

Last post 12-01-2006, 11:45 PM by Adam. 6 replies.
Sort Posts: Previous Next
  •  11-10-2006, 6:03 PM 24244

    Showing the number of users online

    I'm running Cutechat under DNN2 on trial and I'm keen to display the number of users online (and maybe also who) either on it's own within the portal or preferably on a stand alone web page. This is as I would like to show the number of users online in a custom browser toolbar which is only about 30 pixels (or 1 charcter) high. The toolbar can display html or similar code within a framed webpage. So if I could somehow display this info on 1 line at the top of a blank html or basic browser viewable page that would be great.
     
    If I can make this work I will be sure to purchase a full license as after much research, functionallity and dnn integration is the best on the market.
     
    Thanks.
     
    Lyndon.
  •  11-13-2006, 11:59 PM 24309 in reply to 24244

    Re: Showing the number of users online

    Lyndon,
     
    In the default User conteol,  Cute Chat display the chat room as followings:

    Chat Room4 ( 1 ) 
     
    If you put your mouse cursor over the above link, you can easily find out the online users in the chat room.  You can easily modify this user control to meet your own requirements.
     
     

    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

  •  11-14-2006, 5:24 AM 24318 in reply to 24309

    Re: Showing the number of users online

    Adam,
     
    Telling me that I can easily modify something without saying how isn't very helpful for me. As I said in my first post, I want to be able to display the information somewhere else in addition to on the portal's main module area. I would like to display the information in isolation so that I can utilise it within a browser toolbar. I'm hoping I can do this with a very small web page (without the rest of the module info, sit skin, menus etc) which I can then include within a frame within my toolbar.
     
    please take another lok at this. I could really use some pointers to get this going as I have bought a full license for the product.
     
    So simply put - how do I get this info either in a standard html / asp page and how do I adjust what / how it's displayed?
     
    Thanks,
     
    Lyndon
  •  11-30-2006, 2:18 PM 24730 in reply to 24318

    Re: Showing the number of users online

    Hi,
     
    Any chance someone could please have another look at this. I'm still stuck with this issue.
     
    Thanks,
     
    Lyndon.
  •  12-01-2006, 12:41 AM 24767 in reply to 24730

    Re: Showing the number of users online

    Lyndon,
     
    Please save the following code as a control, for example chatcount.ascx.
     
    <%@ Control Language="vb" Inherits="DotNetNuke.PortalModuleControl" %>
    <%@ Import Namespace="DotNetNuke" %>
    <%@ Import Namespace="System.Data" %>
    <%@ Import Namespace="CuteSoft.Chat" %>
    <script runat="server">
        Protected Overrides Sub OnLoad(ByVal e As System.EventArgs)
            MyBase.OnLoad(e)
            If Not IsPostBack Then
                Dim ChatCount As Integer
                For Each lobbyinfo As LobbyInfo In ChatApi.GetLobbyInfoArray()
                   ChatCount = ChatCount + lobbyinfo.ClientCount
                Next
                Literal1.Text = ChatCount.ToString
            End If      
        End Sub   
    </script>
    <asp:Literal ID="Literal1" Runat="server" />


    And add it as a module to your DNN. That will resolve the problem.
     

    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

  •  12-01-2006, 6:40 PM 24799 in reply to 24767

    Re: Showing the number of users online

    Hi Adam,
     
    Thanks for this. I managed to get the number up and things are looking good. Would you mind helping just a little more? I'm keen to make the link work so I can also see who's in the room. What do I need to add to make this work?
     
    Thanks in advance,
     
    Lyndon.
  •  12-01-2006, 11:45 PM 24813 in reply to 24799

    Re: Showing the number of users online

    Lyndon,
     
    Ok.
     
    Please use the following code:
     
     
    <%@ Control Language="vb" Inherits="DotNetNuke.PortalModuleControl" %>
    <%@ Import Namespace="DotNetNuke" %>
    <%@ Import Namespace="System.Data" %>
    <%@ Import Namespace="CuteSoft.Chat" %>
    <script runat="server">
        Protected Overrides Sub OnLoad(ByVal e As System.EventArgs)
            MyBase.OnLoad(e)
            If Not IsPostBack Then
                Dim ChatCount As Integer            
                Dim ChatUsers As String
                For Each lobbyinfo As LobbyInfo In ChatApi.GetLobbyInfoArray()
                   ChatCount = ChatCount + lobbyinfo.ClientCount
                   ChatUsers = ChatUsers + lobbyinfo..JoinClient(",")
                Next
                Literal1.Text = ChatCount.ToString             
                Literal2.Text = ChatUsers 
            End If      
        End Sub   
    </script>
    <asp:Literal ID="Literal1" Runat="server" />
    <asp:Literal ID="Literal2" Runat="server" />
     


    And add it as a module to your DNN. That will resolve the problem.
     

    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

View as RSS news feed in XML