Author Topic: passwords on subfolders  (Read 3461 times)

0 Members and 1 Guest are viewing this topic.

Offline freediver

  • album.pl Tester
  • **
  • Posts: 27
  • Karma: +0/-0
    • OzPolitic
passwords on subfolders
« on: January 21, 2008, 00:28:52 »
I would like to set up a subfolder so that it is hidden from the public and requires a password to view the subfolder and any files and sub folders within it. What is the easiest way to set this up? I would want to be able to stop people gaining access by typing in the URL directly, eg:

http://ozpolitic.com/album/

I also saw in the FAQ that it is possible to view a slideshow and add watermakrs. How do I do that?
Founding member of

Offline Mike Bobbitt

  • album.pl Author
  • Administrator
  • I Spend Too Much Time Here
  • *****
  • Posts: 3381
  • Karma: +35/-2
    • Mike's Development Archive
Re: passwords on subfolders
« Reply #1 on: January 22, 2008, 14:51:59 »
Hi freediver,

You might be able to set per-sub-album passwords by using a local album.cfg, placed in that sub-album. For example, see this note on how to change the sort order per album:

http://dev.bobbitt.ca/forums/index.php/topic,380.0.html

The same idea holds for the passwords. Having said that, it may not work for all cases... you may be able to browse into the album using the droplist album selector (for example) so give it a thorough test before you trust it.

Here's a post on watermarking (using post upload processing):

http://dev.bobbitt.ca/forums/index.php/topic,566.0.html

And for slideshows, have a look at the ways you can invoke a slideshow by clicking a specific URL:

http://dev.bobbitt.ca/forums/index.php/topic,524.0.html

Once you find the one you want, you can easily add this to your template to show it on every page, if desired.


Cheers
Mike


Offline freediver

  • album.pl Tester
  • **
  • Posts: 27
  • Karma: +0/-0
    • OzPolitic
Re: passwords on subfolders
« Reply #2 on: January 22, 2008, 16:06:02 »
Thanks. I ended up creating a new album folder elsewhere. I think that is easier. I copied and renamed the album.pl file and the configuration file and pointed the new album.pl at the new config file by changing one of the first few lines. Then I configured it as normal to point to the new directory. Have I done anything silly there?

I've got an album password on the album and another one on the folder with the images, so you have to login twice to view via the album. The album software is able to get the filenames out of the folder for some reason even if you haven't entered the .htaccess password.

How 'hackproof' is this?



I found the slideshow option in the config settings, but that makes it a slideshow by default which is a bit annoying. I'll check that link.
« Last Edit: January 27, 2008, 18:20:15 by freediver »
Founding member of

Offline freediver

  • album.pl Tester
  • **
  • Posts: 27
  • Karma: +0/-0
    • OzPolitic
Re: passwords on subfolders
« Reply #3 on: January 22, 2008, 22:37:33 »
I just tried on a different PC and it didn't ask for the album password, only the .htaccess password. I checked the config file and couldn't see an obvious cause.

EDIT - I fixed this by turning off authentication (authentication_type = 0). However I would like to be able to use the album password and the authentication at the same time. Is this possible? I can't move the files around without authentication, even if I set default_admin to all.
« Last Edit: January 22, 2008, 23:28:32 by freediver »
Founding member of

Offline frister

  • album.pl Donor
  • album.pl Hacker
  • ****
  • Posts: 230
  • Karma: +42/-0
  • half baked ideas are better than none
    • fristersoft travelogue
Re: passwords on subfolders
« Reply #4 on: January 24, 2008, 21:05:31 »
Instead of using passwords on sub-folders, I did it by setting membership levels for the sub-folders: owner, full member, junior member, guest
(On my site they're labeled owner, family, friend, anyone)
These choices appear whenever I create or edit any folder and photo.
If, when you are logged in as the administrator, and you try to create an album or edit descriptions, you can see the "Who can view this photo" pulldown, then you can use this approach.

Offline freediver

  • album.pl Tester
  • **
  • Posts: 27
  • Karma: +0/-0
    • OzPolitic
Re: passwords on subfolders
« Reply #5 on: February 05, 2008, 06:33:07 »
Where are the file names stored? The htaccess security doesn't seem to stop the viewing of the file names. The actual pictures and thumbnails themselves are blocked. I thought maybe they are kept in the cgi bin directory and I should move the relevant file in with the images. Hope I'm not getting out of my depth.
Founding member of

Offline Mike Bobbitt

  • album.pl Author
  • Administrator
  • I Spend Too Much Time Here
  • *****
  • Posts: 3381
  • Karma: +35/-2
    • Mike's Development Archive
Re: passwords on subfolders
« Reply #6 on: February 09, 2008, 16:27:52 »
Sorry, which file names do you mean? The file names for the photos? Those are just picked up each time you run album.pl... it scans the album dir to see what's there.

Offline freediver

  • album.pl Tester
  • **
  • Posts: 27
  • Karma: +0/-0
    • OzPolitic
Re: passwords on subfolders
« Reply #7 on: February 11, 2008, 03:09:43 »
Yes I mean the photo file names. I'm trying to figure out why it shows you the file names on the thumbnails (but not the actual images) before the htaccess popup appears.

Maybe I should just move the pl file into the same folder as the photos. Is that easy to do?
Founding member of

Offline Mike Bobbitt

  • album.pl Author
  • Administrator
  • I Spend Too Much Time Here
  • *****
  • Posts: 3381
  • Karma: +35/-2
    • Mike's Development Archive
Re: passwords on subfolders
« Reply #8 on: February 12, 2008, 20:26:10 »
The filenames are read by the script, so it bypasses the .htaccess, which is only invoked when the image itself is displayed to the user. I don't think you can use .htaccess to hide the names from a user, unfortunately.