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 registered users can view original (full) image  (Read 1304 times)

0 Members and 1 Guest are viewing this topic.

papak

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
only registered users can view original (full) image
« on: February 10, 2009, 01:21:25 pm »

Hello,

the previous mod no longer applies for the new version (i am using latest version with stamm mod).

I understand how to include the if (!USER_ID) but can't seem to find where in displayimage.php it would be appropriate (can't find where the link is generated) (if still in the displayimage.php) at all ...

can somenone please help? to clarify again => i would like only the registered users to be able to view the full image (original) and the non-registered users only to be able to view the thumbs and _normal image ...

Thank you in advance.
Logged

papak

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
[SOLVED] only registered users can view original (full) image
« Reply #1 on: February 10, 2009, 02:46:10 pm »

I managed to find it ... sort of :)

what I did in case someone else is interested:

in displayimage.php changed
Code: [Select]
if (isset($_GET['fullsize'])) {
theme_display_fullsize_pic();
ob_end_flush();
to
if (isset($_GET['fullsize'])) {
if (!USER_ID) theme_display_nofullsize_pic();
else theme_display_fullsize_pic();
ob_end_flush();

and than i also added the custom theme_display_nofullsize_pic in includes/themes.inc.php, which contains the message that user must register.
Logged
Pages: [1]   Go Up
 

Page created in 0.016 seconds with 19 queries.