Hi,

this is for blogelephant.com

I dropped

if ($comment->gravatar) { print $comment->gravatar; } elseif ($picture) { print $picture; }

into comment.tpl.php

I pointed to a default picture in the interface http://blogelephant.com/files/gravatars/blogelephant_gravatar.png

That shows up for all anonymous users. Their gravatars don't work. I've tested it.

Any ideas to get this working. Or should I just remove the module. Is the module working? I know its in development. Thanks for your help.

Comments

Narno’s picture

Component: Code » User interface
Assigned: Unassigned » Narno

Hum, so strange... can you make some screen capture of the user settings page et Gravatar settings ? And, is the "user access" to Gravatar is ok ?

seanHodge’s picture

StatusFileSize
new72.29 KB
new55.38 KB

I'm really excited. The module is working. I made a change to a setting in the module I should not have. I pointed out where I made the mistake in the screenshot.

So, Gravatars work for users that have them that visit the site. I also got a default picture in for users that don't have a gravatar, which is really cool by the way. I love that feature of your module.

The only remaining issue is that my User Picture doesn't show up in comments. I attached a screenshot. I'm not sure if this is a related issue or not. I do have the code you recommend in a comment.tpl.php file:

if ($comment->gravatar) { print $comment->gravatar; } elseif ($picture) { print $picture; }

Any thoughts on what I might try to fix this issue? Thanks.

Also, I listen to the Lullabot podcast and they gave a bunch of ways to get involved with Drupal. I'm not a php programmer so I wasn't sure how. But they mentioned that helping with documentation is often needed. If I can help out with this module that way or another way let me know. I know your doing this work volunteer and I really appreciate it.

Thx.

Narno’s picture

StatusFileSize
new17.54 KB

Hi, I'm very happy you appreciate this module! :-)

About the first issue, i will fix the default configuration.

On the other hand, have you uncheck "Use my Gravatar in comments" in your user account, to display your profile picture instead of your Gravatar.

Thanks for your support!

ataliba’s picture

In my Drupal, I fix this issue, changing this line in gravatar.module ( line 201 ) :

The original line is :

$grav_url .= "&default=" . urlencode(url($default));

The line with the fix :

$grav_url .= "&default=http://".$_SERVER['SERVER_NAME'] . urlencode(url($default));

Narno’s picture

Hum... I suggest this code :

if (!preg_match('/^[a-z]+:\/\//', $default)) {
  global $base_url;
  $default = $base_url . '/' . $default;
}

I thinks it's better ! :-P

Narno’s picture

Component: User interface » Code
Category: support » bug
Priority: Normal » Critical
Status: Active » Closed (duplicate)
Narno’s picture

Status: Closed (duplicate) » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)

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

lexx27’s picture

I had the same problem and used the snippet the other way around, and it worked :)

 <?php
if ($picture) { print $picture; } elseif ($comment->gravatar) { print $comment->gravatar; }
?>