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
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.
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.
Has anyone found an easy way of doing this yet?
Thanks
x
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;
}
}`
it only goes to 300 and something.
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.