My first WordPress plugin: AJAX Login Widget++
Today I decided that did not really like the how WordPress handled user logins. Whenever you want to login, it whisks you away from what you were reading and onto a very empty login page. Once you have logged in, in tends to whisk you off somewhere new. Worse, when you logout it again takes you away from the page you were on to show you a blank login page. Thus I headed back to the WordPress plugins directory in search of something better.
What I found was a nifty plugin named AJAX Login which (surprise) used AJAX to handle almost all login processing within the page the user was on. Unfortunately, it had not been updated in over a year and was no longer compatible with the latest version of WordPress. Thus I started hacking on it and ended up making a number of improvements to its UI and how it handled AJAX calls. Anyway, I decided to package it up as a new plugin — you can get the plugin and read all the details about what it does here.
Its official location in the WordPress plugins directory is at http://wordpress.org/extend/plugins/ajax-login-widget/!
it gives me this messege: Unknow registration response
fixed by removing registration anti-spam check for simple forum.
I’m using this code (which is great), but I set it up so that you can register within the thickbox, too. However, when a user registers, they are taken away from the page they were on and set to the wp-login.php. Any suggestions on how I can get them sent back to the same page they were just viewing and then be prompted by the thickbox to login.
Any ideas?
http://www.bouncingbackfromloss.com/bbfl/blog/
Visiting the page will automatically trigger the thickbox if you’re not logged in.
@deadnick
Is there a function I can call to use this instead of having it in the sidebar as a widget?
Looks like just what I need, but I’m not using sidebars. Need it inthe header
The plug in worked great until I upgraded to WP 2.9.1. Now there are issues:
1. When I click “log out”, instead of reloading whatever page I’m on or redirecting me back to the blog home page, it sends me to a 404 page not found error page. This is duplicated no matter which account I log in under.
Log out from the admin functions normally – it’s just logging out through the plugin that is an issue.
2. Attempts to register new accounts are met with a pop up error message: “Unknown Registration Response”. Registration was attempted with 2 made up user names with 2 different email accounts. Both resulted in the same error message and no registration email is sent.
3. Lost Password/Reset Password remains functional. No issue there.
Can you assist with a fix?
I think there’s a bug in the code which builds the log out link.
It says:
wp_logout_url(‘/wp-login.php
If you blog doesn’t live at the root of the domain then this link doesn’t work. For example if your blog is at http://example.com/blog/ then it will fail.
I think the simple fix is for the above code to say:
wp_logout_url(‘wp-login.php
Thanks a lot for the excellent plug-in!!
Hey David,
Thanks for the tip – I’ll give that a try and see if it resolves the issue and report back. Although in my situation, the log out functionality has worked just fine until I upgraded to WP 2.9.1, even though my blog has never lived at the root of the domain.
I LOVE this plugin and really want it to work.
Hi David,
I don’t have that line of code in any of my plug in files. Anyway, since registration has also been affected, I really think something in the new version of WP broke the plugin, rather than the plug in having a bug in the code – because as mentioned earlier…this worked fine for me until I upgraded to the new WP version (at the time 2.9.1 and more recently 2.9.2) even though my blog has never been on the domain root.
Thanks for your help though. Hopefully Mr. Underhill will take a look at it soon and post a fix.
Hi David,
I am getting a “Stack overflow error at line: 10″ error message in a dialog window when your plug-in is activated. It does not matter if I use the widget or not. I have disabled all other plugins for testing but I get the same error. I use IE8. In Chrome I don’t get a message but registration or login does not work in either of them.
When I change the theme to the default, things work somewhat, but when loggin out I get a 404…sigh
Here is an error report from IE
Webpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.04506.648; .NET CLR 1.1.4322; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)
Timestamp: Thu, 4 Mar 2010 11:01:52 UTC
Message: ‘alw_registerForm.user_login’ is null or not an object
Line: 62
Char: 2
Code: 0
URI: …/wordpress/wp-content/plugins/ajax-login-widget/ajax_login_widget.js
Message: ‘alw_loginForm.log’ is null or not an object
Line: 40
Char: 2
Code: 0
URI: …d/wordpress/wp-content/plugins/ajax-login-widget/ajax_login_widget.js
Any idea?
Cheers
Meini
hi
Please take a look a http://www.affinitiworx.com your login widget is being used in the top right of the masthead. For some reason when a login is attempted a pop appears stating “unknown login response”. Now the user does get logged in but unless they click on a menu link they wouldn’t know it. I looked at your FAQ on the WordPress plugin page but I don’t have a start.php file in my themes and I am not sure exactly which ‘…’ tags you are refering to.
I would appriciate a response as soon as possible, preferably to my email, which you now have on file.
Many thanks
Jon
PS: I removed the captcha code requirement from the 2 contact forms on the site and still didn’t work. I noticed from other posts that an anti spam method may be the reason.
Hi! What’s about CAPTCHA? (ex. re-captcha)
Hi David,
i like the plugin , but the validation form’s alert most of the time is empty, without any messages
how can i fix it , i have already added few condition in ajax_login_widget.js , but i’m still getting the empty alert,sample when the user already exist in the db or username and pwd are wrong ect…
any help will be really appreciated. Thanks
I really love this plugin but i have an issue that is bothering me alot. When people registrate, it says: Please check your email for your password. But my subscribers never gets an email? How can i fix this? Thank you for your response.
Hi David,
Love the plugin. Question – I need to collect user info when they register, what’s the best way to do this with your plugin? Can I change the code so when they click Register it redirects them to the standard WP login page?
Thanks!
javy
Hi David,
When I login, I get “Unknown login response”. Please help me to fix this bug.
hello, love the plug-in…trying to add it to a wordpress page…tried to add it in the html tab as a code? could you help with this…i also currently have it in my sidebar, can you run 2 instances of it on the same page?
I implemented this login/register plugin but am wondering why the login fields are uneven. I am currently using the latest version of WP and when I installed the plugin, WP said that this plugin has not been tested on the version of WP that I am using. Also is there a way to write the code into a sidebar instead of a widget?
Thanks , its a good login widget. But i got some problems with it.
Its not working fine with internet explorer . Its creating problems with desgin issues. Its working fine with firefox. how can i make it work fine with IE versions.
Hope to hear something back.
Hey everybody,
Here is a good fix for anybody having a problem with the log out url giving that “WordPress Failure Notice” page…
In this file:
ajax-login-widget/alw_template.php
Fix the log out url line to this line here:
(<a href="”>log out)
This is set to redirect them to the sites homepage, but you could easily substitute whatever dynamic or hardcoded url in there…
Josh
sir i used AJAX Login Widget++, it was work properly last 5 months but now registration is not working properly so please suggest me if it was work what is possibility of create a problem i did not change any code..
http://gogos.clients.intdev.co.za/
Hi,
Why the logout process always redirect us to the wp logon page?
Is there any way to go back to the home page after the logout action ?
Thanks
Hi David,
I’m very new to this. Your readme file says the widget is easily customizable with CSS. There are no CSS files in you widget; is there a list of elements somewhere that I can refer to to style AJAX Login ++?
Whatever help you can provide would be greatly appreciated ==
ransomcat
Is this plugin still alive?
I’ve been fiddling with this plugin and I think the logout problem is a bug. The intent was to redirect to the referring page, but it creates a malformed URL. Also the reason why you don’t get the right CSS styling is it doesn’t call the standard $before_widget, $after_widget stuff. I have fixes for both, and also a more table-like template file.
Are you accepting patches?
Mike
Hi David,
This plugin/widget works wonderful for me.
I have three customizable areas where I need to use the widget. Unfortunately it seems I can only use one instance.
Do you have any guidance on how I can use it in all three areas?
Regards
Cor
Great plugin
Thanks alot!
Hi, love this little plugin, I have it working on my site http://www.mark-sunter.com I’ve re-syled it into a one line form and put it in a nice slide down box. I also fixed the bug for log out redirect. I was just wondering if you know of any way for this plugin to work with “Peters login redirect” found here http://www.theblog.ca/wplogin-redirect you might know a quick fix that I dont
best regards, Mark
@Mark Sunter
Cool. Would you mind sharing the patch for the bug you fixed?
Great plugin
Thanks alot!