Archive for July, 2010

A couple of weeks ago I spotted an ad on TV3, it ended like this.

Last year I saw an ad on the PlayStation US Blog, it ended like this.

In fact, I could go through these ads frame-by-frame and you’d see that they’re the same. When I saw it I thought that either TV3 had partnered up with Sony to bring something (well, no), or TV3 are stupid and Sony was going to pwn them.

Turns out there is a third option, Sony will just go in for the ride. After the ad turned up on Joystiq, KB/PR person posted this on Twitter,

Dear TV3: You could have at least put my photo on top of the amp. Sheesh.

He’s referring to how there is a picture of SCEA CEO Jack Tretton on the top of his amp (in fact, I’m pretty sure in all the commercials there’s a photo of him somewhere, except for the ModNation Racers one where he was in the ad).

Well, thinking that Sony lawyers are quickly writing up a cease-and-desist notice, the KB/PR person did one more, posting to the PlayStation Blog,

[W]e’d like to help them out and make our ENTIRE LIBRARY OF COMMERCIALS available for them to copy in order to promote their programming. I only ask that TV3 doesn’t use our actual footage, but all future homages of this sort are now Kevin Butler sanctioned.

He even asks for a box set of the Flight of the Conchords, some thinking he was making reference to this scene in Episode 1 of Season 2.

I guess this was a win for all – TV3 got more publicity for the campaign than they were “expecting” (yeah, they probably engineered this whole thing), and Sony get more mileage out of an old ad and don’t come out looking like a giant corporation beating down smaller ones.

Or, Sony still have their lawyers at full force, they’re just distracting us all.

Recently I acquired tickets to go to Europe, that’s later this year, and I had a brief thought – I wonder if I could use WordPress for iPhone to make a travel blog. The intention was to be quick about it, i.e. take a photo, send it off, without thinking. Oh, and have it mark the location of where the photo was.

My search came to an end surprisingly quick, WordPress for iPhone already does geotagging, it’s just WordPress itself doesn’t take advantage of it yet. There is a way however, and I managed to get something going in no time.

When WordPress for iPhone geotags a post it adds several custom fields to the blog post, but we care about:

  • geo_public – indicates that the geotagging data is public,
  • geo_address – the address that was picked up,
  • geo_latitude and geo_longitude – the important bits.

If it’s your blog, it’s up to you whether you heed geo_public, but this is a good indicator for whether you have a geotagged blog post or not.

Google Maps provides a handy API to provide static images, no key required. The URL is http://maps.google.com/maps/api/staticmap? and then you bundle in a bunch of parameters:

  • sensor=false because we aren’t using a GPS to generate this map, at least, I think that’s the rule (cause we did)
  • maptype can be satellite, terrain, hybrid or left out for the default street map. I like the terrain maps.
  • size is the size you want the image to be, widthxheight.
  • zoom is your preferred zoom size,
  • markers in my example is size:small|lat,lon

And you have a nice Google Map! But in your WordPress blog template, find where you output your blog posts (my theme has this in a function) and do the following:

<?php if ( get_post_meta($post->ID, "geo_public", true) == "1" ) :
	$map = "http://maps.google.com/maps/api/staticmap?sensor=false&maptype=terrain&size=234x150&zoom=12&markers=size:small|";
	$lat = get_post_meta($post->ID, "geo_latitude", true);
	$lon = get_post_meta($post->ID, "geo_longitude", true);
	$map .= $lat . "," . $lon;
?>
<div class="post-map">
	<img src="<?php echo $map ?>" alt="Google Map" /><br />
	<?php echo get_post_meta($post->ID, "geo_address", true); ?>
</div>
<?php endif; ?>


Done!

Another thing of note, the WordPress app will resize photos down to 640×480 and I’ve found no way of changing it, so make sure your template is ready for it!

Plus, I haven’t decided if I would do it, mobile roaming charges are expensive, and I’d have better things to do than tell you all about it.

Work takes my programmers time, so anytime I think I can do something rather quickly, I’d try and make an effort. Since I’ve made Google Chrome my default browser, I thought I’d sink my teeth into some Chrome Extensions work – I attempted something similar with Mozilla Firefox, but found the whole development process to be clunky. Having a look over the API documentation, with Chrome you can build something up rather rapidly with no browser restarts. Sometimes, you don’t even need to reload the extension!

The problem

So, I went about thinking about what it is I do all the time that I could simplify. My immediate thought was posting links and pictures to Twitter. It’s something I regularly do, and so something I’d make easier. The process is rather complicated:

  1. Copy the link.
  2. Go to http://j.mp.
  3. Paste the link, hit Shorten.
  4. Click the Copy button.
  5. Go to Twitter (it’s usually open on another tab).
  6. Type in my message, paste the link.

Of course, if I used something like TweetDeck, the process is rather easier, copy the link, go to TweetDeck, paste the link. But, why not just do it in the browser?
(more…)