i would say just wait for release of bp 1.7 since I heard from developers that they are going to include that feature of privacy.
There is no activity privacy feature in 1.7. Google friends only activity stream. I think a plugin already exists. You can look through plugin as an example of code
There was a plugin but its gone now! It was removed from the repository. So I guess there is no one that can assist you.
Not too difficult. You can filter activity stream by passing a comma seperated list of user id’s. just get logged in users friends id’s. read the codex on how to filter loops
@modemlooper that is a daunting task when an admin has thousands of users. There should be a more automated way to accomplish this feat than manually doing all that. If that is what it takes then it will take a long long time to get the result your after and every time a a new user joins your site you will have to manually add their id again. That is just not logical!
You get user id’s with code not manually.
`bp_get_friend_ids( bp_loggedin_user_id() ) ; `
Could you explain this method further because I can see your calling a function but does this function already exist or does it need to be created before calling it? Where would this call be placed? Just curious?
A search of the core files would find you this function!
bp-friends-template.php
function returns false if user id passed to it produces zero friends else a comma separated list of id’s is returned thus you have you necessary list to pass to the loop.
As for where used that would be somewhere where you could use the result in the loop ones writing wouldn’t it?
so after I get the loggin user’s friend IDs then I loop through that array
but, how do I ask for posts by id? I can’t find it in the codex.
https://codex.buddypress.org/developer-docs/custom-buddypress-loops/the-activity-stream-loop/
You’ll probably need to work something using the primary_id & secondary_id, but think you are going to be limited in what degree of control you can get.
`function my_friends_only_activity( $query ) {
$friends_id = bp_get_friend_ids( bp_loggedin_user_id() ) ;
$query = ‘&user_id=’ . $friends_id ;
return $query;
}
add_filter( ‘bp_dtheme_ajax_querystring’, ‘my_friends_only_activity’ );`
My activity stream isn’t including all the activity on http://www.Drawalot.com. I’ve created both custom posts and regular posts but neither are showing up in the stream. I turned off all the other plugins and switched back to the default buddypress theme but the actity still does’t show up.
I know I should probably make a separate forum topic, but somehow that feature has disappeared for me on this site. I can’t even make status updates. What’s up with buddypress.org?
look at the record activity function http://pastebin.com/kNqTrRzc
I already had some code registering my custom post types, but I did copy and paste his record_activity code into my functions.php. I made all, of the necessary edits, for instance I changed the name his post type to the name of my post type. At first it didn’t appear to have made any difference, but then I created a new post type to test it out and it appears in the stream!
Now I’m going to see if I can include the other post types. Thank you for helping me out.