1
hi guys,
I use this script to display random users avatars in a block
global $xoopsDB;
$sql = "SELECT u.uid, u.user_avatar, u.uname FROM ".$xoopsDB->prefix("users")." u, ".$xoopsDB->prefix("groups_users_link")." g, ".$xoopsDB->prefix("profile_profile")." p WHERE u.uid = g.uid AND u.uid = p.profile_id AND u.level > 0 AND user_avatar <> 'blank.gif' AND u.uid NOT IN (1) ORDER BY RAND()";
$result = $xoopsDB->query($sql, 12);
while (list($uid, $user_avatar, $uname) = $xoopsDB->fetchRow($result))
{
echo '<div class="mosh"><a href="' . XOOPS_URL . '/userinfo.php?uid=' . $uid . '" title="' . $uname . '"><img src="' . XOOPS_URL . '/uploads/' . $user_avatar . '" alt="Avatar" class="mosh" /></a></div>';
}
...
this code has been brought up several times here.
it used to display user avatars only but since I upgraded to 2.5.3 with its latest Profile it displays default grey avatars along with uploaded avatars. how do I ged rid of default avatars in the block? thanks in advance
Mind anchors