Loading WordPress’ Thickbox Only When Needed

I like to use Thickbox on my site to display images and videos in overlay windows. In WordPress, it’s easy enough to use wp_enqueue_script( ) and wp_enqueue_style() to load the built-in version of Thickbox. It automatically takes care of including jQuery, putting the css in the header, and the javascript in the footer.

But there’s no need to have the bloat of Thickbox and jQuery loading on all pages when most of them don’t even use it. That’s why Joost de Valk detailed a nice tip to only load thickbox when needed by checking the page content for references to it. All it takes is a few lines of code in your functions.php file.

Unfortunately, you end up with some broken images because the built-in Thickbox defines their locations in thickbox.js as relative paths: Continue reading Loading WordPress’ Thickbox Only When Needed

Chopping Down an Entertainment Center

I’m taking a break from my usual geek content for a woodworking project. Granted, it’s a woodworking project to contain geek stuff, though.

We purchased a nice solid oak entertainment center many years ago. But it’s worthless now in an age of widescreen TVs. I tried to sell it, and then later give it away, with no takers. It had been taking up way too much room in the garage for more than a year. Continue reading Chopping Down an Entertainment Center

WordPress 2.9 Media Features Voting

WordPress logoThe WordPress folks have announced that the 2.9 release will focus mostly on media handling features. They have posted a list of features for consideration and are asking everyone to vote on their favorites.

I applaud them for a great list of useful enhancement ideas, however, I would love to see it approached from a slightly different angle. Continue reading WordPress 2.9 Media Features Voting

GPS Geolocation in Safari on iPhone OS 3.0

I just updated my iPhone to the shiny new OS 3.0. Apple did a great job addressing a few shortcomings and adding new features. Others have already told about the common features so I won’t rehash them here.

But let me tell you about my favorite new feature: Safari can now get your GPS location via javascript! Continue reading GPS Geolocation in Safari on iPhone OS 3.0

Filling Mac Address Book Pictures with Gravatars

[This information in this post is out of date. Please see Gravatar, AppleScript, and the OS X Address Book Revisited for more current information.]


This is a multi-part tutorial series on using Gravatar from AppleScript to update your Mac Address Book pictures automatically. These pictures then sync to your iPhone for Gravatar goodness on the go.

I’ve had some AppleScripts to work with Gravatars and Address Book hanging around in rough form for quite a while. But I was recently prompted to clean them up and write these tutorials when Matt Mullenweg posted about Gravatar on his blog saying that “we need a better way to get Gravatars into your Apple address book / iPhone.” I hope that the documentation and tools from this project will be used for other creative Gravatar integration projects.

We’re about to put all of what we learned in part 1, part 2, and part 3 together to make our working script. Continue reading Filling Mac Address Book Pictures with Gravatars