02 Aug

Login With Ajax

Description

Login With Ajax is for sites that need user logins and would like to avoid the normal wordpress login, this plugin adds the capability of placing a login widget in the sidebar with smooth AJAX login effects.

Some of the features:

  • Login without refreshing your screen using AJAX calls.
  • Password retrieval now available within the widget.
  • Compatible with Wordpress, Wordpress MU and BuddyPress.
  • Will work with forced SSL logins.
  • Customizable, upgrade-safe widgets.
  • Redirect users to custom URLs on Login and Logout
  • Redirect users with different roles to custom URLs
  • shortcode and template tags available
  • Fallback mechanism, will still work on javascript-disabled browsers
  • Widget specific option to show link to profile page

If you have any problems with the plugins, please visit our support forums for further information and provide some feedback first, we may be able to help. It's considered rude to just give low ratings and nothing reason for doing so.

If you find this plugin useful and would like to say thanks, a link, digg, or some other form of recognition to the plugin page on our blog would be appreciated.

Download

Requires At Least : 2.7
Test Up To : 2.8.6
Current Version : 2.0.4
Download latest version

Installation

  1. Upload this plugin to the /wp-content/plugins/ directory and unzip it, or simply upload the zip file within your wordpress installation.

  2. Activate the plugin through the 'Plugins' menu in WordPress

  3. If you want login/logout redirections, go to Settings > Login With Ajax in the admin area and fill out the form.

  4. Add the login with ajax widget to your sidebar, or use loginwithajax() in your template.

  5. Happy logging in!

Frequently Asked Questions

How do I use SSL with this plugin?

Yes, see the notes section.

Do you have a shortcode or template tag?

Yes, see the notes section.

For further questions and answers (or to submit one yourself) go to our support forums.

Screenshots

screenshot-0

Add a login widget to your sidebars. Widget html is fully customizable and upgrade safe since they go in your theme files.

screenshot-1

Smoothen the login process via ajax, avoid screen refreshes on login failures.

screenshot-2

If your login is unsuccessful, user gets notified without loading a new page!

screenshot-3

Customizable login/logout redirection settings. Control where users get directed to after login or logout (applicable to normal wp-login pages too).

screenshot-4

Choose what your users see once logged in.

Changelog

1.1

  • Fixed JavaScript for http to https support
  • Added shortcut tag loginwithajax()

1.11

  • Fixed regular expression issue

1.2

  • Fixed redirection issue
  • Added link to wp-admin profile page when logged in to default widget template

1.3

  • Fixed widget template $before_widget... variables being used with shorttag and template tag functions
  • Added JSON encoding compatability for PHP4
  • Fixed bad link for non root hosted sites in template
  • Added forgot password widget
  • Added redirect capability based on user roles
  • Fixed template locating to handle child themes
  • Added Shortcode

1.3.1

  • Small bugfix on admin page if newly installed. Changes also made to the 1.3 tag

2.0

  • Made plugin widget available as multiple instances (using new 2.8 Widget API)
  • Profile login link now controllable at widget level
  • Fixed bug where shortcode only appears at beginning of posts
  • Other Small Bug fixes

2.0.1

  • Removed unnecessary locate_template call in admin class initialization.
  • Resynching SVN with trunk.

2.0.2

  • Fixed bad link to profile in default widget_in.php template

2.0.3

  • Fixed loginwithajax function so it echoes correctly.

2.0.3

  • Changed short opening tag

Support

Visit our support forums

If you liked this post, why not share it?

  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Reddit
  • RSS
  • StumbleUpon
  • Technorati
  • Twitter

