Name in the Live Support Chat window

Last post 10-09-2012, 7:28 AM by Kenneth. 8 replies.
Sort Posts: Previous Next
  •  04-21-2011, 2:17 AM 67270

    Name in the Live Support Chat window

    Hi,
     
    Do we update the name in the chat as [first name] [last name]  right now it is showing as [username].
     
    Thanks
    Neeraj
  •  04-21-2011, 6:39 PM 67285 in reply to 67270

    Re: Name in the Live Support Chat window

    Dear Neeraj,
     
    Please open global.asax, you will find the following method, please update the highlighted code and set the nickname:
     
    public static bool GetUserInfo(string loginName,ref string nickName,ref string password,ref bool isAdmin)
     {
      loginName=loginName.ToLower();
      Hashtable table=(Hashtable)System.Web.HttpRuntime.Cache["UserInfo:"+loginName];
      if(table==null)
      {
       using(System.Data.IDbConnection conn=Instance.CreateConnection())
       {
        conn.Open();
        using(System.Data.IDbCommand cmd=conn.CreateCommand())
        {
         cmd.CommandText="SELECT * FROM SampleUsers WHERE "+LowerLoginName+"="+SqlEncode(loginName);
         using(System.Data.IDataReader sdr=cmd.ExecuteReader())
         {
          if(!sdr.Read())
           return false;
          table=new Hashtable(new CaseInsensitiveHashCodeProvider(),new CaseInsensitiveComparer());
          for(int i=0;i<sdr.FieldCount;i++)
           table[sdr.GetName(i)]=sdr.IsDBNull(i)?null:sdr.GetValue(i);
         }
        }
       }
       System.Web.HttpRuntime.Cache["UserInfo:"+loginName]=table;
      }
      nickName=table["NickName"].ToString();
      //nickName="firstname"+"lastname"; please customize the nickName based on your requirement      
      password=table["Password"].ToString();
      isAdmin=(1==Convert.ToInt32(table["IsAdmin"]));
      return true;
     }
     
    Thank you for asking
  •  04-22-2011, 6:32 AM 67293 in reply to 67285

    Re: Name in the Live Support Chat window

    Hi,
    I had changed the nick name for client operator in sampleuser table and it works well. Now the thing is the user who is trying to contact to live support agent I want to change his username also as firstname + lastname.
     
    Thanks
  •  04-22-2011, 7:15 PM 67299 in reply to 67293

    Re: Name in the Live Support Chat window

    Dear nrsharma,
     
    The display name of operator and website visitors is generated from the following method:
     
         public static bool GetUserInfo(string loginName,ref string nickName,ref string password,ref bool isAdmin)
     
    In this method, you can find code "nickName=table["NickName"].ToString(); "
     
    "nickName" is the display name of operator and website visitors.
     
    Both operator client and website visitor page will call this method and return the display name. You can set this and let it be equal to firstname+lastname.
     
    You can follow the following steps to verify this:
    1. Open "SampleUsers" and create 3 more users
        username: user1,user2,user3
        nickname:eric user1,eric user2,eric user3
    2. Login to operator client as "user1"
    3. Open IE and login to your website as "user2"
    4. You will find the display name of these two users will be "eric user1" and "eric user2".
     
    Thank you for asking
  •  04-22-2011, 11:52 PM 67300 in reply to 67299

    Re: Name in the Live Support Chat window

    Hi Eric,
    Here the scenario is different in my case
    The operator login credentials are in the sample user table but the login credentials of website visitor is in another table.
    Now the thing is when I had changed the nickname for operator in the sampleuser table, it works well but the display name of website visitor is still username.
     
    Please reply me if you want more clarification.
     
    Thanks
    Neeraj Sharma

     

  •  04-25-2011, 1:28 AM 67309 in reply to 67300

    Re: Name in the Live Support Chat window

    Hi Eric,
     
    I had done with it.  Thanks for your reply.
     
     
    Thanks,
    Neeraj
  •  10-04-2012, 11:41 AM 74858 in reply to 67285

    Re: Name in the Live Support Chat window

    Hi,

     

    I have this setup in DNN site with v6.2.

    Also would like to change the name that shows for the operator (and user if possible). Was trying to follow the instructions above but my global.asax file doesn't contain that code only a few lines with 

    public override void Init()

     

    Apreciate if you could help on this.

    Thanks! 

  •  10-09-2012, 3:38 AM 74921 in reply to 74858

    Re: Name in the Live Support Chat window

    Hi,

     

    Appreciate if you could reply to this... It's been a while now without any answer.

     

    Thanks 

  •  10-09-2012, 7:28 AM 74929 in reply to 74921

    Re: Name in the Live Support Chat window

    Hi joses,

     

    You will find the code under "DNNChatProvider.cs".

     

    Regards,

     

    Ken 

View as RSS news feed in XML