Page 1 of 1

I'ved modified event/plugin_loginform

Posted: Thu Aug 21, 2008 2:36 am
by vdudman
Hi

I wanted to be able to control which page is displayed after you've logged in or out. So have added a field to each of the event and login form plugin.

I've put a tar file at http://www.hospodaripomahajihospodarum. ... inform.tar

Neil

p.s If login fails it still redirects you... in my own app that login_url is only viewable if you are logged in, so not so much of a problem. I couldn't work out how to fix this if its possible.

Re: I'ved modified event/plugin_loginform

Posted: Thu Aug 21, 2008 10:38 am
by garvinhicking
Hi!

Hm, the sidebar plugin references a $lougout_url which does not get set anywhere in code. So i removed that, and also removed in the event plugin some other references to not existing variables. Also, I made the URLs needed to be entered absolute (via http://blabla) so that the users have more flexibility to which page they want to redirect.

You can check out the commit I made in CVS:

http://php-blog.cvs.sourceforge.net/php ... p?view=log
http://php-blog.cvs.sourceforge.net/php ... p?view=log

Thanks a lot for your contribution, maybe in the future you have even more things to add. If possible, for the next patches, you could try to use 4 spaces instead of tabs for indenting the code, and also always use { and } indention even if optional, for better readability and so that it matches our coding guidelines. :-)

Best regards,
Garvin

Posted: Thu Aug 21, 2008 4:15 pm
by vdudman
Hi!

>Hm, the sidebar plugin references a $lougout_url which does not get set >anywhere in code. So i removed that, and also removed in the event >plugin some other references to not existing variables.
Sorry about that :) I origionally only modified the sidebar plugin but found the even plugin also did redirection to homepage so moved the logout_url to the event plugin and didn't clean up.

>Also, I made the URLs needed to be entered absolute (via http://blabla) >so that the users have more flexibility to which page they want to >redirect.
I wanted to do that but thought it wouldn't work, that they need to reload the index.php etc.. I didnt' understand exactly how the login/out worked. But your change is great.

>Thanks a lot for your contribution, maybe in the future you have even >more things to add. If possible, for the next patches, you could try to use >4 spaces instead of tabs for indenting the code, and also always use { >and } indention even if optional, for better readability and so that it >matches our coding guidelines. Smile
Will do... thanks

Best regards
Neil

Posted: Thu Aug 21, 2008 4:16 pm
by judebert
Wow, it's nice to have more developers around! Thanks for the contribution, and we hope to see more from you in the future!