Member
Member
phil_geek   2009-03-14, 15:36
#1

I'm new to zenphoto and I'm interested in using for the clients section of my website. I want to have a login page that simply asks for their username and password and then redirects them to the gallery their able to see. I found the "Zenphoto Single-Login" hack which seemed like exactly what I want, however when someone logs in through that page there's a 404 error because it's pointing to /zenphoto/albums/userdirectory and "userdirectory" doesn't exist. I tried reading the forum attached to the hack but didn't see anything related to my issue. Any suggestions to help me accomplish what I want with or without the hack?

Member
Member
sbillard   2009-03-14, 15:58
#2

Change line 29 of the hack. Leave out the .$album.'/'

Member
Member
phil_geek   2009-03-14, 17:41
#3

great, that worked. does this hack work with the guest login that can be setup for each album?

Member
Member
sbillard   2009-03-14, 18:45
#4

This hack works only for defined "admin" users. I think someone has done a similar thing for guest users, not sure. Do a forum search and see what you find.

Member
Member
phil_geek   2009-03-20, 17:47
#5

Is there a way to change the look of the login fields? For example, I'd like the username and password boxes to be shorter. I know how you do this with fields, but in the hack's code, I don't see a form anywhere. Also, I'd like to replace the normal index page with this login page, but when I do that, it seems to allow the user to login just fine, but then I get the following error:

Too many redirects occurred trying to open “URL”. This might occur if you open a page that is redirected to open another page which then is redirected to open the original page.

Member
Member
sbillard   2009-03-21, 17:06
#6

The form is styled with a DIV, etc. so you can change the CSS. Alternatively you can reporduce the form contents with your own styling. There is not a separate file with just the form.

Member
Member
phil_geek   2009-03-24, 02:33
#7

I searched the single-login.php file and found no DIV tags, and as I said before, I also don't see any form or text box tags in it as well. Can you tell me what line I should be looking at?

Also, how to fix the"too many redirects" error?

Member
Member
phil_geek   2009-03-24, 02:33
#8

I searched the single-login.php file and found no DIV tags, and as I said before, I also don't see any form or text box tags in it as well. Can you tell me what line I should be looking at?

Also, how to fix the"too many redirects" error?

Member
Member
sbillard   2009-03-24, 02:46
#9

The easiest way is to get a login form up in your browser and look at the HTML source. The actual form is basic zenphoto, not part of the plugin.

I really don't know what the too many redirects error is. The only redirect would be after the login back to the original page.

Member
Member
phil_geek   2009-03-24, 02:54
#10

I know how to build a form. So I need to modify zenphotos default login form? Can you tell me where to find that?

I think I must not have done a good job explaining my goal. I'd like to single-login to be my index, so when someone isn't logged in, they are asked to login, then once they login they can see what they are allowed to. Is that possible?

Member
Member
sbillard   2009-03-24, 23:04
#11

The form is generated by printPasswordForm()--called from the plugin. But maybe I was not so clear either. It is generally a bad idea to modify the zenphoto core functions. You will be forever having problems with new releases.

My suggestion was to use CSS styiling to make your changes. If that is not capable of doing what you want you should make your own version of the plugin and replace the printPasswordForm() call with your form. But understand, the login is handled in the very bowls of Zenphoto, so all the form fields in your version. must be as in the original.

Member
Member
phil_geek   2009-04-21, 15:29
#12

Is there a way to make the Single Login page live one directory above the zenphoto directory? when I try it I get a 404 error because it's looking for the zen-core directory in the wrong place.

Member
Member
sbillard   2009-04-21, 16:47
#13

http://www.zenphoto.org/2008/01/hacks/#zenphoto-single-login is the only thing I can think of.

Member
Member
phil_geek   2009-04-21, 20:27
#14

Yeah I saw that, that's where I got the script from. However there's no documentation for changing the location outside of the zenphoto directory. I tried both of the following and either worked:

Member
Member
sbillard   2009-04-21, 21:15
#15

Maybe you did not understand the text there. It says you must have this single_login.php script in the zenphoto folder root.

The script you create (that your users are pointed to) can go anywhere , it consists of just `` in that script.

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.