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 Responses to “Halo 3 Service Record WordPress Plugin”

  1. SPARTAN 117 says:

    HALO 3 RULES

  2. Anthony says:

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

  3. heretic monk says:

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

  4. ardamis says:

    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. Presto-X says:

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

  6. Tobeon says:

    Brilliant, that is fantastic thank you very much :)

  7. P Smoove says:

    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. ardamis says:

    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. bad says:

    Great work

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

  10. ardamis says:

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

  11. bad says:

    prefect, thanks again

  12. Presto-X says:

    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. ardamis says:

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

  14. jmarc90 says:

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

  15. ardamis says:

    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. tyler says:

    Another great plugin. Thanks ardamis!

  17. Brian says:

    Hi, great plugin idea! The images appear to be broken again, any chance of a fix?

  18. ardamis says:

    Maintaining this script is pretty low on my list, actually.

  19. Brian says:

    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.

The comment form requires JavaScript. Please enable JavaScript to submit a comment.