What is code for "Only user with avatar" - using vbulletin

Discussion in 'PHP' started by basketmen, Apr 14, 2007.

  1. #1
    1. Hi guys i have php file from vbulletin zoints local for viewing user, but the file below is viewing user with avatar and user with no avatar

    I need Only viewing user with avatar, not viewing user with no avatar




    2. This is the file zoints_randmemb.php

    code in red i think that influence about this, what is need to edit so only viewing user with avatar,

    i think there is clue what is avatar code below, i just need the right format





     
    basketmen, Apr 14, 2007 IP
  2. Subikar

    Subikar Active Member

    Messages:
    241
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    60
    #2
    if (!$avatarurl)
    {
    // If the user does not have a Zoints local avatar and they do
    // not have a vBulletin avatar then use a generic image.
    $user['avatar_path'] = $stylevar['imgdir_misc'] . '/noavatar.gif';
    }


    Just make a changes here :
    if (!$avatarurl)
    {
    // If the user does not have a Zoints local avatar and they do
    // not have a vBulletin avatar then use a generic image.
    $user['avatar_path'] = '';
    }

    And Where you are showing the avatar give a condition
    if ($user['avatar_path'] != '' )
    Show Avatars
     
    Subikar, Apr 15, 2007 IP
  3. basketmen

    basketmen Well-Known Member

    Messages:
    837
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    130
    #3
    Hi subikar, thanks for your help


    where is exactly i need to put this









    anyway what i am thinking it could be something like this, look code in blue below, but that is not the right code




     
    basketmen, Apr 15, 2007 IP
  4. Subikar

    Subikar Active Member

    Messages:
    241
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    60
    #4
    one thing you can do just fetch those data which avatars field is not blank this solve your problem. i.e in where condition use $user['avatar'] != ''
     
    Subikar, Apr 16, 2007 IP