Ticket #938 -> Fallo al mostrar la página de miembros. Mezcla la lista de amigos con la de todos los miembros.

git-svn-id: https://192.168.0.254/svn/Proyectos.ASong2U_Web/trunk@41 cd1a4ea2-8c7f-e448-aada-19d1fee9e1d6
This commit is contained in:
David Arranz 2012-07-27 10:52:43 +00:00
parent c10f3e4c85
commit ca53af75b6
3 changed files with 37 additions and 4 deletions

View File

@ -535,6 +535,21 @@ function bp_member_add_dedicate_a_song_button() {
echo bp_get_button( ( $button ) );
}
}
add_action('bp_directory_members_actions', 'bp_member_add_dedicate_a_song_button');
add_action('bp_directory_members_actions', 'bp_member_add_dedicate_a_song_button');
function my_friends_by_default( $query_string ) {
global $bp;
if ( !$query_string )
$query_string = '';
if ( $query_string == '' && $bp->current_component == BP_MEMBERS_SLUG && !strpos($query_string, 'scope=')) {
$query_string .= 'type=active&action=active&user_id='.$bp->loggedin_user->id.'&scope=personal&page=1';
}
return $query_string;
}
add_filter( 'bp_dtheme_ajax_querystring', 'my_friends_by_default' );
?>

View File

@ -34,7 +34,7 @@
<div class="item-list-tabs" role="navigation">
<ul>
<?php if ( is_user_logged_in() && bp_is_active( 'friends' ) && bp_get_total_friend_count( bp_loggedin_user_id() ) ) : ?>
<?php if (is_user_logged_in() && bp_is_active( 'friends' ) && bp_get_total_friend_count( bp_loggedin_user_id() ) ) : ?>
<li class="selected" id="members-personal"><a href="<?php echo bp_loggedin_user_domain() . bp_get_friends_slug() . '/my-friends/' ?>"><?php printf( __( 'My Friends <span>%s</span>', 'buddypress' ), bp_get_total_friend_count( bp_loggedin_user_id() ) ); ?></a></li>
@ -42,6 +42,12 @@
<li id="members-all"><a href="<?php echo trailingslashit( bp_get_root_domain() . '/' . bp_get_members_root_slug() ); ?>"><?php printf( __( 'All Members <span>%s</span>', 'buddypress' ), bp_get_total_member_count() ); ?></a></li>
<?php if (0) : /* bp_friend_get_total_requests_count() != "0" ):*/ ?>
<li><a id="members-" href="<?php bloginfo('url'); ?>/members/<?php global $current_user; get_currentuserinfo(); echo $current_user->user_login; ?>/friends"><span style="font-weight:bold;">(<?php echo bp_friend_total_requests_count() ?>)</span>&nbsp;&nbsp;Friends</a></li>
<?php endif;?>
<?php do_action( 'bp_members_directory_member_types' ); ?>
</ul>

View File

@ -140,7 +140,7 @@ h1 a:hover, h2 a:hover, h3 a:hover, h4 a:hover, h5 a:hover, h6 a:hover {
/*************************** User Details ***************************/
ul.navmenu {
width: 269px;
width: 330px;
float: right;
margin-bottom: 10px;
}
@ -216,12 +216,24 @@ ul.navmenu li a.profile:hover {
background-repeat: no-repeat;
}
ul.navmenu li a.logout {
background-image: url(lib/images/icons.png);
background-position: 0px -170px;
background-repeat: no-repeat;
}
ul.navmenu li a.logout:hover {
background-image: url(lib/images/icons.png);
background-position: -52px -170px;
background-repeat: no-repeat;
}
.login-name {
color: #596a7c;
width: 40%;
float: left;
margin-top: 50px;
margin-top: 40px;
text-align: center;
font-weight: bold;
}