Instructions for ZP 1.1+
In order to get it working just take the password.php and album_images files from default-pass and drop them in default.
Open up album_images and fill it with this:
`
<?php while (next_album()): ?>
<div class="album">
<div class="thumb">
<a>" title="View album: <?php echo getAlbumTitle();?>"><?php printAlbumThumbImage(getAlbumTitle()); ?></a>
<a>" title="View album: <?php echo getAlbumTitle();?>"><?php printAlbumTitle(); ?></a>
<small><?php printAlbumDate(""); ?></small>
<?php printAlbumDesc(); ?>
<p style="clear: both; ">
</div>
<?php endwhile; ?>
</div>
<?php while (next_image(false, $firstPageImages)): ?>
<div class="image">
<div class="imagethumb"><a>" title="<?php echo getImageTitle();?>"><?php printImageThumb(getImageTitle()); ?></a>
</div>
<?php endwhile; ?>
</div>
`
add this to the top of your album.php:
`
<?php
if (substr(getAlbumTitle(), 0, 1) == "_" && empty($newwws_password)) $newwws_password = "zen";
/* Check if this is a private album and ask for a password */
$newwws_passwordfile = $themepath . "/" . $theme . "/" . "password.php";
$album_image_file = $themepath . "/" . $theme . "/" . "album_images.php";
if (empty($newwws_password)){
$newwws_authenticated = false;
} else {
$newwws_authenticated = true;
}
$newwws_password_soll = $newwws_password;
$newwws_password_ist = $_POST['newwws_pw'];
if($_COOKIE["newwws_".strtolower(str_replace(" ", "_", getAlbumTitle()))] == "OK") $newwws_password_ist = $newwws_password_soll;
if ($newwws_password_ist == $newwws_password_soll) {
$newwws_authenticated = false;
setcookie ("newwws_".strtolower(str_replace(" ", "_", getAlbumTitle())),"OK",time()+1800, "/");
}
?>
`
and in album.php replace the albums and images DIVS with:
`
<?php
if ($newwws_authenticated){
include("$newwws_passwordfile");
} else {
include("$album_image_file");
}
?>
`