DoubleMule

 | Half as Smart... Twice as Stubborn...

Custom Comment Avatars for Thesis – Make Your Own Default Gravatar Image

You are a royal jackass... your avatar should match your evolutionary stumbles.

The herd believes that comment spam should be more colorful — are you not bored by the Mystery Man?

Do you like your default avatars Blank? Wish to promote the Gravatar logo? Do you get wild with user icons as foolish as the very names: Identicon, Wavatar, MonsterID?

Surely not.

Perhaps an avatar named… Bite the Human?

Now that is a custom default avatar the herd would like to see. We may enable comments to titter at Gravatar laggards.

Oh, but you’re in a hot lather now… eager as spring colts to make your very own default avatar. It’s time to smack those cheeky monkeys without a proper face! Let’s build you a custom avatar right now, yes?

Thesis Theme custom_functions.php code filter… How to make a unique default avatar image.

/* Custom Default Mule Herd Avatar */
if (!function_exists('mule_avatar')) { function mule_avatar($avatar_defaults) { $new_default_icon = get_bloginfo('template_directory') .
'/custom/images/just-a-human.png';
$avatar_defaults[$new_default_icon] = 'Bite The Human';
return $avatar_defaults;
}
add_filter( 'avatar_defaults' , 'mule_avatar' ); }

There’s little more to say than that… the first part in bold is the file path to the image.

The herd used a 96×96 pixe avatar saved as a PNG… JPG or GIF formats can work just as well… photo-style images look best as PNGs, but can run twice the file size of an optimized JPG, given this resolution. The venerable GIF can be very light for line art or other simplified avatars. Please don’t animate them.

The second bold bit names the Gravatar or avatar or icon or whatever the dickens you think of it as, and will appear described as such in your WordPress administration panels.

Bite the Human - Hard - Mules Rule

At right is the herd’s choice. It’s you. A human. Being bitten. We like it a great deal.

Your image’s file path, if you run the Thesis theme — which you bloody well should — is in the /custom folder, where the herd in its wisdom placed the PNG in the /images sub-directory of /custom. Clever mules!

Now you may enter WordPress, skitter on down to Settings, Discussion, select your shiny new avatar, and save.

WordPress Default Gravatars - Custom Avatar for Walking Apes

If you did anything right, which we doubt, you may now overtly taunt those reckless commentators (those without a Gravatar associated with their email address) with an insulting avatar… this should cause them to abandon any thought of joining your community, freeing you to work on more important things… your spoon collection?

We’ve no desire to hear your blathering here. If you simply must talk at your screen… pester the SEO and Marketing Experts at Outspoken Media.

While human, they’re a decent lot — and Miss Hoffman’s earlier take on custom WP avatars deserves a head bob.

Socialist Media for Humans to Click...

Add Unsubstantiated & Wild Claims from Your Fantasy World...

The herd may very well kick or bite your vile spam...

1 King Sidharth whinnied... 05/6/2010 at 2:04 am

Thanks Mules! I was just looking for this.
Why don’t you blog more often? For Christ’s sake come back?

Reply

2 Monique whinnied... 05/6/2010 at 8:19 am

I just implemented this custom avatar business & I love it! Thanks for writing up this post, sure to be helpful to get all those boring gravatars off blogs all over…

Question: Is there a way to do a series of them that are automatically & randomly generated?

Reply

3 The Mules nickered back... 05/9/2010 at 12:46 am

The mules were able to create a random avatar function… however, it is only random in the WordPress Administration “Discussion” panel, not random at the time of page generation. While it remains likely generated random avatars may be possible without core file modifications… this would be a more ambitious strike at the heart of the avatar function set — and the herd was last seen when an orchard enclosure lost a top rail.

Yours,

The Cat

4 Alex whinnied... 05/12/2010 at 11:24 pm

Double Mule! I know you are twice as stubborn, but I was hoping for your advice – perhaps you could make a post on it?
I have Thesis (thanks for all your twitter assistance btw!) and cannot figure out how to get my comments order to change.
If I post replies to a comment, it should appear under the comment it pertains to, but it seems to go in chronological order, so unless I can answer the comment before someone else comments then I end up with a dishevelled looking comment thread.
Check it out at my site if you wish. Whats wierd is that I have seen others with thesis (who are not using disqus or anything) that do not have this problem,. in fact the reply comment usually indents from the respondents comment and looks schmick! how can I get mine to do this???
And yes I have googled until my fingers fell off – NOTHING?!?
if you post on this, you’ll hit no. 1 rank in google for ‘how to customize comment order in thesis’ LOL – seriously!

NB: Whats wrong with a good spoon collection anyway?
…Im off to knit socks for my cat….

Reply

5 Alex whinnied... 05/12/2010 at 11:25 pm

actually, now that I look at it, you seem to have the same issue? not sure about the order as the comments are limited here, but you have the same background colour – and no indent.?

Reply

6 The Mules nickered back... 05/13/2010 at 12:30 am

This avatar function applies across a large swath of Thesis versions, as does the custom css required for ridding yourself of the unfortunate robin’s egg blue background.

WordPress administration combined with Thesis 1.7 allows for indentation and threading combined with custom.css if desired… though how fabulously this works — or not — with your CommentLuv plug-in is unknown to we of little faith — in third party clippings.

Enabling nested comments in modern WordPress should be all that is required for a thread system… likewise on the order, though it’s simplistic in that you can go oldest or newest first… though what else might be wanted there the herd cannot think to say.

7 Rob whinnied... 06/6/2010 at 6:58 am

great post!!

Reply

8 Toilliach whinnied... 06/8/2010 at 2:45 am

Are you a professional journalist? You write very well.

Reply

9 The Mules whinnied... 06/8/2010 at 2:07 pm

The closest this herd comes to journalism is our association with other draft animals.

Now, if you wish to believe the dog, he claims to have completed some form of correspondence coursework… but we feel this merely provides him with a convenient excuse to remain unkempt and filthy.

A cob pipe and blank stare do not make a philosopher.

Reply

10 Chazz Crable whinnied... 06/10/2010 at 7:53 am

Good post. I’ve been going back in forth with themes on my site not having exactly what I need. Been playing with Thesis for a minute and still have some trouble with customization. I really appreciate all the customization on your site soon i’ll have [My Blog Site] up and running. Every bit of customization helps. Just a bit frustrating finding the right tutorial for your needs.

Reply

11 George Serradinho whinnied... 06/30/2010 at 10:47 pm

I saw this tutorial on another siet and tried it out and it worked very well. It makes WP better and also wonder if they will ever include this in WP core.

Reply

12 ajmal whinnied... 01/29/2012 at 7:49 pm

Really awesome tutorial for adding custom-comment-avatars in thesis theme. Thank you very much i will do this in my thesis blog

Reply

13 Arafin Shaon whinnied... 02/16/2012 at 11:15 am

really a cool trick :) tnx dude….

Reply

14 Kristen @ The Endless Meal whinnied... 02/11/2013 at 6:04 pm

Thank you for this code. It worked perfectly :)

Reply

15 The Mules nickered back... 02/20/2013 at 10:58 pm

Kristen; the herd is pleased this tutorial continues to be found and functional… though we must say, your site was a disappointment… our search on “alfalfa” discovered not a single stem-cured treat to try — a real shame, that… we’ve a convection unit on delivery.

16 Toufiq whinnied... 03/18/2013 at 5:04 pm

Actually very nice!

Reply

The South Pasture