This topic has 15 replies, 2 voices, and was last updated 8 years by sharmstr.

  • Author

    Tagged: ,

  • #100182
     costyclan
    Participant

    Hi there, I have two things I’d like help with in regard to the activity feed please:

    1. When I sort the activity feed from ‘everything’ to ‘updates’ the feed is not showing recent updates (going back to updates from a month ago).

    2. I would like the activity page to only show ‘updates’ and ‘posts’ and nothing else (ie. remove new members, profile updates, comments, new groups, group updates and group memberships).

    I’ve searched as much as I can and can’t find an answer to question 2 that I can understand and implement.

    #100358
     sharmstr
    Moderator

    1 – The do show up. The ones that dont are rtMedia updates. This isnt a Buddyapp bug as the same behavior happens with the WP 2015 theme.

    2 – Put this in your child theme’s functions.php files. It will stop saving all new activity types listed in the code. It will not remove those types that are already in the db. Edit as you see fit.

    https://gist.github.com/slaFFik/044cb43c0871e48cf341

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

    #100454
     costyclan
    Participant

    If rtmedia updates aren’t going to show then I would like to completely remove the sort option on right hand side of activity (shown in screenshot attached). How can I do this please?

    Attachments:
    You must be logged in to view attached files.
    #100466
     costyclan
    Participant

    I copied the code from link provided into functions.php within my child theme and site crashed. Did I do something wrong?

    #100526
     sharmstr
    Moderator

    You probably included the php tags

    COPY CODE
    
    //Block certain activity types from being added
    function bp_activity_dont_save( $activity_object ) {
        $exclude = array(
            'updated_profile',
            'new_member',
            'new_avatar',
            'friendship_created',
            '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 );
    
    
    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

    #100686
     costyclan
    Participant

    @sharmstr If rtmedia updates aren’t going to show then I would like to completely remove the sort option on right hand side of activity (shown in screenshot attached). How can I do this please?

    Attachments:
    You must be logged in to view attached files.
    #100688
     costyclan
    Participant

    oh and thank you @sharmstr for advice on code. got it working now : )

    #100729
     sharmstr
    Moderator

    Great!

    Here’s the css to hide the filter

    COPY CODE
    
    #activity-filter-select {
        display: none !important;
    }
    
    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

    #100898
     costyclan
    Participant

    sorry @sharmstr but this code didn’t remove the filter. Any advice?

    #100971
     sharmstr
    Moderator

    It does work. The issue is your cache/cdn. Do yourself a favor and disable it until you’re done designing your site. Otherwise, remember to purge your cache/cdn after ever single change you make.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

    #101109
     costyclan
    Participant

    Thank you @sharmstr. Sorry for the muck around with this. I will take your advice and disable cdn until site is finalised. The filter has removed but the menu is now sitting on activity border and there’s a grey line that needs removing (see attached screenshot). I’m almost done with site so I’ll be out of your hair soon : )

    Attachments:
    You must be logged in to view attached files.
    #101139
     sharmstr
    Moderator

    Try this

    COPY CODE
    
    .bp_activity .item-list-tabs {
        margin-bottom: 15px !important;
    }
    #buddypress form#whats-new-form {
        border-bottom: 0px !important;
    }
    
    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

    #101392
     costyclan
    Participant

    Thank you, looks great.
    Final question, I promise. I’ve amended the activity feed with code you provided. I also want to remove updates for ‘New Group created’. CAn you please advise what code to add to make this happen?

    #101394
     sharmstr
    Moderator

    Try created_group.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

    #101666
     costyclan
    Participant
    This reply has been set as private.
    #101701
     sharmstr
    Moderator

    I just checked your styles.css and the code I gave you to fix the activity page isnt in there.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

Viewing 16 posts - 1 through 16 (of 16 total)

The forum ‘General questions’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?