From ca53af75b6b8fa11163016ae58ed252749747edf Mon Sep 17 00:00:00 2001 From: david Date: Fri, 27 Jul 2012 10:52:43 +0000 Subject: [PATCH] =?UTF-8?q?Ticket=20#938=20->=20=09Fallo=20al=20mostrar=20?= =?UTF-8?q?la=20p=C3=A1gina=20de=20miembros.=20Mezcla=20la=20lista=20de=20?= =?UTF-8?q?amigos=20con=20la=20de=20todos=20los=20miembros.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: https://192.168.0.254/svn/Proyectos.ASong2U_Web/trunk@41 cd1a4ea2-8c7f-e448-aada-19d1fee9e1d6 --- .../lib/buddypress/functions-buddypress.php | 17 ++++++++++++++++- wp-content/themes/score/members/index.php | 8 +++++++- wp-content/themes/score/style-asong2u.css | 16 ++++++++++++++-- 3 files changed, 37 insertions(+), 4 deletions(-) diff --git a/wp-content/themes/score/lib/buddypress/functions-buddypress.php b/wp-content/themes/score/lib/buddypress/functions-buddypress.php index 8b2addd..7527018 100644 --- a/wp-content/themes/score/lib/buddypress/functions-buddypress.php +++ b/wp-content/themes/score/lib/buddypress/functions-buddypress.php @@ -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' ); ?> \ No newline at end of file diff --git a/wp-content/themes/score/members/index.php b/wp-content/themes/score/members/index.php index 2d83850..b9e239b 100644 --- a/wp-content/themes/score/members/index.php +++ b/wp-content/themes/score/members/index.php @@ -34,7 +34,7 @@