Add Logo to Admin WordPress Plugin Version 1.3

Posted on February 25, 2009  |  Category: Downloads

I have revamped my first plugin to make it a little easier to use. If you have tried it before and weren’t impressed give it another shot. I have included an admin uploader so you can easily upload your own logo and choose whether you want it to appear on the Admin page and/or the Login page. You can also upload multiple logos and then select the one you wish to use for now.

Any feedback or suggestions would be totally appreciated.

addlogo 580x364 Add Logo to Admin WordPress Plugin Version 1.3

This plugin is build for WordPress 2.7.x. It doesn’t really work for earlier versions.

Download

Tags: , , , , , , , , , , , ,

Short URL: http://bavotasan.com/?p=114

helpIf you require help or support, please visit the Support Forum and ask all your questions there. Questions about themes or plugins posted in the comments below will not be answered.

82 Responses to “Add Logo to Admin WordPress Plugin Version 1.3”

  1. And where are the settings in the admin panel to make all this cool stuff happen? ;)

    #73
    • There is actually nothing you need to do to make it work other than activate it. Just upload your logo to the images folder of the plugin and call it logo.png and it will all work automatically.

      #74
  2. tom

    Uploaded and activated. Doesn’t seem to do anything.

    #75
  3. Hello,

    I am running wp 2.7 and got his error “Fatal error: Cannot redeclare add_logo_to_admin() (previously declared in /home/content/g/l/e/mydirectory/html/attraction/wp-content/plugins/add-logo-to-admin/trunk/add-logo.php:12) in /home/content/g/l/e/gmydirectory/html/attraction/wp-content/plugins/add-logo-to-admin/add-logo.php on line 11″ when I tried to activate this plugin.

    Thanks,

    Glen

    #77
  4. Greetings. I am experiencing the same problem.

    I am using a new install of 2.7. I used the plugin install feature in the admin dashboard to install. I uploaded logo.png (74×70, 54,850 bytes) to /public_html/wp-content/plugins/add-logo-to-admin/trunk/images/ , replacing the logo.png file that was there.

    #78
  5. Hey Glen and BobG,

    This is my first plugin and I obviously messed up with the install to WordPress. I have just updated it to version 1.0.2 to fix all these issues.

    #79
  6. tom

    Chris,

    Sorry for the snarkiness (is that a word?) of the comment I left. I was just short of time and hit ‘submit’ before I looked back at it. I’m running 2.7 and it seems that your recent update fixed the problem. Thanks. It’s little touches like this that make a blog feel personal and it’s programmers like you that make it all possible. Thanks again.

    #80
  7. Hey Tom,

    No worries. Thanks for letting me know that it wasn’t working properly.

    #81
  8. tom

    Is there a proportion limit on the graphic? I used one that was taller and not as wide (proportionally) as yours and it stretched it. I made one the same dimensions as yours and it worked fine.

    #82
  9. tom

    Scratch that – it was a cache thing. The new graphic was displayed but with the old graphic’s proportions. After I cleared the cache, it worked fine.

    #83
  10. Sorry for that, but i see my logo only on wp-login page not in admin? I run WP 2.7. On the web test.mysite.com works good but on mysite.com i see logo only on wp-login.php. All browsers same. Cache cleared. Any idea, pls?

    #84
  11. Nevermind, its working now, i switch all plugins off, and looks like that Audio player 1.2.3 when active, this not work at admin page, any idea to fix it?

    #85
  12. Nevermind again, fixed with new beta of Audio player 2.0b6. Works good, thx!!!

    #87
  13. I’ve tested your plugin, and i’ve found a ‘bug’ and it’s solution. When Wordpress it’s not installed on the root of the server, the icon doesn’t shows on login screen, but works fine on admin pages.
    To solve it all you need to do is change the value of the imgSrc variable on login.js and remove the “../” from the value, otherwise it will make reference to a non existent image.

    #88
  14. I see in your login.js that you do the following thing:
    window.onload = addLogo

    This is a very dangerous thing to do, because, in this way, you overwrite all previous actions that already should be done at the onload. It is better to do something like the following:

    var onloadOrig=window.onload;
    if (typeof window.onload != 'function') {
    window.onload = function() {
    addLogo();
    };
    } else {
    window.onload = function() {
    onloadOrig();
    addLogo();
    };
    }

    This way, you keep the original functions in the window.onload intact.

    #99
    • Hey Johan,

      Thanks for the tip. I have gone in and updated the plugin using a slightly different version of the code you suggested. I also upgraded the plugin a bit by adding an option page in the admin. Take a look for version 1.1 on the WordPress site.

      #100
  15. ravi

    Excellent one. Really worked perfectly.

    #145
  16. Serafino

    Never nice. Got it working with a couple of issues.

    How can I center the image?

    #168
  17. Not working. Does wordpress have to be in the root folder or can it be in a separate wordpress folder?

    #333
  18. Using 2.7.1. Is it Compatible?

    #334
    • Hey Jim,

      You are correct. It wasn’t working when installed in a subfolder. I have just updated the plugin and now everything should be fine.

      #472
  19. I am getting a red x in a blank screen on both the admin pannel and when logged in. Any suggestions as to why this is happening. Is it possible that the image is too big?

    #353
  20. Hi,

    I used older version of your plugin with success, but, i can’t use this new version with my WordPress 2.7.1.

    It’s very strange because my logo appeared on your plugin setting page but never on my admin panel or login panel ???

    #379
  21. rfolk

    Updraded to new 1.3 plugin and doesn’t work. WP 2.7.1. It appears upload is not working…

    #386
    • Hey rfolk,

      Please make sure that the file you are trying to upload does not have any spaces in it’s name. So if you have “my logo.jpg” it needs to be “my-logo.jpg”.

      #387
  22. rfolk

    No spaces. Just logo.png. Then tried logo_admin.png. Same problem.

    #388
  23. rfolk

    Where is it trying to write top. Could it be write permissions?

    #389
  24. All it’s ok after your mail.

    Thanks a lot if you change something.

    #390
  25. Jim

    I am using 2.7.1 and version 1.3.1 of your plugin and it doesn’t seem to work. I choose the file to upload (a jpg with no spaces in the file name), I click “save changes” and the image is blank. The select and delete choices are there but no image although a placeholder for the image does appear. When I refresh the page only the original image you provide with the plugin appears. Any help would be appreciated. Thanks!

    #391
  26. Just found out that some people were having issues with the uploader not working due to the fact that the images folder in the plugin was not writeable. Please make sure that add-logo-to-admin/images is writeable.

    #395
  27. tp

    Is it possible to upload a logo for the login page and a different logo for the admin header? I would like to do something similar to the original wordpress where the login logo is bigger (logo + wordpress), and the admin logo is just 32*32 (logo).

    #402
  28. Hey tp,

    Right now there is no way to have a different logo for the admin and a different logo for the login. I will consider adding that functionality to a future version of the plugin. Thanks.

    #409
  29. Chuck

    I installed your plugin and it works, thanks. One problem that I discovered was that the “visit site” link no longer appeared in the header. After doing some research and debugging I discovered that you are replacing the visit site anchor with the newLogo image. I reworked the addLogo function in the admin.js file to replace the img tag rather than overwrite the a tag. Here is the code:

    function addLogo() {
    var myHead = document.getElementById(“wphead”);
    var curLogo = document.getElementById(“wphead”).getElementsByTagName(“img”)[0];

    var myLogo = document.createElement(“img”);
    var imgSrc = newLogo.site+newLogo.logo;
    myLogo.setAttribute(“src”,imgSrc);
    myLogo.setAttribute(“id”, “newLogo”);

    myHead.replaceChild(myLogo,curLogo);
    myBody.style.display = “block”;

    return false;
    }

    I also modified the wp-admin.css file to handle the new image as it needs to be floated left and removed the #wphead h1 a display none style.

    Regards,

    Chuck

    #414
    • Hey Chuck,

      I had originally coded the plugin to work with 2.7 which does not have that img tag in the header. That is why I replaced the “View Site” tag, which also made the logo the link to click back to the site. The above mod will only work in 2.7.1. with the new version of the plugin if you change var imgSrc = newLogo.site+newLogo.logo; to var imgSrc = newLogo.logo;.

      Thanks.

      #446
  30. Lori

    Hi,
    I love the plugin, so easy. I have found a bit of a problem, when the plugin is active I get an error when updating theme files.
    Footer options would be a great addition to the plugin too.
    Thanks for all your work!!

    #421
    • Hey Lori,

      I had been encountering this issue as well and didn’t realize it was all my fault. I have gone in and fixed the problem with the plugin. Uploading it right now.

      #447
  31. Jim

    Don’t mean to keep buggin’ ya, but I have another problem with your plugin. I have found that once your plugin is active I can no longer modify user profiles or delete users. I am sure it is your plugin because I tested it by removing it and reinstalling, activating and deactivating, and the problem only occurs when your plugin is active. If you like email me and I will demonstrate.

    #429
  32. Hector

    The plugin not display the image, i’m using Wordpress 2.7.1. and your version plugin 1.3.2. not work.

    Please check. Thanks for your attention.

    #456
  33. Hector

    Bavota San

    This plugin display the image in the Dashboard of Wordpress but not in the Access Area.

    Thanks for your information.

    #457
  34. Your plugin came just at the right time. I needed to re-brand Wordpress as Strattomedia, my online coaching community.
    Unfortunately it is not showing my logo. Any thoughts? My site is in a wordpress (sub) folder right now.

    #491
  35. **Correction**

    Your plug-in works! User error, plus I didn’t read the above post about making the folder writable.

    Thank you for your efforts…it’s a simple fix for a much needed solution.

    -Jim

    #492
  36. Josh

    The plug-in works great with Firefox on both the login and admin page, but does not work on the login page with IE 7 (I don’t know about other versions of IE)It does work on the admin page. I am getting the same results on several computers.

    I have tried several different image formats and sizes. I get the same results with the default image.

    WP 2.7.1
    Add Logo to Admin 1.3.2

    IE Error:
    Line:20
    Char:2
    Error: ‘newLogo’ is undefined
    Code:0
    URL:”my website”

    #536
  37. Tom

    Same problem as Josh.
    Works great in Firefox.
    Does not work in IE7.
    Tried two separate .png files. Same results. Can’t see them in IE7, only in Firefox.
    No error messages in IE7, just no logo.
    I have Wordpress 2.7.1 and Plugin version 1.3.2

    #594
  38. Just updated the plugin to version 1.3.3 which addresses the issue with IE7 and the logo not appearing on the login page. It was all because of one little comma. One stupid little comma!

    #620
  39. Works great, thank you

    #623
  40. emmeellep

    my solution, before the upgrade, was borrowed from register plus.

    1. I included jQuery by:
    <script type = ‘text / javascript’ src = ‘ wp-includes/js/jquery/jquery.js? ver = 1.2.3 ‘>

    2nd I made the link of the logo with a link to the home (not wordpress)

    jQuery(document).ready( function() {
    jQuery(‘#login h1 a’).attr(‘href’, ”);
    jQuery(‘#login h1 a’).attr(‘title’, ”);
    });

    3rd I removed from the css background image and added my :)

    #login h1 a { background:none; background:transparent url() center top no-repeat; padding-bottom:24px }

    Ciao :)

    #637
  41. Tom

    Thanks, c.
    You fixed the IE7 issue. Works great! Great plug in!

    #640
  42. Great plugin but I would ask for one new feature :)
    It will be very usefull to select one image for login page and different for admin page. Both pages are different (background and size) so I need small white logo on admin and big black logo on login page.
    Is it possible to upgrade that plugin?

    #850
  43. MarcM

    Hi

    I sent you a modified version of this plugin a week or so ago and haven’t heard back. It allows different images as requested in comments 402 and 850 (which I needed too).

    LMK if you didn’t get the message and i will send again.

    #1959
  44. I tried this and the image I uploaded totally overpowered the top half of the page! What happened?

    #2202
  45. Very nice template, exactly what i was looking for.

    Only one thing i can not get. Is how put my logo banner in my post pages using this template.

    #2232
  46. Amy

    Hey there…I successfully installed, but when I upload pics, nothing happens. The only available pic is the default (your logo). Ideas? Thanks!

    #2320
    • Be sure your webserver has write permissions to add-logo-to-admin/images directory. Permissions should likely be 755

      #2352
  47. Hi, great blog. I was wondering, how do I get my logo in the title tag to replace the default blank doc pic?

    #2379
    • That is called a favicon. Convert your image to a favicon with any online favicon generator. Then upload the file to your site’s main directory.

      #2938
  48. Hi…! This rocks. You rock. Thank you for sharing and helping people out. I send you a virtual beer :)

    #2609
  49. Thx, very nice plugin.:D

    #2681
  50. Warning: moveuploadedfile(/home/g2xx/publichtml/blogpage/wp-content/plugins/add-logo-to-admin/images/g2xx-white-trans.gif) [function.move-uploaded-file]: failed to open stream: Permission denied in /home/g2xx/publichtml/blogpage/wp-content/plugins/add-logo-to-admin/add-logo.php on line 36

    Warning: moveuploadedfile() [function.move-uploaded-file]: Unable to move ‘/tmp/phpVzeNBq’ to ‘/home/g2xx/publichtml/blogpage/wp-content/plugins/add-logo-to-admin/images/g2xx-white-trans.gif’ in /home/g2xx/publichtml/blogpage/wp-content/plugins/add-logo-to-admin/add-logo.php on line 36

    Warning: Cannot modify header information – headers already sent by (output started at /home/g2xx/publichtml/blogpage/wp-content/plugins/add-logo-to-admin/add-logo.php:36) in /home/g2xx/publichtml/blogpage/wp-content/plugins/add-logo-to-admin/add-logo.php on line 59

    anybody got any ideas for this newbie. installing my logo produces the above errors.

    thanks in advance

    #2862

Leave a Reply

To enter code in the comment box, please place it between <pre lang="php"> </pre> tags. You don't have to convert any characters to their hex/HTML code. Just add your code the way you would to any code editor.