Related Posts

  • Digg This Button
  • Remove BuddyPress AdminBar Plugin
  • Meta Tag Manager
  • Localhost Notify
  • Twitter Goodies Widgets
  • Ben
    I receive this error when using your plug in on the newest version of WP

    Warning: preg_match() [function.preg-match]: Unknown modifier '.' in /webroot/b/i/biolo001/benandcate/www/wp-content/plugins/login-with-ajax/login-with-ajax.php on line 131
  • Hi Ben,

    Thanks for pointing that out. It's been fixed now and the update was just checked in. It should show up in the wordpress repo in about 15 minutes.
  • thanks for you :)
  • Charles
    Same error on logout with the latest version and also reported here:
    http://wordpress.org/support/topic/297310
  • Strange... the preg issue was fixed on mine.

    I've made some further changes to it and it should definitely not give that error anymore. The login redirecting wasn't working for the widget either, so that's fixed too. Please make sure you upgrade to the newest version 1.2.

    Thanks for pointing that out Charles.
  • reverend gene
    Does not work

    Sorry all I get is an error code and I had to rename the directory to use the site at all

    I am a full time missionary using other peoples computers and asked not to fill out forms on line
    You have no email shown
    and Whois is block

    So I had to make a fake email below
  • I need more specific information on the problem to be able to help you. what's the error code?
  • reverend gene
    Also
    I do not blog or forum or . . .
    and there is no contact information on WP

    So how does anyone get a hold of you?
  • Well, for now this comment form seems to work :)

    We're intending on putting a contact form up asap. If you leave your real email next time I could get back to you directly.
  • dansss
    If my blog don't use the widgets, can I use this plugin through pasting the code?
  • Yes, you can do this. I created a tag called login_with_ajax() which you can use.

    One temporary niggle, the default template is geared as a widget, so it uses the widget wrapper. The fix is quite easy, though. You should copy the widget folder contents (not the folder itself) to your theme directory under plugins/login-with-ajax/ and edit the template widget_in.php and widget_out.php files to suit your site.

    So if your theme was called mytheme, it would be located at /wp-content/themes/mytheme/plugins/login-with-ajax.
  • dansss
    Thanks, it's really useful plugin for me
  • dansss
    I have copyed the contents of login-with-ajax floder to the theme floder, them pasted the tag in sidebar file. but the page show me these words: Fatal error: Call to undefined function login_with_ajax(), I wonder whether you could help me solve this problem. Thanks a lot.
  • Are you updated to version 1.2, and is the plugin activated? The function is there so you shouldn't be getting those errors.

    Also you'd want to call it like so to avoid fatal errors like the one you have:
    <?php if( function_exists('login_with_ajax') ) login_with_ajax(); ?>
  • dansss
    I uploaded the plugin to the plugin folder. also built new folders named plugins, login-with-ajax in the using theme folder. then uploaded the files in login-with-ajax plugin to floder login-with-ajax, then paste the code in the sidebar.php and active the plugin, update setting. but I still didn't see any changes happened on the homepage. I am sure the plugin has been actived. its widget existed in widget setting.
  • You need to move the files in the widget folder (not the widget folder itself) to the plugins/login-with-ajax/ folder in your theme folder.

    However, that shouldn't affect the login page showing up (or not in your case). You mention the widget appears in the widgets admin page. Can you get that to work?
  • Hi i have a theme with no widgets and i've done everything described here. I see the login information with avatar when i'm logged in, but when logged out i don't see a login form. What am i doing wrong?
  • From the sounds of it you must have not moved all the files over, or there might be an HTML issue if you changed the content in the widget_out.php file.
  • comawhite
    Hi !
    firstly.. awesome ajax plugin!..really :D

    Here's my problem...
    - login widget is at the side bar
    - i AM logged in
    - I want to see an Admin link ( you know, a link to the dashboard )

    - all i have right now is a Log out link

    *How do I get the admin link to show up on the widget?


    thanks
  • Check out the new version 1.2, there is now an option in the admin settings to add a profile link.

    Alternatively you can also edit the template and add whatever links you want. See the notes for details on modifying the template so it's upgrade-safe
  • comawhite
    Oh my...thanks a bunch....

    Was using 1.1 all this while...

    guess you haven't updated the wordpress plugin page with your new plugin
  • Mac
    Hello - I like this widget. Simple, but effective. Do you know how to now get rid of the default login that comes with Buddy Media, since you've replaced it?
  • Thanks Mac. By buddy media, do you mean buddypress?

    Not sure which login you mean either... if you're referring to the admin bar on top, I also have a plugin for that, check it out : http://netweblogic.com/wordpress/plugins/remove...
  • Mac
    Sorry - yes buddypress My bad... By login, I don't mean the gray buddypress bar across the top, which I think this plugin removes. I mean the yellow row, which has the user/pass fields - and subsequent username/logout once you've logged in. Since you're essentially replaced that functionality, I was trying to avoid having it in two places.
  • Mac
    Sorry, and one more question. Widget-wise, can you add the Login with Ajax widget in more than one column? Seems that once I place it in one column, it is then no longer available to put it in another column. The reason for this is that the three main columns show on the homepage, but once you get past the homepage, the only column that shows on my site is the blog-sidebar - so I need it there for most pages, but on one of the main columns for the home.
  • I believe the login you're referring to is the buddypress default theme login. You'll have to change your theme to get rid of it. The login will still work on the sidebars.

    I know what you mean about the multiple widgets. I will convert the widget to a compatible 2.8 format which allows multiple widgets in the next version.
  • wal
    Just occured to me that I was simply putting in "login_with_ajax()" whereas I needed to wrap it as such: "<?php login_with_ajax(); ?>". That may settle some of the issues that people are experiencing ;)
  • Chuck
    The login button isn't working for me. I click it and I get absolutely nothing happening. I tried changing the button name to "submit" instead of "wp-submit" and it didn't work either way.
  • Sounds like a Javascript error (check that your javascript is enabled for your browser?). Probably a conflict between different plugins. Have you tried deactivating other plugins? I'm betting that will help pinpoint the problem.

    Also, if you can tell me the browser you're using.
  • Chuck
    Here's the error that I get:

    Fatal error: Call to undefined function: json_encode() in /wp-content/plugins/login-with-ajax/login-with-ajax.php on line 72

    The only two other plugins that I have running are WP-CMS Post Control and WP-reCAPTCHA. I'm using Firefox, but it doesn't work in IE either.
  • Ah, ok I see what went wrong. You need php5 in order for json_encode I believe. There is a way of doing json_encode in php4. I'll add that for backwards compatability in the next version of the plugin.
  • mirandapieron
    Hi there!
    I think it will be a great plugin, but the login button isn't working for me either. I have Safari. Can I fix it or do I need to find another plugin?
  • David
    I have no problems with Safari. You might want to give a few more details: OS, Safari for Windows or Mac, which versions browser, WP, Login With Ajax, etc.

    David
    Mac OSX 10.4.11
    Safari 4.0.3 (I just upgraded - it also worked on Safari 3)
    WP 2.8.4
    Login With Ajax 1.2
  • David has a point, it works for me on safari also. You should make sure you have the newest plugin version.

    Also, there might be other plugins that conflict with this one...
  • fillupt
    i seem to be having an issue with your plugin - after submitting the login information, the loading screen opens, but then that is all that happens. If i login in conventionally, the refreshed page shows me as logged in as per your screenshots, and the logout button works fine. Using Firefox 3.0.6 and WP 2.8.3
  • So, to confirm, the loading spinner shows and it doesn't go away? The first thing I must ask you check is that you have version 1.2 :)

    If so, do you have firebug installed? If you could install that plugin, reproduce the error and check for the messages going on in the console that will give me something more to go on.
  • fillupt
    Version 1.2 confirmed. Firebug error:

    missing ; before statement
    [Break on this error] Fatal error: Call to undefined f...th-ajax.php on line 72
    \n

    It halts before processing the logon - refreshing the page i'm still logged out. The logout button and links work fine, once logged in.
  • aha, you're probably using PHP4 here, that line calls json_encode. Things are a little hectic here but I hope to get that sorted within a week.

    I thought this would have at least given an error warning when logging in?
  • fillupt
    Aha, yes i am. I am upgrading tonight to 5, eventually. Thanks for your assistance!
  • Kurt
    the [blog admin] link in widget_in.php (line 57) has a small mistake:

    blog admin should correct be:
    <a href="<?php bloginfo('siteurl') ?>/wp_admin/">blog admin

    thanks for the nice plugin...
blog comments powered by Disqus