[bbDev] adding gravatars

fernando fernando at dubtribe.com
Fri Dec 31 22:58:05 GMT 2004


i've been thinking that bbPress needs some form of avatar scheme. no 
better that i know of than gravatars.

i have a couple questions:

Gravatar.com say about using gravatars with php:

Implementing gravatars with PHP is quite simple. PHP provides both 
md5() and urlencode() functions, allowing us to create the gravatar URL 
with ease. Assume the following data:

$email = "someone at somewhere.com";
  $default = "http://www.somewhere.com/homestar.jpg";
  $size = 40;

You can construct your gravatar url with the following php code:

$grav_url = "http://www.gravatar.com/avatar.php?
  gravatar_id=".md5($email).
  "&default=".urlencode($default).
  "&size=".$size;

  Once the gravatar URL is created, you can output it whenever you 
please:

<img src="<?php echo $grav_url; ?>" alt="" />


And so this would be a matter of adding it to the functions?
i am puzzled by this part of php, like wanting to add images, or ubb 
code, where and how to place it is over my head.

Yet once place, wouldn't the implementation be as simple as creatig 
another <th> in the  forum view, and just above the author information 
(or perhaps actually in the same area) include the <img src="<?php echo 
$grav_url; ?>" alt="" /> tag followed by a <br />

it does seem simple.

but where and how to insert the function is not clear to me.

does anyone else think Gravatars of some type would be a positive 
addition?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/enriched
Size: 2449 bytes
Desc: not available
Url : http://one.textdrive.com/pipermail/bbdev/attachments/20041231/f0f24c1f/attachment.bin


More information about the bbDev mailing list