2 questions - how does cutechat know who is online/offline & anyway to override profile image?

Last post 11-14-2012, 10:17 AM by Kenneth. 3 replies.
Sort Posts: Previous Next
  •  11-14-2012, 5:21 AM 75249

    2 questions - how does cutechat know who is online/offline & anyway to override profile image?

    Hi,

     

    Couple of questions if anyone can help:

     

    This just out of interest.... How does CuteChat determine who is online and offline? Is it something to do with the "ServerProperties" field in the User table e.g  "InstantActivateTime:634884873477777500"?

     

    Also, is there a way to override the pull to get the profile display image?  We are hooking up the chat to our asp.net membership system which already has user profile images. Ideally instead of pulling the image from "PublicProperties" field in the user table (i.e "InstantAvatar:Messenger^7boy93.png"), we would like to grab it from a field in a seperate table. Is this possible?

     

    Thanks!
    Pete. 

  •  11-14-2012, 7:32 AM 75254 in reply to 75249

    Re: 2 questions - how does cutechat know who is online/offline & anyway to override profile image?

    Hi PeterGregory,

     

    Question 1

     

    About the "online", do you mean the user join the chat room? Or you are talking about CuteMessenger?

     

    Question 2

     

    You can change the source code of fiile "CuteSoft_Client\CuteChat\ViewProfile.Aspx" directly to set the user profile.

     

    Regards,

     

    Ken

  •  11-14-2012, 7:43 AM 75255 in reply to 75254

    Re: 2 questions - how does cutechat know who is online/offline & anyway to override profile image?

    1. Yes sorry I mean CuteMessenger.

     

    2. Great, thanks I'll give that a try.

  •  11-14-2012, 10:17 AM 75257 in reply to 75255

    Re: 2 questions - how does cutechat know who is online/offline & anyway to override profile image?

    Hi PeterGregory,

     

    You can use the code below to check the user is online or not.

     

    1. protected override void OnLoad(EventArgs e) 
    2.     CuteChat.ChatPortal portal = CuteChat.AppSystem.Instance.GetCurrentPortal(); 
    3.     lock (portal) 
    4.     { 
    5.         if (portal.IsMessengerStarted) 
    6.         { 
    7.             CuteChat.ChatPlaceUser user = portal.Messenger.FindUser("User:David"); 
    8.             if (user != null
    9.             { 
    10.                 //online  
    11.             } 
    12.             // CuteChat.ChatPlaceUser[] users=portal.Messenger.GetAllUsers(); 
    13.             // foreach(CuteChat.ChatPlaceUser user in users)  
    14.             //  
    15.  
    16.             // //user.Identity.UniqueId  
    17.             // } 
    18.  
    19.         } 
    20.     } 
    21.     base.OnLoad(e); 
     

    Regards,

     

    Ken

View as RSS news feed in XML