Skip to Content Skip to Menu

Profilebook: Sender only can delete

15 years 5 months ago #84708 by redleader36
Profilebook: Sender only can delete was created by redleader36
Hello all.

I was wondering if you guys might be able to help me out with the Profile Book plugin. I am trying to modify it so that only the sender of a message can delete that message. I am sure this is possible but I have been unable to implement it so far. I have gotten the "Delete" link to dissapear from the recipient's page. I have also gotten the "Delete" link to appear when the sender is logged in and viewing the recipeint's page, but upon clicking the javascript confirm button it does nothing. The page doesn't even refresh. Is the key to this in the if statement for the action variable 'if ($isME || $iAmModerator) { switch ($action) . . . '?
If anybody can help me figure this out, I would greatly appreciate it. I don't know much about PHP, but I have found that I can read it and have some understanding of what is going on.

If you would like to see my current cp.profilebook.php I could post that.

Additionally, I am also trying to find a way to quote the original message when sending a reply (return favor) to a message. If anyone has any input on that, I would be very thankful.

Thanks in advance!

Post edited by: redleader36, at: 2009/01/09 17:12

Please Log in or Create an account to join the conversation.

15 years 5 months ago #85084 by redleader36
Replied by redleader36 on topic Re:Profilebook: Sender only can delete
I have figured it out. I was missing the actionForm form. once i copied that inside the if statement "if($isME || $iAmModerator || ($my->id && $my->id == $item->posterid))" it works great!

I have also successfully disabled deleting for the receiver of the message.

If anyone else needs a copy of this cb.profilebook.php, let me know!

Please Log in or Create an account to join the conversation.

  • only1russ
  • only1russ
  • OFFLINE
  • Posts: 30
  • Thanks: 1
  • Karma: 2
13 years 5 months ago #149603 by only1russ
Replied by only1russ on topic Re:Profilebook: Sender only can delete
What version of profile book was this - I am interested in a way to send the text with the notification emails....

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum