Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: How to remove "Edit" option from the comments?  (Read 11454 times)

0 Members and 1 Guest are viewing this topic.

darkdog

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
How to remove "Edit" option from the comments?
« 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.
« Last Edit: July 19, 2005, 04:08:23 pm by Nibbler »
Logged

Nibbler

  • Guest
Re: How to remove "Edit" option from the comments?
« Reply #1 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.
Logged

darkdog

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Problem solved
« Reply #2 on: July 19, 2005, 11:21:28 am »

Thank you for your help, the problem is now solved :).
Logged

chechu

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: How to remove "Edit" option from the comments?
« Reply #3 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
Logged

Tranz

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Female
  • Posts: 6149
Re: How to remove "Edit" option from the comments?
« Reply #4 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.
Logged

chechu

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: How to remove "Edit" option from the comments?
« Reply #5 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
Logged

Vargha

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 223
  • Persian Soldier
    • Rangarang
Re: How to remove "Edit" option from the comments?
« Reply #6 on: June 23, 2006, 07:39:50 am »

follow Nibblers suggestion, its easy
Logged
Haalaa Boro Ye Chayi Vasam Dorost Kon Ta Man Ye Fekri Be Halet Bokonam ;) Ye Hendooneye Shotoriham Biyar Bizahmat :)
Visit My Site www.Rangarang.co.nr
Check Out My Gallery
www.Rangarang.co.nr/buddies
(http://img157.imageshack.us/img157/838/rangarang4xn.jpg)

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: How to remove "Edit" option from the comments?
« Reply #7 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.
Logged
Pages: [1]   Go Up
 

Page created in 0.021 seconds with 19 queries.