Cute Web Messenger's Display name limited to 40 characters issues

Last post 07-14-2010, 2:58 AM by Kenneth. 12 replies.
Sort Posts: Previous Next
  •  06-30-2010, 2:22 AM 62114

    Cute Web Messenger's Display name limited to 40 characters issues

    Hi,

    I've notice that the web messenger display name is limited to around 40 characters.
    There are two issues:
    1.   Most of my members name is relatively long and the name field for my table is at least 250, therefore most of the name will appear truncated.
    2.   When the display name is truncated, it will have a weird logic where it will display the full name below with "<" and ">" along.
    Example:
    This is a very long name. This is <-- (truncated) 
    <This is a very long name. This is a very long name>

    As you can see its rather annoying and looks really weird.
     
    Please help. Thanks
  •  06-30-2010, 11:14 PM 62154 in reply to 62114

    Re: Cute Web Messenger's Display name limited to 40 characters issues

    Hi dspoh,
     
    We will add a option for this requirement soon. Sorry for your inconvencence.
     
    Regards,
     
    ken
  •  07-02-2010, 1:57 AM 62212 in reply to 62154

    Re: Cute Web Messenger's Display name limited to 40 characters issues

    Is there a way to make a quick fix to it?
  •  07-02-2010, 3:06 AM 62230 in reply to 62212

    Re: Cute Web Messenger's Display name limited to 40 characters issues

    Hi dspoh,
     
    We will fix it before next Monday.
     
    Regards,
     
    Ken
  •  07-05-2010, 1:16 AM 62278 in reply to 62230

    Re: Cute Web Messenger's Display name limited to 40 characters issues

    Will it be a small patch (just the dll files?) or in a form of a new release?
  •  07-05-2010, 2:05 AM 62280 in reply to 62278

    Re: Cute Web Messenger's Display name limited to 40 characters issues

    Hi dspoh,
     
    Below is a simple way to achieve it.
     
    Open your chat provider, add the code below into it.
     
    1. class MyDataManager : CuteChat.AppDataManager   
    2.         {   
    3.             public MyDataManager(AppPortal portal):base(portal)   
    4.             {   
    5.             }   
    6.             public override void UpdateUserInfo(IChatUserInfo info)   
    7.             {   
    8.                 if (info.DisplayName != null && info.DisplayName.Length > 100)    
    9.                     info.DisplayName = info.DisplayName.Substring(0,100);   
    10.                 if (info.Description != null && info.Description.Length > 150)   
    11.                     info.Description = info.Description.Substring(0, 150);   
    12.   
    13.                 using (IChatDataProvider provider = this.CreateDataProvider())   
    14.                 {   
    15.                     provider.UpdateUserInfo(info);   
    16.                 }   
    17.             }   
    18.         }   
    19.         public override AppDataManager CreateDataManagerInstance(AppPortal portal)   
    20.         {   
    21.             return new MyDataManager(portal);   
    22.         }  
    Like
     
    1. public class SampleProvider : ChatProvider   
    2. {   
    3.   
    4.     class MyDataManager : CuteChat.AppDataManager   
    5.     {   
    6.         public MyDataManager(AppPortal portal)   
    7.             : base(portal)   
    8.         {   
    9.         }   
    10.         public override void UpdateUserInfo(IChatUserInfo info)   
    11.         {   
    12.             if (info.DisplayName != null && info.DisplayName.Length > 100)   
    13.                 info.DisplayName = info.DisplayName.Substring(0, 100);   
    14.             if (info.Description != null && info.Description.Length > 150)   
    15.                 info.Description = info.Description.Substring(0, 150);   
    16.   
    17.             using (IChatDataProvider provider = this.CreateDataProvider())   
    18.             {   
    19.                 provider.UpdateUserInfo(info);   
    20.             }   
    21.         }   
    22.     }   
    23.     public override AppDataManager CreateDataManagerInstance(AppPortal portal)   
    24.     {   
    25.         return new MyDataManager(portal);   
    26.     }   
    27.   
    28. }  
     
    Regards,
     
    Ken
     
     
  •  07-05-2010, 11:32 PM 62299 in reply to 62280

    Re: Cute Web Messenger's Display name limited to 40 characters issues

    Regarding this line of code:
    1. using (IChatDataProvider provider = this.CreateDataProvider())      
    2. {      
    3.     provider.UpdateUserInfo(info);      
    4. }     
    CreateDataProvider() method doesn't seems to allow nothing as parameter, or am i missing something here? 
     
    I'm using asp.net 1.1 (vb) so some of the syntex is not available, my code for the above would be:
     
    1. Dim provider As IChatDataProvider = Me.CreateDataProvider(nothing) 'It require cutechat.appPortal object as parameter...    
    2.   
    3.   
    4. provider.UpdateUserInfo(info)  
    By specifying "nothing", it "seems" to solve the issue but it does not update the "cutechat4_user" table in database like it used to.
     
     
  •  07-06-2010, 10:37 PM 62316 in reply to 62299

    Re: Cute Web Messenger's Display name limited to 40 characters issues

    ...
  •  07-06-2010, 11:14 PM 62317 in reply to 62316

    Re: Cute Web Messenger's Display name limited to 40 characters issues

    Sorry if i don't understand your code but please enlighten me as we need to get it functional asap.
     
    Many thanks.
  •  07-07-2010, 1:26 AM 62319 in reply to 62317

    Re: Cute Web Messenger's Display name limited to 40 characters issues

    Hi dspoh,
     
    Please try the code below. I tested on asp.net 1.1, it works fine.
     
    1. Class MyDataManager   
    2.          Inherits CuteChat.AppDataManager   
    3.          Public Sub New(ByVal portal As AppPortal)   
    4.              MyBase.New(portal)   
    5.          End Sub  
    6.          Public Overrides Sub UpdateUserInfo(ByVal info As IChatUserInfo)   
    7.                 
    8.              If Not info.DisplayName Is Nothing And info.DisplayName.Length > 100 Then  
    9.                  info.DisplayName = info.DisplayName.Substring(0, 100)   
    10.              End If  
    11.              If Not info.Description Is Nothing And info.Description.Length > 150 Then  
    12.                  info.Description = info.Description.Substring(0, 150)   
    13.              End If  
    14.   
    15.              Dim provider As IChatDataProvider = Me.CreateDataProvider()   
    16.              provider.UpdateUserInfo(info)   
    17.               
    18.          End Sub  
    19.      End Class  
    20.   
    21.      Public Overrides Function CreateDataManagerInstance(ByVal portal As AppPortal) As AppDataManager   
    22.          Return New MyDataManager(portal)   
    23.      End Function  
     
    Regards,
     
    Ken
  •  07-08-2010, 3:05 AM 62348 in reply to 62319

    Re: Cute Web Messenger's Display name limited to 40 characters issues

    I've tried your code and i observed the similar results:
     
    1. The display name is not more truncated.
    2. It does not update the "cutechat4_user" table in database like it used to. When this happens, chat windows of past conversation keeps poping up again even after it was closed during previous session with the chat.

    Please help thanks.
  •  07-14-2010, 1:17 AM 62469 in reply to 62348

    Re: Cute Web Messenger's Display name limited to 40 characters issues

    Anyone?
  •  07-14-2010, 2:58 AM 62475 in reply to 62469

    Re: Cute Web Messenger's Display name limited to 40 characters issues

    Hi dspoh,
     
    Is your site online? If so, can you set up ftp access for me? So I can change it for you.
     
    Please send the information to Kenneth@Cutesoft.net
     
    Regards,
     
    ken
View as RSS news feed in XML