Home > Coding, WordPress > My first WordPress plugin: AJAX Login Widget++

My first WordPress plugin: AJAX Login Widget++

February 22nd, 2009

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/!

David Underhill Coding, WordPress , , ,

  1. December 24th, 2009 at 00:24 | #1

    it gives me this messege: Unknow registration response

  2. December 24th, 2009 at 02:15 | #2

    fixed by removing registration anti-spam check for simple forum.

  3. February 2nd, 2010 at 19:07 | #3

    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.

  4. Wavatar
    David Heffernan
    February 20th, 2010 at 06:36 | #4

    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!!

  5. February 25th, 2010 at 10:15 | #5

    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.

  6. February 25th, 2010 at 10:37 | #6

    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.

Comment pages
  1. No trackbacks yet.