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: [Solved]: Link to password protected gallery  (Read 2276 times)

0 Members and 1 Guest are viewing this topic.

fidhleir

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
[Solved]: Link to password protected gallery
« on: April 07, 2009, 01:22:38 am »

I have a multi-user password protected gallery.  When I email a URL link to a photo or album, the recipient clicks the link and the login screen appears.  After they login, the gallery home page is displayed.  Is there any way to have Coppermine take them directly to the URL I sent after they've logged in?  As far as I can tell, after logging into the gallery they have to go back to the email and click the link again. 

I've searched the documentation and the forums and can't find anything about this.  Any help would be appreciated.
« Last Edit: April 07, 2009, 05:31:32 pm by Nibbler »
Logged

Nibbler

  • Guest
Re: Link to password protected gallery
« Reply #1 on: April 07, 2009, 01:41:14 am »

You should be able to do this quite easily. Look through the following files

./index.php
./displayimage.php
./search.php
./thumbnails.php

find this code near the start

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

and change it like this:

Code: [Select]
if (!USER_ID && $CONFIG['allow_unlogged_access'] == 0) {
    $redirect = "login.php?referer=$REFERER";
    header("Location: $redirect");
    exit();
}
Logged

fidhleir

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Re: Link to password protected gallery
« Reply #2 on: April 07, 2009, 01:59:44 am »

Very nice.  Thank you.  I'll give that a try.
Logged

fidhleir

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Re: Link to password protected gallery
« Reply #3 on: April 07, 2009, 04:51:00 pm »

That worked perfectly.  Thank you again.
Logged
Pages: [1]   Go Up
 

Page created in 0.017 seconds with 20 queries.