BuddyDev

Search

Replies

  • Keymaster
    (BuddyDev Team)
    Posts: 25173

    Hi Kristina,
    You are most welcome 🙂

    Should we mark it as resolved then?

  • Keymaster
    (BuddyDev Team)
    Posts: 25173
    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: 25173
    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: 25173
    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: 25173
    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.

    • This reply was modified 9 years, 11 months ago by Brajesh Singh.
  • Keymaster
    (BuddyDev Team)
    Posts: 25173
    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: 25173

    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 ‘

  • Keymaster
    (BuddyDev Team)
    Posts: 25173

    Hi Kristina,
    I have managed to write some code that creates a category with group name when group is created.

    What do you suggest for already existing group? should we check and create for them when user visits the blog tab?

  • Keymaster
    (BuddyDev Team)
    Posts: 25173
    Brajesh Singh on in reply to: Mediapress – No upload in activity or gallery #1337

    Hi JC,
    Thank you. I have got the idea what is happening.

    The image is uploading but the response that is coming from server is not properly JSON formatted causing the issue(not being attached to the activity).

    Are you familiar with firebug addon? if yes, I will need one more help from you. Please click on console before uploading image.
    Then select image and you will see a post request. Click on response tab of that request and take a screenshot and post me.
    here is a screenshot to show it.

    http://i.imgur.com/PI32Aci.png

    That ill give us the complete idea of what is going on.

    Thank you for all your help so far in troubleshooting it.

    Thank you
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25173

    Hi Kristina,
    Welcome to BuddyDev forums and thank you for asking.

    Please give me around an hour and I will post the code.

    Thank you
    Brajesh