Skip to:
Content
Pages
Categories
Search
Top
Bottom

How do I Remove BuddyPress Auto Status Updates from the Activity Feed?


  • Lee
    Participant

    @diondeville

    I want to stop activity updates like ‘Mr X. added Mr B. as a friend’ and ‘Mrs C. Joined group xyz’ from showing in the activity stream. I know I can do it by editing the activity-loop.php file to change:

    `if ( bp_has_activities( bp_ajax_querystring( ‘activity’ ) ) ) :`

    To

    `if ( bp_has_activities( ‘type=activity_update&action=activity_update’ ) ) :`

    But doing it like this creates a problem with the ‘Load More’ button on the activity stream. When the above edit is made, the Load More button doesn’t load more, it loads the same updates over and over again.

    I am aware of another solution that prevents those auto status updates from being written to the database but I prefer to log the data in case it’s needed later.

    Is there another solution?

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

  • danbpfr
    Participant

    @chouf1

    hi @diondeville,

    it’s a bit old but perhaps he’s still working. Give a try to:

    http://etivite.com/wordpress-plugins/buddypress-block-activity-stream-types/


    Lee
    Participant

    @diondeville

    Hi @chouf1, I was looking for a way that would keep the updates I want to remove in the database but I’m happy to go with this plugin temporarily. Thank you so much.


    Lee
    Participant

    @diondeville

    I have another idea. Is it possible to set a default filter option for the global activity stream such that the dropdown filter box defaults to ‘Updates’ instead of ‘Everything’?


    danbpfr
    Participant

    @chouf1

    For sure you can !
    Copy /activity/index.php to your child theme and invert line 94 & 95

    Also add select=selected to the update option to get finally this:
    <code>
    <option value=”activity_update” select=”selected”><?php _e( ‘Updates’, ‘buddypress’ ); ?></option>
    <option value=”-1″><?php _e( ‘Everything’, ‘buddypress’ ); ?></option>

    </code>
    Empty your browser history to view the change.

    And take care by copy/pasting from here.  You probably have to rewrite the curly quotes into single quotes.


    Lee
    Participant

    @diondeville

    I’m trying that one but it’s not working properly. I have to select Everything (or anything other than Updates) then select Updates for only updates to show. Will keep playing until we get it.


    danbpfr
    Participant

    @chouf1

    had the same trouble while testing. but it works. Perhaps try by removing -1 in the update value

    and don’t forget to refresh the browser or close reopen it.


    Lee
    Participant

    @diondeville

    Gave it a go but couldn’t get it to work properly. The filter displays ‘Updates’ but the stream still returns unfiltered posts. The only reason I can think of for it not working is if there is another file that controls the default option. Maybe it’ll work after a full restart of my computer. Will test that one tomorrow.


    Lee
    Participant

    @diondeville

    As an aside from the main topic, looking at this, I can see how I could add a ‘Refresh’ button just above the stream.


    danbpfr
    Participant

    @chouf1

    Why do you want add a refesh button ?


    Lee
    Participant

    @diondeville

    Sorry, I missed your reply. I don’t need a refresh button now because I’m using the RS BuddyPress Activity Refresh plugin to automatically update the activity stream in realtime but my idea was that I could use a refresh button to allow members to refresh the activity stream without needing to refresh the whole page. A refresh button would be quicker and smoother because it would use Ajax.


    modemlooper
    Moderator

    @modemlooper

    very easy.

    create a button with html and place a on click to it

    https://gist.github.com/4644352

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘How do I Remove BuddyPress Auto Status Updates from the Activity Feed?’ is closed to new replies.
Skip to toolbar