[Solved]: Hide albums from Anonymous Users [Solved]: Hide albums from Anonymous Users
 

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]

Main Menu

[Solved]: Hide albums from Anonymous Users

Started by allabout, November 07, 2003, 07:44:50 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

allabout

First post here, first of all I just want to thank the developers for this great free photo gallery.
I hope this isn't asking too much, but I was wondering if there is a feature to hide the albums from anonymous users. and just show the log in and register option on the main page?
I wanted to only give access to the albums for friends and family.
Thank you all for any replies.

hyperion

One way to preserve your privacy would be to create a .htaccess file for the entire Coppermine directory.  Give your friends and family the username and password, and then they would be allowed to see CPG index page.

This method is like using a sledgehammer. It's overkill, but it's effective.  :)

The other methods require tinkering with Coppermine's code in index.php, login.php, and theme.php, and those who were really determined to could still access your photos.

However, if you are looking for a mini-blind of sorts, you could try heavy editing of the index.php and theme.php pages.
"Then, Fletch," that bright creature said to him, and the voice was very kind, "let's begin with level flight . . . ."

-Richard Bach, Jonathan Livingston Seagull

(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fwww.mozilla.org%2Fproducts%2Ffirefox%2Fbuttons%2Fgetfirefox_small.png&hash=9f6d645801cbc882a52f0ee76cfeda02625fc537)

Bruz

Its much easier:

Just open index.php and find:

/**
 * Local functions definition
 */


before, add:

if (!USER_ID) cpg_die(ERROR, 'You need to register to access this page', __FILE__, __LINE__);

Thats it.
(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fwww.kingbruz.de%2FFotos%2Fsignatur_cpg.php&hash=b7bf1fbae41c2d8c534416d10d32fe51619697d7)

get your statistik-hack here

Bruz

I have some problems with my own posting above :D

I'm using the phpbb integration and the code in the index.php which I postet above.
Some of my logged-in users still get the "'You need to register to access this page'"-message..deleting the cookies, re-login - nothing seems to help.
How can I change if (!USER_ID) cpg_die(ERROR, 'You need to register to access this page', __FILE__, __LINE__); to solve this problem?

Thx!
(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fwww.kingbruz.de%2FFotos%2Fsignatur_cpg.php&hash=b7bf1fbae41c2d8c534416d10d32fe51619697d7)

get your statistik-hack here

Casper

Try the solution in this thread, which directs all unlogged users to the login page, where they can login, or register if you allow it.
If not, then no-one else but your users will be able to see your main page.  That is what you want I think.

http://forum.coppermine-gallery.net/index.php?topic=3503
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

Bruz

Yea, thats it!

Thank you a lot casper (again!!)
(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fwww.kingbruz.de%2FFotos%2Fsignatur_cpg.php&hash=b7bf1fbae41c2d8c534416d10d32fe51619697d7)

get your statistik-hack here