forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 permissions => Topic started by: jamurillo on November 30, 2005, 05:43:25 pm

Title: Displaying Image Permission
Post by: jamurillo on November 30, 2005, 05:43:25 pm
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
Title: Re: Displaying Image Permission
Post by: Joachim Müller on November 30, 2005, 08:04:25 pm
http://coppermine-gallery.net/demo/cpg14x/docs/faq.htm#viewThumbnailsOnly
Title: Re: Displaying Image Permission
Post by: jamurillo on November 30, 2005, 10:08:43 pm
GauGau,

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

Thank you

jam
http://www.jamurillo.com
Title: Re: Displaying Image Permission ERROR
Post by: jamurillo on November 30, 2005, 10:35:08 pm
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
Title: Re: Displaying Image Permission
Post by: Nibbler on November 30, 2005, 10:38:52 pm
Post what you actually did, not what the instructions were.
Title: Re: Displaying Image Permission
Post by: jamurillo on November 30, 2005, 10:49:33 pm
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