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.
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.
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.
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!
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
Yea, thats it!
Thank you a lot casper (again!!)