Twitter Updates for 2010-09-29

Filed in Lifestream

Twitter Updates for 2010-09-28

Filed in Lifestream

Twitter Updates for 2010-09-27

Filed in Lifestream
  • Unfortunately, I'm not going to have many comments on the #Colts game today. We're stuck watching WAS-STL. #
  • Thank you, Kyle Orton! Lacey just had the #Colts #039; longest YAC of the game so far! #
  • Touchdown! Manning to Collie! #Colts have turned 2 DEN turnovers into 10 points, and lead 13-0. #
  • @Shake1n1bake so why don't get get out of zone? All of our CBs are healthy, as is our line. in reply to Shake1n1bake #
  • @Shake1n1bake man coverage, scary? This is Orton to Royal/Gaffney; not Brady to Moss/Welker! I think Hayden, Powers, and Lacey can handle in reply to Shake1n1bake #
  • Since when did a horse-collar constitute grabbing the jersey, but not get a hand inside the pads? Bad call in #WAS #STL game. #
  • @Shake1n1bake I was just going to ask if you wanted to reconsider... in reply to Shake1n1bake #
  • @Shake1n1bake once, early. I don't remember that game ending up close. Might as well have Tim Jennings on the field with this zone. in reply to Shake1n1bake #
  • @18to88 more to blame are giving up the long pass plays, and allowing third-down conversions. in reply to 18to88 #
  • Hey #NFL any chance your officials could just - for once - call one of the ridiculously blatant holds of Freeney? Your officials suck. #
  • @Shake1n1bake and what was it this time? I am without the benefit of actually getting to watch the game this week. in reply to Shake1n1bake #
  • Peyton Manning: 3 games, 1000yds, 9TDs, 0 INTs. Just go ahead and mail in the MVP votes ahead of time. Go #Colts #
  • Ballgame. #Colts win! Three fourth-down stops for our Defense today! #
  • How often does this happen: top 2 QBs (by yardage) - Orton (DEN) and Rivers (SD) - both had over 400yds today, and both lost. #
  • @wptavern unless I have a *really* good reason not to, I generally take _ck_'s word on anything bbPress-related. in reply to wptavern #
  • @markmcwilliams @wptavern personally? I don't know his motives, and don't care. Motives aren't as important as the end result. in reply to markmcwilliams #
  • @markmcwilliams @wptavern I don't think _ck_ was implying *improper* or *ulterior* motives, just clarifying her inference of his priorities in reply to markmcwilliams #
  • @markmcwilliams @wptavern is she right that BP is higher priority than bbP? Maybe. But if bbPress-as-plugin ends up being awesome? I'm happy in reply to markmcwilliams #
  • I wonder what Freeney and Mathis think when they see the ticky-tack crap that gets called as Offensive Holding for *other* teams. #
  • @18to88 that might possibly be the worst DPI call I've ever seen. in reply to 18to88 #
  • Dear #NFL your officials could at least *try* not to make it so obvious that they want the Jets to win this game. This is terrible. #

Twitter Updates for 2010-09-26

Filed in Lifestream

Custom WordPress Gravatars – The Right Way

Filed in Web DevelopmentTags: Gravatars, Themes, tutorials, WordPress

I recently (h/t: Nacin) came across this tutorial by Nenuno Creative that recommends bypassing WordPress core implementation of Gravatars in order to output custom Gravatars. Below, I present a brief tutorial for a much better way to implement custom Gravatars in a way that doesn't require bypassing WordPress' core functionality.

The Nenuno Creative tutorial presents the following "customizations" of Gravatars:

  1. Comment Author email address
  2. Custom default Gravatar image
  3. Custom Gravatar image size

