Halo 3 Service Record WordPress Plugin

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.

Halo 3 emblem for ardamis

Halo 3 rank for ardamis
Service Tag: A10
Captain, Grade 1

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" />
  • Digg
  • StumbleUpon
  • del.icio.us
  • Facebook
  • Technorati
  • LinkedIn
  • TwitThis
  • Google
  • E-mail this story to a friend!

16 Responses to “Halo 3 Service Record WordPress Plugin”

  1. HALO 3 RULES

  2. i need the HTML Code for this setup so i can post it on my myspace.

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

  4. 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.

  5. ardamis you ROCK! you are a code ninja, I love you!

  6. Brilliant, that is fantastic thank you very much :)

  7. 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.

  8. 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.

  9. Great work

    did something change on bungie’s site?
    the emblem does not seem to load anymore
    any idea’s on fix?

  10. Yup, Bungie changed the Halo 3 player profile page, which broke the rank emblem part of the plugin. It’s fixed now.

  11. prefect, thanks again

  12. 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 :)

  13. Sharing the cache file would require rewriting the caching portions of both plugins.

  14. anyway you could make this script print onto an image instead?

  15. 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?

  16. Another great plugin. Thanks ardamis!

Leave a reply

Comments are moderated

Wrap code snippets in <code></code> tags.