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?
Thanks for everything you do for the BuddyPress community!!
Thx again, JC
Hi John,
Yes, that post is from long time ago. it was for the legacy template pack. Are you using legacy template pack?Regards
BrajeshYes 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.
<?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
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.