Log in

View Full Version : Show Avatar


Sukij
10-15-2001, 09:49 AM
HI..

Is it possible to show Avatar for each member in the Member Page ?

Admin
10-15-2001, 11:56 AM
Just use <img src="avatar.php?userid=$userinfo[userid]">, although I'm not sure about the $userinfo variable, you'll have to see what's used in that template.

Sukij
10-15-2001, 12:14 PM
HI..

This is the code in Memberlistbit. I try to add the code you give me as seen in the last 2 lines but there is no picture shown.

If I remove the <td> ... </td> in the last 2 lines, the picture shown correctly but not in the table. It shows before the list of member.

For ex.
picture
picture

table
list of member info.

I want to add picture after last column (posts)..

.....
<td bgcolor="#F1F1F1"><normalfont>$userinfo[datejoined]</normalfont></td>
<td bgcolor="#DFDFDF"><normalfont>$userinfo[posts]</normalfont></td>

<td bgcolor"#DFDFDF"<img src="avatar.php?userid=$userinfo[userid]"></td>

Sukij
10-15-2001, 12:18 PM
ok ok I got it.. It's my mistake because of the > in wrong place.

Thank you very much for your help..

kypdurron
01-28-2002, 08:41 PM
Actually, if you have predefined Avatars as well, use the following code on memberlistbit
template:

<td bgcolor="second alt color"><img src="$avatarurl" border="0" align="middle"></td>

instead. Then modify memberlist.php and add:

// Avatar Hack
if ($userinfo[userid]!=0) {
$avatarurl=getavatarurl($userinfo[userid]);
if ($avatarurl=='') {
$avatarurl='images/space.gif';
}
}

// Avatar Hack

Lastly, add Avatar as a column on the memberlist template