1
yomhatiqva
Create a Top User page
  • 2006/11/22 14:32

  • yomhatiqva

  • Just popping in

  • Posts: 10

  • Since: 2006/11/20


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

Login

Who's Online

233 user(s) are online (146 user(s) are browsing Support Forums)


Members: 0


Guests: 233


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits