BuddyDev

Search

Blog Post – Allow activity authors to delete activity comments by other users…

  • Participant
    Level: Enlightened
    Posts: 56
    John B on #32798

    https://buddydev.com/allow-activity-authors-delete-activity-comments-users-buddypress-based-social-network/#comments

    I tried to reply to this article but it appears the comments are closed. I was wondering if the article is an older one, as the delete function still works, but the entire Comment and Activity post is removed when clicking Delete.

    I’m using the following code to display the delete button on the right-side menu.

    <?php if ( bp_activity_user_can_delete() ) bp_activity_delete_link(); ?>

    The issue only happens when the conformation window appears as shown in the video below. Do you know if there is a way to format the code above so that it does not call on the conformation window?

    https://youtu.be/JfClPDVPqu0

    Thanks for everything you do for the BuddyPress community!!

    Thx again, JC

  • Participant
    Level: Enlightened
    Posts: 56
    John B on #32800

    I’m using the BP Confirm Actions plugin.

  • Keymaster
    (BuddyDev Team)
    Posts: 24623
    Brajesh Singh on #32803

    Hi John,
    Yes, that post is from long time ago. it was for the legacy template pack. Are you using legacy template pack?

    Regards
    Brajesh

  • Participant
    Level: Enlightened
    Posts: 56
    John B on #32814

    Yes I’m using the BuddyPress Legacy template pack.

    The code you provided in the article “Allow activity authors to delete activity comments by other users on your BuddyPress based social network” places a Delete button below the users comment. That delete button works perfectly. Thank you for that!!!!

    When I try to move that button to the right, next to the comment using the following code, this is where I see the issue.

    https://youtu.be/JfClPDVPqu0

    <?php if ( bp_activity_user_can_delete() ) bp_activity_delete_link(); ?>

    I was just wondering if it would be possible to display custom Delete button, to delete the Activity Comments without triggering the BP Confirm Actions plugin to kick in.

    Thx, JC

  • Keymaster
    (BuddyDev Team)
    Posts: 24623
    Brajesh Singh on #32822

    Hi John,
    The problem is we are relaying on the javascript included in the legacy template pack for communicating the action to the server.

    When you are moving the link, I am assuming it is changing the selector scope for the button and the legacy javascript is not able to handle that.

    That’s why it is not working.

    If you want, you can copy the code from buddypress.js and modify to achieve the same.

    Regards
    Brajesh

You must be logged in to reply to this topic.

This topic is: not resolved