BuddyDev

Search

[Resolved] How to stop image repost when someone makes a comment

  • Participant
    Level: Initiated
    Posts: 6
    steve on #25978

    Hi,
    i don’t understand why an image is reposted when someone comments on an image posted in BP activity feed.
    It clutters the feed with the same image, so how can i get this to stop and simply nest under the original posted image.
    I have seen some threads on this from a time back but have found no resolution

    Thanks in advance

  • Keymaster
    (BuddyDev Team)
    Posts: 24149
    Brajesh Singh on #25981

    Hi Steve,
    Is it about MediaPress? We did it specifically on the request of users. I can assist with disabling image in the comments.

    Please let me know.

    Regards
    Brajesh

  • Participant
    Level: Initiated
    Posts: 6
    steve on #25983

    Hi again,
    yes sorry should have been more specific. In mediapress indeed, i would prefer for any comments on an image in BP activity not to repost the original image, comments should just nest under original post. hope this makes sense

  • Keymaster
    (BuddyDev Team)
    Posts: 24149
    Brajesh Singh on #25986

    Hi Steve,
    Please put the following code in your bp-custom.php or your theme’s functions.php

    
    add_action( 'mpp_init', function () {
    
    	if ( function_exists( 'mpp_activity_inject_media_in_comment_replies' ) ) {
    		remove_action( 'bp_activity_entry_content', 'mpp_activity_inject_media_in_comment_replies' );
    	}
    
    } );
    

    It will disable the image in the comments.

    Regards
    Brajesh

  • Participant
    Level: Initiated
    Posts: 6
    steve on #25993

    once again many thanks for your help with this, greatly appreciated Brajesh

  • Participant
    Level: Initiated
    Posts: 6
    steve on #25994

    Hi Brajesh,
    code has definately stopped the image post when cooments made, but comments made from lightbox do not nest under original post which is a real shame. so I have had to disable comments in light box.
    Thanks again for your help on this
    Steve

  • Keymaster
    (BuddyDev Team)
    Posts: 24149
    Brajesh Singh on #26010

    Hi Steve,
    Thank you.

    The comments made on the lightbox are on single media while the stream contains multiple media(normally). That is the reason.

    Also, our commenting needs improvements and It is coming in future.

    Regards
    Brajesh

You must be logged in to reply to this topic.

This topic is: resolved