Re: customize cutechat avatar

  •  07-29-2009, 5:44 AM

    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 Complete Thread