Dropdown activity stream and filter questions
-
Hi,
I did not want to show some things in the activity stream. After searching a long time I did find a snippet what did work.
function bp_activity_dont_save($activity_object) { $exclude = array( 'bp_doc_created', 'bp_doc_edited', 'bp_doc_comment', 'bbp_topic_create', //bbpress 'bbp_reply_create', //bbpress 'created_group', 'joined_group', ); // if the activity type is empty, it stops BuddyPress BP_Activity_Activity::save() function if (in_array($activity_object->type, $exclude)) $activity_object->type = false; } add_action('bp_activity_before_save', 'bp_activity_dont_save', 10, 1);
Is this the best way to do this? Or do you have a better sollution?
I cannot find the right term to exclude when someone updates in a group, does someone know that one?Then, I want to get rid off the options in the drop down menu on the activity stream. I did find some code what almost did the trick.
`add_filter( ‘bp_get_activity_show_filters_options’, function( $filters ) {
unset( $filters[‘bp_doc_created’] );
unset( $filters[‘bp_doc_edited’] );
unset( $filters[‘bp_doc_comment’] );
unset( $filters[‘bbp_topic_create’] );
unset( $filters[‘bbp_reply_create’] );
unset( $filters[‘created_group’] );
unset( $filters[‘joined_group’] );
unset( $filters[‘updated_group’] );
return $filters;
} );I think there should be a better way, so I hope someone can advice me with this.
Now i have a strange thing. The Forum topics and replies are not visible anymore in the dropdown so thats good.
The group creation and the group joining are not visible anymore so thats good.
I cannot find the group update term. Does someone know what Term i need?
And, the bp docs are still visible. This is strange because they are not showing anymore in the activity feed, but i cannot get them out of the dropdown menu.
Can someone help me to achieve this? Or give me a better sollution??
Sorry for any bad English
Thanks in advantage
- You must be logged in to reply to this topic.