3
I found an interesting hack of wordpress which allows you to show user avatar in side posts. Unfortunately, it doesn't work perfectly. The avatars show up in the module page but doesn't show up on the contents block on the top page...
here is the deal...
Inside the file, index-template.php...near row 10to17..
Quote:
$myrow[username] = $authordata->user_login;
$rawuid = $xoopsDB->fetchArray($xoopsDB->query("SELECT uid,uname,user_avatar FROM ".$xoopsDB->prefix("users")." WHERE uname = '".$myrow[username]."'"));
$avatar = $rawuid['user_avatar'];
if($avatar != "blank.gif"){
echo '';
}
?>
is the hack that will allow the avatar to show up in the module page.
this works just fine.
but, inside content_block-template.php around row 9to16...there is this code,
Quote:
$myrow[username] = $authordata->user_login;
$rawuid = $xoopsDB->fetchArray($xoopsDB->query("SELECT uid,uname,user_avatar FROM ".$xoopsDB->prefix("users")." WHERE uname = '".$myrow[username]."'"));
$avatar = $rawuid['user_avatar'];
if($avatar != "blank.gif"){
echo '';
}
?>
that is I suppose the code to bring up the avatar. When I put in these codes, all i get is a blank white block. When I delete these codes I get a perfect block(without avatars) so I assume there is a problem with these codes.
anyone had the same problem??