1
tomodea
Xoops 2.0.18.1 – Problem with Delete Comments
  • 2008/4/1 19:02

  • tomodea

  • Just popping in

  • Posts: 47

  • Since: 2008/2/19


When a registered user creates a comment, the user has 3 buttons available for that comment: Edit, Delete, and Reply. Edit and Reply work just fine. However, when the user presses Delete, the system responds with the "you do not have permission" message.

This is very confusing for the user because we show the Delete button but then when the user tries to use it, we give an error message!

Has anyone else encountered this problem?

Permissions are checked in the include file, comment_delete.php so I need to make a change to this file but it’s difficult to understand where the change should be made or what the change should be.

Any suggestions?
Regards, Tom O'Dea
Melbourne, Australia

2
tomodea
Re: Xoops 2.0.18.1 – Problem with Delete Comments
  • 2008/4/5 20:16

  • tomodea

  • Just popping in

  • Posts: 47

  • Since: 2008/2/19


Quote:

tomodea wrote:
When a registered user creates a comment, the user has 3 buttons available for that comment: Edit, Delete, and Reply. Edit and Reply work just fine. However, when the user presses Delete, the system responds with the "you do not have permission" message.

This is very confusing for the user because we show the Delete button but then when the user tries to use it, we give an error message!

Has anyone else encountered this problem?

Permissions are checked in the include file, comment_delete.php so I need to make a change to this file but it’s difficult to understand where the change should be made or what the change should be.

Any suggestions?


I finally figured it out. I found that I needed to add logic to the include file comment_delete.php to check to see if the current user is the owner of the comments.

I added these lines after line 97:
if (is_object($xoopsUser)) {
    
$accesserror false;
}
Regards, Tom O'Dea
Melbourne, Australia

Login

Who's Online

124 user(s) are online (91 user(s) are browsing Support Forums)


Members: 0


Guests: 124


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits