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: [Solved]: Hide albums from Anonymous Users  (Read 3283 times)

0 Members and 1 Guest are viewing this topic.

allabout

  • Coppermine newbie
  • Offline Offline
  • Posts: 1
[Solved]: Hide albums from Anonymous Users
« on: November 07, 2003, 07:44:50 pm »

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.
Logged

hyperion

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Posts: 1317
  • - retired -
[Solved]: Hide albums from Anonymous Users
« Reply #1 on: November 08, 2003, 02:51:00 am »

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.
Logged
"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://forum.coppermine-gallery.net/proxy.php?request=http%3A%2F%2Fwww.mozilla.org%2Fproducts%2Ffirefox%2Fbuttons%2Fgetfirefox_small.png&hash=9f6d645801cbc882a52f0ee76cfeda02625fc537)

Bruz

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 54
[Solved]: Hide albums from Anonymous Users
« Reply #2 on: February 23, 2004, 02:01:46 pm »

Its much easier:

Just open index.php and find:

Code: [Select]
/**
 * Local functions definition
 */


before, add:

Code: [Select]
if (!USER_ID) cpg_die(ERROR, 'You need to register to access this page', __FILE__, __LINE__);

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

get your statistik-hack here

Bruz

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 54
[Solved]: Hide albums from Anonymous Users
« Reply #3 on: February 24, 2004, 08:12:14 pm »

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
Code: [Select]
if (!USER_ID) cpg_die(ERROR, 'You need to register to access this page', __FILE__, __LINE__); to solve this problem?

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

get your statistik-hack here

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
[Solved]: Hide albums from Anonymous Users
« Reply #4 on: February 24, 2004, 08:42:33 pm »

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
Logged
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

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 54
[Solved]: Hide albums from Anonymous Users
« Reply #5 on: February 24, 2004, 08:50:54 pm »

Yea, thats it!

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

get your statistik-hack here
Pages: [1]   Go Up
 

Page created in 0.028 seconds with 18 queries.