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: Hide or cvhange thumbnails for guest users  (Read 3364 times)

0 Members and 1 Guest are viewing this topic.

paquets

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 59
Hide or cvhange thumbnails for guest users
« on: August 29, 2009, 10:50:53 pm »

Hi,

I was wondering if it is possible to change the thumbnails of images to something else (for instance a thumbnail that would read "please register to see images") for guest users. Registered users would see the real thumbnail. The reason for this is I'd like to keep my gallery open to searches so guests can read image titles, descriptions and keywords, but not see the actual thumbnail, normal and full-size images. I've got the normal and full-size image part down, but searches will still display the thumbnail.

Is that possible?

Site: adpharm.net
Logged

Nibbler

  • Guest
Re: Hide or cvhange thumbnails for guest users
« Reply #1 on: August 30, 2009, 05:01:28 pm »

Just copy the theme_display_thumbnails() function from the sample theme.php to your custom theme.php and change all occurrences of

Code: [Select]
'{THUMB}' => $thumb['image'],

to something like

Code: [Select]
'{THUMB}' => USER_ID ? $thumb['image'] : '<img src="path/to/your/pic.png" alt="please register to see images" width="xx" height="xx" />',
Logged

paquets

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 59
Re: Hide or cvhange thumbnails for guest users
« Reply #2 on: August 30, 2009, 08:52:14 pm »

You definitely know your stuff. It works perfectly.
Had to disable the plugin "Lightbox" though as for some reason it uses "theme_display_thumbnails" another way and it conflicts.

Thanks Nibbler!
Logged
Pages: [1]   Go Up
 

Page created in 0.017 seconds with 19 queries.