Results 1 to 7 of 7

Thread: avatars.php?id=id here

  1. #1
    Join Date
    Sep 2008
    Posts
    44
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default avatars.php?id=id here

    Ok here it goes.

    What code do i have to use so that


    <?php if ($current_user->ID) {
    $user=get_userdata($current_user->ID);
    echo $comment->user_id;
    } ?><?php echo get_avatar($current_user->ID,$size='50'); ?>

    this code ^^ displays avatars, each id has a different avatar, i am wondering if i have it so that it has avatars.php?id=id here it changes the avatar. What php code do i need? so basically the ID in the link will replace all of the id usage in the above php code.

  2. #2
    Join Date
    Sep 2008
    Posts
    44
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default

    Ok i found something else...

    <?php echo get_avatar( $id=ID CONTENT HERE,$size='50'); ?>
    so i need to have it so that it goes http://e4g.info/avatarspage.php?id=IDCONTENTHERE and depending on the number for exampe if its ?id=1 the code becomes
    <?php echo get_avatar( $id=1,$size='50'); ?>

  3. #3
    Join Date
    Sep 2008
    Posts
    44
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default

    someone help please...

  4. #4
    Join Date
    Sep 2008
    Posts
    44
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default

    please help?

  5. #5
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    Try:

    Code:
    <?php echo get_avatar($_GET['id'],$size='50'); ?>
    Hope this helps.
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

  6. The Following User Says Thank You to thetestingsite For This Useful Post:

    dkblackhawk (09-14-2009)

  7. #6
    Join Date
    Mar 2007
    Location
    New York, NY
    Posts
    557
    Thanks
    8
    Thanked 66 Times in 66 Posts

    Default

    Call $id variable though.

    PHP Code:
    <?php echo get_avatar($id=$_GET['id'],$size='50'); ?>
    - Josh

  8. The Following User Says Thank You to JShor For This Useful Post:

    dkblackhawk (09-14-2009)

  9. #7
    Join Date
    Sep 2008
    Posts
    44
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default

    thanks it worked like a charm :P

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •