728x90-banner.png

WordPress Admin Bar Improved

November 15, 2009 · View Comments

There have been many comments over at Viper007Bond’s site requesting that he modify his admin bar to work site-wide, whether the user is logged in or not. He has repeatedly said that that was not the purpose of his plugin, and that it would not be supported. Well, I want to thank Viper007 for releasing his extension via GNU GPL, graciously allowing modifcations and re-releases as long as they are also GNU GPL. So that’s what I did.

I present to you the WordPress Admin Bar Improved. It allows for site-wide use, whether the user is logged in or not, and if they aren’t logged in, gives them a log in form, much like the one seen on WordPress.com or Blogger.

I will write up more later, but all you really need to know is that you need to unzip the files, and upload them to your wp-plugins folder. If you are installing it on WordPress MU, do the same thing, and then move the wordpress-admin-bar-improved.php file to the mu-plugins folder.

Enjoy!

You can always download the latest from here:
Latest.zip

Or you can get it direct from WordPress here:
http://wordpress.org/extend/plugins/wordpress-admin-bar-improved/

Or you can install it from your Plugins->Add New page by searching for WordPress Admin Bar Improved.

  • Does anyone know how to get this great plugin to work with WP 3.0? It no longer displays when logged out?
  • The post of content is very interesting and exciting. I learned a lot from here.The content from simple to complex, so all of you can come in . No matter you want to see what can be found.By the way ,there are some websites is also very wonderful,you can go and see.such as ajf 8
  • The post of content is very interesting and exciting. I learned a lot from here.The content from simple to complex, so all of you can come in . No matter you want to see what can be found.By the way ,there are some websites is also very wonderful,you can go and see.such as Jordan Pro Classic
  • Ricky
    Donald,
    Are you planning on updating this most awesome of plugins for 3.0?
  • AKLP
    Hi there, is it possible to make this not visible to all subscribers and anonymous users while all privilleged users can choose from settings?
  • Seems it's triggering a fatel error in WP 3.0-alpha on line 480 of wordpress-admin-bar-improved.php
  • TheOrchards
    Hi!
    Is there any way I could make the Admin Bar viewable for certain Roles??

    thanks,
    Chris
  • craigmo
    Hello,
    For some reason when I use the plug-in there is a 'log in' button as well as 'log in' in text beside the remember me checkbox. I really just want the button and not the text as well. Is there any way to remove this repitition. My site is www.pm2consulting.com Thanks!
  • craigmo
    Ok so I found out what part of the PHP code causes this to be called around line 451 of the plugins .php file. Unfortunately I know absolutely nothing about PHP except that there needs to be an IF statement that makes wploginout only appear when logged in. Furthermore, is there a way to make it so the appearance of the admin bar is set for all users. I'd rather the options for that are left solely to the admin. Thanks!
  • Mel
    There is a problem with my install. When user is logged out there is a link "Log in" right next to the Remember Me check box. How can I delete this link?
  • Mel
    Clarification: The Log in button is there including the Log in link that is redundant. So I need to delete it. I looked every where in the files but can not find it.
  • Is there a possibility to delete all links?
    Even the "Wordpress Logo" which links to settings or __file__?

    I will always use the admin bar with the login form and the login and logout button...?!

    I use mingle and the users shouldnt go to the dashboard?

    or is there a possibility to use own links in the topbar?
  • Matthew
    I love the admin tool bar however it does not work correctly when my site is in a sub directory and not at the root installation directory. What a shame the plugin appears to be very usefull. Hope you have an updated version soon.
    Matthew
  • moliv
    I installed the plugin. I am using wordpress 2.8.6. After installing the plugin anytime I enter the blog thru Firefox I am presented an administration that requires username and password. If I enter the requested data I am presented the error message "The requested URL/wp-login.php does not exist". Going back to the previous page and clicking on the "connect" link Iam presented the log-in page trhu which I connect regularly.
    Can you help me. Please send a message to my email.
  • Hello,
    I'm running into a bit of a problem since I upgraded. The Admin bar does not show up when on the site- it does show up in the admin area. Everything was working as expected before upgrading to 1.6. Any ideas?
  • Sorry about that - I forgot I had changed the default to not show in the
    admin area - should have included it in the Changelog - Will update it for
    sure.

    On the settings page for the plugin, there is an option to be able to show
    it on the admin page or not. (There is an option for the frontend too.)
  • I'm sorry - I should've clarified. That option is selected and still doesn't show. So I do have both boxes checked... thanks.

  • ok - try a couple things - There may be a conflict with your other plugins
    - but let's try this first.

    (I'm sure you've already done this..) Try resetting the settings so that
    they register again with the plugin. It should work ok. If not...

    Uninstall and reinstall the plugin. I installed it fresh, version 1.0.6,
    here on Mactimize. And it's working ok.

    If neither of those work, which other plugins do you have installed?
  • -not sure where to reset the settings...
    -I deactivated, deleted and reinstalled 1.0.6.
    -note: I downgraded back to 1.0.5 and that didn't work either.

    I have a lot of plugins - 33 total:
    Akismet
    Custom login page
    Diagonal advertising banner plugin
    Flickr photo album
    Ie6 no more
    Let it snow
    Login lockdown
    Move comments
    My page order
    One click plugin updater
    Polldaddy polls
    Post image
    Revisionary
    Scissors
    Secure admin
    Secure wordpress
    Sidebar login
    Simple hit counter
    Subscribe to "double opt in" comments
    ThickBox
    Top 10
    Weather widget
    Wordpress.com stats
    WordPress admin bar improved
    Wordpress database backup
    Wordpress totals
    Wp-cumulus
    Wp-downloadmanager
    Wp-secure remove wordpress version
    Wp-useronline
    Wp events calendar
    Wp menu manager
    Wp status notifier
  • Well - if you want to create a special admin account for me - I could take a
    look at it on your blog and try to fix.
  • That would be nice of you! Can you send me an email so I can give you or creds? Let me know if you are unable to view my email address.
    Thank you!
  • art
    Hello Don,

    I trust all is well.

    I wanted to grab your attention for a bit seeking to obtain some guidance on how to remove/replace the wording inside admin bar tabs.

    I'm modifying WPMU-supported BuddyPress Social theme.

    I've been looking for a way to get them a customized title/headline with no success. Would you have any idea how to do this on your own admin bar?

    Please let me know,

    Art
  • It is possible to do this with the BuddyPress Admin Bar - I have it
    installed at http://baptistblogs.com. I can help you with this - just emial
    me directly at mactimize at gmail dot com.

    As far as doing it on my own admin bar, I will add an option for that -
    eventually.
  • getblogged
    for wordpress mu ... i manage to put some extra commands (links) to it ... like register , main blog and in combination with random blog plugin i manage to make a very useful admin bar for wordpress mu (mynconnect.com) , and it will be something good if you can the admin bar like mine ( very useful for wordpress mu blogs ) (sry for my englihs)
  • That's great! Could you send me the patches - I will look at getting them
    added to the official release.

    Thanks.
  • getblogged
    i just add some links to this part of the code
    "

    <div id="wpabar">
    <div id="wpabar-leftside">
    <ul>


    <li><form action="/wp-login.php" id="loginform" method="post" name="loginform" style="margin:2px 0pt 0pt 10px">
    <li><input id="user_login" name="log" onblur="if (this.value == '') {this.value = 'Username';}" onfocus="if (this.value == 'Username') {this.value = '';}" tabindex="1" type="text" value="Username">
    <input id="user_pass" name="pwd" onblur="if (this.value == '') {this.value = 'Password';}" onfocus="if (this.value == 'Password') {this.value = '';}" tabindex="2" type="password" value="Password">
    <button id="wp-submit" name="wp-submit" tabindex="4" type="submit" value="true">Log In</button>
    <input id="rememberme" name="rememberme" tabindex="3" type="checkbox" value="forever">Remember Me
    </li><li>Get a Blog</li> <li>Random blog</li> <li>Main Blog</li>




    "
    i dont know php .... and i just try add some links and it worked
    here is the link to the random blog redirect plugins : http://wpmudev.org/project/WPMU-Random-Blog-Redirect




    just one more thing .... how can i remove Log In button from left side?</form></li></ul></div></div>
  • getblogged
    Get a Blog link is --- myblog.com/wp-signup
    Random Blog links is --- yourblog.example.com/?random (from the plugin- read plugin desciption for more )
    Main blog link is --- mywebsite home
  • Rookie @ WPMU
    I apologize for a rookie questions, but I just started working with Wordpress MU on Thursday and already have a huge appreciation for it and the improved admin bar.

    Question 1: Is there an straightforward way to control the various options that appears in the menubar? For example, I do not want users to be able to adjust their view options of the admin bar so the option TOOLS>ADMIN BAR could be removed for all users.

    I am a member of a university blog that has added an extra main menu option called BLOGS at the extreme left of the admin bar that allows users to navigate to any of the blogs that they are a member of right from that point (they are listed under BLOGS as drop down menu items under it).

    Question 2: When a user logs out they get the option to login again after they click on the "Back to A New Blog" link, but the login link fails "File Not Found". My WPMU server is not at root, but rather is in a subfolder called "blog". If I changed the link at Line 382 of the wordpress-admin-bar-improved.php from /wp-login.php to /blog/wp-login.php would this make the necessary change? Would I need to make changes elsewhere?

    Thanks for your patience with my questions!

  • Thanks for your interest in my plugin! I too have recently picked up with WPMU and love it! Hope your experiences are going well.

    Answer 1: Yes - This plugin picks up the menu items the same way the default admin panel menu does. You can hide them the same way you would with the default admin menu. The easiest way is via a custom plugin that utilizes custom actions. More info on that can be found here. http://weeklytips.wordpress.com/2006/03/04/extra-tip-removing-admin-menus/ and there is a plugin that can disable menu items here (http://wpmudev.org/project/Menus).

    The plugin itself has in the options page check boxes to disable certain menu items. I will look into updating this so that it is a sitewide thing.

    Answer 2: You made the proper change in the proper place - and that is all that needs to be done for it to work correctly. I had noticed the same issue on my WPMU install, and doing what you did fixed it. I am going to update the plugin so that it will automatically find the root directory of your WP installation and input it there - I just haven't yet.
  • Rookie @ WPMU
    Many thanks for your help - this was great - it took a bit of tinkering to get it to work - it seemed that all of my plug-ins were disabled after I installed this, but seems like everything is back to normal now. I am currently having a problem with the LDAP plug-in as it does not always create the WPMU account that it says it has - very buggy, will need to investigate other LDAP plug-ins.

    Thanks again!
  • Great! If you email me with the changes you had to make, I can take a look
    at them and maybe integrate them into the official release.
  • How can I add a link to the new user registration form in this Admin bar? Awesome plugin by the way! If I could add this one thing I'd be thrilled.
  • Well, it kind of depends, if you are wanting to use this on a regular WordPress install, add the code below just above the wp_loginout(); (line 448), and you will have your register link working just fine.

    "<li>< a href="/wp-login.php?action=register">Register</li>"

    If you are running WPMU, it's a different story.
  • Thanks Donald!
  • Your welcome. I forgot to mention that the edits need to be made in the wordpress-admin-bar-improved.php file. (I know you probably know, but I am posting it for the future readers.) :)
  • is there anyway to change the width of the bar?
  • You can adjust the width by adding this to your custom.css for your theme.

    #wpabar { width: WHATEVER YOU WANT; }
  • Bones_6
    Awesome thanks, just one more thing.
    Is there a way to physically call the bar somewhere else on the site, instead of the top? Like, calling it below a banner, for instance?
  • Yes - but not very easily. You need to edit some core files. Which is easy
    enough - if you know what you are doing.

    Edit wordpress-admin-bar-improved.php where it says
    [php] // Register the hooks to display the admin bar
    if ( 1 == $this->settings['show_site'] ) {
    add_action( 'wp_head', array(&$this, 'OutputCSS') );
    add_action( 'wp_footer', array(&$this, 'OutputMenuBar') );
    [/php]
    Change your wp_head and wp_footer to whatever position you want (I use the
    Thesis theme, so I changed mine to thesis_hook_after_header)

    Then you need to edit the css file for whichever theme you are using.
    (default is grey.css) and just comment out or delete near line 5 where it
    declares the top css attribute. (top: 0 !important;)

    Do that, and your admin bar will go below the thesis header. You can change
    up the CSS from there to style it more to your liking.

    If you are not using Thesis, Find the appropriate hook calls for your theme
    and put them in instead.

    Hope that helps.
    Don
  • awesome, thanks man!
  • Also, is there a way to remove or replace the wordpress icon from the bar?
  • The WordPress icon is just a CSS styled background image floated left. You can remove it be taking out the background: url('images/background-logo.png') top left no-repeat; from the grey.css file on line 118 (assuming you are using the default grey theme.)
  • Yeah finally figured that out this weekend. Thanks again!
  • You can remove the Login Form (by the way, it uses the actual login form at wp-login.php) by either deleting or commenting out lines 385-390 of the wordpress-admin-bar-improved.php file.

    Doing this will leave the login link on the right side of the bar, but it will not show menu's if the user is not logged in. The plugin uses WordPress hooks that puts up there all menu's available to a logged in user.
  • le.poke
    Hi

    Thx for your response
    Your modification "deleting or commenting out lines 385-390 of the wordpress-admin-bar-improved.php file" doesn't fit with what i want ... a login bar is still visible for logged out users and deforming my template.

    Is it possible to simply show nothing of your plugin for logged out users?

    sorry for my english it is not my native language
  • Please use the original WordPress Admin Bar by Viper007Bond. His offers what
    you need exactly.

    Here's the link.

    http://www.viper007bond.com/wordpress-plugins/wordpress-admin-bar/
  • le.poke
    ok thx a lot ... that's exactly what i want
  • le.poke
    Hi

    well done !

    just a question ...

    how to not show the login bar ( "How the plugin appears for logged out Users") for my logged out users .... i just want to use the default login system

    thx
blog comments powered by Disqus

Previous post:

Next post: