coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 permissions => Topic started by: Gert-Paul on July 17, 2006, 12:39:55 AM

Title: Only show comments for registered users
Post by: Gert-Paul 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?
Title: Re: Only show comments for registered users
Post by: Nibbler 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


if (!USER_ID) return '';


in a new line near the top of the function.
Title: Re: Only show comments for registered users
Post by: Gert-Paul on August 08, 2006, 11:47:37 PM
Thanks. This solved it. I think this can be marked as solved.
Title: Re: Only show comments for registered users
Post by: Nibbler on August 09, 2006, 12:13:16 AM
Great, thanks for returning and resolving your thread.