WordPress Sidebar Login 2 – Optimised for wordpress 2.6

July 23, 2008 | Published in: Wordpress & plugins | Tags: , , , , , , 352

Sidebar Login 2At last! My sidebar login widget has evolved into ‘Sidebar Login’ which has both a widget and a template tag to allow you to have a login form in the sidebar of your wordpress powered blog.

It lets users login, and then redirects them back to the page they logged in from rather than the backend, it also shows error messages. Read more for more information and the download link.

Sidebar Login

Sidebar login is self explanatory really; it allows users to login to wordpress from the sidebar! This plugin requires wordpress 2.6 (that is all I have tested) in order to function; this is because wordpress 2.6 has a modified login system to older versions.

Screenshots

Login Form

Login Form

Logged in

Logged in

Change Log

You can track changes to the plugin in the wordpress plugin SVN.

Get it now!

You can get the latest version from the wordpress plugin database; Download it here!

Installation Instructions

  1. Unzip and upload the php file to your wordpress plugin directory
  2. Activate the plugin
  3. For a sidebar widget: Goto the design > widgets tab – Drag the widget into a sidebar and save!
  4. To use the template tag: Add <?php sidebarlogin(); ?> to your template.

License

WordPress Sidebar Login © Copyright 2008-current. Mike Jolley

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
optimised

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

Show your support – ensure continued development

I put a lot of effort into all of my plugins; its thirsty work so why not show your support by buying me a nice coffee :)

Found this post useful? Why not buy me a coffee!

Related Entries

352 Responses to “WordPress Sidebar Login 2 – Optimised for wordpress 2.6”

RSS feed for comments on this post.

