Ravatar Wordpress plugin for randam avatars

I was looking for a Wordpress plugin to spice up comments with custom avatars, but I didn’t find exactly what I was looking for. So I hacked together the Ravatar Wordpress plugin that will display a randomly generated avatar for each visitor. The icons are based on email, so a given visitor will get the same icon each time they comment. It’s totally customizable, so you can set it up with images that match your blog’s theme. Visitors can optionally choose their own avatar by setting up a Gravatar. Download the plugin here.

The Ravatar plugin is based on Shamus Young’s Wavatar plugin which is quite good, but the generated avatars weren’t really what I was looking for.

Ravatar comes with a default set of images, or you can remove those and upload your own. It works by creating a hash of the email address, and then using the hash to choose an image and the place where the image should be cropped. Uploading your own images gives you the power to customize avatars for your site. A backpacking site might use use nature scenes. Or you might pick images that match your blog’s color scheme.

Here is a set of avatars that were generated by the plugin’s default images. I grabbed some images of oil paintings from Wikimedia Commons for the defaults.

screenshot

To customize the plugin, upload your own set of images to the plugins/ravatars/parts directory. Supported image types are .jpg and .png. Its hard to say how many images you should upload. The minimum for a good set of ravatars is probably around 40, but you will want more if you have a lot of people posting and you want avatars to be unique for everybody. Try to get images with a lot of distinctive elements in them. If any images have large sections of one solid color, cropping those sections out will give you a more varied set of ravatars.

Here is a set of avatars Ravatar generated using the source images for my site (which are different from the Ravatar default images). I picked a set of HDR images that are mostly industrial, plus a few nature scenes. Leave a comment below to see what your own avatar looks like.

ravatars

To install the plugin, get it here, unzip it, put it in the wordpress plugins directory, and enable it. Thats all there is to it.

The administration panel is under Options » Ravatars. You can adjust the size of the Ravatars, and assign HTML to come before and after each image to help nudge it into place. Each image is also set with the CSS “ravatars” class, so you can fine-tune the avatar position in your CSS file. For easy deployment, icons will automatically precede the commenter’s name.

If that still doesn’t give you enough control over ravatar placement and you don’t mind editing your theme, just turn off automatic placement and add the line

  1. ravatar_show($comment->comment_author_email);

to your comment loop wherever you want the image to appear.

Note that the plugin requires that your install of PHP support the GD library. If it doesn’t, the Ravatars won’t show up and you’ll get a warning in the Ravatar admin panel. You can still use this plugin to display Gravatars, even if the GD library isn’t available. Image manipulation function are very memory intensive. If you get a memory error, try reducing the size of your source images by lowering the resolution or cropping them into smaller parts. You can also increase PHP’s memory_limit.

The readme.txt file that comes with the plugin contains a few other tips and tricks for using the plugin, so have a look at that if you are having trouble.

 

 

Like this plugin? Make a donation.

Tags: , ,

