Halo 3 Service Record WordPress Plugin

Update 7/31/10: I no longer support this plugin and have removed it from the site. You can still download the code, if you like, but it needs to be updated before it will work correctly.

This plugin allows you to add information from your Halo 3 Service Record to your WordPress blog.

The plugin displays your emblem, rank and grade, but with a little editing it could also display total the total number of games played, the date and time of the last game played, and any other information on the Halo 3 Service Record page at Bungie.net.

Installation

The download includes:

  • ardamis-halo3.php (put this in your /plugins/ directory)
  • halo3stats.css (copy and paste the contents into your theme’s style.css)

The plugin attempts to create a text file (halo3_cache_YOURTAG.txt) for use as a cache in your blog’s root folder automatically. Some server configurations may not permit the plugin to create this file and you’ll see resultant errors; in this case, you may have to manually create a file with that name and upload it to your blog’s root (and perhaps set permissions).

Usage

The plugin accepts one argument: your gamertag.

Insert the code:

<?php if (function_exists('ardamis_halo3')) ardamis_halo3('YOURTAG'); ?>

into a template file wherever you want the Service Record to appear, replacing YOURTAG with your actual Xbox Live gamertag, ex.:

<?php if (function_exists('ardamis_halo3')) ardamis_halo3('ardamis'); ?>

Download

Get the files here: (Current version: 1.0 beta)

Download the Halo 3 WordPress Plugin

How can I add the Service Record to a post?

Thanks to a really neat plugin, The Execution of All Things, you can call functions from any activated plugin from within a post. Once you have both the Halo 3 Service Record plugin and the wp-exec plugin installed, you can include the sig in a post with the line:

<exec type="function" name="ardamis_halo3" params="YOURTAG" />

19 thoughts on “Halo 3 Service Record WordPress Plugin

  1. heretic monk

    Excellent work man. I suppose this can be transplanted on a non-wordpress site in the same way as your gamertag script?

  2. ardamis Post author

    This won’t work on MySpace. It uses PHP to do all sorts of stuff, and MySpace will never let users add PHP scripts to their pages. You’ll have to stick to an image-based sig.

    The principles behind the Halo 3 sig are the same as those of the gamertag script, so yes, it can be edited to work on non-WordPress sites in the same way.

  3. P Smoove

    Can this be adopted to work in Blogger? I already have my GamerTag on the page, it would be cool to add the service record as well. Thanks.

  4. ardamis Post author

    The current method won’t work on Blogger or any other site that prohibits you from running PHP scripts. But I’m sure someone will make a Halo 3 Service Record flash sig for use on vBulletin boards and the like.

  5. Presto-X

    Hey ardamis,
    How hard would it be to combine the two cache files used by the gamer tag mod and the halo 3 mod in to one cache file? I was trying to play around with the code without any luck, again you are the master lol… Hey you should have my email address shot me an email with your paypal email address so I can donate some funds your way :)

  6. ardamis Post author

    Yes, it’s possible to convert the script’s output into an image, but that defeats the purpose of the plugin, so it’s not a project I’ll be working on.

    If you want an image, why not just crop a screen capture of the output?

  7. Brian

    I will find you, plasma pistols at dawn good sir.

    J/K, I know what you mean about being busy. I will mess around with it but I don’t know PHP. If I come up with anything I will post back.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>