if ($vbulletin->options['qleb_av_me']=="1")
{
require_once('./includes/functions_user.php');//dont change it
$userid = $thread['postuserid'];//dont change it
$username = $thread['postusername'];//dont change it
$avatarurl = fetch_avatar_url($userid);// dont change it
$my_style = $vbulletin->options['style_css_me'];
$avat_wig = $vbulletin->options['avat_wig'];
if ($vbulletin->options['link_to']=="1")
{
$link = "showthread.php?$session[sessionurl]t=$thread[threadid]$thread[highlight]";
}else
$link = "member.php?u=$userid";
// this well show the avatar as no avatar selected
if ($avatarurl == '') {
$avatar = "<div class='alt1' style='float:$stylevar[align=left]'><a href='$link'><img src='images\misc\unknown.gif' border='0' style='$my_style' width='$avat_wig' height='$avat_wig'></a></div>";
}
//this well show the avatar if selected as thumbinal
else {
$avatar = "<div class='alt1' style='float:$stylevar[align=left]'><a href='$link'><img src='image.php?u=$userid' border='0' style='$my_style' alt='$username' width='$avat_wig' height='$avat_wig'></a></div>";
}
}else
//if the mode is off no avatar
$avatar ="";
if ($vbulletin->options['where_iam']=="0")
{
$vbulletin->templatecache['threadbit'] = str_replace('$thread[prefix_rich]','$avatar',$vbulletin->templatecache['threadbit']);
}
if ($vbulletin->options['where_iam']=="1")
{
$vbulletin->templatecache['threadbit'] = str_replace('$thread[views]','$avatar',$vbulletin->templatecache['threadbit']);
}
if ($vbulletin->options['where_iam']=="2")
{
$vbulletin->templatecache['threadbit'] = str_replace('$thread[openclose_editable]','$avatar',$vbulletin->templatecache['threadbit']);
}