Wordpress Sidebar Login 2 – Optimised for wordpress 2.6

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

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

336 Responses to “Wordpress Sidebar Login 2 – Optimised for wordpress 2.6”

RSS feed for comments on this post.

1 2 3 ... 14
  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

Why ask?

About this site

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

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

    • @AzN102 If you mean the social link, you need to create a page called 'social' and give it the template called 'home'.
  • Out of the blue - More

    • MiniCard 1.1.7 Update

      I have just uploaded 1.1.7 of MiniCard here and to the WordPress theme directory. This updates includes:

      • New networks; xing, gowalla, yelp, foursquare, mobileme, google buzz
      • A way to change link text and define multiple links of the same network
      • A way to define your own custom links + icons
      • Improved admin panel

      Hope you like it, and don’t forget you can show your support by purchasing the premium pack from here.

    • Switched: From Shared to VPS

      It’s been about two weeks now since I made the transition from a shared reseller hosting account to a VPS (Virtual Private Server) account – impressions so far, excellent performance but fiddly to configure.

      The reason I wanted to change from shared hosting was the fact the server was always being hacked (even though ALL my scripts were secure), there was frequent downtime, support blamed me for problems every time, and it was slow as hell.

      Those used to a shared hosting environment would probably not know where to start when faced with configuring a VPS. Luckily, a lot of it was pre-configured when I received my account – certainly some of the major security holes were patched. I was not satisfied with those however. As a victim of hacking in the past (previous host swears it was not there fault, something I don’t believe) I took extra care to secure it as a much I could – configuring brute force detection, the firewall, installing mod security (excellent rules for that here: http://www.atomicorp.com/wiki/index.php/Atomic_ModSecurity_Rules) and going though multiple guides (like this one: http://www.webhostingtalk.com/showthread.php?t=468168) with a fine-tooth comb.

      The result? My pages are loading at least 6 times faster, I have had no down time (or at least have not noticed any), and I feel in control and happy. No longer am I at the mercy of shared hosts :)

      If your interested, I chose ServInt as my provider as they offered a great deal, as well as being a managed service (so I’m not on my own if I screw things up). I was tempted by the bells and whistles of Media Temple, but felt the ServInt service was better value.

    • Download Monitor 3.2.2 Maintenance Release

      Download Monitor has received some more love and has been updated. Here’s the change log from the new version:

      • Small bugfix in uploader.php – cat ID
      • Changed stats graph calculation – thanks lggemini
      • Changes to headers in download.php to avoid caching
      • File Browser fixes – $root was clashing with something….
      • exclude_cat works in all sections of download_page now
      • Removed hardcoding of /uploads/
      • Added action to download.php – should be able to use it to stop a download if you want – maybe limiting downloads per day or something? Whatever you want…
      • Made it so if you post new file on ‘edit’ screen, the post date is updated.
      • Fixed the ‘blank meta’ section which blanks out custom field values when nothing is set.
      • Moved ‘allow_url_fopen’ check.
      • Someone said downloads don’t work with spaces in the name. They do! Wasting my time sonny…
      • All work and no play make jolley a dull boy
      • Had to rename capabilities so they work. Apologies if you have to set this up again! Cheers to Mark Dingemanse.
      • {category_ID} custom format tag added. Useful if you want to send someone to its category on the DL page I guess. Also added {category_other} so when no category is set “other” is shown – this is because the download page can show an ‘other’ section if you want it to.
      • You can now manually edit the post date on the edit download screen.

      If you have edited capabilities for download monitor user permissions, you’ll have to again sorry! This is because I named them too long. Also, you should check your forced downloads still work because there was a logic error meaning they may not have been forced after-all…

      Enjoy.

    • Mahousive update to Download Monitor (3.2)

      Today I completed the update for the Wordpress Download Monitor Plugin – many tweaks, fixes, and features added. There were no changes to the database structure so people upgrading should be fine. Here is the list from the change log:

      • {user} tag added for custom formats
      • ‘autop’ option fix
      • Download page buttons applied with CSS so they are easier to customise/translate.
      • Fix for pagination bug after editing a download
      • Category output fix on edit downloads screen
      • Category urls on download page use ID rather than name to prevent errors when cats have the same names.
      • exclude_cat added to download_page shortcode
      • Localised ‘hits’ ‘date’ ‘title’ on download page
      • Option to disable the download logging
      • Read file ‘chunked’ some people found large files were corrupted so this should help (fingers crossed)
      • Added show_tags option to download page – displays x amount of tags on the download page.
      • File Browser root setting and download.php logic/mime types modified thanks to Jim Isaacs (jidd.jimisaacs.com)
      • Interface Improvements
      • Bulk edit categories, custom fields, tags, member only downloads
      • Added roles for download monitor admin – should be able to use with a role manager plugin if you want anyone other than admin to access the admin section e.g. http://wordpress.org/extend/plugins/capsman/
      • Change redirect after add
      • Edit Cat names/parents
      • Dedicated tags and thumbnails fields (they still use meta table though)

      And yes, those category link bugs are fixed at long last, and you can edit category names finally. Phew!