2
i'm not a coder...
but here's what i use to show 8 random member in a php custom block
to show only members from a group..you need to edit the sql select statement to include the groups_user_link table and groupid
my php coding sucks..let the more experience tell you how to do that
in the mean time you can test this
if the user have no avatar...it will show an image i uploaded in uploads folder called blank-avatar.gif
$count=0;
global $xoopsDB;
echo "<table><tr>";
$sql = "SELECT distinct uid, uname, user_avatar FROM ".$xoopsDB->prefix("users")." ORDER BY RAND() LIMIT 8";
$result = $xoopsDB->query($sql);
while (list($uid, $uname,$user_avatar) = $xoopsDB->fetchRow($result) ) {
$count++;
if ($user_avatar == 'blank.gif')
{
echo "<td><a href='".XOOPS_URL."/userinfo.php?uid=".$uid."'><img src='".XOOPS_URL."/uploads/blank-avatar.gif' title='".$uname."' border='0' alt='".$uname."' height='48' width='48'><br />".$uname."</a></td>";
}
else
{
echo "<td><a href='".XOOPS_URL."/userinfo.php?uid=".$uid."'><img src='".XOOPS_URL."/uploads/".$user_avatar."' title='".$uname."' border='0' alt='".$uname."' height='48' width='48'><br / >".$uname."</a></td>";
}
if($count == 4)
{
$count=0;
echo "</tr><tr>";
}}
echo "</tr></table>";