About Avatars in a PHP website

Discussion in 'PHP' started by sohail.rahman, Nov 20, 2008.

  1. #1
    Hello everybody

    I am working on a communiy type site , now I need to include avatars in it... Can anyone help me out that how can i include avatars in my site like yahoo.
    when new users some to register thier they can give thier PHOTO or can make an avatart for thier self.

    Ragards
    sohail
     
    sohail.rahman, Nov 20, 2008 IP
  2. Tarkan

    Tarkan Peon

    Messages:
    491
    Likes Received:
    16
    Best Answers:
    0
    Trophy Points:
    0
    #2
    You would need a file upload script, so that users can upload their images.

    Or link them, save it to a database, then display it later.
     
    Tarkan, Nov 21, 2008 IP
  3. sohail.rahman

    sohail.rahman Peon

    Messages:
    13
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I can do Upto 2mb File uploading on fingure tips

    My problem is I want to provide the facility like yahoo avatars, moving , custom avatars , every one decide his own. I want users to provide thier pics and then thier avatar will be generated automatically, Or if it is not possible then I would like the users to choose from a collections of existing avatars on my site.

    Is there any way to do it . I really need it.

    Regards
    sohail
     
    sohail.rahman, Nov 21, 2008 IP
  4. eric90

    eric90 Peon

    Messages:
    14
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    if you're moderately good php coder. what i'd do is make an upload script, you can even find the code for free, just google. make sure your hosting has php upload enabled in the php.ini file.

    then just let your users upload. and what happens is that the upload form will rename the file to a unique id and then link it to the user's account, using a database field. so that way, to display, you just have to create a recordset filtered by the logged in user's account name, then display the image file by grabbing the file name from the database field.

    not too hard actually.
     
    eric90, Nov 21, 2008 IP
  5. AdultProfiles

    AdultProfiles Peon

    Messages:
    54
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    What you need it very hard to do with PHP I think a better solution is to use Java applets or Flash for this
     
    AdultProfiles, Nov 21, 2008 IP
  6. Supah!

    Supah! Peon

    Messages:
    18
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Hard? On the contrary, something like this is very straight forward and simple.
     
    Supah!, Nov 22, 2008 IP
  7. sohail.rahman

    sohail.rahman Peon

    Messages:
    13
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    I worked alot on file upload script , but this is not my problem

    I want avatars like yahoo avatrs(moving), user can make his custom avatars , the java applet or Flash pklug in would be needed i thnk. its most probably the flash plug in, but i cant make a plugin like that , i know flash but of that level. I need such plug in that i put in my page and let the users choose thier custom avatar.

    i need avatars like http://www.avatars.yahoo.com

    plz if some one can help

    kind regards
    sohail
     
    sohail.rahman, Nov 26, 2008 IP
  8. djzmo

    djzmo Active Member

    Messages:
    165
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    58
    #8
    Hmm..maybe you can create 3 (three) extra fields or more in your users table in the database.
    Let's say,
    head, body, and foot.
    each columns will store the path to the image of the user's selected head, body, or foot.
    then combine them together to form a complete avatar.

    [​IMG]

    kinda like that..zzz
     
    djzmo, Nov 27, 2008 IP
  9. sohail.rahman

    sohail.rahman Peon

    Messages:
    13
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #9
    well all of you give me wonderfull solution and ideas specially you "djzmo". your solution is wonderfull as well. thank you so much

    Now i found the solution to my problem, and i am here to share with you.

    look at this article

    http://www.partdigital.com/tutorials/custom-avatar

    This is article is exactly what i was looking for. this creates the image throug GD library on runtime by combining several images like head, hands, hairs, shirt etc ect. Hope you will find this handy too

    thanks alot

    Best Regards
    sohail
     
    sohail.rahman, Dec 2, 2008 IP