BuddyDev

Search

Replies

  • Participant
    Level: Initiated
    Posts: 10
    Catherine F. Weah on #46831

    Hi Brajesh,
    Thanks for the effort.

    Please permit me to ask you this.
    Is there any way to pass the user_id as argument in

    bp_nouveau_activity_recurse_comments and also bp_nouveau_activity_comments

    if not, then perhaps pass the user_id parameter first.

    Or just a way to get the comments of a particular user.

  • Participant
    Level: Initiated
    Posts: 10
    Catherine F. Weah on #46714

    I hope this tread of mine is not off the limit; if not then someone kindly try and respond to it. Brajesh, any other person, please respond to this tread, please.

    Once again, thanks in advance.

  • Participant
    Level: Initiated
    Posts: 10
    Catherine F. Weah on #46680

    Hi Brajesh,
    I will take your advise.
    I just wanted to know. Perhaps in the nearer future I may have a need for that.

    Thank you very much for the assistance; and also thanks to you and the BuddyDev team for considering my appeal on the duplicated topic and deleting one.

    I think this topic very much now resolved.
    Once again, thank you very much.

  • Participant
    Level: Initiated
    Posts: 10
    Catherine F. Weah on #46673

    Should somebody gracefully help me answer this question, please note that I only want all the restrictions mentioned above to be effective on personal activities, and not group or forum activities.

    I tried looking into the hiding the likes and was able to achieve a result the nonconventional way which ofcourse is not advisable, that is by going directly into the buddyboss code “buddyboss-platform/bp-activity/bp-activity-functions.php/” right after line 1130 below $return_str = ''; and added the following code

    
    
    /* CFW Site Admin, Staff, and Activity Owner should see all the likes, otherwise display only the particular user like */
    	$jlw_cur_user = bp_loggedin_user_id();
    	$jlw_activity_user = bp_get_activity_user_id();
    
    	// CFW Check whether it is Admin, Staff or Activity Owner
    	if ( current_user_can( 'manage_options' ) || $jlw_cur_user == $jlw_activity_user ) {
    
    

    and then I went down, somewhere around line 1204 or 1210, since few lines were added above.
    Above the line that says return $return_str; and added the following code

    
    
    } else { // CFW Closes the if statement and begin an else
    		if ( 1 <= $like_count ) {
    			if ( $current_user_fav ) {
    				$return_str = __( 'You like this', 'buddyboss' );
    			}
    		}
    	} // CFW Closes the else statement
    
    

    This works for the like, The post owners and admin users see all the likes, while other users see only “You like this” is he/she did like it, or doesn’t see anything if he/she didnot like it; however, the restriction is being applied everywhere, including group posts etc.

    I couldn’t make any progress on the comments, it seems just difficult.
    Any help, and I will really appreciate.

    Once again,
    Thanks in advance

  • Participant
    Level: Initiated
    Posts: 10
    Catherine F. Weah on #46669

    Hi Brajesh,
    It was actually caching issue, now it is also working on my live server.
    Just to know, what is I want to do the XProfile Query with additional 1 or 2 more xprofile field(s).
    How do I add them?

    Thanks for all the assistance

  • Participant
    Level: Initiated
    Posts: 10
    Catherine F. Weah on #46666

    Hi Brajesh,

    Thanks a lot for the response, this is really a great forum.
    The code works well on my local host, but is not working on my live server, however, I think it is caching issue, so I am going to give it some time to take effect, and will definitely let you know when it finally works.

    Once again, thank you very much.

  • Participant
    Level: Initiated
    Posts: 10
    Catherine F. Weah on #46655

    Hi Brajesh,
    Thanks a lot for the kind response.
    Here’s the link to the code https://pastebin.com/8KqPyKuB

    Once again, thank you very much in advance.