
@ the Aster Cafe. Most delicious Belgian sour I’ve enjoyed to date.
About time. And product. And being more deliberate.

@ the Aster Cafe. Most delicious Belgian sour I’ve enjoyed to date.
I’ve been fighting with getting the contents of a WordPress page to display within Thickbox.
The great thing about WordPress, is that wiring this up is super straight forward.
function init_theme_method() {
add_thickbox();
}
add_action('init', 'init_theme_method');
<script type="text/javascript">
if ( typeof tb_pathToImage != 'string' )
{
var tb_pathToImage = "< ?php echo get_bloginfo('url').'/wp-includes/js/thickbox'; ?>/loadingAnimation.gif";
}
if ( typeof tb_closeImage != 'string' )
{
var tb_closeImage = "< ?php echo get_bloginfo('url').'/wp-includes/js/thickbox'; ?>/tb-close.png";
}
</script>The I spun up a get_post_content function:
function get_post_content($post_id) {
global $wpdb;
$data = $wpdb->get_results("SELECT * FROM $wpdb->posts WHERE ID=$post_id");
return $data[0]->post_content;
}
and added it as a hidden div in my footer.php
<div id="about" style="display:none;">
<?php echo get_post_content($id); } ?>
</div>
and created a link to launch the thickbox <a href="#TB_Inline?inlineId=about" class="thickbox"</a>
But it was blank.
Empty.
Nothing in the box.
Turns out thickbox requires some markup – any markup – within the requested inlineId.
<div id="about" style="display:none;">
<p><?php echo get_post_content($id); } ?></p>
</div>
Tonight, I loaded my beer recipes into Hopville’s Beer Calculus (thanks to Mr. Hadden for the tip).
Yes, they’re all off style. Some by a little, and some so off – they’re on (the Maibock passed BJCP guidelines for American Barleywine).
In all honesty – this round of brewing wasn’t about hitting a style, it was about the confidence of building a recipe. And, turns out, becoming fixated on making the recipe better.
There’s a lesson in here about being ready for new tools & insights. The first time I read Hitchhikers – it was complete jibberish. Three months ago, Beer Calculus would have been as well.
Where I really see Hopville’s Beer Calculus excelling is in setting up the bounds for a style and helping me find my target within there.
Easily, the best homebrew resource yet.
With Basic Brewing Radio & The Mad Fermentationist coming in a close second.
I just had a long, difficult conversation with the Out Like a Lion. We both agree that things have to change, no one’s at fault, and we’ll both try harder next time.
If you’re looking for a quick way to track when Flash movies (or anything else in <object> <embed> tags) are played – this works for me:
Quick overview: create a new div with an onClick action and put the Flash movie inside it.
Then in the movie’s <object> tag – add <param name="wmode" value="transparent" /> and in the <embed> tag add this attribute wmode="transparent"
The wmode declarations allow the click in the Flash movie to pass through to the enclosing div and trigger the onClick.
Like this:
<div onClick="_gaq.push(['_trackEvent', 'Videos', 'MovieName', 'PageName']);">
<object...>
<param name="movie" value="http://path.to.swf" />
...
<param name="wmode" value="transparent" />
<embed wmode="transparent" ..." />
</object>
</div>
As you know – I’ve got a long bet on WiFi being the default transport for all our information exchange; voice, video, audio, email, web, everything. Everything.
Unfortunately – there’s an insidious group with a counter bet and planting FUD everywhere.
Thankfully, the EFF has declared the need and benefit for more open WiFi networks:
BTW – here’s my rule of thumb on protecting WiFi networks:
Don’t – it will inconvenience and irritate those you want to have access far more than those you don’t.