only registered users can view original (full) image only registered users can view original (full) image
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

only registered users can view original (full) image

Started by papak, February 10, 2009, 01:21:25 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

papak

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.

papak

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

what I did in case someone else is interested:

in displayimage.php changed

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.