forum.coppermine-gallery.net

Support => cpg1.5.x Support => cpg1.5 miscellaneous => Topic started by: taucher_0815 on August 14, 2010, 06:05:31 pm

Title: Galery only for registered users.
Post by: taucher_0815 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
Title: Re: Galery only for registered users.
Post by: papukaija on August 15, 2010, 09:42:56 pm
Reading the documentation is part of board rules (http://forum.coppermine-gallery.net/index.php/topic,55415.msg270608.html#msg270608). There's even an example code here (http://documentation.coppermine-gallery.net/en/php-content.htm#php-content_anycontent). Please reply if the example helped and then mark the thread as solved.
Title: Re: Galery only for registered users.
Post by: taucher_0815 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
Title: Re: Galery only for registered users.
Post by: Αndré 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');
Title: Re: Galery only for registered users.
Post by: taucher_0815 on September 03, 2010, 11:09:00 am
Thanks André