BuddyBoss Home – Web Support Forums Plugins BuddyBoss Wall display_comments=stream not working after installing plugin

Viewing 4 posts - 1 through 4 (of 4 total)
  • Question

    #48331
    @maddish

    Hi,
    I had my activity stream configured as follow
    if ( bp_has_activities( bp_ajax_querystring( ‘activity’ ).’&display_comments=stream&action=activity_update’ ) ) :
    That was working perfect.

    After installing the buddyboss plugin :
    a) in the main activity page the stream for comment is not working anymore and comments are shown as thread
    b) in the user profile activity stream the filter to show only post_update is not working anymore

    I’m running wordpress vers. 4.3
    buddypress version 2.3.3
    Thank you for you support

    Answers

    #48412
    @vapvarun

    Hi @maddish , Wall plugin regenerate the activity on the basis of Wall and NewsFeed parameters

    Following function will give you an idea how to modify Wall activity
    you can use them inside the child theme functions.php

    
    function filter_wall_where(){
     global $bp;
     $user_id = $bp->displayed_user->id;
     $table = bp_core_get_table_prefix() . 'bp_activity';
     $where = "WHERE ( $table.user_id = $user_id AND $table.type = 'activity_update' )";
     return $where;
    }
    
    function filter_wall_mentions(){
    global $bp;
    $user_id = $bp->displayed_user->id;
    $user_filter = $bp->displayed_user->domain;
    $table = bp_core_get_table_prefix() . 'bp_activity';
    $mentions_modifier = "OR ( $table.content LIKE '%$user_filter%' AND $table.type = 'activity_update' ) ";
    return $mentions_modifier;
    }
    
    add_filter('buddyboss_wall_query_wall_activity_ids_where', 'filter_wall_where');
    add_filter('buddyboss_wall_query_wall_activity_ids_mentions', 'filter_wall_mentions');
    
    function filter_wall_feed_where(){
     global $bp;
     $user_id = $bp->displayed_user->id;
     if ( function_exists( 'friends_get_friend_user_ids' ) )
      {
       $user_ids = friends_get_friend_user_ids( $user_id, false, false );
      }
      else {
       $user_ids = array();
      }
     $user_list  = implode( ',', $user_ids );
     if ( empty( $user_list ) )
      {
       $user_list = 0;
      }
     $table = bp_core_get_table_prefix() . 'bp_activity';
     $where = "WHERE ( $table.user_id IN ($user_list) AND $table.type = 'activity_update' )";
     return $where;
    }
    
    add_filter('buddyboss_wall_query_feed_activity_ids_where', 'filter_wall_feed_where');
    
    

    Regards
    Varun Dubey

    #48450
    @maddish

    Hi @vapvarun
    Thank you for your answer.

    It works …right what I needed.

    Thanks a lot

    Maddish

    #48658
    @vapvarun

    🙂 Glad to help
    Regards
    Varun Dubey

Viewing 4 posts - 1 through 4 (of 4 total)
  • The question ‘display_comments=stream not working after installing plugin’ is closed to new replies.