Cute Live Support

Membership Database Integration

1 Install Cute Chat database Execute the following SQL files: SQLScripts\cutechat4.sql against your database.
2 Deploy Dlls and license files Copy the CuteChat.dll, CuteChat.AppCode.dll, CuteChat.lic, CuteMessenger.lic and CuteLiveSupport.lic to the project \bin directory.
3 Deploy Cute Chat client files CuteSoft_Client folder and all files it contains should be deployed to the project root directory.
4 Membership Database Integration. a. Create a class that inherits CuteChat.ChatProvider and implement these methods:

public override string GetConnectionString()
{
        return the connection string , for the CuteChat
}

public override string FindUserLoginName(string nickName)
{
        find the login username from the display name or null if the user is not found.
}
public override AppChatIdentity GetLogonIdentity()
{
    need to find the information of current user. Return null if user is anonymous.

    string loginname=...
    string nickname=...
    return new AppChatIdentity(nickname, false, ToUserId(loginname), HttpContext.Current.Request.UserHostAddress);
}
public override bool GetUserInfo(string loginName, ref string nickName, ref bool isAdmin)
{
       return false , if the loginName is invalid.
       otherwise set the nickName and isAdmin , and return ture
}
public override bool ValidateUser(string loginName, string password)
{
        check the username/password . 
        if valid , set the cookie.
}


b. Initialize an instance of provider when the application starts:

CuteChat.ChatProvider.Instance = new MyChatProvider();
CuteChat.ChatSystem.Start(new CuteChat.AppSystem());
5 Add chat rooms into web pages Get the chat rooms collection from the database, then databind the results to a DataGrid/imagesList/Reapter server control in your web page.
C# VB
ArrayList lobbies=new ArrayList();
foreach(LobbyInfo lobby in ChatApi.GetLobbyInfoArray())
{
       lobbies.Add(lobby);
}
Dim lobbies As New ArrayList()
For Each LobbyInfo as lobby In ChatApi.GetLobbyInfoArray()
      lobbies.Add(lobby)
Next
6 Add chat admin button into web pages <%if (CuteChat.ChatWebUtility.CurrentIdentityIsAdministrator)
{%>
 <Asp:HyperLink runat=server NavigateUrl="~/CuteSoft_Client/CuteChat/ChatAdmin/" ID="Hyperlink1" NAME="Hyperlink1">Chat Admin</Asp:HyperLink>
<%} %>
7 Adding chat button and monitor tag to web pages

Chat Button appears as a graphics button with online or offline images you select from our gallery page.


Insert the following code (via copy/paste) into your web page where you want the Chat Button to appear.




In order to track a visitor on a specific page in your web site and invite them to chat, the page must include a live support visitor monitor tag. This tag is invisible to the visitors.


Insert the following code (via copy/paste) into your web page.




1