You Shot My Banjo

Added on April 19th, 2012

I was initially going to add a few more games and a lot more screenshots before writing about You Shot My Banjo on my blog, but now that my gaming PC has decided that it doesn’t want to play along anymore and wants to crash every hour or so, I’ll just fast track this post.

What exactly is You Shot My Banjo? It’s a project, a website, that was born out my need to offload all the game screenshots I take while playing. As it was they were just collecting dust on my HD. Not only that, but I wanted to create a proper project with CodeIgniter and Twitter Bootstrap (both of which are rather brilliant). There’s game info, pagination, lightbox and other things you’d expect from a site like this.

So far I have seven galleries up there, with three of them being “complete” (L.A. Noire, Mass Effect 3 and Saints Row: The Third). In future I’ll of course add more games and more screenshots as far as my free time allows.

One of my proudest moments so far with YSMB is that one (or more?) screenshots from the Mass Effect 3 gallery were used for a Kotaku article (specifically my custom Shepard). So feel free to use the screenshots, and if you can let me know where and how you used them.

And finally, a big thank you to Maria Miettinen for drawing the YSMB logo which is used around the site. Maybe one day I’ll figure out how to use it more prominently.

Yes, I know this is an old video, and yes I’ve only now come across it, but the content of the video still applies, and I couldn’t agree more with it! Watch it, and you’ll see it’s not what you expected it to be.

More than three years later on, we still have the same exact problem. I wonder why that is? Is it because people seem to be content with just another Call of Duty or Elder Scrolls?

And even though I love both of those franchises, this video makes so much sense, and there’s so much that could be done to give non-gamers a chance to get into gaming.

While working on a recent WordPress project for a client I needed to list all the attachments/media that had been uploaded for the current post/page that the visitor was viewing.

What I needed was a HTML list with each bullet containing the thumb which was in turn linked to the large version of the image. This is what I came up with:

$args = array('post_type' => 'attachment',
      'numberposts' => -1,
      'post_status' => null,
      'post_parent' => $post->ID,
      'order_by' => 'menu_order',
      'order' => 'ASC');
$attachments = get_posts($args);
if($attachments)
{
  echo '<ul class="imagelist">';
  foreach($attachments as $attachment)
  {
    echo '<li>';
    $large = wp_get_attachment_image_src($attachment->ID, 'large');
    $thumb = wp_get_attachment_image($attachment->ID, 'thumbnail');
    echo '<a href="'. $large[0] .'">' . $thumb . '</a>';
    echo '</li>';
  }
  echo '</ul>';
}

Now one could argue why didn’t I just use the built-in gallery option? For one because it didn’t give me the flexibility I needed. I can expand the above code to include additional rules easily.

For example, maybe I don’t want the “Featured Image” to appear in the list. Easily added. Or maybe my setup would change from “thumbnail” and “large” to something else. Again, easy to change.