Has anyone tried using their own images inst of avatars?

Last post 02-19-2008, 11:27 AM by christoph. 1 replies.
Sort Posts: Previous Next
  •  04-20-2007, 12:55 PM 28653

    Has anyone tried using their own images inst of avatars?

    ADAM - IMPRESSIVE product by the way.  (Cute Chat)
     
    I have successfully embedded Chat in my ASP.net project.  It's fantastic !!!
     
    Here's my question:

    My members are expressing interest in using one of their pictures from their album as
    the avatar in the chat.  Has anyone done this?
     
    Jessica
  •  02-19-2008, 11:27 AM 37154 in reply to 28653

    Re: Has anyone tried using their own images inst of avatars?

    Hi Jessica,
     
    You  have to rewrite the Code in the HttpHandler DrawAvatar's ProcessRequest method (/CuteSoft_Client/CuteChat/DrawAvatar.ashx). The script file /CuteSoft_Client/CuteChat/Script/ChatUI.js contains two methods for drawing avatars where parameters are passed to the handler via querystring (ChatUI_GetAvatar(user) and ChatUI_GetInstantAvatar(user)). For eymaple you could rewrite the paths in these methods as follows:

    CuteChatUrlBase+"DrawAvatar.Ashx?ID="+user.UserId
     
    the body of the handler's ProcessRequest method could then look like this:
     
    context.Response.Redirect("/ProfileImages/"+context.Request.QueryString["ID"]+".jpg");
     
    That's how we did it. We are using the user's profile images exclusively, so we disabled the avatar function in the GUI completely. However, it shouldn't be too complicated to let users choose between avatars and their profile image or imges from their albums. The only challange might be, that the user object doesn't store that data, so that you'll have to work around e.g. using a cookie.
     
    Hope that helps!
    Kind regards, Christoph
View as RSS news feed in XML