No avatar and no display name
-
Hi all
I have managed to get the search function for directory members to search and deliver one specific member by username.
However, now we have changed the search code in bp-core-classes.php (I know, core changes!), the avatar and name are not appearing, only the ‘add friend’ button!
The search code is below, commented out lines are the originals:
$total_users_sql = apply_filters( 'bp_core_search_users_count_sql', "SELECT DISTINCT user_login FROM " . wp_signups . " u LEFT JOIN {$bp->profile->table_name_data} ON user_login WHERE user_login LIKE '%%$search_terms%%' ORDER BY user_login ASC", $search_terms );
/*$total_users_sql = apply_filters( 'bp_core_search_users_count_sql', "SELECT DISTINCT count(u.ID) as user_id FROM " . CUSTOM_USER_TABLE . " u LEFT JOIN {$bp->profile->table_name_data} pd ON u.ID = pd.user_id WHERE pd.field_id=1 AND pd.value = '$search_terms' ORDER BY pd.value ASC", $search_terms );*/
$paged_users_sql = apply_filters( 'bp_core_search_users_sql', "SELECT DISTINCT user_login FROM " . wp_signups . " u LEFT JOIN {$bp->profile->table_name_data} ON user_login WHERE user_login LIKE '%%$search_terms%%' ORDER BY user_login ASC{$pag_sql}", $search_terms, $pag_sql );
/*$paged_users_sql = apply_filters( 'bp_core_search_users_sql', "SELECT DISTINCT u.ID as user_id FROM " . CUSTOM_USER_TABLE . " u LEFT JOIN {$bp->profile->table_name_data} pd ON u.ID = pd.user_id WHERE pd.field_id=1 AND pd.value = '$search_terms' ORDER BY pd.value ASC{$pag_sql}", $search_terms, $pag_sql );*/
The ‘members-loop.php’ file is fine, slightly adjusted to not include links that’s all:
<div class="item">
<div class="item-title"><b><?php bp_the_site_member_name() ?></b>
Username: <b><?php echo bp_core_get_username( bp_get_the_site_member_user_id() ) ?></b></div><?php do_action( 'bp_core_directory_members_content' ) ?>
</div>
<div class="action">
<?php bp_the_site_member_add_friend_button() ?>
<?php do_action( 'bp_core_directory_members_actions' ) ?>
</div>
<div class="clear"></div>
Anyone have any idea how I can get the avatar and name to display again?!?!
Thanks very much
DW
- The topic ‘No avatar and no display name’ is closed to new replies.