See: http://code.google.com/p/textpattern-plugins/wiki/GlxGravatar
Unfortunately, a plugin cannot be written for TextPattern at this time. TextPattern's plugin support for comment manipulation is non-existant, and we must therefor rely on the following hack. Even if you don't know PHP, this hack is easy to implement and only requires the addition of a single line of code to a single file. These instructions refer to TextPattern Gamma 1.19.
Installation: Find and open the file at . Scroll down to line 126. You want to enter the line below that is in bold
124 $temp = preg_replace
('/<(txp:comment_permlink)>(.*)<\/\1>/U',
125 '$2',$temp);
126
127 $temp = str_replace('
'http://www.gravatar.com/avatar.php?
gravatar_id='.md5($email), $temp);
128
129 $out .= n.t.'
Save the file and your installation is complete.
Usage: This hack basically replaces every instance of in a TP comment form with the gravatar request url and gravatar_id in md5 form. You can then incorporate this into your code like so:
If you want to include the size, default, or border arguments in the gravatar URL, simply add them in the comment form like so
Since this is a hack, be careful when upgrading TextPattern, as the file you modified may be overwritten. When TextPattern allows us to write a plugin for this functionality, we will do so, but until then, hack away!