World of Goo Review

I’ve always had a soft spot for a good puzzle game. The Incredible Machine series was always one of my favorites and Portal is simply a puzzle masterpiece. I heard about World of Goo a while back and heard good things about it, but never tried it. Steam has it on sale this weekend for $5 and there’s a demo available to try out. I went ahead and bought it after playing the demo.

The gameplay is pretty darn simple. You have to connect your balls of goo into a structure to reach a pipe for your remaning goo balls to escape from. Each level has a goal to reach so you can’t go crazy building your bridges and towers. There’s a couple different types of goo that you have to use to your advantage. The physics and writing in the game are great. The demo only covered the first of four parts and I’m looking forward to the rest.

Pick up World of Goo this weekend if you want a quirky little game that requires a little more thought and problem solving than your average game.

Show AdSense to Google Search visitors in WordPress

I put AdSense ads on my WordPress plugin pages since the donation button wasn’t exactly raking in the dough. I inserted my AdSense code straight into these pages’ content. Looking through some of my stats I noticed a few of my posts got lots of hits from Google Search that would be good for ads. I didn’t want to show ads to my friends and normal readers so I went looking for a simple solution.

I borrowed some of the code used in this post, http://www.scratch99.com/2008/01/shylock-adsense-plugin-hack-to-avoid-adsense-smart-pricing/. One template function checks the referrer, if it returns true then you display your AdSense code in your post template, single.php in my case. This goes in your functions.php:

function scratch99_fromasearchengine(){
$ref = $_SERVER['HTTP_REFERER'];
$SE = array('/search?', 'images.google.', 'web.info.com', 'search.', 'del.icio.us/search', 'soso.com', '/search/', '.yahoo.');
foreach ($SE as $source) {
if (strpos($ref,$source)!==false) return true;
}
return false;
}

and this goes in your post template where you want the ads to be displayed:

<?php if (function_exists('scratch99_fromasearchengine')) {
if (scratch99_fromasearchengine()) { ?>
INSERT YOUR ADSENSE CODE HERE
<?php } } ?>

And that’s it. Visitors coming in from Google and some other search engines will have whatever ad you want displayed. There are plugins that will do this all for you, but this is simple enough to build straight into your theme. The only downside is if you are using caching, but odds are only your older posts are going to be getting hits from Google. If a page happened to get cached with the AdSense code inserted then everyone will see the ads. Not really a big deal to me, but just something to be aware of.

Blog CSS makeover

Did a little work on my blog’s theme to bring it up to speed with WordPress 2.7. Been using the same theme with a few modifications since WP 1.5 so it was time for a little refresh. List of changes:

  • New font and font sizes.
  • Reset all padding and margins. This made it easy to get consistent spacing across the entire site using margins only.
  • New comments output with gravatar support. Using the new wp_list_comments function with a custom callback to separate trackbacks.
  • Moved header text down so the tails of the Y’s go into the background of the main column, that’s the extent of my creativity.
  • Category and tag pages only show excerpts now.
  • Edited robots.txt and sitemap.xml to avoid Google indexing duplicate content on archive pages.
  • Increased total container width to 895px, my stats show only about 1.2% of people who visit my blog are on 800 x 600 so there’s no point in designing for them anymore.
  • Added code to show Google AdSense to visitors coming straight from a Google search. Did that about a month ago, I’ve made $7 in  February so far.

Google Reader subscription list and parser

I added a new page over on the right, My Google Reader Subscriptions. I wrote a little OPML to HTML parser that will take your OPML export from Google Reader and generate all the HTML for you if you’d like to create a similar listing. Just a real quick Javascript job, but I might expand it into something with more features in the future.

Skim through the list of Friend Blogs, you might be missing out on someone’s site. Try running your own subscriptions through the parser and post it up. Would be cool to see what people are reading and if there’s anything others might be interested in.