diff options
Diffstat (limited to 'extensions/Gravatar')
-rw-r--r-- | extensions/Gravatar/Extension.pm | 7 | ||||
-rw-r--r-- | extensions/Gravatar/template/en/default/hook/bug/comments-user-image.html.tmpl | 6 |
2 files changed, 9 insertions, 4 deletions
diff --git a/extensions/Gravatar/Extension.pm b/extensions/Gravatar/Extension.pm index e30e921c1..52bbd3d08 100644 --- a/extensions/Gravatar/Extension.pm +++ b/extensions/Gravatar/Extension.pm @@ -20,16 +20,17 @@ BEGIN { } sub _user_gravatar { - my ($self) = @_; + my ($self, $size) = @_; if (!$self->{gravatar}) { if ($self->setting('show_my_gravatar') eq 'On') { (my $email = $self->email) =~ s/\+(.*?)\@/@/; - $self->{gravatar} = 'https://secure.gravatar.com/avatar/' . md5_hex(lc($email)) . '?size=64&d=mm'; + $self->{gravatar} = 'https://secure.gravatar.com/avatar/' . md5_hex(lc($email)) . '?d=mm'; } else { $self->{gravatar} = 'extensions/Gravatar/web/default.jpg'; } } - return $self->{gravatar}; + $size ||= 64; + return $self->{gravatar} . "&size=$size"; } sub install_before_final_checks { diff --git a/extensions/Gravatar/template/en/default/hook/bug/comments-user-image.html.tmpl b/extensions/Gravatar/template/en/default/hook/bug/comments-user-image.html.tmpl index 14adfd055..6faed368d 100644 --- a/extensions/Gravatar/template/en/default/hook/bug/comments-user-image.html.tmpl +++ b/extensions/Gravatar/template/en/default/hook/bug/comments-user-image.html.tmpl @@ -7,5 +7,9 @@ #%] [% IF user.settings.show_gravatars.value == 'On' %] - <img align="middle" src="[% who.gravatar FILTER none %]" width="32" height="32"> + [% IF who.last_activity_ts %] + <a href="user_profile?login=[% who.login FILTER uri %]"> + [% END %] + <img align="middle" src="[% who.gravatar FILTER none %]" width="32" height="32" border="0"> + [% "</a>" IF who.last_activity_ts %] [% END %] |