👻 Halloween Treat: Our biggest-ever 25% OFF memberships — use SPOOKYSOCIAL before Nov 1! 🎃

BuddyDev

Search

Replies

  • Keymaster
    (BuddyDev Team)
    Posts: 25197

    Hi George,
    sorry for missing it. Will look at it today and get back to you.

  • Keymaster
    (BuddyDev Team)
    Posts: 25197
    Brajesh Singh on in reply to: Happy Birthday Brajesh #1358

    Thank you Israel 🙂
    I appreciate the feelings 🙂

    Thank you
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25197
    Brajesh Singh on in reply to: Followers are not showing in activity feed #1357

    Hi Laurie,
    My apologies for the inconvenience.

    Since most the users are only interested in seeing the activity of the users they follow, This plugin includes that by default.

    Still, It is very easy to make it include the activity of followers. You can add following line to your bp-custom.php or theme’s functions.php and It will include followers activity too

    
    add_filter( 'fblike_activity_get_friend_ids', 'fb_like_custom_include_follower_user_ids', 10, 2 );
    
    function fb_like_custom_include_follower_user_ids( $user_ids, $current_user_id ) {
    	
    	$follower_ids = bp_follow_get_followers( array( 'user_id' => $current_user_id ) );
    	
    	return array_merge( $user_ids, $follower_ids );
    }
    
    

    Hope that helps.

    Thank you
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25197

    Hi Kristina,
    You are most welcome 🙂

    Should we mark it as resolved then?

  • Keymaster
    (BuddyDev Team)
    Posts: 25197
    Brajesh Singh on in reply to: [Resolved] Friends Only Activity Stream #1352

    Thank you Israel.
    I am glad that it is working. Appreciate your generosity 🙂

  • Keymaster
    (BuddyDev Team)
    Posts: 25197
    Brajesh Singh on in reply to: [Resolved] Friends Only Activity Stream #1350

    Hi,
    I have update the code in my 2nd post. I left a print_r there that was showing the output. Sorry about that.

  • Keymaster
    (BuddyDev Team)
    Posts: 25197
    Brajesh Singh on in reply to: [Resolved] Friends Only Activity Stream #1347

    Hi,
    Can you please post your bp-custom.php on pastebin? There seems to be some space before opening/after closing php tag causing it. There is an easy fix to remove the spaces.

  • Keymaster
    (BuddyDev Team)
    Posts: 25197
    Brajesh Singh on in reply to: [Resolved] Friends Only Activity Stream #1345

    Please put the following code in your bp-custom.php and it should work.

    
    
    function buddydev_friends_only_activity_args( $args ) {
    	
    	if( ! bp_is_activity_directory() || !  is_user_logged_in() ) {
    		return $args;
    	}
    	
    	$user_id = get_current_user_id();
    	
    	$user_ids = friends_get_friend_user_ids( $user_id );
    	
    	//include users own too?
    	array_push( $user_ids, $user_id );
    	
    	$args['user_id'] = $user_ids;
    	
    	//print_r($args);
    	return $args;
    
    }
    add_filter( 'bp_after_has_activities_parse_args', 'buddydev_friends_only_activity_args' );
    
    

    hope that helps.

  • Keymaster
    (BuddyDev Team)
    Posts: 25197
    Brajesh Singh on in reply to: [Resolved] Friends Only Activity Stream #1343

    Do you mean you want it on sitewide activity? It is very easy to do. Just need confirmation where you want it to be, on sitewide activity page or on user profile page?

  • Keymaster
    (BuddyDev Team)
    Posts: 25197

    Hi Kristina,
    Thank you.

    1. Please upgrade to blog categories for groups 1.2.1(It is required only if you want to disable the create step category selection screen & group admin manage screen for category selection)

    2. Please put the following code in your bp-custom.php

    https://gist.github.com/sbrajesh/186460e14bbd1f9e5910

    I have left the top ‘