I've modified the newws password code to offer a password per album from the database. Also instead of using a cookie to persist a session, I'm a using PHP session variable.
1) Add a text column to the albums table called album_password
2) Replace code in the album.php with the following
/* Start of Private Password for Albums */
$albumtitle = getAlbumTitle();
$albumpwd=query_single_row("SELECT DISTINCT album_password FROM zen_albums where title = \"$albumtitle\"");
$pvt_password = $albumpwd['album_password'];
/* $pvt_password = "fstop"; */
$pvt_passwordfile = $themepath . "/" . $theme . "/" . "password.php";
$album_image_file = $themepath . "/" . $theme . "/" . "album-images.php";
$pvt_password_post = $_POST['pvt_pw'];
session_start();
if (!empty($pvt_password)){
if ($pvt_password == $pvt_password_post) {
$_SESSION['pvtsess'] = 1;
$pvt_authenticated = false;
}
if (!isset($_SESSION['pvtsess'])) {
$pvt_authenticated = true;
} else {
$pvt_authenticated = false;
}
} else {
$pvt_authenticated = false;
}
/* End of Password for Private Albums */