BuddyBoss Home – Web Support Forums Plugins BuddyBoss Wall Re: Global activity filter not working in single page

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

    #45938
    @surfbuddy

    Hi @vapvarun, I commented out that line and mentions are still appearing in the member’s personal wall. Thanks

    Re: Hi @surfied mentions can be part of post updates
    You can comment
    //add_filter(‘buddyboss_wall_query_wall_activity_ids_mentions’, ‘filter_wall_mentions’);

    That will work, and it will remove all mentions.
    Regards

    Answers

    #46366
    @surfbuddy

    Hi @vapvarun, I just wanted to follow up on this. I have commented out the following, but @mentions is still appearing on the members wall. How can I remove mentions from appearing on a members wall? Thanks

    
    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');
    
    #46528

    Anonymous
    @

    hi @surfied, you just need to check how queries are working, you can easily change
    $mentions_modifier = “OR ( $table.content LIKE ‘%$user_filter%’ AND $table.type = ‘activity_update’ ) “;

    with any data what you have to include or exclude

    if you want to exclude all, do not pass any parameter/query inside that
    like below
    $mentions_modifier = “”;

    Regards
    Varun Dubey

    #46627
    @surfbuddy

    Thanks. It removed the mention from everyone’s wall, including the member’s wall who posted the update. I would only like to exclude it from the member who is being mentioned’s wall, not the poster’s wall. How can I keep mentions in the poster’s wall, but not the mentioned’s wall?

    #47242

    Anonymous
    @

    @surfbuddy poster’s wall = logged in user’s wall
    $user_filter = $bp->loggedin_user->domain;
    $mentions_modifier = “OR ( $table.content LIKE ‘%$user_filter%’ AND $table.type = ‘activity_update’ ) “;

    Regards
    Varun Dubey

    #47730
    @surfbuddy

    Hi, @vapvarun the above code no longer works with the latest updates and not returning only ‘activity_update’ in sitewide activity. Should $user_list be replaced or something else?

Viewing 6 posts - 1 through 6 (of 6 total)
  • The question ‘Re: Global activity filter not working in single page’ is closed to new replies.