Closed prathviraj080 closed 8 years ago
Not sure why this is not implemented yet.
utilities:avatar
pkg is still neededThe way I handled this since you can define a custom template for any part: I made a custom singleComment template. And altered the default template with this code.
{{> commentsBox id=post._id singleCommentTemplate="singleComment" }}
</a>`
Then I created a helper. `Template.singleComment.helpers({
getAvatar: function() {
var user = Meteor.users.findOne(this.userId);
var imageAvatar = Comments.ui.config().defaultAvatar;
var customAvatar = user && user.profile && user.profile.customAvatar; //http://stackoverflow.com/questions/25758476/exception-in-template-helper-typeerror-cannot-read-property-profile-of-undef
if (customAvatar === 1) {
imageAvatar = "http://yourdomain.com/image/"+this.userId+".png";
}
return imageAvatar;
}
});`
There is probably a better way to do this but that's how I handled it.
Yeah for now that's a solution that works, it'd be cool though to have something that's easily configurable.
+1 @delay
This is possible now over the public API https://github.com/ARKHAM-Enterprises/meteor-comments-ui/blob/master/GUIDE.md#custom-avatars
I've profile images for all the users and I'm storing it in
Meteor.users
collection. Is there any way I can display these URLs instead of default ones?