Password protection of a gallery wasn't working for me. It appeared that the text in /password.php was including the newline in text for the password. (In fact, since it uses file_get_contents(), it would include all text in all lines of password.php if there were more than one.)
Anyway, I made this hack in libraries/general.functions.php#password_exists() and it seems to work:
< return strip_tags($password);
> return strip_tags(trim($password)); /// chomp eol in $password text
Interested in knowing if there really is a more correct way for getting this to work?
unfortunately, password protection does not work and it is not documented. it is one of the future (possible) enhancements, if i figure out a safe way to do so without complicating people's lives.
however, i think any attempt you do that works out will be welcomed in the community, and might be useful in a future implementation.
I changed the function of ~/ minishowcase/libraries/ajax.js.
Because the test routine detected L/F of the input password and the error.
Then, it changed as follows.
.....
function setGallery(id, link)
{
///// cut of L/F
id_password[id] = id_password[id].trim();
if (id_password[id] && id_password[id]!='') {
gallery_password = prompt('Password:');
///// gallery_password = prompt('Password:',id_password[id]);
.....
I think that it operates by this well.
may the minishowcase be with you.
Hi guys,
i think i have a solution for the password problem. I have implemented a free javascript, which generates a md5 hash of the password and compares it with the actual password. For me it works!
I can send you the changes i made on the script if you want?!
Sorry for my bad english! I have to thank you for the really nice gallery!!!
hi muebbel, you can send it to me and i'll see if i can integrate it. either attach it to a reply or send it to minishowcase at frwrd dot net. thanks for the support!
Hi,
on the first step open the ajax.function.js, on line 282 replace "gallery_password = prompt('Password:');" with "gallery_password = MD5(prompt('Passwort:'));" (without the quotes). At the end of the file add the code from the attached file.
Second step:
You have to create a password.php in every gallery. Don't write anything in it!
Third step:
Create a "passwort.html" in the galleries directory and insert
Name of gallery:
Name of gallery:
Name of gallery:
in the body.
Then create a pass.php in the same directory and insert:
That's it! I think its simple to implement into your code.