The problem with their tutorial is that, assuming your Theme is using wp_list_comments() to output the comments list (and your Theme is using wp_list_comments() to output the comments list, isn't it?), you have no easy way to control where and how your custom-built Gravatar is displayed (at least, not without quite a bit of additional custom code) - as evinced by the author's recommendation:

I would recommend using this in the “comments.php” page, somewhere around “< ? php wp_list_comments(); ? >” or whatever similar you may have in your theme!

Not a terribly helpful implementation suggestion, is it? (And in truth, since wp_list_comments() outputs a Gravatar by default, it's actually a rather incorrect recommendation.) Fortunately, all of the above can be implemented in a much, much easier way.

First, wp_list_comments() by default outputs a 32x32px Gravatar based on the Comment Author email address. So, all we need to deal with are custom Gravatar size, and custom default Gravatar image.

Custom Gravatar size is as simple as passing the avatar_size argument to wp_list_comments(). The arguments passed to wp_list_comments() are an array, so to output an 80x80px Gravatar, replace the default call:


With this:

wp_list_comments( 'avatar_size=80' );

Simple, right?

That just leaves us with defining a custom default Gravatar image. Admittedly, this part is a bit trickier, but still not terribly complicated. We will be using the built-in user-configuration setting for default Gravatar image. By default, the option list includes "Mystery Man", "blank" (no image), the Gravatar logo, an Identicon, a Wavatar, and a Monster ID:

Default Avatars

The default list of images available for use as the default avatar in WordPress, including Mystery Man, blank (no image), the Gravatar logo, Identicon, Wavatar, and Monster ID

We will be hooking into this list, using the avatar_defaults filter, in order to add a custom image to this list (h/t: WPEngineer).

Simply add the following to your Theme's functions.php file:

function mytheme_addgravatar( $avatar_defaults ) {
  $myavatar = get_bloginfo('template_directory') . '/images/avatar.gif';
  $avatar_defaults[$myavatar] = 'My Theme Custom Gravatar';

  return $avatar_defaults;
add_filter( 'avatar_defaults', 'mytheme_addgravatar' );

You will need to replace /images/avatar.gif with an appropriate image file, that you have uploaded to your Theme directory.

That's it! Now, just go to Settings -> Discussion, and you will see your custom image listed in the options for Default Avatar:

Default Avatar Setting List With Custom Image

The default avatar setting list with a custom image "My Theme Custom Gravatar" added to the list

Simply select your custom image, and save settings.

Voila! We've just implemented everything from the Nenuno Creative tutorial, in a way that uses, rather than bypasses, core WordPress functionality.

Twitter Updates for 2010-09-25

Filed in Lifestream

Twitter Updates for 2010-09-23

Filed in Lifestream
  • @nathanrice "niche" rhymes w/ "quiche" & "sheesh". Origin: "nicher" (French): "I" pronounced "ee", "ch" pronounced "sh"; thus: "n"-"ee"-"sh" in reply to nathanrice #
  • Wow, so the absolute best of @StampedeBlue is headed over to @18to88? Awesome! Congratulations @shake1n1bake! #
  • My daughters have recently discovered VeggieTales, which my oldest now refers to as "Fruities and Veggies Tales". #
  • @18to88 you and me, both! Best of both worlds now, so to speak... in reply to 18to88 #

Twitter Updates for 2010-09-22

Filed in Lifestream

Twitter Updates for 2010-09-21

Filed in Lifestream

Twitter Updates for 2010-09-20

Filed in Lifestream
  • @SI_PeterKing Tampa Bay holding a two-game division lead? in reply to SI_PeterKing #
  • @SI_PeterKing er, nevermind; that still can't happen. But I'm guessing it involves Tampa Bay and the NFC South division lead? in reply to SI_PeterKing #
  • @andrea_r WorrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrdPress! in reply to andrea_r #
  • @andrea_r which, in typical St.-Louis accent, "Word" is pronounced "W-AHR-d", so it fits. 🙂 in reply to andrea_r #
  • @carlhancock praying everything is okay! Had that happen to my wife - showed up thinking appendix, left with gall bladder removed. in reply to carlhancock #
  • @carlhancock any updates? Hope all is well! in reply to carlhancock #
  • @18to88 yeah, too bad the Redskins are doing their best to let the Texans win the game... in reply to 18to88 #
  • Poor Tom Terrific! Two INTs & now a sack-fumble. On a related note: this old, slow Patriots defense is making Jets offense look good #
  • @LovinBlue I know, but I love tweaking Patriots fans. 😉 in reply to LovinBlue #
  • @pwilson24 interesting. Not Angerer, eh? in reply to pwilson24 #
  • @pwilson24 I know, but he's a good LB, period. in reply to pwilson24 #
  • @LovinBlue I know, you're surprised, right? in reply to LovinBlue #
  • @18to88 Kubiak just made a Caldwell call: punted from the 34 at 4th and 4. Might cost the Texans the game. in reply to 18to88 #
  • If the Texans lose the game, it will be due to Kubiak punting from the WAS 34yd line at 4th and 4, instead of going for it or trying FG #
  • @LovinBlue works for me! in reply to LovinBlue #
  • And now the ice-the-kicker crap. Just lets him line up the kick (and he nailed it). Kubiak really going for the football anti-karma. #
  • @18to88 4th and 4? yeah. 4th and 7? not as much. I thought HOU should have just gone for it. in reply to 18to88 #
  • @18to88 and Jamey Richard just threw the best block of his pro career on that TD run. in reply to 18to88 #
  • What's this "touchback" thing? #
  • Bethea introduces himself in a really, really nasty way to sniff out that end-around. #
  • Why can't the Colts O-Line run-block for Addai? #
  • What a heck of a kick! Pat the Punter is on his game tonight. #
  • Aaaand our punt returner falls down when he has a hint of a seam. Oh well; decent field position anyway. #
  • @18to88 we'll take one or the other: call it on both, or call it on neither. in reply to 18to88 #
  • Freeney and Mathis are FAST tonight! #
  • Amazing how much better Colts' entire offense works when O-line provides even just a little bit of run-blocking: set up that play-action TD #
  • @Shake1n1bake is that Dallas' evil twin? in reply to Shake1n1bake #
  • Colts are over 100 yards rushing, halfway through the second quarter. Addai and Brown are channeling their inner Edgerrin James! #
  • Three touchbacks in ONE GAME?!?!?! Who are these Colts special teams? Go #Colts #
  • Colts now have 10 pts on turnovers & lead 24-0 with less than 1 min left in the first half. I don't think Manning is struggling w/ NYG's DC #
  • @keder Colts are tearing it up in all three phases. This is impressive. in reply to keder #
  • @pwilson24 make that "Horseshoe Blue", since G-Men also wear Blue and White 😉 in reply to pwilson24 #
  • @Shake1n1bake caught that one on the replay, too. Strange there was no flag... ( /sarcasm ) in reply to Shake1n1bake #
  • @LovinBlue so was Lacey, unfortunately. in reply to LovinBlue #
  • @18to88 yeah, that was the dumbest thing Chrissy said yet tonight. Powers *might* be the best cover corner, but it's probably still Hayden in reply to 18to88 #
  • @18to88 when he's healthy, I won't argue that one. in reply to 18to88 #
  • @LovinBlue same here. Crap call, that cost the Colts a drive. in reply to LovinBlue #
  • Block Freeney one-on-one, at your own 10yd line? Suffer the consequences. Sack-fumble-TD Colts! Go #Colts #
  • @18to88 I noticed that pass block, too (was it his first ever?), & of course Chrissy Collinsworth thinks it was a "good non call" on the PI in reply to 18to88 #
  • @NMRgirl well heya! Go #Colts #
  • Just noticed that, from the back, @Pat1McAfee has Tom Terrific's flowing locks. Don't worry; you wear it much better than Brady! Go #Colts #