Skip to:
Content
Pages
Categories
Search
Top
Bottom

I am trying to remove activity comments as separate entries 2.0


  • Humiges
    Participant

    @humiges

    Dear @danbp,

    I have seen and tried the solution you kindly provided at: “I am trying to remove activity comments as separate entries” on: https://buddypress.org/support/topic/i-am-trying-to-remove-activity-comments-as-separate-entries/

    function my_bp_activities_include_activity_types( $retval ) {
    // only allow the following activity types to be shown
        $retval['action'] = array(
         //   'activity_update',
            'activity_comment',
            'new_blog_post',
            'new_blog_comment',
            'friendship_created',
            'created_group',
        );
     
        return $retval;
    }
    add_filter( 'bp_after_has_activities_parse_args', 'my_bp_activities_include_activity_types' ); 

    This is awesome, until I found out that it also removes them in @-mentions – the …/activity/mentions/ posts … please, is there any way I can keep those under …/activity/mentions/ ??

    Thanks a lot :))

Viewing 3 replies - 1 through 3 (of 3 total)
  • You’ll want to add new_at_mention to your list of types.


    Humiges
    Participant

    @humiges

    Dear Paul – @djpaul,

    thank you for your kind reply.
    Works like a charm.

    Please, is there any way I can add the link to the comment too? The activity just says:
    for example “Paul posted a new activity comment” but no actual link to it 🙁

    …. maybe this is the answer:

    activity->id, $activities_template->activity ) ?>
    <a href="” class=”button acomment-reply bp-primary-action” id=”acomment-comment-“><?php printf( __( 'Comment %s‘, ‘buddypress’ ), bp_activity_get_comment_count() ); ?>

    from: https://buddypress.org/support/topic/resolved-single-activity-url/

    However, I’m not sure where I should actually have it?

    Thank you very much 🙂


    Humiges
    Participant

    @humiges

    Dear @djpaul ,
    please ignore my previous reply.

    I found out that the // ‘activity_update’, works a bit TOO well/much 😉 , since it also removes the activity information about the new comments created in blogs.

    Please, is there any specific removal as // ‘activity_update’, — however, this one only removes those which are posted in Buddypress Profiles?

    This would mean… I would still see:
    [username] commented the post [postname]

    However, if someone replies the BuddyPress activity/comments the
    [username] posted a new activity comment
    Will not show/ create.

    Thank you very much

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