1
A lot of questions today
I try to find how to create a top user page instead of the top user block. I already created a vote for members and hits variable in user profile, and i want to show in a page the top user list with informations such as avatar, age, gender etc. I already hace those variables in the xoops_user DB but i'm blocking for their integration in a page...
Here is the php source code of the topuser block:
Quote:
function b_system_topposters_show($options)
{
$block = array();
$criteria = new CriteriaCompo(new Criteria('level', 0, '>'));
$limit = (!empty($options[0])) ? $options[0] : 10;
$size = count($options);
for ( $i = 2; $i < $size; $i++) {
$criteria->add(new Criteria('rank', $options[$i], '<>'));
}
$criteria->setOrder('DESC');
$criteria->setSort('hits');
$criteria->setLimit($limit);
$member_handler =& xoops_gethandler('member');
$topposters =& $member_handler->getUsers($criteria);
$count = count($topposters);
for ($i = 0; $i < $count; $i++) {
$block['users'][$i]['rank'] = $i+1;
if ( $options[1] == 1 ) {
$block['users'][$i]['avatar'] = $topposters[$i]->getVar('user_avatar') != 'blank.png' ? XOOPS_UPLOAD_URL.'/'.$topposters[$i]->getVar('user_avatar') : '';
} else {
$block['users'][$i]['avatar'] = '';
}
$block['users'][$i]['id'] = $topposters[$i]->getVar('uid');
$block['users'][$i]['name'] = $topposters[$i]->getVar('uname');
$block['users'][$i]['hits'] = $topposters[$i]->getVar('hits');
}
return $block;
}
How can i transpose this to a XOOPS page ?
Thank you