Tutorials – Activity Default to My Friends

featured_buddypress
featured_buddypressThis method has some bugs but is a good reference and good start to accomplish adding new tabs to the members page.This Buddypress snippet is meant to change the default activity feed to show ‘My Friends’ instead of ‘All Members’. This involves editing the following 3 files: functions.php, activity-loop.php and header.php – Note: all of these files should be within your Buddypress child theme so, no worries about updating Buddypress. Thats it now the main activity link sends you to the My Friends activity instead of All Members.
//Put this in your functions.php

function lmc_query_filter( $query_string ) {
$query_string .= '&scope=friends';
return $query_string;
}

//Change the loop in activity-loop.php
//Default to My Friends
if($_GET['friends'] == 'true'){
add_filter('bp_dtheme_ajax_querystring','lmc_query_filter');
} <?php if (bp_has_activities(lmc_activity_default())) : ?>

//Change the main activity link to include the 'friends=true' query string, in header.php
<li<?php if ( bp_is_page( BP_ACTIVITY_SLUG ) ) : ?><?php endif; ?>>
<a href="<?php echo site_url() ?>/<?php echo BP_ACTIVITY_SLUG ?>/?friends=true" title="<?php _e( 'Activity', 'buddypress' ) ?>">
<?php _e( 'Activity', 'buddypress' ) ?></a>
</li>

from http://hyperspatial.com