Author Topic: Protecting selected albums  (Read 1215 times)

0 Members and 1 Guest are viewing this topic.

Offline zorz

  • album.pl Donor
  • album.pl Tester
  • **
  • Posts: 24
  • Karma: +0/-0
  • XAKEP
    • Destination: Zorz
Protecting selected albums
« on: February 25, 2003, 01:20:00 »
I'm new to this cool script and moving forward in implementing it on my site. I stumbled across a sad fact - we can password-protect entire album (root directory for all pics managed by album.pl) but can we selectively protect separate folders (albums) within the main one? In other words, to have some albums public and others - private, yet all managed by the script?

I tried protecting private folder within root using .htaccess but it was half-successful. While pictures and thumbnails are not visible (instead - empty X spaces), entire HTML page - is, including layout, comments, etc. This is obvious to me - script is located in a different folder, uneffected by .htaccess.

Has anybody worked a way around it?
Ed

Join my web project! Use my site, develop your ideas, pay nothing! Read more:
http://www.zorz.net/cgi-bin/YaBB/YaBB.cgi?board=partner

My photo album:
http://www.zorz.net/cgi-bin/AlbumPL/album.pl

Offline Mike Bobbitt

  • album.pl Author
  • Administrator
  • I Spend Too Much Time Here
  • *****
  • Posts: 3381
  • Karma: +35/-2
    • Mike's Development Archive
Re:Protecting selected albums
« Reply #1 on: February 25, 2003, 07:39:40 »
Hi Ed,

There is a way! :)

Basically, if you drop a copy of album.cfg into an album, that config will take effect for just that album. I recommend using a stripped down config: delete all the items except the ones you want to "override" on this album.

For an example of how to do this, see the following post:

http://perl.bobbitt.ca/yabbse/index.php?board=7;action=display;threadid=435

So in a nutshell, you could drop a new album.cfg into the album you want to protect that has:

authentication_type=1
protect_album=1
auth_db=/home/user/new_auth_db.txt

And that would allow only users specified in your "new_auth_db.txt" to have access to that album.

Hope that makes sense.

Offline zorz

  • album.pl Donor
  • album.pl Tester
  • **
  • Posts: 24
  • Karma: +0/-0
  • XAKEP
    • Destination: Zorz
Re:Protecting selected albums
« Reply #2 on: February 25, 2003, 10:36:40 »
Mike,

I'm amazed. Not only did you develop such a nice script AND constantly work on its improving, but also provide such a caring and dedicated support! I've seen so many replies of yours here! You are definitely a devoted developer.

I'm afraid to open a can of something here, but having this sort of service for free is a blessing for a web developer. Thank you for being so generous. Yet, I feel obliged to thank and support you. I've just sent you $5.

Peeps, he deserves it!
Good luck!
Ed

Join my web project! Use my site, develop your ideas, pay nothing! Read more:
http://www.zorz.net/cgi-bin/YaBB/YaBB.cgi?board=partner

My photo album:
http://www.zorz.net/cgi-bin/AlbumPL/album.pl

Offline Mike Bobbitt

  • album.pl Author
  • Administrator
  • I Spend Too Much Time Here
  • *****
  • Posts: 3381
  • Karma: +35/-2
    • Mike's Development Archive
Re:Protecting selected albums
« Reply #3 on: February 25, 2003, 11:29:20 »
Thanks for the support zorz!

I know what it's like to struggle with someone else's script and never hear back when you ask a question, so I try to help out if I can.

Cheers