13
Quote:
it will be better if you include a username title tooltip to identify who is the user behind all the avatar
well you're totally right! that's much better. the new code with tooltips is like this:
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, 45);
while (list($uid, $user_avatar, $uname) = $xoopsDB->fetchRow($result))
{
echo '<div align="center" style="float: left; padding:2px;"><a href="' . XOOPS_URL . '/userinfo.php?uid=' . $uid . '" title="' . $uname . '"><img src="' . XOOPS_URL . '/uploads/' . $user_avatar . '" alt="Avatar" height="30" width="30"/></a></div>';
}
echo '<br><br><br><br><br><br><br>';
Quote:
you've got a good memory mate
the code credits go to ghia that's no doubt im not a php coder in any way