Advanced search  

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]

Pages: [1]   Go Down

Author Topic: Galery only for registered users.  (Read 2908 times)

0 Members and 1 Guest are viewing this topic.

taucher_0815

  • Coppermine frequent poster
  • ***
  • Country: 00
  • Offline Offline
  • Posts: 134
Galery only for registered users.
« on: August 14, 2010, 06:05:31 pm »

Hi @all!

I set up a new gallery on http://www.640stel-sekunde.de

This is only for registered users.
Is it possible (and if yes, how) to display the anycontent.php also to unregistered users?
Right now if you open the gallery you will be directed strait to the login.php

Many thanks!
Sven
Logged

papukaija

  • Contributor
  • Coppermine frequent poster
  • ***
  • Country: 00
  • Offline Offline
  • Posts: 333
Re: Galery only for registered users.
« Reply #1 on: August 15, 2010, 09:42:56 pm »

Reading the documentation is part of board rules. There's even an example code here. Please reply if the example helped and then mark the thread as solved.
Logged

taucher_0815

  • Coppermine frequent poster
  • ***
  • Country: 00
  • Offline Offline
  • Posts: 134
Re: Galery only for registered users.
« Reply #2 on: August 16, 2010, 06:53:32 am »

Hi papukaija!

I have read the docs 4 sure... But this did not work for me.

The Index-page is not displayed and the user is redirected to the login-page immediately.
The Config of this gallery is set to be visible for registered users only. 
Even with the line of code from the example nothing is displayed.

Sven
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Galery only for registered users.
« Reply #3 on: September 03, 2010, 10:17:27 am »

Open login.php, find
Code: [Select]
if ($superCage->get->getInt('force_login')) {
    msg_box($lang_login_php['force_login_title'], $lang_login_php['force_login']);
}
and replace with
Code: [Select]
if ($superCage->get->getInt('force_login')) {
    msg_box($lang_login_php['force_login_title'], $lang_login_php['force_login']);
}

include('anycontent.php');
Logged

taucher_0815

  • Coppermine frequent poster
  • ***
  • Country: 00
  • Offline Offline
  • Posts: 134
Re: Galery only for registered users.
« Reply #4 on: September 03, 2010, 11:09:00 am »

Thanks André
Logged
Pages: [1]   Go Up
 

Page created in 0.019 seconds with 19 queries.