Fixed display of Gravatar for accounts
This commit is contained in:
parent
82020e9ae6
commit
face5d5e99
3 changed files with 8 additions and 4 deletions
|
@ -603,9 +603,8 @@ HopObject.prototype.creator_macro = function(param, mode) {
|
||||||
html.link({href: this.creator.url}, this.creator.name);
|
html.link({href: this.creator.url}, this.creator.name);
|
||||||
} else if (mode === 'url') {
|
} else if (mode === 'url') {
|
||||||
res.write(this.creator.url);
|
res.write(this.creator.url);
|
||||||
} else if (mode === 'gravatar' && this.creator.email) {
|
} else if (mode === 'gravatar') {
|
||||||
res.write('https://secure.gravatar.com/avatar/');
|
this.creator.gravatar_macro(param);
|
||||||
res.write(this.creator.email.trim().toLowerCase().md5());
|
|
||||||
} else {
|
} else {
|
||||||
res.write(this.creator.name);
|
res.write(this.creator.name);
|
||||||
} return;
|
} return;
|
||||||
|
|
|
@ -55,7 +55,7 @@
|
||||||
<input type="hidden" name="hash" id="hash">
|
<input type="hidden" name="hash" id="hash">
|
||||||
<figure class='uk-float-right' style='height: 0'>
|
<figure class='uk-float-right' style='height: 0'>
|
||||||
<a href='https://gravatar.com'>
|
<a href='https://gravatar.com'>
|
||||||
<img alt='' src='<% membership.creator gravatar suffix='?s=160&d=mm' %>' style='border: 1px solid #ddd; border-radius: 4px'>
|
<img alt='' src='<% user.gravatar suffix="?s=160&d=mm" %> 'style='border: 1px solid #ddd; border-radius: 4px;'>
|
||||||
<figcaption class='uk-text-center'>
|
<figcaption class='uk-text-center'>
|
||||||
<% gettext 'Account Image' %></a>
|
<% gettext 'Account Image' %></a>
|
||||||
</figcaption>
|
</figcaption>
|
||||||
|
|
|
@ -503,4 +503,9 @@ User.prototype.list_macro = function(param, type) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
};
|
||||||
|
|
||||||
|
User.prototype.gravatar_macro = function () {
|
||||||
|
res.write('https://secure.gravatar.com/avatar/');
|
||||||
|
this.email && res.write(this.email.trim().toLowerCase().md5());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue