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 allow registered user to view Image Info  (Read 6174 times)

0 Members and 1 Guest are viewing this topic.

tip

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Only allow registered user to view Image Info
« 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!
« Last Edit: November 06, 2005, 02:59:24 pm by GauGau »
Logged

xplicit

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 214
Re: Only allow registered user to view Image Info
« Reply #1 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
Logged
Don't ask me: Can you do this .... or Give me that...or I need Quick help in PM's. I'm not Santaclaus so post your questions on the board so it will be in the benefit for everyone.

tip

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: Only allow registered user to view Image Info
« Reply #2 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.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Only allow registered user to view Image Info
« Reply #3 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).
Logged

tip

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: Only allow registered user to view Image Info
« Reply #4 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.
Logged
Pages: [1]   Go Up
 

Page created in 0.031 seconds with 19 queries.