Live Support, Chat, Upload Control and Rich Text Editor
Welcome to Support forums Sign in | Join | Help |Client Center
in Search

Who is in Chat

Last post 11-01-2007, 5:53 AM by selliott. 16 replies.
Sort Posts: Previous Next
  •  09-25-2006, 5:41 AM 23022

    Who is in Chat

    Hi guys,
     
    Does anyone know with v3.1 how to get who is in which room at the present time?
     
    I run cs2.1 and while the integrations shows the number of people chatting, my members would like to know exactly who those members are..is that possible?
     
    regards
    Eric
  •  09-25-2006, 10:57 PM 23066 in reply to 23022

    Re: Who is in Chat

    Eric,
     
    Please download the Cute Chat for community Server again.
     
    And copy View-ForumGroupView.ascx to  \Themes\default\Skins directory of your Community Server installation
     

    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

  •  10-04-2006, 3:07 AM 23331 in reply to 23022

    Re: Who is in Chat

    eliew:
    Hi guys,
     
    Does anyone know with v3.1 how to get who is in which room at the present time?
     
    I run cs2.1 and while the integrations shows the number of people chatting, my members would like to know exactly who those members are..is that possible?
     
    regards
    Eric

    We're after a similar sort of function -- except we would like this as an entry similar to "Who is online", perhaps appearing below "Who is online" with identical styling. Could we have a control that we can add to forum/default.aspx showing who is currently in the Chat Room. Any idea what code we would need to add?
  •  10-06-2006, 2:29 PM 23385 in reply to 23331

    Re: Who is in Chat

    Nick,
     
    It's possible.
     
    We will post the code showing how to do this today.
     
     

    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

  •  10-06-2006, 10:42 PM 23391 in reply to 23331

    Re: Who is in Chat

    Nick,
     
    Please follow the steps below:
     
    1. Open Skin-WhoIsOnline.ascx file and copy/paste the following code at the top section:
     
    <%@ Import Namespace="CuteSoft.Chat" %>
     
    2. Copy/Paste the following code into Skin-WhoIsOnline.ascx.
     

    <script runat="server">

     

    private void Page_Load(object sender, System.EventArgs e)

    {

       if (! this.IsPostBack)

       {

          String sOnlineChater = "";

          int len=0;

          foreach(CuteChatLobby lobby in ChatApi.GetLobbyArray())

          {

             if(lobby.IsHidden)

                continue;

             foreach(CuteChatClient chater in ChatApi.GetLobbyClientArray(lobby.LobbyId))

             {

                if(chater.ActiveTime > DateTime.Now-TimeSpan.FromSeconds(30) )

                {

                   sOnlineChater += chater.DisplayName + " ";

                   len++;

                }

             }

          }

          lblOnlineCount.Text = len.ToString();

          if(len>0)

             lblOnlineChater.Text = " (" + sOnlineChater + ")";

       }

    }

    </script>

    3. Copy/paste the following code after UsersOnline Repeater:
     
     <br /><br />
       There are <asp:Label ID="lblOnlineCount" Runat="server"></asp:Label> users chatting<asp:Label ID="lblOnlineChater" Runat="server"></asp:Label>.


     

    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

  •  10-12-2006, 12:35 AM 23505 in reply to 23391

    Re: Who is in Chat

    VERY NICE!  Can you please adjust that to show what room they are in as well?  Like ...
     
    There are 1 users chatting (admin - General Chat)
     
    or even better
     
    There are 3 users chatting: General Chat (admin, joe) Support Chat (adam)
  •  10-12-2006, 3:51 AM 23510 in reply to 23391

    Re: Who is in Chat

    Thanks Adam, Added and working at emrupdate.com

    For the benefit of anyone who isn't sure, this is the completed "Skin-WhoIsOnline.ascx":
    <%@ Control Language="C#" %>
    <%@ Register TagPrefix="CS" Namespace="CommunityServer.Controls" Assembly="CommunityServer.Controls" %>
    <%@ Register TagPrefix="CSD" Namespace="CommunityServer.Discussions.Controls" Assembly="CommunityServer.Discussions" %>
    <%@ Import Namespace="CommunityServer.Components" %>
    <%@ Import Namespace="CommunityServer.Discussions.Components" %>
    <%@ Import Namespace="CuteSoft.Chat" %>
    <script runat="server">

     

    private void Page_Load(object sender, System.EventArgs e)

    {

       if (! this.IsPostBack)

       {

          String sOnlineChater = "";

          int len=0;

          foreach(CuteChatLobby lobby in ChatApi.GetLobbyArray())

          {

             if(lobby.IsHidden)

                continue;

             foreach(CuteChatClient chater in ChatApi.GetLobbyClientArray(lobby.LobbyId))

             {

                if(chater.ActiveTime > DateTime.Now-TimeSpan.FromSeconds(30) )

                {

                   sOnlineChater += chater.DisplayName + " ";

                   len++;

                }

             }

          }

          lblOnlineCount.Text = len.ToString();

          if(len>0)

             lblOnlineChater.Text = " (" + sOnlineChater + ")";

       }

    }

    </script>

    <div class="CommonInlineMessageArea">
        <h4 class="CommonInlineMessageTitle">
            <a href="<%= Globals.GetSiteUrls().WhoIsOnline%>"><CS:ResourceLabel runat="server" ResourceName="WhoIsOnline_Current" id="Resourcelabel1"/></a>
        </h4>
        <div class="CommonInlineMessageContent">
            <CS:ResourceLabel runat="server" ResourceName="WhoIsOnline_Inline1" />
            <asp:Literal id="GuestUsers" Runat="server"/>
            <asp:Literal id="UsersOnlineCount" runat="server" />
            <asp:Repeater Id="UsersOnline" Runat="server">
                <HeaderTemplate>- </HeaderTemplate>
                <ItemTemplate><a title='<%# DataBinder.Eval(Container.DataItem, "Location") %>'
                        class='<%# ( (bool) DataBinder.Eval(Container.DataItem, "User.IsAdministrator") ) ? "" : "" %><%#  ( (bool) DataBinder.Eval(Container.DataItem, "User.IsModerator") && !(bool) DataBinder.Eval(Container.DataItem, "User.IsAdministrator") ) ? "" : "" %>'
                        href='<%# Globals.GetSiteUrls().UserProfile( (string) DataBinder.Eval(Container.DataItem, "Username")) %>'><%# DataBinder.Eval(Container.DataItem, "User.DisplayName")%></a></ItemTemplate><SeparatorTemplate>, </SeparatorTemplate>
            </asp:Repeater>
            <br /><br />
       There are <asp:Label ID="lblOnlineCount" Runat="server"></asp:Label> users chatting<asp:Label ID="lblOnlineChater" Runat="server"></asp:Label>.
        </div>
    </div>


  •  09-21-2007, 12:43 AM 33703 in reply to 23391

    Re: Who is in Chat

    Adam, do you have directions on how to accomplish this for CS2007?
     
     
  •  10-01-2007, 12:41 AM 33919 in reply to 33703

    Re: Who is in Chat

    Can this be done is CS2007?  I've tried adding this to grouplist.aspx, in the Themes>default>Forums folder, but haven't been able to get it to work.  This may be a completely wrong way to do this, but I'm just guessing here.
     
    I added the <%@ Import Namespace="CuteSoft.Chat" %> to the top of the grouplist.aspx file.
     
    Then added the code inside the "Who is Online section":
     
     
     
            <CSControl:UserOnlineList runat="server" ShowHeaderFooterOnNone="false">
                <LeaderTemplate>
                    <div class="CommonInlineMessageArea">
                        <CSControl:SiteUrl runat="server" UrlName="WhoIsOnline" ResourceName="WhoIsOnline_Current" Tag="H4" CssClass="CommonInlineMessageTitle" />
                        <div class="CommonInlineMessageContent">
                            <CSControl:UsersOnlineData runat="server" Property="GuestCount" ResourceName="WhoIsOnlineView_GuestUsers" />
                            <CSControl:UsersOnlineData runat="server" Property="MemberCount" ResourceName="WhoIsOnlineView_UsersOnlineCount" />
                </LeaderTemplate>
                <QueryOverrides QueryType="AuthenticatedUsers" PageSize="999" />
             <HeaderTemplate>- </HeaderTemplate>
             <ItemTemplate><CSControl:UserOnlineData runat="server" Property="DisplayName" LinkTo="Profile" /></ItemTemplate>
                <SeparatorTemplate>, </SeparatorTemplate>
                <NoneTemplate></NoneTemplate>
                <TrailerTemplate>
       <br /><br />There are <asp:Label ID="lblOnlineCount" Runat="server"></asp:Label> users chatting<asp:Label ID="lblOnlineChater" Runat="server"></asp:Label>.
                        </div>
                    </div>
                </TrailerTemplate>
            </CSControl:UserOnlineList>
     
     
    But the final sOnlineChatter code causes an error if I try to insert it.
  •  10-01-2007, 4:26 PM 33938 in reply to 33919

    Re: Who is in Chat

  •  10-03-2007, 2:00 AM 33969 in reply to 33938

    Re: Who is in Chat

    Any update on this?
  •  10-03-2007, 11:16 PM 34003 in reply to 33919

    Re: Who is in Chat

    1. Delete all the changes you made to the grouplist.aspx
     
    2.
     
    Find the following code:
     
     <a title="<%# GetRoomInfo(Container.DataItem).Tooltip %>" href="<%# ResolveUrl("~/RedirectForumToChat.Aspx?ForumId="+((Forum) Container.DataItem).SectionID) %>"><img src="<%=ResolveUrl("~/CuteSoft_Client/CuteChat/images/private.gif")%>" align=absmiddle border="0"> (<%# GetRoomInfo(Container.DataItem).OnlineCount %>)</a>

    Change it to:
     
     <a title="<%# GetRoomInfo(Container.DataItem).Tooltip %>" href="<%# ResolveUrl("~/RedirectForumToChat.Aspx?ForumId="+((Forum) Container.DataItem).SectionID) %>"><img src="<%=ResolveUrl("~/CuteSoft_Client/CuteChat/images/private.gif")%>" align=absmiddle border="0"> (<%# GetRoomInfo(Container.DataItem).OnlineCount %>) (<%# GetRoomInfo(Container.DataItem).Tooltip %>)</a>

    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

  •  10-04-2007, 2:18 AM 34008 in reply to 34003

    Re: Who is in Chat

    This just adds the names to the forum rows.  I actually just want to display the names of the people chatting at the bottom of that page, under the "Who's Online" section...like the option allowed in 2.1.  And I won't need the "Chat" column, since I added a Chat link in the navigation bar, that takes users to chat.aspx
  •  10-04-2007, 2:50 AM 34009 in reply to 34008

    Re: Who is in Chat

    edit...
  •  10-24-2007, 11:02 PM 34573 in reply to 34009

    Re: Who is in Chat

    Is it possible to do this?  Again, I just want to be able to post Who is Chatting under the "Who's Online" data that the Forums use.  You did this for the 2.1 version.  For example:
     
     
    Who is Online
     
    There are 16 guest(s) online. There are 1 member(s) online. - admin  (tells who is in the forums)
     
    There are 2 members chatting: admin, Adam  (add code to tell who all is in the chat rooms)
     
     
     
     
    It would be even better if the Who is Chatting data displayed which room they were in too (There are 3 members chatting: General Chat: admin, Adam - Support Chat: tester), but just listing everyone who is chatting is better than nothing.
     
     
  •  10-29-2007, 1:49 AM 34672 in reply to 34573

    Re: Who is in Chat

    Ok, how about this.  If I insert this code into the "Who's Online" box for each chat room, maybe it will work...but I need help figuring out how to finish it.
     
    <a title="SomeTitle" href="~/RedirectForumToChat.Aspx?ForumId=22" Target="_blank"><img src="<%=ResolveUrl("~/CuteSoft_Client/CuteChat/images/private.gif")%>" align=absmiddle border="0"> (<%# GetRoomInfo(Container.DataItem).OnlineCount %>) (<%# GetRoomInfo(Container.DataItem).Tooltip %>)</a>
     
    How do I manually code the section in Red, to point it to a specific Chat room...so it'll get that data?
  •  11-01-2007, 5:53 AM 34748 in reply to 34672

    Re: Who is in Chat

    If this isn't possible, then please just say so.  I've been waiting for days for a response and I really miss this feature.  It's very nice when users can log into the forums and see all the names of who is in the chat rooms, down in the "Who's Online" box.
View as RSS news feed in XML
Powered by ASP.Net
Copyright 2003 - 2017 CuteSoft Components Inc.. All rights reserved.