Dear Friends,
With the code in the attached documetn, I can show the list of new members as a block. However, I want to make sure that the biography and location fields in the "Additional Information section" are listed below the names of members for the newly registered members. What shall I add to the attached code to achieve this?
Thanks in advance for your help.
Regards,
PHP Code:
<?php
// -----------------------------------------------------------------------
// vbPortal a Content Management System for vBulletin
// Copyright (C) 2005 by the phpPortals Development Team.
// http://www.phpportals.com/
// -----------------------------------------------------------------------
$blocks_modules['topposters'] = array(
'func_display' => 'blocks_topposters_block',
'func_add' => '',
'func_update' => '',
'func_preview' => '',
'text_type' => 'topposters',
'text_type_long' => 'Top Posters',
'text_content' => 'Top Posters',
'allow_create' => false,
'allow_delete' => false,
'form_url' => false,
'form_content' => false,
'form_refresh' => false,
'show_preview' => true,
'formated_output' => true,
'module_name' => 'Top',
'query_count' => 1
);
function blocks_topposters_block($row) {
global $DB_site, $bbuserinfo, $vbpoptions, $vboptions, $session, $bgclass;
global $altbgclass, $permissions, $stylevar, $vbplingual, $vbcollapse;
$module_name = $row['module_name'];
$moduleid = pverifyname('module', $module_name);
// module permissions
$moduleperms = getmodperms($moduleid);
if (!($moduleperms & CANVIEWM)) {
return; // no permission
}
// permissions check
if ((!$permissions['forumpermissions'] & CANVIEW)
OR (!$permissions['genericpermissions'] & CANVIEWMEMBERS))
{
return; // no permission
}
$block_header = unhtmlspecialchars($row['title']); // vbull function
$bid = $row['bid']; // used to collapse blocks
$collapseobj_vbpblock = &$vbcollapse["collapseobj_vbpblock_$bid"];
$collapseimg_vbpblock = &$vbcollapse["collapseimg_vbpblock_$bid"];
$counter = 0;
$users = $DB_site->query("
SELECT userid, username, lastpost, posts, joindate, lastvisit, email, birthday
FROM " . TABLE_PREFIX . "user
WHERE joindate <> 0
ORDER BY joindate DESC
LIMIT " . ($row['limited'] + 1) . "
");
while ($user = $DB_site->fetch_array($users)) {
$counter++;
// if we got one more than we want, displays url show more...
if ($counter > $row['limited']) {
$geturlid = "$vbpoptions[homedir]/modules.php?$session[sessionurl]name=$module_name&op=posters";
$moretitle = $vbplingual['more'] . " " . strip_tags($block_header);
eval('$block_footer = "' . fetch_template('P_block_more') . '";');
break;
} else {
exec_switch_bg(); // vbull function
$block_content .= "<div class=\"$bgclass\">";
// if - forsomereason trim the title to $sbtitlelen (still to set this reason in vbpoptions)
$phrase = htmlspecialchars_uni(fetch_trimmed_title($user['username'], 50)); // vbull function
// append the querybit to the url in the block that you click
$geturlid = "$vbpoptions[bbdir]/member.php?$session[sessionurl]action=getinfo&userid=$user[userid]";
eval('$block_content .= "' . fetch_template('P_block_urlrow') . '";'); // ($latest_array[posts])
$user['uyetarihi'] = vbdate($vboptions['dateformat'], $user['joindate'], 1); // vbull function
// $phrase = $vbplingual['uye_tarihi'] . ': ' . $user['uyetarihi'] . ' ' . $user['birthday'] . ' <br />' . $vbplingual['post_count'] . ': ' . intval($user['posts']);
$phrase = 'D.G?n?:' . $user['birthday'] . ' <br />Mesaj Sayısı: ' . intval($user['posts']);
eval('$block_content .= "' . fetch_template('P_block_textrow') . '";');
$block_content .= '</div>';
}
}
if (!$counter) {
// admin option to show/hide empty block
if ($vbpoptions['showemptyblocks']) {
eval('$block_content = "' . fetch_template('P_block_none') . '";');
} else {
return; // empty
}
}
eval('$block_box = "' . fetch_template('P_block_box') . '";');
$DB_site->free_result($users);
unset ($user);
return $block_box;
}
?>