AspNetForums set up & customization

Last post 12-16-2004, 12:40 AM by Adam. 6 replies.
Sort Posts: Previous Next
  •  12-14-2004, 11:01 PM 3031

    AspNetForums set up & customization

    This looks like a great product.

     

    I would be ready to purchase a license right now for my project if it was not for the frustrating lack of documentation. (The CuteSoft Help file just does not cut it)

     

    I do not know if I have wasted a day installing & testing yet, as I am still unable to see I can set CuteSoft up to work as we need it.

     

    Here is the sample of what I need to achieve by tomorrow.

     

    Background: (I have installed CuteSoft within an Intranet running AspNetForums2)

     

    I need to have each Moderator that is logged on have a chat icon next to them so Intranet users can click and start chatting with them. (I can get the icon next to the moderators within the Forum code)

     

    • How can I set up Rooms for the moderators (not related to the Forum chat rooms).
    • How can I get CuteSoft to determine if the Moderator has logged on.
    • The Live Help functionality could work, but there is no documentation on how to set it up or even if you can have multiple operators with multiple rooms.

     

    Any help would be appreciated

    More documentation is needed.

  •  12-14-2004, 11:26 PM 3032 in reply to 3031

    Re: AspNetForums set up & customization

    We realize that the document  is lagging behind, and we will included more instructions into the developer guide in the next minor release.


    I think the live support feature will work for your situation.

    If the Moderator has logged on, the live help message will be available, otherwise it will show "leave a message".

    To set up the live support for the ASPNET forums 2.0, please following the steps below.

    Step 1Copy the following code at the top of your page:

    <script runat=server>
    public string GetRoomUrl()
    {
     string file="ChatRoom";

     if(ChatUtility.CurrentUserIsRoomAdmin(1))
      file="SupportServer";
     else
      file="ChatSupport";

     return ResolveUrl("~/CuteChat/"+file+".Aspx?RoomId=1");
    }
    </script>




    Step 2
    Copy the following code the position in your page where you want to show the live help button.

    <a href='<%= GetRoomUrl() %>'>
             <IMG align=absMiddle title="support chat" src="/CuteChat/images/livehelp.gif" border=0><%= CuteChat.ChatFactory.HasSupportOperatorOnline(1)?"<span>(Available)</span>":"<font color=gray>(Leave a message )</font>" %></a>



    Hope it helps.

    Keep me posted.
     

    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-15-2004, 9:56 PM 3053 in reply to 3032

    Re: AspNetForums set up & customization

    Hi Adam,

     

    Thanks for the Tip.

     

    Is there any documentation on CuteChat’s public API’s?

     

    My requirement is to list all Moderators using ab asp:repeater, show an icon next to each one displaying if they are currently online, display the LiveHelp icon next to that so that if they are online then Forum users can chat with them.

     

    Is there a method I can use to find if a particular Moderator is online, not just if any Moderator is on line.

     

    i.e if(CuteChat.ChatFactory.HasThisSupportOperatorOnline(“UserName” or “UserId”))

     

    Can I set up a Room for each moderator?

    As it appears from testing that if another online moderator starts LiveHelp support they can not use the same Room with the same Id.

     

    i.e. /cutechat/SupportServer.Aspx?RoomID=UserId

     

    Example.

     

    <asp:repeater id="ModeratorsRepeater" runat="server">

    <itemtemplate>

      <table border="0" cellpadding="1" cellspacing="1" width="100%" class="chatOnline">

      <tr>

        <td width="70%"><%# DataBinder.Eval(Container.DataItem, "Username") %></td>

        <td width="15%"><asp:image id="online" runat="server" alternatetext="Off line"

              imageurl="~/Themes/default/images/user_IsOffline.gif"/>

        </td>

        <td width="15%"><asp:imagebutton enabled="True" causesvalidation="False" id="LiveHelp"

             imageurl="~/cutechat/images/colourpick.gif" runat="server" alternatetext="Not available"/>

        </td>

      </tr>

     </table>

    </itemtemplate>

    </asp:repeater>

     

    /// <summary>

    /// Loop through list of Moderators and set an icon to show if they are onLine,

    /// and update LiveHelp button Alt Text to say they are now available

    /// </summary>

    /// <param name="sender"></param>

    /// <param name="e"></param>

    private void ModeratorsRepeater_ItemDataBound(Object sender, RepeaterItemEventArgs e)

    {

    //Set each online image to show if Moderator is active

                if((DateTime)DataBinder.Eval(e.Item.DataItem,"LastActivity") > DateTime.Now.AddMinutes(-10))

                {

                            Image online = (Image) e.Item.FindControl("onLine");

                            online.ImageUrl="~/Themes/default/images/user_IsOnline.gif";

                            online.AlternateText="Now available";

                }

     

                //Get each Moderators details. (may help for the next bit)

                int id = (int)DataBinder.Eval(e.Item.DataItem,"UserId");

                string userName = DataBinder.Eval(e.Item.DataItem,"Username");

     

                //Get LiveHelp imageButton

                ImageButton liveHelp = (ImageButton) e.Item.FindControl("LiveHelp");

     

                //Need to find if this user "userName" is Support User & if he is online

                //Then set LiveHelp Alt text & online livehelp.gif image

                //At the moment every time one LiveHelp support user logs on, all LiveHelp

                //image buttons become available

                if(CuteChat.ChatFactory.HasSupportOperatorOnline(1))

                {

                            liveHelp.ImageUrl = "~/cutechat/images/livehelp.gif";

                            liveHelp.AlternateText="Now available";

                }

     

                //If current logged on user is Moderator (LiveHelp User)

                //then set link to SupportServer.aspx

                if(ChatUtility.CurrentUserIsRoomAdmin(1))

                {

                            liveHelp.Attributes.Add("onClick","openWindow('"/cutechat/SupportServer.Aspx?RoomID=1',750,500)");

                }

                else

                {

                            liveHelp.Attributes.Add("onClick","openWindow('"/cutechat/ChatSupport.Aspx?RoomID=1',750,500)");

                }

    }

  •  12-15-2004, 10:07 PM 3054 in reply to 3053

    Re: AspNetForums set up & customization

    If I could create a room for each Moderator, then maybe something like this could work.

     

    Lets say RoomId = ModeratorId;

     

    if(CuteChat.ChatFactory.HasSupportOperatorOnline(ModeratorId)

     

    if(ChatUtility.CurrentUserIsRoomAdmin(ModeratorId))

    {

    liveHelp.Attributes.Add("onClick","openWindow('"/cutechat/SupportServer.Aspx?RoomID=”+ ModeratorId +”',750,500)");

    }

    else

    {

    liveHelp.Attributes.Add("onClick","openWindow('"/cutechat/ChatSupport.Aspx?RoomID=”+ ModeratorId +”',750,500)");

    }

     

    Yes, No?

  •  12-15-2004, 10:30 PM 3055 in reply to 3054

    Re: AspNetForums set up & customization

  •  12-16-2004, 12:34 AM 3056 in reply to 3055

    Re: AspNetForums set up & customization

    Is there any easy way of creating new rooms? admin consol?, dialog box?, command line?

     

    Or should I just alter the database table “cutechat_room” ?

    Thanks
    WillSki

  •  12-16-2004, 12:40 AM 3057 in reply to 3056

    Re: AspNetForums set up & customization

    WillSki,
     
    If you integrate the Cute Chat with ASP.NET forums, the Cute Chat rooms will be based on the the forums.
     
    For example, if you have 3 forums, there will be three rooms by default.
     
    You can also create new rooms by editing the cutechat_room table directly.

    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