BuddyBoss Home – Web › Support Forums › Plugins › BuddyBoss Wall › Re: Global activity filter not working in single page
- This topic has 5 replies, 2 contibutors, and was last updated 9 years, 1 months ago by Ted.
Question
September 8, 2015 at 10:15 am #45938@surfbuddyHi @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.
RegardsAnswers
September 16, 2015 at 12:53 am #46366@surfbuddyHi @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');
September 17, 2015 at 10:58 am #46528@
Anonymoushi @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 DubeySeptember 18, 2015 at 3:43 pm #46627@surfbuddyThanks. 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?
September 27, 2015 at 5:39 am #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 DubeyOctober 1, 2015 at 5:02 pm #47730@surfbuddyHi, @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?
- The question ‘Re: Global activity filter not working in single page’ is closed to new replies.