Custom Avatars

Topics: Themes
Sep 2, 2008 at 1:37 PM
Hey there. I am using BE 1.4.5.0 and I was wondering how I am able to use a custom default gravatar on my site. When I go into settings to change my Comments section, the only options I have are "MonsterID", "Wavatar", "Identicon" and "None". I have a "noavatar.jpg" in the root of my theme folder, but it's not picking it up no matter which avatar option I choose in my settings.

I know with 1.4 there was an option that said "gravatars" but that option doesn't seem to be there in 1.4.5.0.

Does anyone have any ideas as to how to make this thing work?

Thanks in advance.
Sep 2, 2008 at 5:28 PM
All of those options (other than None) use gravatars. The only thing is that if a user comments with an email that doesn't exist with a special gravatar avatar, then the gravatar service uses whatever you selected to fallback and create a "random" avatar.

Select Wavatar and see what I mean, users registered with a gravatar will end up showing their custom avatar and those who do not will have a randomly generated wavatar.
Sep 2, 2008 at 6:01 PM
Hey jwendl,

Thanks for your response. I do understand that a user's avatar will appear if they have one. What I want it to do is display MY default avatar if the user doesn't have one. I don't want it to display some random monster or wave picture.

You can see what I mean here at Danny's blog

http://www.dannydouglass.com/post/2008/07/15/FlickrGalleryV1Release.aspx#comment

The users that don't have a gravatar attached to their e-mail address just show a tree. I already e-mailed Danny, and he said his version (1.4) has the option to set your own. 1.4.5 doesn't though (as far as I can tell) and I wanted to see how I can set my own default.
Sep 3, 2008 at 6:06 PM
I see what you are saying, yes it looks like in the source code the only way a noavatar.jpg shows up is if the email address does not contain a "@" sign. You can see with the current change set yourself : http://www.codeplex.com/blogengine/SourceControl/FileView.aspx?itemId=18680&changeSetId=16659 inside protected string Gravatar()

Although, this is controlled in this file : http://www.codeplex.com/blogengine/SourceControl/FileView.aspx?itemId=18626&changeSetId=16659 where you would change Gravatar(80) to be your own custom thing. Your own custom thing would be something to the effect of generating a link to gravatar that would be to change the url from being :

string
gravatar = "http://www.gravatar.com/avatar/" + hash + ".jpg?s=" + size + "&d=";

to

string gravatar = "http://www.gravatar.com/avatar/" + hash + ".jpg?s=" + size + "&amp;d=" + <Custom URL to noavatar.jpg on your server>;