modifying user_login-out plugin

OK since I got the plugin to work now I would like to modify it's layout.

I had a look into zp-core/zp-extensions/user_login-out.php
And find the `printUserLogin_out()` function used in the templates.

I thought to find the markup there but after some digging to my surprise the markup seems written in
zp-core/lib-auth.php with `printLoginForm()`

That means that if I need to reinstall ZP or upgrade my modifications will be lost?

So my question is how can I 'override' this core function?

Comments

  • acrylian Administrator, Developer
    You can change the layout without changing the code...use CSS to change the display on your theme.

    Otherwise yes, you need to re apply all of your changes.

    You will understand that the authentification stuff is core stuff that needs to be fixed, especially with the federated login abilities Zenphoto now has.
  • I should also point out that there is a re-styling of the login form coming in Zenphoto 1.4.2. This should make it easier for you to style it to your theme, but it will also require you to re-style it for that release.

    You can preview this with the DEV nightly builds.

    You can also use the custom theme logon form as from before 1.4.1. But you will need to turn off the error message (see many posts elsewhere on how) This would, of course, not support some of the new security features unless you add them to your form.
  • Just with CSS? Ok I'll try, just didn't really like the form and table elements.

    Anyway, just to understand can that function not be overwritten with filters? "Filters modify the behavior of existing Zenphoto functions.."

    I would like to check out the example-plugins
    http://www.zenphoto.org/category/extensions/example-plugins/
    But get a 404?
  • acrylian Administrator, Developer
    Tables are not bad per se....sometimes they make your life easier.

    You can't "overwrite" functions in PHP. You can make your own custom one probably. Filters let you add things at certain hooks. What these are is documentated on our plugin tutorial.

    http://www.zenphoto.org/news/category/example-plugins
    The slash at the end was the problem (easy to fix if you use the nav on the right). A leftover from times when we used WP for this part of the site.
  • 'll try, just didn't really like the form and table elements.
    Well, I can understand the bit with the table elements. And that will be changing.

    However, if you are opposed to forms you are out of luck. Logins are and always have been handled by processing the $_POST elements cerated by form submissions.

    Anyway, as I mentioned before, you can make your own form if you choose. Re-read the post for details.
Sign In or Register to comment.