Im still not able to get the selected tab ( my groups ) to load when you land on the page.
Basically what I did was swap ‘my groups’ and ‘all members’ around and changed the li class and id. Ive tried a few things but still come up empty handed.
Here’s my entire activity.php: http://pastebin.com/jbzn7xLN
the edits are from lines 21-27 and 39-41 ( as I said, basically swapped them around and changed the class of ‘all members’ to just the li id and added the ‘selected’ class to ‘my groups’ )
any one? This little problem is holding up a launch :<
Changing the tabs is an appearance issue; it doesn’t have any effect on the activity items shown.
Try the following function in your functions.php or bp-custom.php. The logic is this: If the query string is empty (as it is when you first visit the activity page) and there is nothing in the POST variable that says which scope to show (that is, the user has not clicked ‘All Activity’ and thus set an AJAX request into effect), then show only my group content.
`function bbg_my_groups_activity_default( $qs ) {
if ( empty( $qs ) && empty( $_POST ) ) {
$qs = ‘scope=groups’;
}
return $qs;
}
add_filter( ‘bp_ajax_querystring’, ‘bbg_my_groups_activity_default’, 999 );`
Thanks boone! And thanks for the insight of how it works. Ill give it a try when I get home
@boonebgorges if I have ‘my groups’ selected but the member hasn’t joined any groups yet, then nothing will be selected when the member lands on the page.
If I removed the `( bp_loggedin_user_id() )` in “ it displays the tab though will it affect any functionality?