Avatar In Online List

Started on the old forum in January 2009 · view the original in the archive · old links redirect here

10 replies · 1,052 views · started 17 years ago · 1 min read

7 participants
Rider Developer · 128 posts #1
$avlink = getavatar($user);
  if ($avlink=="")
  { 
    $sex = mysql_fetch_array(mysql_query("SELECT sex FROM ibwf_users WHERE id='".$user."'"));
    if($sex[0]=='M')
         {
      echo "
<img src=\"images/nophotoboy.gif\" alt=\"avatar\"/>
";
    }else if($sex[0]=='F')
          {
            echo "
<img src=\"images/nophotogirl.gif\" alt=\"avatar\"/>
";
          }else{
                 echo "
<img src=\"images/nopic.jpg\" alt=\"avatar\"/>
";
               }
  }else{
  echo "
<img src=\"$avlink\" alt=\"avatar\"/>

";
  }

when i add this to my online list it only show the nopic what must i do that it can show the avatar in the members profile i did check with me i have a avatar and it still show nopic icon

Dj-marc Developer · 164 posts #2

This is how I do it on my site bro...

$avlink = getavatar($item[2]);
if ($avlink!=""){
echo "<img src=\"$avlink\" height=\"25\" width=\"25\" alt=\"avatar\"/>";
}else{
echo "<img src=\"images/nopic.jpg\" height=\"25\" width=\"25\" alt=\"avatar\"/>";
}
      $lnk = "<a href=\"index.php?action=viewuser&who=$item[2]&sid=$sid\"> $item[0]</a>";
      echo "
";
    echo "$item[1]
";

}
something else Fellow · 2,296 posts #3

just add $user = $item[2]; above your coding 🙂

thunderwap Developer · 169 posts #4

this will work try it

$avlink = getavatar($item[2]);
if ($avlink!=""){
echo "<img src=\"$avlink\" height=\"25\" width=\"25\" alt=\"avatar\"/>
";
}else{
echo "<img src=\"images/nopic.jpg\" height=\"25\" width=\"25\" alt=\"avatar\"/>
";
}

WANT GOOD CHEAP HOSTING WITH 99% UPTIME? THEN PM ME FOR DETAILS!!

something else Fellow · 2,296 posts #5

hes trying to code male and female no-pics so that wont work lol

his code is right it just needs $user = $item[2]; adding above it.

Rider Developer · 128 posts #6

I nw got avatar in my online list inbox and in my forum posts

Rider Developer · 128 posts #8

Hehe gumslone im getting ideas all over the net

wap2k Developer · 168 posts #9

Hey GumSlone why moan just shows you have the ideas before everyone else....

Rider Developer · 128 posts #10

Not really ive gotten the idea from fimizone then ive seen 2wap have it lol so yea i guess im catching allot with the eye then trying to search for my site

subzero Super moderator Fellow · 3,954 posts #11

Waring gumslone lamar is copying again lol

Visit: Chat4u.mobi - The New Lay Of being a site of your dreams! Visit: WapMasterz Coming Back Soon!


SCRIPTS FOR SALE BY SUBZERO Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders. FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others... _______…

Write your reply now; next you create a free account (or sign in) and it is posted right away. Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close