I've always been a big fan of gravatars. I dont know im just a sucker for little images representing people. anyway for those of you who dont know what they are, check out gravatar.com
For those of you who do, and want to have alittle hack to plop them into your comments, here is an easy one line hack to do it.
go to image.php in your theme, and if its the default theme go to around line 49, or just look for <div class="commentmeta">, and plop the following line of code right after that (make sure its the first one).
`
<?php $grav_email=getCommentAuthorEmail(); $grav_url = "
http://gravatar.com/avatar.php?gravatar_id=".md5($grav_email)."&default =
http://www.gravatar.com/images/common/default.jpg".urlencode($default)."&size = 80"; echo "<img src="$grav_url" alt=" " class="gravatar">" ; ?>
`
this will give you an 80x80 image styled with the css class gravatar. Now just style it and you're done
Here is some css you could use in your zen.css
.gravatar {
width: 20px;
border: 1px grey solid;
padding: 1px;
vertical-align: middle;
}
here is an example of what it looks like:
http://www.pseudoweb.net/zenphoto/index.php?album=favorites&image=IMG_0385.jpg p.s. As you can see this is pretty easy to impliment. if we ever do get a plugin setup going, i would love to make a plugin for this.
Comments
Sec nice optional plugin for Zenphoto!
`code` <div class="commentmeta">
<?php $grav_email=getCommentAuthorEmail(); $grav_url = "http://gravatar.com/avatar.php?gravatar_id=".md5($grav_email)."&default = http://www.gravatar.com/images/common/default.jpg".urlencode($default)."&size = 80"; echo "<img src="$grav_url" alt=" " class="gravatar">" ; ?>
<span class="commentauthor"><?php printCommentAuthorLink(); ?></span> says:`code`
And now I get some weird error:
Parse error: parse error, unexpected T_VARIABLE, expecting ',' or ';' in /opt/lampp/htdocs/photos/themes/default/image.php on line 50
http://www.pseudoweb.net/zenphoto/themes/EdtheTheme/image.txt
see if you can just grab it from there, i have the code block marked with comment tags
Thanks,
Chris