Log in

View Full Version : "Default" Avatar -Sort of thing - Need help!


sgtryan
09-01-2005, 11:39 PM
Hello,

I am trying to create a script that will draw the user's avatar, using:

if( a certain user has NO avatar)
{
echo "<img src='forum/images/avatars/default_avatar.gif";
}
else
{
echo "<img src='http://www.^^^^^^^^^^.com/forum/image.php?u=$userid[userid]'>";
}


I am sorta trying to make a script like that, so each user who posts will have their avatar next to that post. (this is a remote script hack to VB)

Any clue how I would go about doing this?

Nutz
09-02-2005, 12:12 AM
Do you mean like this?
https://vborg.vbsupport.ru/showthread.php?t=89966&highlight=default+avatar

Many Thanks
Mat

sgtryan
09-02-2005, 01:23 AM
No because $avatarurl isn't a global variable..

darnoldy
09-02-2005, 04:12 AM
each user who posts will have their avatar next to that post.Here's the code I put into the postbit template to do that:

<if condition="$show['avatar']">
<img src="$avatarurl" alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" />
<else />
<img src="images/avatars/baghead.gif" alt="No Avatar" border="0" />
</if>
Hope that's what you were looking for

sgtryan
09-09-2005, 10:45 PM
Where is $avatarurl stored in mySQL? and how can I call the user's avatar of a certain user id?