It isn't really custom. I just copied the New Members block temlate code over the Waiting Contents block template code:
<{foreach item=user from=$block.users}>
" valign="middle">
<{if $user.avatar != ""}>
<{/if}> <{$user.name}> |
<{$user.joindate}> |
<{/foreach}>
I then edited the system_blocks.php file, replacing the function b_system_waiting_show() section with the code from the function b_system_newmembers_show($options) section:
{
$block = array();
$criteria = new CriteriaCompo(new Criteria('level', 0, '>'));
$limit = (!empty($options[0])) ? $options[0] : 10;
$criteria->setOrder('DESC');
$criteria->setSort('user_regdate');
$criteria->setLimit($limit);
$member_handler =& xoops_gethandler('member');
$newmembers =& $member_handler->getUsers($criteria);
$count = count($newmembers);
for ($i = 0; $i < $count; $i++) {
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');
}
return $block;
}
Both blocks display fine, only the Waiting Contents block (with the New Members code in it) doesn't display the avatars, only the username and the join date. I just need to know how the original New Members block, using the same code as the other, winds up displaying the avatars. The option is there in the New Members block to display avatars, while none exists in the Waiting Contents block (since that wasn't the original purpose of the block).
If it isn't possible to display the avatars when doing something like this, I'm cool with that. Just would like to know if I could make it happen though.
Thanks