Displaying Image Permission Displaying Image Permission
 

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

Displaying Image Permission

Started by jamurillo, November 30, 2005, 05:43:25 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

jamurillo

CPG 1.4.2
How can make guest or anonimous just view thumbnail on index page and albums not display image ?
I want when trying to display image redirect to login.php

displayimage.php :

require('include/init.inc.php');

if (!USER_ID && $CONFIG['allow_unlogged_access'] == 0) {
    $redirect = $redirect . "login.php";
    header("Location: $redirect");
    exit();

thanks

Joachim Müller


jamurillo

GauGau,

Muchas gracias !
Excuse me .... I have not read all the documentation.

Thank you

jam
http://www.jamurillo.com

jamurillo

edit
displayimage.php
and search for

/**************************************************************************
* Local functions definition
**************************************************************************/

and add before it
if (!USER_ID) cpg_die(ERROR, 'You need to register to access this page', __FILE__, __LINE__);

I GET :

Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/jamurill/public_html/stock/displayimage.php on line 51

Nibbler

Post what you actually did, not what the instructions were.

jamurillo

ok,

Once more i did it !
The problem was, when uploading the edited file displayimage.php by ftp i was in automatic mode (Fetch, Mac).
After edition i have to be carful to upload the file in "text" mode.

Excuse me again.

jam
http://www.jamurillo.com/stock