forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 miscellaneous => Topic started by: papak on February 10, 2009, 01:21:25 pm

Title: only registered users can view original (full) image
Post by: papak on February 10, 2009, 01:21:25 pm
Hello,

the previous mod (http://forum.coppermine-gallery.net/index.php/topic,7636.0.html) 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.
Title: [SOLVED] only registered users can view original (full) image
Post by: papak 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.