Skip to:
Content
Pages
Categories
Search
Top
Bottom

Dropdown activity stream and filter questions


  • havealookhere
    Participant

    @havealookhere

    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

Viewing 6 replies - 1 through 6 (of 6 total)

  • carasse64
    Participant

    @carasse64

    Hello

    I have read your post. It seems you wan to filter activity stream. I want too πŸ™‚

    Did you fix your issues with your php code ? Caan you tell me where you paste the code ? In which file and where exactly ?

    On my website, I would like to delete the following activities from my activity stream :
    – user modified his image
    – Member location updated
    – profile updated
    – user joined a group
    – group settings updated
    – document modified
    – new concact created

    Do you know how I could do that ?

    Thanks a o lot for help.

    Tu es français ?

    Fabien


    havealookhere
    Participant

    @havealookhere

    Hi,

    The php code did work. The data what was filtered was not visible anymore in the activity streams. I only had problems with removing creating docs from the drop down menu.

    I see you have different key words to exclude. You can make a mysql dump of the bp activities table (export) and open it in notepad ++. There you can find the right names of your activities.

    You can also download wbcom Buddypress activityfilter. It works nice and smooth. However there is a bug in version 2.8. So you have to wait till version 2.9 or install 2.8 and roll back to 2.7 . You can use plugin wp roll back for that.

    Finally i used the activity plugin of wbcom, used the roll back plugin to version 2.7 and everthing is working fine.


    havealookhere
    Participant

    @havealookhere

    sorry for any bad english, and sorry that there is a bug in wbcom buddypress activities.


    carasse64
    Participant

    @carasse64

    Hi

    I installed the Buddypress activity filter plugin and I noticed the bug that’s why I tryed to find an other PHP code writing solution. I contacted WBcom and they confirmed me the bug and that it would be corrected in the next version. But when ? No response from them at the moment.

    You confirm me the past version 2.7 works well with the last WP an buddypress versions ?

    Thanks a lot for your help.

    Fabien


    havealookhere
    Participant

    @havealookhere

    yes, its working with 2.7.

    what you do is using wp roll back plugin. install and activate it. Go to plugins and scroll to the bp activity plugin. You can click roll back or something there. Then click 2.7 and install and activate.

    Then go to general settings of bp activity and first press submit/save. Then the error is gone and it will work.

    I did write a lot of emails before the developer admitted it was a bug πŸ™‚ but i did not get answer also about when next version is ready. On my website it works with the newest wordpress and buddypress.

    good luck


    carasse64
    Participant

    @carasse64

    I’ll let you know if I get an answer from them.

    Maybe I’ll be luckier than you πŸ™‚

    Thanks.

    Fabien

Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.
Skip to toolbar