It'd be really handy if there was a section in the readme that mentions what code we should use in order to display a gravatar in a block or custom module.

Comments

davidneedham’s picture

I say that because it'd save me the last hour of trying to figure out how to call it... and I'm still not having any luck. Any tips? I basically just want to display the user's avatar, be it gravatar or one they uploaded in a block.

Thanks in advance!

davidneedham’s picture

I'm still trying to figure this out.

How do I display the user's gravitar image? I just need to put it in a block with other code.

Dave Reid’s picture

Status: Active » Fixed

Sorry I hadn't responded sooner. WIth 6.x-1.7, here's how you get a Gravatar:

_gravatar_get_gravatar(array('mail' => 'example@example.com'));

The current code that will be 6.x-1.8:

gravatar_get_gravatar('example@example.com');
davidneedham’s picture

Thank you thank you thank you!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Ben Clifford’s picture

Version: 6.x-1.7 » 7.x-1.1
Status: Closed (fixed) » Active

"How do I display the user's gravitar image? I just need to put it in a block with other code."

Could you give the code to do this in drupal 7 with Gravatar 7.x-1.1

Thanks in advance.

Narno’s picture

Status: Active » Fixed

Gravatar 7.X:
gravatar_get_gravatar('example@example.com');

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.