[bbDev] adding gravatars
Neil Patel
neildpatel at gmail.com
Sat Jan 1 20:20:23 GMT 2005
I think that gravatars would be a great addition. As far as coding
them in PHP I would recommend taking a look at the wordpress gravatar
plugin: http://www.gravatar.com/implement.php#section_2_2. Once the
plugin system becomes active in bbPress I think that adding gravatars
as a plugin would be the ideal way to call them in order to keep the
core of the system as light as possible.
On Fri, 31 Dec 2004 14:58:05 -0800, fernando <fernando at dubtribe.com> wrote:
>
> 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?
>
> _______________________________________________
> bbDev mailing list
> bbDev at lists.bbpress.org
> http://lists.bbpress.org/mailman/listinfo/bbdev
>
>
>
More information about the bbDev
mailing list