PDA

View Full Version : Avatar on non-vb page


ChristianAlfred
11-20-2007, 11:02 AM
I have the following code to get the latest blog for my frontpage. How can I display the avatar for the user?

$query_blog = mysql_query("SELECT blogid, userid, username, title, lastblogtextid, dateline FROM vb3_blog ORDER BY lastblogtextid DESC LIMIT 1") or exit(mysql_error());

echo "<a href='/forum/blog.php?b=" . $rs_blog["blogid"] . "'>" . $rs_blog["title"] . "</a> <a href='http://www.zoopet.com/forum/member.php?u=" . $rs_blog["userid"] . "'><small>(" . $rs_blog["username"] . ")</small></a><br>";

gotlinks
11-20-2007, 07:46 PM
This is the Avatar Code you want to use:

<if condition="$show['avatar']"><td class="alt2"><a href="member.php?$session[sessionurl]u=$post[userid]"><img src="$post[avatarurl]" $post[avwidth] $post[avheight] alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a></td></if>


Hope this helps :D

ChristianAlfred
11-22-2007, 02:42 PM
The page is outside vbulletin and no include files are loaded. Need some more info

Analogpoint
11-22-2007, 03:27 PM
<a href="https://vborg.vbsupport.ru/showpost.php?p=1317228&postcount=4" target="_blank">https://vborg.vbsupport.ru/showp...28&postcount=4</a>

ChristianAlfred
11-23-2007, 04:10 AM
I did it like this

Same sql as above with this line to show it.

echo "<div align='center'><img src='http://www.zoopet.com/forum/image.php?u=" . $rs_blog["userid"] . "&dateline" . $rs_blog["dateline"] . "' width='50'><br></div>";