Code: Select all
<td class="info"><!-- IF memberrow.PROFILE_COUNTRY_VALUE -->{memberrow.PROFILE_COUNTRY_VALUE}<!-- ELSE --> <!-- ENDIF --></td>
Code: Select all
PROFILE_NAME_VALUE
To include sorting, I needed to expand on this explanation by brf. (Which is a very good explanation on how to add a column to your memberlist.)kincoyotes wrote:Hello,
Ok i did add the custom profile fields in the member list, but how can i "sort" them ?
Code: Select all
));
?>
Code: Select all
'FNAME' => 'Full Name',
'SORT_FNAME' => 'Full Name',
Code: Select all
<th>Full Name</th>
Code: Select all
<th><a href="{U_SORT_FNAME}#memberlist">{L_FNAME}</a></th>
Code: Select all
$sort_key_text['y'] = $user->lang['SORT_FNAME'];
$sort_key_sql['y'] = 'fd.pf_fname';
Code: Select all
// Get us some users :D
Code: Select all
if(isset($sort_key_sql['y'])) {
$sql = "SELECT u.user_id
FROM " . USERS_TABLE . " u
$sql_from
LEFT JOIN " . PROFILE_FIELDS_DATA_TABLE . " fd ON (u.user_id = fd.user_id)
WHERE u.user_type IN (" . USER_NORMAL . ', ' . USER_FOUNDER . ")
$sql_where
ORDER BY $order_by";
} else {
Code: Select all
}
Code: Select all
'U_SORT_FNAME' => $sort_url . '&sk=y&sd=' . (($sort_key == 'y' && $sort_dir == 'a') ? 'd' : 'a'),
Code: Select all
if(isset($sort_key_sql['y'])) {
$sql = "SELECT u.user_id
FROM " . USERS_TABLE . " u
$sql_from
LEFT JOIN " . PROFILE_FIELDS_DATA_TABLE . " pf ON (u.user_id = pf.user_id)
WHERE u.user_type IN (" . USER_NORMAL . ', ' . USER_FOUNDER . ")
$sql_where
ORDER BY $order_by";
} else {
codejunkie wrote:To include sorting, I needed to expand on this explanation by brf. (Which is a very good explanation on how to add a column to your memberlist.)kincoyotes wrote:Hello,
Ok i did add the custom profile fields in the member list, but how can i "sort" them ?
First, you need to determine what your column name is going to be. So, I opened the common.php file, which is located in each of the installed language sub folders found in my /language folder. At the end of the file you should seeOn the line just before the double parenthesis and semi-colon I addedCode: Select all
)); ?>
........Code: Select all
'FNAME' => 'Full Name', 'SORT_FNAME' => 'Full Name',
Code: Select all
} else if ( ) {