2010/1/4 11:57
hipoonios
Friend of XOOPS
Posts: 298
Since: 2005/9/24
2010/1/4 14:39
mjoel
Quite a regular
Posts: 325
Since: 2006/12/9
$count=0; global $xoopsDB; echo ""; $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 ".XOOPS_URL."/userinfo.php?uid=".$uid."'>.XOOPS_URL."/uploads/blank-avatar.gif' title='".$uname."' border='0' alt='".$uname."' height='48' width='48'>".$uname.""; } else { echo ".XOOPS_URL."/userinfo.php?uid=".$uid."'>.XOOPS_URL."/uploads/".$user_avatar."' title='".$uname."' border='0' alt='".$uname."' height='48' width='48'>".$uname.""; } if($count == 4) { $count=0; echo ""; }} echo "";
2010/1/4 16:01
ghia
Community Support Member
Posts: 4953
Since: 2008/7/3 1
2010/1/4 18:29
2010/1/4 19:05
iHackCode
Module Developer
Posts: 1038
Since: 2004/6/29
$userhandler = xoops_gethandler('user'); $userhandler->table_link = $xoopsDB->prefix('groups_users_link'); $userhandler->field_link = "uid"; $userhandler->field_object = "uid"; $criteria = new Criteria('l.groupid',2); //2 being the group id. $criteria->setSort("o.uid"); $criteria->setOrder('DESC');//maybe add a limit. $userobjarray = $userhandler->getByLink($criteria);
2010/1/4 19:23
trabis
Core Developer
Posts: 2269
Since: 2006/9/1 1
$groupid = 1; $count=0; global $xoopsDB; echo ""; $result = $xoopsDB->query("SELECT u.uid, u.uname, u.user_avatar FROM ".$xoopsDB->prefix("groups_users_link")." l LEFT JOIN ".$xoopsDB->prefix("users")." u ON l.uid=u.uid LEFT JOIN ".$xoopsDB->prefix("groups")." g ON l.groupid=g.groupid WHERE g.groupid=".$groupid." ORDER BY l.groupid, u.uid"); while (list($uid, $uname,$user_avatar) = $xoopsDB->fetchRow($result) ) { $count++; if ($user_avatar == 'blank.gif') { echo ".XOOPS_URL."/userinfo.php?uid=".$uid."'>.XOOPS_URL."/uploads/blank-avatar.gif' title='".$uname."' border='0' alt='".$uname."' height='48' width='48'>".$uname.""; } else { echo ".XOOPS_URL."/userinfo.php?uid=".$uid."'>.XOOPS_URL."/uploads/".$user_avatar."' title='".$uname."' border='0' alt='".$uname."' height='48' width='48'>".$uname.""; } if($count == 4) { $count=0; echo ""; }} echo "";
2010/1/4 20:31
2010/1/5 16:38
2010/1/5 19:10
2010/1/5 19:39
Advanced Search
322 user(s) are online (74 user(s) are browsing Support Forums)
Members: 0
Guests: 322