I saw this sign back on May 14, but only got around to posting it now because of its recent personal significance, which has nothing to do with the subject of this sign.
Author: Brandon Moeller
It’s a boy!
As announced yesterday on my Facebook and Kim’s Facebook, we’re proud to announce here that we learned that we’re expecting a baby …
B O Y ! ! !
You know how when, before you know, people are all up in you business like,
“So, what do you want it to be …”
And then you’re all like …
“I don’t care, man – as long as it’s healthy … “
And it wouldn’t be that bad to have these words come out of your own mouth if you didn’t have to keep repeating them. I mean, everyone asks this question. You can not escape the stereotypical questions that people ask when you are anticipating a birth of a child; the only thing you can do is limit the number of people you tell by only posting about it online where surely no one will go and read about it.
Oh, you have a website? That’s nice … hey, you should friend me on Facebook.
I’m lucky; I’m not showing. If these types of conversations start, they’re typically my fault.
Anyway, back to how they always ask that question and how you’re always supposed to pretend that you don’t have a preference so as to not offend anyone who may have a differing preference or to let on that you may be disappointed if it turns out your baby is not the sex you were hoping it would be.
Well, here, today, on this very blog, I will summon up the courage to say, I did have a preference, and I’m glad that it is a boy.
Because, with a boy, I can …
- Go fishing (and by fishing, I mean visit aquariums and pet stores to stock our own)
- Take apart electronics and try to put them back together again
- Work out in the garden
- Ride bikes and play sports
- Grill meat and otherwise make messes in kitchen areas
- Find new and exciting ways to irritate mom
I’m also pretty sure that if it turned out to be a girl that I would have written this blog the exact same way, except I would have just replaced the word “boy” with the word “girl.”
RSS Responsive Caption
The problem:
Readers who use Google Reader to read WordPress powered website RSS feeds on their small-screen mobile devices don’t get the full picture if the WordPress site in question uses the caption short code functionality, because the resulting inline CSS code that displays does not instruct the feed reader to scale the image down to fit the screen.
See, i.e.:
The solution:
I created a new WordPress plugin called RSS Responsive Caption to adjust the inline CSS styles that get attached to images with captions to make them more “responsive.”
Really, all that was needed was the following CSS code to specify that the maximum width of an image should be 100% (of the screen size). That’s responsive web design, in a nutshell.
max-width: 100% !important;
height: auto;
Creating a plugin to accomplish this was not necessary. In fact, anyone can do this without downloading the plugin, simply (heh) by altering lines 745-746 in the wp-includes/media.php file, from:
return ‘<div ‘ . $id . ‘class=”wp-caption ‘ . esc_attr($align) . ‘” style=”width: ‘ . (10 + (int) $width) . ‘px”>’
. do_shortcode( $content ) . ‘<p>’ . $caption . ‘</p></div>’;
to:
return ‘<div ‘ . $id . ‘class=”wp-caption ‘ . esc_attr($align) . ‘” style=”max-width: 100% !important; height: auto; width: ‘ . (10 + (int) $width) . ‘px”>’
. do_shortcode( $content ) . ‘<p>’ . $caption . ‘</p></div>’;
But! If I did it that way, then every time WordPress would release a new version of its frickin-awesome open source software package, I would have to manually go into the media.php file and change that line of code to keep my RSS feeds displaying properly in Google Reader.
Instead, I prefer the instant update method of installing the latest version of WordPress. I click the button, it does its thing and in a few moments of anticipatory suspense, I have the latest version of WordPress in all its glory, and I can troubleshoot it because my own specific modifications are separate.
That’s also why I typically choose to create child themes on top of existing themes – if the theme is ever updated by the theme author, I won’t have to manually sort out what was changed vs. how I reconfigured it, unless the theme author specifically chose to alter something I wanted to alter.
The plugin makes the viewing experience in Google Reader much better.
See, i.e.:
Download my first-ever WordPress plugin here:
RSS Responsive Caption
http://wordpress.org/extend/plugins/rss-responsive-caption
Credit:
This plugin would not have been possible if the WordPress core team didn’t create a way to “allow a plugin to replace the content that would otherwise be returned” via the caption shortcode function (see: wp-includes/media.php, line 711), or, if they didn’t further explain the add_filter function in the codex, even going so far as suggesting the following plugin:
add_filter('img_caption_shortcode', 'my_img_caption_shortcode_filter',10,3); /** * Filter to replace the shortcode text with HTML5 compliant code * * @return text HTML content describing embedded figure **/ function my_img_caption_shortcode_filter($val, $attr, $content = null) { extract(shortcode_atts(array( 'id' => '', 'align' => '', 'width' => '', 'caption' => '' ), $attr)); if ( 1 > (int) $width || empty($caption) ) return $val; $capid = ''; if ( $id ) { $id = esc_attr($id); $capid = 'id="figcaption_'. $id . '" '; $id = 'id="' . $id . '" aria-labelledby="figcaption_' . $id . '" '; } return '<figure ' . $id . 'class="wp-caption ' . esc_attr($align) . '" style="width: ' . (10 + (int) $width) . 'px">' . do_shortcode( $content ) . '<figcaption ' . $capid . 'class="wp-caption-text">' . $caption . '</figcaption></figure>'; }
Basically, I took the plugin above and altered it to fit my needs, after an exhaustive search to determine that someone else hadn’t already done what I wanted to do.
I got the idea for this plugin by looking at the HTML source code of the posts WordPress generates for images with captions and images without, then Googling until I discovered what made what worked.
Articles and forum posts that I came across in the exploratory process include, but are likely not limited to:
- Auto resizing images to fit max width? original forum post by caffeinedreamer
- Should I edit media.php? original forum post by avalera
Want to further alter the way captions are handled in WordPress? This plugin looks very interesting:
About RSS Responsive Caption
from the documentation section of the plugin:
This plugin allows publishers to better control the width of photos that use the WordPress caption shortcode feature, when that content is displayed in RSS feed readers like Google Reader, as displayed on small-screen mobile devices.
This plugin accomplishes the same thing that adjusting the “function img_caption_shortcode” code in includes/media.php would, but allows the user to automatically update WordPress without worrying about losing these changes.
It is the author’s hope that in future releases of WordPress (post 3.3), this plugin will prove unnecessary if (hard-working, responsive-minded) WordPress core developers decide to include the fix in newer versions of the awesome great open source software we have all come to love.
(Hint, hint)
Download my first-ever WordPress plugin here:
RSS Responsive Caption
http://wordpress.org/extend/plugins/rss-responsive-caption
All aboard the Polar Express in Palestine
This year, my mother joined us for the Polar Express train ride from Palestine, Texas to Rusk, Texas (and back again). I took three videos of the holiday fun: one, two and three. Two is my favorite.
See more photos:
Polar Express Train 2011
Blue monsters and laptops
I love the brushed aluminum blue Toshiba laptops; but they’re hard to find at the price points I want. I saw this one at a Wal-Mart, but they were out of stock – of course – and three other Wal-Marts didn’t have it, either. Because I checked. Wasn’t online, either.
At Target, I found this Cookie Monster toy. It talks, and munches cookies. If only I were five again! It was also about $40, which I think is a little excessive, but so was Cookie Monster.
Update: Dec. 27. Ok, it wasn’t $40. It was $25. But still. It’s available from Target.com.
An invitation to Galveston Realtors
Today, I designed an e-mail to be sent to top-producing Realtors in Galveston, announcing that RE/MAX of Texas is coming to their town for its 35th Annual Statewide Convention – and that they were invited, too.
The HTML e-mail contains writing by Mike Sumerlin, with a banner and a register button designed by Brian Miller and Mark Bohenick.
Snowy Thanksgiving
My aunt Barbara ordered a truckload of snow to keep the kids busy (and soggy) on Thanksgiving. A great time was had by all. I shot one video of the fun.
See more photos here:
Thanksgiving 2011