2
Hi xfranc,
Yes, its possible.
Change the function b_system_newmembers_show in the file XOOPS_ROOT_PATH/modules/system/blocks/system_blocks.php like this.
Quote:
function b_system_newmembers_show($options)
{
$block = array();
$criteria = new CriteriaCompo(new Criteria('level', 0, '>'));
$limit = (!empty($options[0])) ? $options[0] : 10;
$criteria->setOrder('DESC');
$criteria->setOrder('DESC');
$criteria->setSort('user_regdate');
$criteria->setLimit($limit);
$member_handler =& xoops_gethandler('member');
$newmembers = $member_handler->getUsers($criteria);
$count = count($newmembers);
//hacked by rplima
$showGroups = array('1'); //Put in this array the ids of groups you want to show. In the example only menbers of admin group will be shown.
for ($i = 0; $i < $count; $i++) {
$groups =& $member_handler->getGroupsByUser($newmembers[$i]->getVar('uid'));
foreach($showGroups as $group){
if (in_array($group,$groups)){
if ( $options[1] == 1 ) {
$block['users'][$i]['avatar'] = $newmembers[$i]->getVar('user_avatar') != 'blank.gif' ? XOOPS_UPLOAD_URL.'/'.$newmembers[$i]->getVar('user_avatar') : '';
} else {
$block['users'][$i]['avatar'] = '';
}
$block['users'][$i]['id'] = $newmembers[$i]->getVar('uid');
$block['users'][$i]['name'] = $newmembers[$i]->getVar('uname');
$block['users'][$i]['joindate'] = formatTimestamp($newmembers[$i]->getVar('user_regdate'), 's');
}
}
}
//end of hack
return $block;
}
att
Rodrigo