Displaying Image Permission Displaying Image Permission
 

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]

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