1 2 3 ... 15
  1. Will says:

    Great work with this Mike. I’m sure I can make use of it!

    Thanks.

    ReplyReply

    Comment made on July 23, 2008 at 12:58 pm

  2. Anthony says:

    Glad to see you’ve updated this, I agree its a useful plugin, great for multi author blogs etc.

    ReplyReply

    Comment made on July 23, 2008 at 2:18 pm

  3. nora says:

    hi… I’ve made minor changes to your original code and everything was fine until the moment when I tried to logout… than I got this:

    Warning: include_once(wp-settings.php) [function.include-once]: failed to open stream: No such file or directory in /home/teatar/public_html/wordpress/wp-content/plugins/sidebar-login.php on line 84

    Warning: include_once() [function.include]: Failed opening ‘wp-settings.php’ for inclusion (include_path=’.:/usr/lib/php:/usr/local/lib/php’) in /home/teatar/public_html/wordpress/wp-content/plugins/sidebar-login.php on line 84

    Warning: Cannot modify header information – headers already sent by (output started at /home/teatar/public_html/wordpress/wp-content/plugins/sidebar-login.php:84) in /home/teatar/public_html/wordpress/wp-content/plugins/sidebar-login.php on line 88

    Any ides how to solve this?

    ReplyReply

    Comment made on July 24, 2008 at 7:06 pm

  4. Mike Jolley says:

    change the path of the include_once() in the plugin; its possible your blog has it somewhere else (is your wordpress installed in the site root?)

    ReplyReply

    Comment made on July 25, 2008 at 1:46 am

  5. Falcon1986 says:

    I have been looking for a plugin like this for quite some time. It works splendidly with my WordPress 2.6 blog. Thank you!

    ReplyReply

    Comment made on July 25, 2008 at 5:41 am

  6. mick says:

    I like the direction of your plugin. I intent to use it for a site providing lessons and course material to logged in users. Unfortunately I have been unable to get it to work. To ensure this was not due to any edits I had made, I did a clean install of wp 2.6 with a fresh db into its own folder inside the web root with wp sidebar login as the only plugin present. I created one subscriber.
    Default login works as expected.
    Sidebar login widget displays the login form as expected with the form action set to the current page url.
    If a user is logged in by the Default login method, sidebar login displays dashboard, profile and logout links. these links work.
    Problem is that the login form is not working for me. When a user and password is entered it returns the empty form on the same page with no errors, but with no-one logged in.
    Any ideas on the solution would be appreciated. Thanks.

    ReplyReply

    Comment made on July 27, 2008 at 9:45 am

  7. Photographion says:

    I’ll try it :)

    ReplyReply

    Comment made on July 27, 2008 at 6:40 pm

  8. mick says:

    My login problems have been found and fixed.
    The problem was cookies. They had www on them while my site is authoritively non www (It has a .htaccess permanent redirect away from the www url)
    My code to fix this goes at line 156 of sidebar-login.php after this block;
    if ($url == “nologout” && strstr($pageURL,’logout’)==true) {
    $pageURL = str_replace(‘?logout=true’,”,$pageURL);
    $pageURL = str_replace(‘&logout=true’,”,$pageURL);
    }
    The added code is;
    //————–
    if (strstr(get_bloginfo(‘wpurl’),’www.’)) {
    }
    else {
    $pageURL = str_replace( ‘www.’, ”, $pageURL );
    }
    //——————–
    I imagine it is formed in an ugly way to a purist php developer, and it may even be in an illogical location, but it works. :)
    Having said this I have not tested it on a www url site (I don’t have any.)
    Please feel free to use this code or a better version of it.
    ps. This plugin elegantly solves the problem of non admin login for wordpress and is just what I needed. Thanks.

    ReplyReply

    Comment made on July 28, 2008 at 9:00 am

  9. Jamie Le Souef says:

    Fantastic plugin! i have clients that need something exactly like this. Thanks

    ReplyReply

    Comment made on July 29, 2008 at 2:09 am

  10. wasabi says:

    I created a static page with sidebar login widget, everytime I tried to logout the user, it always free up the page, because this page is not located at document root, any suggestion?

    ReplyReply

    Comment made on July 30, 2008 at 8:31 pm

  11. Mike Jolley says:

    I think there may be path problems with non-root installs – will be moving to SVN in the coming days with a fix.

    ReplyReply

    Comment made on July 31, 2008 at 10:11 pm

  12. Hawkslayer says:

    I’ve installed the sidebar login widget and it appears to be fine when I log out and login again. Just one thing, I don’t have the “register” link that you have on your example and I would like to have that. Can you tell me how to enable it please?

    ReplyReply

    Comment made on August 2, 2008 at 1:16 am

  13. Hawkslayer says:

    I forgot to mention in my previous post that I’m not very hot with PHP, if anyone makes any suggestions regarding the “register” link, please make them in layman’s language.

    Hawkslayer..

    ReplyReply

    Comment made on August 2, 2008 at 1:22 am

  14. Mike Jolley says:

    @Hawkslayer – Wp-admin Settings>General tick the “anyone can register” link

    ReplyReply

    Comment made on August 2, 2008 at 12:47 pm

  15. Hawkslayer says:

    Mike – I’m using WordPress-mu and it doesn’t have that option. guess I should have mentioned I was using MU when I asked the question. The option is does have is: “Users must be registered and logged in to comment” and I do have this enabled.

    Under site admin/options it does have these choices:

    * Disabled
    * Enabled. Blogs and user accounts can be created.
    * Only user account can be created.
    * Only logged in users can create new blogs.
    * Disable or enable registration and who or what can be registered. (Default=all)

    I selected: Enabled. Blogs and user accounts can be created.

    Si I guess this version of sidebar doesn’t work on mu. Sorry about that I really like it.

    Hawkslayer..

    ReplyReply

    Comment made on August 2, 2008 at 2:12 pm

  16. Tom Johnson says:

    Thank you. Thank you! THANK YOU! for making this plugin. This is exactly what I needed for my site. Very appreciative of your efforts. I’m using the Prologue theme and needed an external login like this.

    Tom

    ReplyReply

    Comment made on August 2, 2008 at 4:44 pm

  17. Hawkslayer says:

    Hurrah!! I found the key to allowing users to register and now the link to register shows up.

    It is in site admin/blogs, open the blog and there it is, “allow users to register” put an 1 in it and the register link shows up on the sidebars and the login page. Thanks for bearing with me on this. I’ll most likely be back with other problems. :)

    Hawkslayer..

    ReplyReply

    Comment made on August 2, 2008 at 6:59 pm

  18. hanjra says:

    wow, great plugin… i was really looking for it which works in the template too and not only as widget. I am going to test it. If it works for me, i will really thankful to you. cheers :)

    ReplyReply

    Comment made on August 3, 2008 at 8:00 am

  19. hanjra says:

    It works.. thanks a lot dear… but i removed dashboard and profile link after you login as i dont want users to see the backend at all. Still testing…

    ReplyReply

    Comment made on August 3, 2008 at 8:27 am

  20. hanjra says:

    oh no, when i removed those links, i received errors,, i receive only blank screen after i click login… can you help me to be not shown those link after login.

    ReplyReply

    Comment made on August 3, 2008 at 8:59 am

  21. Mike Jolley says:

    @hanjra – Should just remove:

    <li class="page_item"><a href="'.get_bloginfo('wpurl').'/wp-admin" rel="nofollow">'.__('Dashboard').'</a></li>
    <li class="page_item"><a href="'.get_bloginfo('wpurl').'/wp-admin/profile.php" rel="nofollow">'.__('Profile').'</a></li>

    On line 28. That should not cause any problems.

    ReplyReply

    Comment made on August 3, 2008 at 9:08 am

  22. hanjra says:

    @ mike this what i did, but after that i receive a blank page whenever i click login in the sidebar, and even i cant login and if i dont remove those lines, its ok. and when i login i dont see USER NAME after the welcome … shouldnt it be there?? Anyway i just removed your plugin for further testing.

    ReplyReply

    Comment made on August 3, 2008 at 10:01 am

  23. Hawkslayer says:

    I have another minor irritation. When I am logged in and have the WELCOME sidebar up, if I click on dashboard, it reports “page not found” the other two links in the sidebar work fine. I am using wordpress-mu.
    The other link I have to admin works correctly. Any ideas?

    ReplyReply

    Comment made on August 3, 2008 at 1:43 pm

  24. Mike Jolley says:

    @hawkslayer – I never stated it would work for MU – the links are different. For example the reg page is wp-signup.php. I suggest you go to your dashboard to find the correct url and manual add it to the plugin in place of whats there.

    ReplyReply

    Comment made on August 3, 2008 at 1:52 pm

  25. Hawkslayer says:

    Thanks Mike – I have already done what you suggested and it works fine.
    The line read:

    ‘.__(‘Dashboard’).’

    I added /index.php thus:

    ‘.__(‘Dashboard’).’

    Everything now appears to be working like it should in MU. Thanks for being patient with me.

    Hawkslayer.

    ReplyReply

    Comment made on August 3, 2008 at 2:46 pm

