Advanced search  

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

Pages: [1]   Go Down

Author Topic: Displaying Image Permission  (Read 7793 times)

0 Members and 1 Guest are viewing this topic.

jamurillo

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 23
    • J.A. Murillo, photographer
Displaying Image Permission
« 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
« Last Edit: December 01, 2005, 05:44:58 am by GauGau »
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Logged

jamurillo

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 23
    • J.A. Murillo, photographer
Re: Displaying Image Permission
« Reply #2 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
Logged

jamurillo

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 23
    • J.A. Murillo, photographer
Re: Displaying Image Permission ERROR
« Reply #3 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
Logged

Nibbler

  • Guest
Re: Displaying Image Permission
« Reply #4 on: November 30, 2005, 10:38:52 pm »

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

jamurillo

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 23
    • J.A. Murillo, photographer
Re: Displaying Image Permission
« Reply #5 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
Logged
Pages: [1]   Go Up
 

Page created in 0.025 seconds with 20 queries.