Please note that this plugin will not make Gravatars show up in your comments! There are plenty of other plugins to do that.
Gravatars are showing up on blogs everywhere. Want a way to make it really easy for your site’s readers to sign up for their very own Gravatar? This is the plugin for you.
Gravatar Signup
Gravatar Signup is a WordPress plugin that puts a checkbox in your comments form that says “Sign me up for a free Gravatar!” If the user checks that box, some additional text and a password field will appear right below the checkbox. If the comment form is submitted with the Gravatar box checked, with a valid e-mail address provided, and with a password in the Gravatar password field, the plugin will sign the commenter up for a Gravatar as their comment is posted. They’ll get an e-mail from Gravatar just as if they had used the signup form at the Gravatar site.
This, I hope, will help take away one of the barriers to entry for Gravatars. If people have to go to another site and fill out a form, they might not want to do it. But since they are already leaving a comment, all it takes is a “check” and a password to sign up using this plugin.
Download
Installation Instructions
- Download and open the zip file.
- Copy the
gravatar-signup
folder to your site’s/wp-content/plugins/
folder. - New in version 1.4: make
/gravatar-signup/gravatar-cache.txt
writable - Activate the plugin in WordPress.
- If you are using WordPress 1.5 with one of the default plugins, you’re done! The form elements will be put in your comments form. If you are using a 3rd party template, it might not show up. If that is the case, or if you would like to change where it shows up in your form, you’ll need the next step.
- Paste the following code somewhere in your comments form:
<?php show_gravatar_signup(); ?>
Versions
- Version 1.6.3, Adapts to change at Gravatar site that broke the plugin, uses WP Snoopy
- Version 1.6.2, Plugin page pointed to here
- Version 1.6.1, Fixed XHTML invalid code
- Version 1.6, small updates for better WP 1.5.1.2 compatability
- Version 1.5, mandatory upgrade. Gravatar changed some things on their servers, so the only way you’d see the checkbox is if you didn’t have a comment cookie… Also, new code for dealing with registered WP users and compatibility with recent WP 1.5.1 builds
- Version 1.4.1, minor fix: checkbox was accidentally given tabindex of “2”
- Version 1.4, caching of known Gravatar hashes, much faster performance thanks to tip from C.S. in comments
- Version 1.2.1, small bugfix for line 93
- Version 1.2, previous commenters who already have a Gravatar won’t see the checkbox
- Version 1.1, bugfix for manually inserted code in comments form
- Version 1.0, initial release
Update: Please note that this plugin will not make Gravatars show up in your comments! There are already many great plugins for WordPress that do that, and I didn’t want to reinvent the wheel. Google is your friend.
Update: Please upgrade to version 1.5! Thanks to Geof for bringing to my attention that something wasn’t working. Gravatar changed something on their servers, so the method I was using to see if the current commenter already has a Gravatar was failing. Now, it’s using a method that shouldn’t break in the future, since it’s the new method that the people at Gravatar have recommended! Also, fixes for sites with user registration as well as compatibility with the latest WP 1.5.1 builds. You should flush out (empty the contents of) your gravatar-cache.txt
file, because it’s likely filled up with hashes of people who don’t have Gravatars, due to the fact that the code was creating false positives.