1 2 3 ... 14

Leave a Reply

About this site

Blue Anvil is the online web design journal & portfolio of , a web designer from Norfolk, England. Read More »
MiniCard Theme for WordPress
  • Featured work - More

    • Beefjack
    • Integrity
    • theotaku.com
  • Latest Tweet - More

    • RT @jameskoster: Free MacBook Pro vector; http://www.potatoestomatoes.co.uk/technical/free-macbook-pro-vector/ #vector #resource
  • Out of the blue - More

    • Closing the Forums

      Just posting to let current users know that I’m closing the forum on Blue-Anvil. This is mainly due to spam-registrations getting out of hand and being a general nuisance. I will be posting good topics as FAQ items within posts if applicable.

      Please note that you can still post and get help for my plugins/themes by posting on the wordpress.org website.

    • Show off your MiniCard!

      Are you a user of the WordPress MiniCard theme? Its been downloaded over 14,000 times so far!

      If you have used it as-is, made your own child-theme or done something creative with it, please show off your MiniCard’s in the comments, I’d love to see how the theme is being used!

    • Spam Stopper updated for WordPress 3.0

      My Spam Stopper plugin has been updated for WordPress 3.0 (version 3.1.3) – you can grab it here. Sorry this update took longer than my other plugins but this one gets less lovin’ – if you want to change that feel free to donate, spread the word, or rate it on the WordPress.org plugin page.

    • SexyBookmarks & Tr.im

      Just a notice to users of the brilliant http://www.sexybookmarks.net/ plugin by shareaholic – If you use tr.im (as I have on a few client sites) be aware tr.im has ceased operation so you may see errors on your blog or in your source code; it screwed up the background and headings on one of my blogs.

      To fix, go to sexybookmarks options, switch services in the “Which URL Shortener?” box, and tick the box to reset all short urls. Once done, your blog should return to normal.