Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Only show comments for registered users  (Read 2452 times)

0 Members and 1 Guest are viewing this topic.

Gert-Paul

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Only show comments for registered users
« on: July 17, 2006, 12:39:55 am »

I use Coppermine in a Joomla based community website. Most of the pictures are not visible for the public, but some albums we want to show. For these pictures we don't want that not registered users can read the comments. In the permission settings there is something about not letting the user post comments, but I couldn't find something about not viewing them.

Is there a possibility to solved this without making a hack, or is hacking the core code the only way of solving this problem?
« Last Edit: August 09, 2006, 12:12:49 am by Nibbler »
Logged

Nibbler

  • Guest
Re: Only show comments for registered users
« Reply #1 on: July 17, 2006, 01:13:31 am »

You can modify it via the theme system, which is preferable to modifying core code. Look for theme_html_comments() function in the sample theme's theme.php, copy the entire function into the theme.php of the theme you are using, and add

Code: [Select]
if (!USER_ID) return '';

in a new line near the top of the function.
Logged

Gert-Paul

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: Only show comments for registered users
« Reply #2 on: August 08, 2006, 11:47:37 pm »

Thanks. This solved it. I think this can be marked as solved.
Logged

Nibbler

  • Guest
Re: Only show comments for registered users
« Reply #3 on: August 09, 2006, 12:13:16 am »

Great, thanks for returning and resolving your thread.
Logged
Pages: [1]   Go Up
 

Page created in 0.016 seconds with 16 queries.