123 Responses to “Ravatar Wordpress plugin for randam avatars”


  1. Yuri Maanzand

    Seems a very cool plugin, however i get an error:
    Fatal error: Call to undefined function: scandir() in /home/blablabla/public_html/wp-content/plugins/ravatars/ravatars.php on line 243

    Something to do with file-permissions?


  2. jess

    Hi Yuri,

    It looks like scandir() is a PHP 5 only function. I’ll post a new version of the plugin that is compatible with both PHP 4 and 5 when I get a chance. Thanks for letting me know about this issue!


  3. jess

    I just uploaded version 1.0.1 which should work with PHP 4 also. Anyone with PHP 4 able to verify that it works?


  4. Move Over Gratavar Its Ravatars Turn » Jeffro2pt0.com

    […] wanted to add some flare to the commenting section of your WordPress blog? Grok-Code has coded up a nifty little plugin called Ravatars. Ravatars displays a random avatar for each […]


  5. sarah

    Cool plugin. I just wanted to see what kind of icon I get.


  6. James

    Checking icon…interesting plugin


  7. Mirco

    cool!


  8. Evern

    was wondering if i did not want the avatar uploaded to my plugins/ravatar/parts folder to be automatically cropped, can i edit the php file in a way so it doesn’t crop the image? meaning just randomly assign avatards to visitors according to their emails without cropping the images i provide? all images i placed in the folder are of the same size.


  9. jess

    Hrrmmm. Interesting question Evern. You might be able to make this work without modifying any code at all. On the Ravatars options screen, try setting the icon size to the size of your images. Your icons will need to by square, and all of the same size like you say. Let me know if it works to do it that way…


  10. Evern

    i already done so and it doesnt work it randomly crops out parts of my avatar images…


  11. jess

    Strange. If you are telling it that you want icons of say, 80 pixels, and all of the images in the plugins/ravatar/parts directory are 80 pixels, it should try to crop the image, but since it can’t be cropped it should just return the original image. It isn’t doing that?

    Well anyway, it shouldn’t be that hard to do it in the code. On lines 258 and 259 you should have
    $width_off = (hexdec(substr ($seed, 6, 5)) % ($width - AVATAR_SIZE));
    $height_off = (hexdec(substr ($seed, 11, 5)) % ($height - AVATAR_SIZE));

    Change those lines to
    $width_off = 0;
    $height_off = 0;


  12. Evern

    Thanks it worked!


  13. Conrad

    I am really enjoying this plugin! Makes such a big difference to the look of the comments. Thank you!


  14. jess

    Thanks for the comment Conrad!


  15. EarnBlogger

    Cool plugin. It will help us to give a personal touch to our blogs! Thanks.


  16. damonx

    nice plugin thanks!


  17. manele

    Checking icon…interesting plugin


  18. Yuri Maanzand

    hmm - strange plugin behavior over here: http://maanzand.com
    - when i activate gravatar support in the ravatar options, it only shows icons from users with a gravatar, the other icons (out of the ravatar-cache) get the standard blue gravatar-logo
    - however, if i deactivate gravatar support, the blue-gravatar-logo-problem is gone, but - of course - there are no gravatars for users with a gravatar.
    any ideas?


  19. jess

    @Yuri I saw the same behavior here on GrokCode, which is why I currently have Gravatar support disabled. I suspect the problem stems from a change in the gravatars API. Gravatars was recently totally rewritten. I’ll be updating the Ravatars plugin within the next few days to fix the issue. Thanks once again for the feedback!


  20. jess

    Ravatars version 1.0.2 which is now up fixes the incompatibility introduced by the Gravatars rewrite. Sites will stop showing the default Gravatar image now. Thanks to Demitrious at Automattic for the help!


  21. Yuri Maanzand

    Thanks a lot for the rewrite! Problem solved over here.


  22. Yuri Maanzand

    Oops. Problem not solved. Gravatar-users get a ravatar instead of their gravatar now. Even with gravatar support enabled in the options. Sorry.


  23. karimun

    Very nice. A useful option for a future release would be to let users actually crop their avatar on their own. Like that they could visually depict their moods. There was a plugin around that did this job but never updated to newer Wordpress versions. Thank for your good work.


  24. jess

    @Yuri That problem should be fixed now too. It looks like an empty Gravatar rating was causing problems. Version 1.0.3 should work for you. *crosses fingers* By the way your site looks very interesting although I can’t read it :)

    @karimun Interesting idea. And I think your point was made even better since your ravatar is all black!


  25. Yuri Maanzand

    Oooh yes. 1.0.3 to the rescue indeed. So stop crossing yer fingers, it worked!
    I’m sorry you can’t read my site, it’s in dutch. But I have one article that is (partly) in english.
    Perhaps you might enjoy the insane story of My Friend Kennedy Mobutu: http://maanzand.com/post/mobutu


  26. JunoMagic

    Hi, I really love the plugin. And I don’t mind editing my theme, but I’m not experienced enough with php to understand your instructions. If I place the code into my comments php, only the text shows up, but not the ravatars. Do I need to add anything to the line? And what exactly do you mean with comments loop? I simply don’t know where in my comments php file to put that code!


  27. Juno’s Magic » Blog Archive » My Theme! My Plugins!

    […] Ravatars […]


  28. jess

    @JunoMagic The easiest way to use ravatars is to just use the auto placement feature. If you really want to to customize the location you will need to know some PHP to edit your theme. The comments loop is a section of code that loops over and displays each of the comments. Since I don’t know how your theme works, I can’t give you specific line numbers for where the comments loop starts, but in my theme the comments loop starts with this line:

    < ?php foreach ($comments as $comment) : ?>

    Hope that helps.


  29. akira

    coool! :)


  30. JunoMagic

    Thank you, that’s very helpful!


  31. lol

    “randAm”? LMAO…


  32. jess

    Ooops! And its in the URL too. I’ll have to see how I can fix it without breaking external links…


  33. birgit

    very nice!!


  34. Becky

    I’m sorry, is this how I place ino my comments.php file?


  35. Becky

    sorry, didnt place it right. comment_author_email); ?>


  36. Becky

    com*ment_author_email); ?*>


  37. Becky

    whatever, i cant place it right without it not showing up. i even tried useing code tags. and now im spamming your comments. thanks anyway.


  38. jess

    @Becky Wordpress likes to break code within comments. Sorry about that. If anyone wants to recommend a plugin for fixing that, I’d be glad to hear about it.

    I would suggest using the autoplacement feature of the plugin to avoid mucking around in the PHP.

    But if you really want to do it try calling
    ravatar_show($comment->comment_author_email);
    within the comments loop in the comments.php file.

    That line needs to be within php tags.


  39. JunoMagic

    What kind of php code do you need to put around the

    ravatar_show($comment->comment_author_email);

    comment_author_email); ?> ? Or something else? Because when I ONLY put the bit of code in that you recommend in the options page, it doesn’t show anything at all.

    I want to use your plugin within Brian’s nested comments, and I can’t get it positioned properly using only CSS. So I’d really rather call it manually. But while I’ve done quite some fiddling with my theme files already, I’m not sure what kind of php code I need to get your ravatar_show to work.


  40. JunoMagic

    Nrgh. The comment form ate parts of my code.

    Sorry.

    Would that be

    <? php ravatar_show($comment->comment_author_email); ?>

    or something else?


  41. jess

    @JunoMagic Yes, the ravatar_show funtion needs to be inside of php tags, so try this: < ?php ravatar_show($comment->comment_author_email); ?>


  42. jess

    The comment form isn’t playing nice with my code either. In the above comment, there should be no space between the ‘<’ and the ‘?php’


  43. JunoMagic

    Thank you- I really appreciate your patience. I can move it now - which is great! But now it only shows one and the same avatar for all commenters! Including me as the admin?! I guess I should just give up … :-(


  44. jess

    @JunuMagic It sounds like the line where you call ravatar_show is outside of the comments loop. Try finding the start of your comments loop and then the closing } that matches with it. There might be many nested matching brackets inside of the loop that you can disregard. Not sure how much sense that makes if you are not a programmer, but I hope it helps.


  45. Carmen

    The plugin doesn’t work in my wordpress.

    The following sentence is shown in the option page:
    “Warning: opendir(../wp-content/plugins/ravatars/cache) [function.opendir]: failed to open dir: No such file or directory in /home/chinakolau/domains/chinakolau.com/public_html/wordpress/wp-content/plugins/ravatars/ravatars.php on line 162
    Cannot open directory for reading.”

    I would like to ask if I can do anything to fix the problem.

    Thx!


  46. jess

    @Carmen It looks like a file permission problem. Try creating a directory called cache inside of /wp-content/plugins/ravatars, then make sure that the owner of the directory has read, write, and execute permissions on the directory. This page has some additional info on changing permissions if you need it: http://samdevol.com/wordpress-troubleshooting-permissions-chmod-and-paths-oh-my/


  47. Rosina Lippi

    Hi,

    I’ve almost got this working, but not quite. I get this error:

    Warning: opendir(../wp-content/plugins/ravatars/cache) [function.opendir]: failed to open dir: No such file or directory in /xxx/xxx/public_html/xxx.xxx/weblog/wp-content/plugins/ravatar/ravatars.php on line 69
    Cannot open directory for reading.

    I made sure that the permissions were all correct, and there’s a cache folder within the raratar plugin folder.

    Any suggestions?

    And a quick questions: There’s support for.jpg and .png files, but not for .gif — will this change at some point?

    Thanks for your help — and the plugin.


  48. jess

    @Carmen & Rosina What version of wordpress are you guys on?

    @Rosina If there is a lot of demand I add .gif, but first on my list is to update the plugin for official wordpress 2.5 support. There is never enough time in the day…


  49. Rosina Lippi

    I’m on 2.5 — and I’m guessing, from the rest of your message, that this plugin is not 2.5 ready.


  50. jess

    @Rosina I’m still working on the admin interface and options for 2.5. I hadn’t come across the problem you are having yet, so thanks for being a beta tester, even if you weren’t aware of it :) I’m hoping to get a version out for 2.5 in the next week, so you might want to sit tight until then.


  51. Rosina Lippi

    Jess — any hope of the 2.5 version soon? Thanks again.


  52. baron

    hi there .thanks for plugin:

    Does anybody know if tis script is compatible with Wordpress 2.5.1 ?

    Thanks in advance for any help on this!

    regards


  53. jess

    OK everybody, I apologize for the delay. Ravatars is 2.5.x ready at last. If you are on 2.5.x, your theme needs to be avatars enabled for the plugin to work.

    As always, let me know if you have any problems with the plugin, and I’ll try to help out.


  54. Latterlig!

    I get the following error message when trying to activate the plugin:

    Fatal error: Cannot redeclare get_avatar() (previously declared in /home/spesiell/public_html/wp-includes/pluggable.php:1217) in /home/spesiell/public_html/wp-content/plugins/ravatar/ravatars.php on line 44


  55. Latterlig!

    BTW: I run 2.5.1…


  56. jess

    Oops. Thanks for the heads up Latterlig! I did something weird when registering the function with wordpress, and didn’t catch this bug since I upgraded without deactivating and reactivating. Ravatars version 2.0.1 fixes it.


  57. Latterlig!

    Thanks. But it still doesn’t work. No ravatars show up (I will double check my theme to be sure it has a get_gravatar line), but on refreshing the cache, it “Cannot open directory for reading”. I’ve checked, and the directory exists, even though I had to create it myself.


  58. jess

    Latterlig!, check the permissions of the cache directory, and make sure that the plugin has permission to write there. If there are still problems, post the exact error message and if possible a link to where I can see the error on your site. Comment here or shoot me an email to jess [AT] grok-code.com

    Lets see if we can get this fixed.


  59. Latterlig!

    I’ve checked now. Permissions are 777 and it still doesn’t work.

    Error message is
    “Cannot open directory for reading.”

    Maybe I checked the wrong directory? The plugin says:
    “/wp-content/cache/ravatars”


  60. jess

    Hrmmm. The plugin should be looking for ‘/blah/wp-content/plugins/ravatars/cache’ so something funny is going on here. What are the permissions of that directory? What is your PHP version (your hosting company should be able to tell you)?

    Does the error message have a line number? Please give me the entire error message.


  61. Latterlig!

    I did some research and found the url to the cache in the .php file. The text in the settings > ravatars, at the bottom, is wrong. Check it yourself in your own installation.

    I created the directory manually, and the cache seems to be working ok. The plugin should create that directory, though.

    And the plugin is not working (I don’t see any ravatars/gravatars). I’m also using the Ajax Comments Reply (http://zhiqiang.org/blog/plugin/ajaxcomment) and that might be the problem. But the get_gravatar line works fine when ravatars is not activated.


  62. jess

    The text in the settings > ravatars, at the bottom, is wrong.

    Ok typo in admin panel has been fixed.

    I created the directory manually, and the cache seems to be working ok. The plugin should create that directory, though.

    Yes it should have been created by the plugin. There was an edge case where the directory was not created properly. Fixed.

    And the plugin is not working (I don’t see any ravatars/gravatars).

    Grab the latest 2.0.2 version of the plugin which fixes the above errors. If the ravatars still don’t display, do a view source on the page, and post the URL of some of the ravatars it is trying to get. The code you are looking for will be something like:
    img class=’ravatar’ border=” src=’http://grok-code.com/wp-content/plugins/ravatars/cache/c4bb682be6f940454.png’ width=’80′ height=’80′ alt=”


  63. Latterlig!

    It’s getting better. Now the gravatars show up, but not the ravatars.

    This one doesn’t show:
    http://www.gravatar.com/avatar.php?gravatar_id=dde663353f0b2811765ae7df5d70a1ea&rating=X&size=80&default=http://spesiell.org/wp-content/plugins/ravatars/cache/dde663353f0b28117.png


  64. jess

    OK. So its looking for the ravatar located at /wp-content/plugins/ravatars/cache/dde663353f0b28117.png but that is giving a 404 not found error. Have a look and see if that file exists. If so, its a directory permissions problem. If not, its plugin bug.


  65. Latterlig!

    The file exists. ;-)


  66. jess

    OK it looks like we are close. Open up permissions on the cache directory. If the file exists, and you are able to resolve this URL: http://spesiell.org/wp-content/plugins/ravatars/cache/dde663353f0b28117.png the whole thing should work.


  67. Rosina Lippi

    Jess — I think it is working now. The problems that remain I think are probably my fault. One BIG question: on the options page I don’t see anywhere to specify size of the ravatar, or what to put before or after it. Can you point me to it more directly? Thanks


  68. jess

    Hi Rosina. I took those options out of 2.5 since in 2.5 that is really the job of your theme. The directions in the post above are all for pre 2.5 which is a bit confusing. I’ll edit them when I get a chance.

    In order to edit the size of the ravatars, look in your theme for the line get_avatar. In the default theme the line is in coments.php and says get_avatar($comment, 32) Change 32 to the size you would like the avatars to be. You can also add your html before and after get_avatar to help position the avatars.

    And thanks to everybody for their patience while getting the kinks sorted out.


  69. Gene Steinberg

    A nice idea, but all I get is a generic icon missing display when I try to use it. Regular Gravatars appear properly. Your cache folder is given a 755 chmod setting by default after installation.

    I can give you specifics about my installation if you wish, but for now it’s just WP 2.5.1.

    Thoughts anyone?

    Peace,
    Gene


  70. jess

    @Gene there are a few things you can check to help narrow down the problem:

    Is Ravatars able to create any avatars i.e. is there anything in the cache directory?

    Do a view source on your page and look for a line like:
    img class=’ravatar’ border=” src=’http://grok-code.com/wp-content/plugins/ravatars/cache/c4bb682be6f940454.png’ width=’80′ height=’80′ alt=”

    What is the img source it is trying to use?


  71. Gene Steinberg

    I have the option to use Gravatars if available, and it insists in pointing to a Gravatar even if one doesn’t exist.

    So I get this:

    That provide a clue?

    Peace,
    Gene


  72. Gene Steinberg

    Sorry, deleted the code.

    Let me try again:

    Peace,
    gene


  73. Gene Steinberg

    Let me try again

    img class=’ravatar’ border=” src=’http://www.gravatar.com/avatar.php?gravatar_id=eedf4ac9e08cd39ad20c491cea6f7932&rating=G&size=32&default=http://macnightowl.com/wp-content/plugins/ravatars/cache/eedf4ac9e08cd39ad.png’ width=’32′ height=’32′ alt=”/

    Hope 3 times a charm. :D

    Peace,
    Gene


  74. jess

    Hi Gene, the comments form likes to eat code. Go ahead and send me an email if it happens again: jess [AT] grok-code.com

    If you have the option checked for using gravatars if available the source should look something like this:
    http://www.gravatar.com/avatar.php?gravatar_id=dde663353f0b2811765ae7df5d70a1ea&rating=X&size=80
    &default=http://spesiell.org/wp-content/plugins/ravatars/cache/dde663353f0b28117.png

    The &default bit is url of the ravatar to be used if that email address doesn’t have a gravatar.


  75. Gene Steinberg

    OK, I think we got a post up that does have the code which resembles yours above. However, non-gravatar avatars aren’t being displayed on my site (I turned the plugin off for now). Just generic icons, not even the non-Gravatar default.

    So?

    Peace,
    Gene


  76. jess

    Looking at your site, an example of a ravatar it is trying to get is http://macnightowl.com/wp-content/plugins/ravatars/cache/eedf4ac9e08cd39ad.png which is giving a 404 not found.

    Does that file exist on your system? Are there files in the ravatars cache? There might be permissions issues that prevent it from being displayed. Or there may be a security plugin or other plugins installed that is blocking access to the file.


  77. Gene Steinberg

    There are files in the ravatars cache It is turned off for now, by the way.

    As to security plugins and such, I’m using WP-Spam Free and Akismet, both latest versions. Permissions are at 755 for most folders/files in the wp-content folder.

    Clues?

    Peace,
    Gene


  78. jess

    Hrrmmm. Strange. Here are my permissions:
    wp-content 755
    plugins 755
    ravatars 755
    cache 755

    How do yours compare?


  79. Gene Steinberg

    Same.

    Peace,
    Gene


  80. Gene Steinberg

    Unless you’re otherwise occupied, can I assume you’re stumped?

    Peace,
    Gene


  81. jess

    Ha! I’m not giving up yet. It could be something in your .htaccess files. If you know how to analyze them, look for anything that would prevent this URL from resolving: http://macnightowl.com/wp-content/plugins/ravatars/cache/eedf4ac9e08cd39ad.png If you don’t have much experience with .htaccess, send them to me and I’ll have a look. We will need to look at a file called .htaccess in every directory from the document root down to cache.


  82. Gene Steinberg

    Here’s the one at the main level of that particular URL. There’s nothing in any of the WP sub-folders, except for whatever they install:

    order allow,deny
    deny from all

    Options +FollowSymLinks
    RewriteEngine on
    RewriteRule ^.htaccess$ - [F]

    RewriteBase /
    RewriteCond %{HTTP_HOST} ^www\.macnightowl\.com$
    RewriteRule ^(.*)$ http://macnightowl.com/1 [R=301,L]

    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_URI} ^/(stats|failed_auth\.html)/?(.*)$ [NC]
    RewriteRule ^.*$ - [L]

    # BEGIN WPSuperCache

    RewriteEngine On
    RewriteBase /
    AddDefaultCharset UTF-8
    RewriteCond %{QUERY_STRING} !.*s=.*
    RewriteCond %{QUERY_STRING} !.*attachment_id=.*
    RewriteCond %{HTTP_COOKIE} !^.*(comment_author_|wordpress|wp-postpass_).*$
    RewriteCond %{HTTP:Accept-Encoding} gzip
    RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html.gz -f
    RewriteRule ^(.*) /wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html.gz [L]

    RewriteCond %{QUERY_STRING} !.*s=.*
    RewriteCond %{QUERY_STRING} !.*attachment_id=.*
    RewriteCond %{HTTP_COOKIE} !^.*(comment_author_|wordpress|wp-postpass_).*$
    RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html -f
    RewriteRule ^(.*) /wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html [L]

    # END WPSuperCache
    # BEGIN WordPress

    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]

    # END WordPress

    Part of this is for WP Super Cache and to force www to non-www, plus the normal WP stuff and the addition for proper stats.

    Peace,
    Gene


  83. Gene Steinberg

    Some of the foregoing code is missing because of the way your comments panel parses it, but I think you have the essentials there, when you add proper codes as appropriate.

    Peace,
    gene


  84. jess

    Hrmmm. I don’t see anything there that looks particularly relevant, but its possible I missed something. I would like to try to rule out the possibility that it is either .htaccess or a WP Super Cache conflict. Can you try this test?

    1. Deactivate the WP Super Cache plugin
    2. Verify that everything between ‘# BEGIN WPSuperCache’ and ‘# END WPSuperCache’ in .htaccess has been removed
    3. Comment out part of .htaccess by putting a ‘#’ in front of each of these lines and save the file

    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_URI} ^/(stats|failed_auth\.html)/?(.*)$ [NC]
    RewriteRule ^.*$ - [L]

    4. Make sure the Ravatars plugin is activated, and your browser cache is cleared. Do the ravatars show up?
    5. Remove the #’s you added in step 2 and save the file. Reactive WP Super Cache.

    Note that this test will remove caching and stat tracking on your site for a short period of time. Get a backup of your original .htaccess before you start.


  85. Gene Steinberg

    I tried each and it failed to change anything, so I’m back to the normal config.

    Is that stat stuff actually needed? I picked up up when I was at DreamHost last year, and never changed it. I’m no longer there, so what’s the skinny?

    Peace,
    Gene


  86. jess

    I think that section is to hide access to any stat files or log files that dreamhost was creating for you. If your current host isn’t using files or directories called stats or failed_auth.html you should be safe removing it.

    Can you give me a full list of all of the plugins you have installed so I can try to rule out plugin conflicts?

    I’m also going ask around a bit about your problem on a few mailing lists and see if anyone knows how to fix this. We have ruled out file permissions and .htaccess problems, I can’t think of what else could cause a 404 on the http://macnightowl.com/wp-content/plugins/ravatars/cache/eedf4ac9e08cd39ad.png URL. Could you humor me and check one more time that that file really does exist? Open it and make sure it’s a normal image.

    Oh and one more quick test. Enable ravatars, then in the ravatars option panel, disable gravatars. Does that change anything?


  87. Gene Steinberg

    Disabling gravatars makes no difference. I did remove the stat entry, since it appears not to have had any negative impact.

    Here’s the list of active plugins, other than you:

    Akismet 2.1.5
    All in One SEO Pack 1.4.6.8
    Automatic Timezone 1.0
    Clean Archives 3.0.0
    DBD Mailto Encoder 1.0
    FeedBurner FeedSmith 2.3.1
    Google XML Sitemaps 3.0.3.3
    InstantUpgrade 1.0-beta2
    Mail From 1.0
    Quoter 1.1
    ShareThis Classic 1.5.2
    Simple Tags 1.5.7
    Star Rating For Reviews 0.4
    StockQuoteSB 1.3
    Subscribe To Comments 2.1.2
    WordPress Mobile Edition 2.1a
    WP-DBManager 1.30
    WP-Print 2.30
    WP-ServerInfo 1.30
    WP-SpamFree 1.8.3
    WP-Sticky 1.30
    WP Ajax Edit Comments 1.1.5.1
    WP Super Cache 0.6.4

    So far as I can tell, it’s all the latest and greatest.

    Peace,
    Gene


  88. jess

    Great thanks for the plugins list. I’ll see what I can find out.

    Were you able to open the image file in ravatars/cache? You’d have to get it with an ftp client.


  89. Gene Steinberg

    I can open the image directly, yes, via the URL.

    But it won’t appear on the page.

    Peace,
    Gene


  90. Jonatán Rueda

    Hi Gene,

    I like this plugin and nice work, but I’m not able to see the ravatar images. I just enabled the plugin, I also have the gravatar site enabled (I can see the gravatars of user that have them) but the ravatars doesn’t appear. I realised that the final html code generated link with cache images that doesn’t exists (error 404 if I try to see them on the explorer). When I navigate over the site, I can see how the cache folder grow up. But then doesn’t appear.

    Could you take me a hand with this please?
    My site is http://www.unraticode.com.


  91. Gene Steinberg

    I’m not the programmer. I have the same problem you do.

    Peace,
    Gene


  92. jess

    What version of Wordpress do you have Jonatán?


  93. Jonatán Rueda

    Sorry Gene, Hi Jess, I’m on 2.5.1

    Thanks.


  94. jess

    OK guys. Disactivate and delete the Ravatars plugin files, then download and install the new version (2.0.3)


  95. Jonatán Rueda

    Wow! It works perfect right now.

    I never seen a faster programmer serving his users. Bravo!

    Just a little question. Is there any way to resize the image instead of cropping it?

    Thank you very very much.


  96. Gene Steinberg

    So it works now. Thanks.

    Peace,
    Gene


  97. jess

    Sweet! Glad I could help.

    @Jonatán - There isn’t a way to resize the images with the plugin, but you could resize your images manually before uploading them. I’ll consider adding resizing as a new feature…


  98. Jonatán Rueda

    To which size. It always crop the images and add an pixel offset to them. I tried with 80×80, 160×160 and 200×200. Always the same result. You can see them here.

    Best Regards.


  99. Sandra

    Thank you so much for this plugin, I really like it. Now I’ve just got to make my own pictures. ;)


  100. Sarahe

    Hi.
    I am trying to get this ravatar thing going, I have upload a bunch of 100×100 pics into the parts directory of ravatar but when they are generated they only take a corner of the picture and then the rest of the avatar is black. So i end with only one corner of the avatar being a picture, and it’s not even a good corner. How do I fix this? can you not have the whole image used as an avatar?
    Also I only have a new site, with only 2 users (only day 2 of site!) and I thought maybe if I cleared the cache (which I had to create as there was no cache directory) it might generate me a new avatar, and now I am getting nothing! no avatars for me or the other user who never had one generated before.
    I’m confused help!!


  101. jess

    What size avatars are you using? Ravatars crops the images so that they are the size that the theme specifies - it won’t resize anything. You can have the whole image used as the avatar, but the source images need to be the same size as the avatars in the theme for that to work. I’m not sure why part would be black if there isn’t any black in the source images. Strange. Do you have an example? Or a link where there are comments, but the avatars aren’t showing up?


  102. Chris

    how can I include my own picture collection?
    … and how can I have smaller pictures for the “New Comment” sidebar?


  103. explorish

    hi,
    how can i make the avatars show in the “recent comments” widget? i am using neoclassical theme, i think i need to tweak it myself.
    thanks a lot in advance!


  104. jess

    @Chris replace the images in the ravatars/parts directory with your own images. Look for the call to get_avatar() in the sidebar. It will look something like this: get_avatar($comment, 32) The number at the end is the size the avatar should be. Unfortunetely, if you have avatars of 2 different sizes for the same person, they will be different parts of the same source image, so they won’t look the same.

    @explorish Try adding the code get_avatar($comment, 32) inside the comment loop code for the recent comments. Change the 32 to whatever size you would like the avatar to be.


  105. explorish

    @jess
    thanks - i dont find a “recent comments” loop. i dont have such a file in the theme, and i don’t have a get_avatar command (i introduced it myself in the “comments” loop, it shows up with the post comments, but not in the sidebar widget. i can’t find any recent comments section anywhere - not in the sidebar, not in the left bar… any suggestions?
    thansk a lot!


  106. jess

    @explorish How are you getting the recent comments? Through a plugin? If so, have a look in the plugin code and you should find a recent comments loop there. Then add get_avatar the same way you did for the regular comments loop.


  107. explorish

    no - thru the normal “recent comments” widget, that comes with the theme. i see no php for the respective widget…


  108. jess

    @explorish hrmmmm. Is there anything interesting in your theme’s functions.php that looks like the code for the widget? If you don’t have a whole lot of experience with PHP, email me that file and I’ll have a look. jess [AT] grok-code.com


  109. Sheta

    Hi there. Ravatars is no longer working on my site. I’m not sure when it stopped, cuz I’ve had a lot of various issues lately and it escaped my notice til the other day. I followed the advice above, including editing my htaccess file, and completely broke my site and had to go so far as delete the entire site and start over (including uninstalling Wordpress three times!). I finally stumbled upon the answer to the break for the site (had to do with wp_redirection plugin, and I had to drop the database tables for that plugin for my site to start showing up again; I’d been getting a blank page.)

    But after all that, ravatars still do not work. I’m using the newest version of Wordpress with a fresh, clean install of the latest Ravatars plugin. I’ve already tried removing all other comment-related plugins, and when it didn’t help I put them back. All other plugins I’m using are:

    Admin Drop Down Menus
    Akismet
    All in One SEO Pack
    Better Comments Manager
    Category Icons
    cforms (Currently disabled)
    Clean Archives Reloaded (currently disabled)
    Click Tags
    CommentLuv
    Cricket Moods
    Excerpt Editor
    FeedSmith
    FireStats (currently disabled)
    Google XML Sitemaps (currently disabled)
    Homepage Excerpt (currently disabled)
    KB Advanced RSS Widget
    Maintenance Mode
    MaxBlogPress Ping Optimizer
    Mini Posts 2
    My Page Order
    NexGen Gallery (currently disabled)
    Official Statcounter Plugin
    Page Category Plus
    Post Avatar
    Register Plus
    Search Unleased
    Simple Trackback Validation
    Subscribe to Comments
    Tag Functions (currently disabled)
    TagMahal
    Wordpress Duplicate Content Cure
    WP-dtree
    WP-OpenID (currently disabled)
    WP-Polls
    WP Ajax Edit Comments
    WP Captcha Free
    WP Super Cache (currently disabled)

    Now I do like Ravatars and am willing to kill less essential plugins for it, but nothing that is important. For the record, I have tried deleting all plugins and starting with Ravatars, and it didn’t work alone, either.


  110. Sheta

    Are comments moderated? Cuz mine vanished, and I didn’t get any sort of confirmation that it would be added on approval… (this is a test).


  111. jess

    @Sheta Wow. Sounds like you’ve been having a tough time. Maybe I can help…

    What exactly is the plugin doing now? Are you getting gravatars but no ravatars? Or neither? If you view source on a page with comments, can you see the code where it is trying to display ravatars?

    Your original comment had to be rescued from the spam filter, thats why it vanished.


  112. Sheta

    @jess - Hi. My site is down again; it seems to hate me this week and I’ve had to put in a call to my webhost. But to answer your questions…

    Neither Gravatars nor Ravatars show up; HOWEVER, I can see the ravatars just fine on my manage comments screen. They’re just not displaying on the public pages. This of course is when the site is working. heh. I can say however that this behavior has been consistent through the entire unrelated nightmare of the many crashes of the entire site this week.

    Ahh spam filters. ;) lol


  113. jess

    @Sheta hrmmmm Without seeing your public pages, I don’t know that there’s a whole lot I can do to help. Do you want to give me an update when I can see the pages that aren’t displaying ravatars? Good luck getting your site back up!


  114. Wordpress 2.5 versiyonu ile uyumlu Eklentiler | Fırtına 30 05

    […] Ravatars 2.0 […]


  115. Gatero

    @jess: Thank you for your work on this, this is one of the best plugin ideas out there. All it needs is a little tweak… I read your dialogue with Evern, who wanted non-cropped random avatars. Allowing people to simply have an uncropped random avatar assigned to guests from a directory would be great.

    Personally, I’d just like to get some small .gifs going for mine. I’m not too good with code, so it’s a trial-and-error process… Whatever Evern did to make it work ain’t workin’ for me. I’m trying to figure out what I can break that would stop the generation process and just return whole avatars, and possibly allow animated .gifs. ‘Don’t suppose I could bother you for some pointers could I?

    @Sheta: I think I know what your problem might be (hope you’re not still dealing with too much trouble by now). I had the same thing happening to me, where images wouldn’t appear on public comments but they would show up when managing comments. It turned out that it was my theme’s comments.php file that was the cause. Try switching to a different theme; if avatars show up then it’s probably that your current theme’s comments.php file is missing this: Once I figured out where to put that, it was all fixed.


  116. jess

    @Gatero Those are good ideas for the next version of the plugin. I’ll see if I can get a version out soon that has the option for not cropping and also allows .gifs. Thanks for the feedback!


  117. Gatero

    I’ve found the solution to Sarahe’s problem, where only the corner of a ravatar displays the image while the rest is black. The problem lies in the line: define(”AVATAR_SIZE”, ‘80′); on line 15 of ravatars.php. Change this to the desired size (in Sarahe’s case, 100), so that it matches the setting. When the value matches the avatar size of the theme, it should return the image in the right size… or at least, it fixed my problem when I changed that.

    Keep up the good work jess, I’ll be watching for the next version!


  118. Sheta

    @Gatero: Your code didn’t show up. Can you repost in a way that allows it to display? Thanks!!


  119. Sheta

    @Gatero addendum: My Ravatars used to show up with the theme I’m using, but don’t now. I’d still like to see the code, though. :)


  120. anyunk

    I’m trying this avatar…


  121. Wordpress 2.5 Uyumlu Eklentiler (Liste) | Wordpress Tema Ve Eklenti

    […] Ravatars 2.0 […]


  122. Haid Dasalami

    Test.


  123. Robson Tambarotti

    to procurando a diferença do WP-Gravatar do Ravatar

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>