I am having the same problem as gilou, I do not know where to put the code in step 3.
[b]tdevlin[/b], any news? Simple password creation is keeping me from moving my client's site from Gallery2 (terrible, ugly beast) to zenphoto. Developing themes in Gallery2 shortens your life!
Adding a password input alongside the album at creation isn't hard, but storing and calling the data is what I can't figure out.
I am also looking for this feature. However I have always password-protected my galleries with a .htaccess file (most of you can probably use cpanel for that). I actually have zenphoto installed twice: zenphotopublic and zenphotoprivate
OK, I think I made a little bit of progress using an htaccess & htpasswd solution. My stumbling block right now is how to manage multiple logins/pwds.
Edit: OK, I'm definitely not smart enough for this. Is anyone else willing to develop this? I'll donate money for this functionality - I just need it soon.
@kwanbis-
I have it working on my gallery at http://www.thinkdreams.com/devzen. Make sure you name all the galleries you want to password protect with underscores _. The code you need to add (which may look different in whatever theme you use) is (and this is based on default theme):
`
">
`
What I did was add in the lines miriam mentioned:
``
right above the lines in the default theme that look like:
`
">
`
which generate the thumbnails you see in the album display page. Then just cut n paste the thumbnail code into the "miriam" code shown above (making sure to use proper php script start and end statements (``). Once that's done, it should work fine.
Hopefully that will get you started on the right path.
Oh, and the password is set in the very top of the album.php once you make the code changes. Look for:
$newwws_password = "zen";
at or around line 6 in the album.php.
And if anyone looks at my gallery, the password is bob, not zen. I was experimenting. I chose "bob". Don't know why.
You mean:
open album.php, and look for the code for the thumbnails, in the default, it would be like this:
" title="">
Above the first like of the code in (1), copy the code:
move the code of (1), bellow the lines of (2) that say:
/ place the original thumbs generating code here /
/ or include another php-file with the thumbs-code /
It would end like this:
That looks good, but make sure you put in the proper opening `` for PHP to work properly. Should end up looking like this:
`
">
`
@kwanbis-
You don't need to include the include (ha!). That last include is if you wish to abstract the thumbs generating code into a separate file. Note in my example it doesn't exist, so it is an optional step.
Try that. That's probably why it isn't working.
hi thinkdreams
i was able to follow the instructions but i have one problem that I hope you can help me with. I am never able to see the login screen the cookie gets set and it goes right into the pictures without putting the password. here is how my code looks at the if statement where $newwws_askforpassword gets checked:
`
if ($newwws_askforpassword){
include($newwws_passwordfile);
}
else
{ ?>
" title="">
`
I also put the following line so that you can see what i mean
`
var_dump($newwws_askforpassword); print ""; var_dump($newwws_passwordfile); print "";
`
the link for the page is
http://www.frejol.com/zenphotosec/index.php?album=_caiman
thank you very much in advance
yvan
I'm not seeing anything but an error currently on that page. You might check your code syntax. Something seems to be misplaced.
thanks for the reply thinkdreams,
It must be maybe that i am hosting the zenphoto on a windows server but i changed the underscore for a # on the album folders and it now works. also i changed the code to use the # instead of an underscore
`
`
with an underscore it just does not work, mmmmm and i copied and paste on my sterile theme exactly the same code on the instructions. but anyway I replied just for giving a heads up for anyone encountering the same problem. thanks for the great hack
yvan
Ok, I got that working, nice trick. I just want to mention, that you need to mark subalbums of a private album each one individual as private.
Oh, and the thumbnail of the hidden album is shown to the public, wich is a little pitty, because afaik we are not able to sort and do this stuff on subalbums(?)
geKow