Gravatar Signup
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-signupfolder to your site’s/wp-content/plugins/folder. - New in version 1.4: make
/gravatar-signup/gravatar-cache.txtwritable - 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.


Cool plugin, thanks!
There are a few XHTML validation problems with the show form because the input tags haven’t been closed.
e.g.
<input style="width:auto;" name="get_gravatar" id="get_gravatar" value="get_gravatar" type="checkbox" onclick="gravatarCheckBox(checked);" />Please get it corrected
Thanks Ajay!
oh cool. i think i’ll use this. might get more pretty pics on my comments. hehe.
Your welcome.
Thanks for correcting it
Does the download file here contain the corrected code?
Amit, it does now! Basically, each version gets its own tag, here:
http://dev.wp-plugins.org/browser/gravatar-signup/tags/
The latest stable version can always be found here:
http://dev.wp-plugins.org/browser/gravatar-signup/tags/latest-stable/
And if you want to see the latest code being written, go here:
http://dev.wp-plugins.org/browser/gravatar-signup/trunk/
Ver. 1.6.1 wasn’t found on the server… ?!
Micha, thanks! Made a typo when creating the zip file. It’s fixed now.
THX
Lightning fast service, better than a commercial coder.
this is great but i keep getting this error
Error: gravatar-cache.txt does not exist!
Heather, you have installed the plugin in
/plugins/gravatar-signup%20Folder/It needs to be in
/plugins/gravatar-signup/So just rename that folder (might need to reactivate the plugin… not sure).
Then, make sure
gravatar-cache.txtis writable, and you should be in business!thanks alot for the quick reply
it works fine now!
gravatar.com seems to be offline for now. Theres no a-record.
gwhois gravatar.com | grep expires
Record expires on 15-Jul-2005.
Did anybody know another service like gravatar.com? Or hear somethink from gravatar.com that it will be going back online in a few days?
@Stefan:
Try this link
hey I was wondering how to get gravatars to show up in comments, I thought that was what this does. is there another plugin? i’ll be searching till then Thanks in advance
See the link at the very top of the page (it’s just a Google search, but the first two results are fine.)
Hm. wordpress-pluginmanager didnt inform that theres a new version. Eventually you should do somethink with mod_rewrite to forward the old plugin-URL…
Hey Mark, I can’t get the plugin to work on my site. Installed everything correctly I think (used the latest stable version), and the “sign up for a free avatar” checkbox shows up nicely for those appropriate. However, when one checks the box and then fills in a password and hits submit, I get a nasty PHP error that goes like this:
Fatal error: Cannot redeclare show_gravatar_signup() (previously declared in /home/lyanna.nl/public_html/journal/wp-content/plugins/gravatar-signup/gravatar-signup.php:17) in /home/lyanna.nl/public_html/journal/wp-content/plugins/gravatar-signup/Snoopy.class.php on line 17
Do you have any idea as to how to fix that?
Lyanna, please try upgrading to the latest version of WordPress. Don’t forget to run the upgrade script
/wp-admin/upgrade.phpafter uploading the new files. Then, if WP 1.5.2 hasn’t been released by the time you do this, download this version ofwp-settings.phpand replace the version in your WordPress directory (contains a security fix).I can’t guarantee that this will fix that error, but it’s something you should do anyway. Let me know if you still get the error after upgrading.
I’ve upgraded to WP 1.5.1.3 and replaced the settings file, but alas, still the same error.
Lyanna,
Okay… I think I figured it out. I won’t bore you with the technical details, except to say that this sure had me puzzled for a while. Please try redownloading the plugin and uploading to your site. There apparently was a glitch when you downloaded it.
w00t!!
It works. Thanks so much, especially for the very very speedy replies. You’ve got some awsome support going on there.
Lyanna
cool..testing it right now
testing
test this thing
Look like a good plugin follow all the step but after postig get a blank page
dir gravatar-signup chmod 777 gravatar-cache.txt chmod 666
I think it is your CAPTCHA anti-spam plugin (the image with the letters and numbers) causing that problem.
How do I change the formatting? This is a great plugin but I can’t get the checkbox to line up with the other one in the form.
http://www.nothingtastesasgood.com
Thanks!
When I submit a comment with that box checked on my local test blog, I get this error:
Fatal error: Call to undefined function: submit() in [...]wordpresswp-contentpluginsgravatar-signupgravatar-signup.php on line 147That’s this line:
if($snoopy->submit($submit_url,$submit_vars)) return true;I have WordPress v1.5.2 installed which comes bundled with Snoopy, but I also have
Snoopy.class.phpin mygravatar-signupfolder just to make sure.What gives?
Prueba.
I have this plugin installed, but wherever I place
it and anything below it get moved so that it is underneath the last line in the sidebar! What’s wrong here?Sounds like a CSS issue with your layout, which you’ll have to fix with trial and error.
Great. Oh well.
For some odd reason, I can’t get it to show up in Safari on my page. It has to be some odd CSS quirk. Works fine in Firefox. Will have to test IE tomorrow. Anyways, it’s a neat plug-in, thanks!
For some odd reason, I can’t get it to show up in Safari on my page. It has to be some odd CSS quirk. Works fine in Firefox. Will have to test IE tomorrow. Anyways, it’s a neat plug-in, thanks!
have this plugin installed, but wherever I place it and anything below it get moved so that it is underneath the last line in the sidebar! What’s wrong here?
hi there,
I am trying to get it working with wpmu, it works but after sending the comment there is an error like this:
Warning: array_filter(): The second argument, ‘Array’, should be a valid callback in /var/www/web15/web/wp-inst/wp-includes/capabilities.php on line 142
Warning: Cannot modify header information - headers already sent by (output started at /var/www/web15/web/wp-inst/wp-includes/capabilities.php:142) in /var/www/web15/web/wp-inst/wp-includes/pluggable-functions.php on line 183
If you click refresh or go back, the coment will have been posted and you are signed up for a gravatar, still the errors are annoying.
If you want to see and try yourself, here is a link: h**p://zice.ro I did not make it a working link as not to get too many visitor as I am just testing, the blogging service is not yet functional.
Feel free to post/comment wherever you like, maybe we can get this great plugin working.
cheers
Ovidiu
I can’t remember when I first installed this, but it was working perfectly. I then just noticed yesterday that the check box isn’t showing up anymore. I downloaded the newest version and even added the include tag just in case, but it’s still not showing up. I even double checked that the plugin was still activated. Any idea?
I’ve upgraded to WP 1.5.1.3 and replaced the settings file, but alas, still the same error.
Kitty,
It’s working… I just visited your site and it was there. Note that it doesn’t show up for people who already have a Gravatar!
Hi everybody,
One question: Will you update the script for WP2? In my case it does not work with 2.0!
Is anyone out there where it works?
How do I change the formatting? This is a great plugin but I can’t get the checkbox to line up with the other one in the form.
i just installed it on my site , it doesnt show up. i use the latest Wp which is 2.0. help me pls
Sig,
It’s working. It just doesn’t show up if you have a comment cookie saved and you already have a Gravatar. See here.
Gry,
You can edit the plugin to make it emulate the html you are using. The default HTML is made to work with WordPress’ included themes, but it doesn’t work with every layout.
tnks so much mark. appreciate it..Great work n keep it up
The latest version doesn’t validate to XHTML Strict.
I changed this line:
(script language=”Javascript” type=”text/javascript”)
to
(script type=”text/javascript”)
Substituting parantheses for carrots, of course. That made it validate just fine, and as far as I can tell did not break the plugin… granted I haven’t tried to sign up.
Just an FYI.
Thanks Tyler… you’re absolutely correct
languageis an old HTML 4 holdout and shouldn’t be in there. I’ll have it out in the next version.The plug-in appears to not be WP 2.0 compatible
cool site, nice script cheers
nice site mate
I recently upgraded my WordPress installation to version 2.0.1 and it appears the plug-in does not cooperate :-(. Just wanted to make you aware.
Great plug-in though!
Ah crap!
Nevermind…I deleted my cookies from my site and it is displayed now!
What a fool I am…
ejemplo
Works perfectly. =) At first I kept wondering why it didn’t show up, then I read the comments here and logged out of my WP Panel. Presto, it showed up. Thank you for the plug-in!
Very nice Plugin. Thank’s for it.
Nice!!!