customize cutechat avatar

Last post 07-29-2009, 5:44 AM by craig88. 1 replies.
Sort Posts: Previous Next
  •  07-28-2009, 4:20 AM 54331

    customize cutechat avatar

    I'm integrating cutechat with an existing membership database. Is there a way to customize the avatar? I saw this for web messenger
    http://cutesoft.net/ASP.NET+Chat/Developer-Guide/scr/Customize-User-Avatar.htm 
     
    but how is it done for cutechat?
  •  07-29-2009, 5:44 AM 54360 in reply to 54331

    Re: customize cutechat avatar

    I found this post:
    http://www.cutesoft.net/forums/thread/37154.aspx
    and had already followed the instructions for customizing the avatar in Messenger so had the file DownloadMyUserPhoto.Ashx all set up to redirect to the avatar.
     Basically edit:  /CuteSoft_Client/CuteChat/Script/ChatUI.js and change these two functions:
    1.   function ChatUI_GetAvatar(user)
      {
          var atype=ChatUI_GetAvatarType(user);
          
          var avatar=user.PublicProperties.Avatar||"";

          //return CuteChatUrlBase+"DrawAvatar.Ashx?Avatar="+escape(avatar)+"&AvatarType="+atype;
          // customize based on user
        return CuteChatUrlBase+ "DownloadMyUserPhoto.ashx?UserId="+user.UserId;
      }
      function ChatUI_GetInstantAvatar(user)
      {
          var atype="Messenger";
          var avatar=user.PublicProperties.InstantAvatar||"";
          //return CuteChatUrlBase+"DrawAvatar.Ashx?Avatar="+escape(avatar)+"&AvatarType="+atype;
          // customize based on user
        return CuteChatUrlBase+ "DownloadMyUserPhoto.ashx?UserId="+user.UserId;
      }
    still working out how to change the avatar sizes.
View as RSS news feed in XML