forum.coppermine-gallery.net

Support => cpg1.3.x Support => Older/other versions => cpg1.3 Permissions & Access Rights => Topic started by: darkdog on July 19, 2005, 02:01:55 am

Title: How to remove "Edit" option from the comments?
Post by: darkdog on July 19, 2005, 02:01:55 am
Hello!

 I'm wondering is there any possible way to remove the "Edit comment" button? I've enabled the allow public comments ... I want that everyone could comment my pictures. It's easier for my friends who maybe are not so good understanding computers.I know you will ask "why they won't register?", yes they can do that, but sometimes even I cannot remember my pwd for some certain account, I'm sure it is much easier for them to comment without registering... there you can add your name too :) . But I'm worried about the edit option that is in the comments section. Some people can abuse this option and change other people comments.

 I think you understood my problem. I would be very thankful if someone could help me.

 Thank you.
Title: Re: How to remove "Edit" option from the comments?
Post by: Nibbler on July 19, 2005, 02:32:02 am
Hi,

The simplest way would be to edit your displayimage.php, look for

Code: [Select]
$user_can_edit = (GALLERY_ADMIN_MODE) || (USER_ID && USER_ID == $row['author_id'] && USER_CAN_POST_COMMENTS) || (!USER_ID && USER_CAN_POST_COMMENTS && ($USER['ID'] == $row['author_md5_id']));
and then change that line to read

Code: [Select]
$user_can_edit = (GALLERY_ADMIN_MODE) || (USER_ID && USER_ID == $row['author_id'] && USER_CAN_POST_COMMENTS);
That will remove the edit and delete permissions from anonymous users.
Title: Problem solved
Post by: darkdog on July 19, 2005, 11:21:28 am
Thank you for your help, the problem is now solved :).
Title: Re: How to remove "Edit" option from the comments?
Post by: chechu on June 22, 2006, 04:24:38 pm
Hi, i have 1.4.2 version, and i can't find this lines.

Can you help me?

Thanks
Title: Re: How to remove "Edit" option from the comments?
Post by: Tranz on June 22, 2006, 04:47:36 pm
Please upgrade to v 1.4.8 first. Serious security bugs have been fixed since the version you are using.
Title: Re: How to remove "Edit" option from the comments?
Post by: chechu on June 22, 2006, 05:45:40 pm
ok, i have jsut upgrade my gallery

How can i do the remove of edit and delete bottons.

Tahnks
Title: Re: How to remove "Edit" option from the comments?
Post by: Vargha on June 23, 2006, 07:39:50 am
follow Nibblers suggestion, its easy
Title: Re: How to remove "Edit" option from the comments?
Post by: Joachim Müller on June 23, 2006, 08:40:54 am
and don't ask questions that belong on the cpg1.4.x support board on this thread. Locking.