Hidden or Private Albums

I don't think this has been covered before but.....

I have a photographer who wants to show his photo's to his customers for them to choose which they would like to order. The trouble is some of his clients would not like the general public being able to view some of photo's like studio shots or wedding photo's for example.

What I would like to be able to do is make an album hidden when uploading so that the only public access would be through the friendly url that he would inform his client of. The photographer would email this url to the client and the album would funciton the same in every other way but simply not be listed on the main zen photo index.

How easy would this be to do? I am more a designer than developer, though am not afraid to get my hands dirty if nessesary. Can anyone point me in the right direction?

Thanks

Comments

  • I am thinking adding a checkbox to the upload screen for 'Make this folder hidden or private'. This in turn would add a 0 or a 1 to a 'hidden' field in one of the tables on creation of the album.

    The next bit is where I am struggling. Getting or adapting the next album function to ignore albums that have been marked with a 1, I am not sure about.
  • I think this is a good idea. I am a photographer and once my Zenphoto gallery goes online I foresee that a lot of my subljects will want to see their pictures (online proofing) before a final print. In that stage they will want a secure area to view these proofs. I tried .htaccess password protection on the album folder but it does not work with all themes. So someone out there, is there a way?
  • trisweb Administrator
    Certainly a good idea, yeah...

    You're right about the "hidden" checkbox, and the table, that's the easy part.

    The next part's pretty easy too. In template-functions.php, you have to find the next_album loop. In there, do a check on the hidden flag, and if it's set, just go to the next album. That's definitely the easiest/best way to do it. Let me know if you need more help.
  • Did anyone do this an documented their change ?
  • I am a web designer who happens to be building a photographers website, and he very much needs a gallery with private client galleries as well. Actually several of my clients require this feature. however, i need not the bloated functionality of say... gallery or coppermine, and find zenPhoto attractive. I can't get the htaccess file working at all, any help would be keen.
  • I'm using ZenPress with my gallery and wanted a hidden album where I could slap all my odd pics that might pop up in blog posts but aren't exactly interesting enough to be in the photo gallery. Y'know... new shoes, someone's dog that looked cute lol that kinda one-off stuff.

    Has anyone found an easy way of doing this yet? :o) I only need to hide one gallery so if there's a manual way of doing it I can dig in. It would just save a whole lot of thumbnail making...

    Thanks
    x
  • Needed som kind of guestbook so I made a little hack. This will hide some albums if you're not logged in but you can still point your browser to them like yoursite.com/zen/hidden_album or yoursite.com/zen/hidden_albumdir/hidden_image.jpg

    Add an array in your zp_config.php with the dirs you want to exclude:
    `$custom_exclude=array("guestbook");`

    Then a small change in classes.php. On row 785 you'll find a function called loadAlbumNames(), add this in the beginning:
    `function loadAlbumNames(){

    // excluded albums

    global $custom_exclude;

    //only exclude if we are not logged in

    $custom_exclude=zp_loggedin()?array():$custom_exclude;`

    and change the if statement in this loop:

    `while ($dirname = readdir($dir)) {

    if (is_dir($albumdir.$dirname) && substr($dirname, 0, 1) != '.' && !in_array($dirname,$custom_exclude)) {

    $albums[] = $dirname;

    }

    }`
  • enj Member
    recco would u elaborate....the versions have changed and I dont see a line 785 in classes.php
    it only goes to 300 and something.
  • acrylian Administrator, Developer
    It is not recommended to hack core files, since you would have to do it again with every update.
  • Just reading this after creating my ticket (#588) for name/password per album. This sounds like similar rationale. The photographer could grant the user a name/password to access the 'private' albums, which is what my feature request is all about :) Casual visitors can not see them.
  • The above code (which is for a very old version of zenphoto) has the same effect as the publish option that now exists. Each album may be marked as not published. If it is so marked only admins logged in can view it.

    So, enj: no need to hack the current version of zenphoto, just use its features.

    You can also assign passwords to albums so that while someone can know they exist, they cannot view them unless they know the password.

    The combination of the two makes it so the viewer must know both the URL and the password to view the album.
Sign In or Register to comment.