forum.coppermine-gallery.net

Support => cpg1.3.x Support => Older/other versions => cpg1.3 Permissions & Access Rights => Topic started by: tip on November 02, 2005, 08:59:40 am

Title: Only allow registered user to view Image Info
Post by: tip on November 02, 2005, 08:59:40 am
Hi,

I'm trying to set up a gallery of products in which I hope to use one of the Image Information fields as the Price of the product.
And I want to hide the price from any unregistered user.
Is it possible to only allow a group of user to view a particular image infomation field?(ex. title, description, comment...any field that I could use as the Price)
Preferrably the Price field would be able to show up in Thumbnails view..

Thanks in advance!
Title: Re: Only allow registered user to view Image Info
Post by: xplicit on November 02, 2005, 07:08:52 pm
All things can be done, but I dont think you'll get propper support if you ask for 3 features in one post
Title: Re: Only allow registered user to view Image Info
Post by: tip on November 03, 2005, 03:23:20 am
sorry, let me rephrase my question.

Could you tell me how I could make an image field only visible to registered users?

thanks very much.
Title: Re: Only allow registered user to view Image Info
Post by: Joachim Müller on November 03, 2005, 08:21:31 am
edit displayimage.php, find
Code: [Select]
$pic_info = html_picinfo();and replace with
Code: [Select]
if (USER_ID) {
    $pic_info = html_picinfo();
} else {
    $pic_info = 'You need to register to see details';
}
(not tested though).
Title: Re: Only allow registered user to view Image Info
Post by: tip on November 06, 2005, 01:34:46 am
Thank you! that works fine.

How about if I want to do the same on the thumbnails view, which file do I edit?

Thanks.