Group Mods

  • Profile picture of @mercime
  • Profile picture of r-a-y
  • Profile picture of Hugo

Support: Creating & Extending

Existing and new plugins/components and themes.

New Plugin: Friends-Only Activity Stream (22 posts)

Started 2 years, 2 months ago by: Sarah Gooding

  • Profile picture of Sarah Gooding Sarah Gooding said 2 years, 2 months ago:

    All the credit for this plugin goes to Rich Fuller and is entirely based on his tutorial for hacking BuddyPress to remove non-friend updates from the activity stream. I simply packaged it up and made it a plugin. Hope someone finds it to be useful! Will get it added to the WordPress repo soon! For now you can download it here:

    http://wpmu.org/create-a-better-community-experience-with-the-new-buddypress-friends-only-activity-stream-plugin/

  • Profile picture of Peter Anselmo Peter Anselmo said 2 years, 2 months ago:

    Awesome! Sounds super useful.

  • Profile picture of rich! @ etiviti rich! @ etiviti said 2 years, 2 months ago:

    haha, thanks :-P

  • Profile picture of Sarah Gooding Sarah Gooding said 2 years, 2 months ago:

    It works with WP single user for me… What errors are you getting?

  • Profile picture of rich! @ etiviti rich! @ etiviti said 2 years, 2 months ago:

    if sarah used my code without major changes – it works on single (what i use) but the admin will see all activity

  • Profile picture of modemlooper modemlooper said 2 years, 2 months ago:

    No error it just shows all activity still.

    Maybe it shows all the activity before you activate and then non after but I’m seeing it all. Also the all members button needs to go. Really doesn’t make sense to have it filter out all activity and then the tab still says all members.

  • Profile picture of rich! @ etiviti rich! @ etiviti said 2 years, 2 months ago:

    logged in as siteadmin (all), public group activity, and nonfriend atme @mentions will be displayed.

  • Profile picture of Sarah Gooding Sarah Gooding said 2 years, 2 months ago:

    That’s what it’s supposed to do.

  • Profile picture of gregfielding gregfielding said 2 years, 2 months ago:

    Is there a way to set the default to show all activity when not logged in?

  • Profile picture of Boone Gorges Boone Gorges said 2 years, 2 months ago:

    Glancing at the code and I’m noticing that site admins will see everything. If the filter’s not working for you, make sure you’re logged in as a non-admin.

  • Profile picture of Sarah Gooding Sarah Gooding said 2 years, 2 months ago:

    @gregfielding Yes, you can do that. I’m not sure if this is the best way (definitely open to more input!) but where you see this:

    function my_is_friend_check( $friend_id = false) {
    global $bp;
    
    if ( is_site_admin() )
    return true;
    
    if ( !is_user_logged_in() )
    return false;

    Change that last part to:

    if ( !is_user_logged_in() )
    return true;
  • Profile picture of gregfielding gregfielding said 2 years, 2 months ago:

    Cool…I’m thinking that it’s still best for fresh visitors to see all activity, not just admin activity…i don’t want it to look like there is only one member!

    Thanks Sarah!

  • Profile picture of gregfielding gregfielding said 2 years, 2 months ago:

    Maybe make this an option in the next version :)

    Thanks again Sarah

  • Profile picture of modemlooper modemlooper said 2 years, 2 months ago:

    Yeah I thought it was weird to log out and only see stuff from an admin. If somebody went to your site and thats all the saw it would be a turn off.

  • Profile picture of Mike Pratt Mike Pratt said 2 years, 2 months ago:

    I must be missing something. Please clarify: There already is a tab (right next to ‘All Members’) that filters just friend’s activity. So why the need for a plugin to do the same thing? Sorry for misunderstanding.