My Xbox Profile : Wordpress Plugin

Posted in Plugins on January 8th, 2010

Now this is a Wordpress Plugin that I have been meaning to create for sometime now. After writing a similar application for my old website I always wanted to create a Xbox Live Gamercard Plugin for Wordpress for everyone to use. So here is the first version of the plugin, its quite simple with only a few options but the biggest feature about it is that it is completely customisable using CSS.

To begin with I have to say a huge thank you to Duncan Mackenzie for providing the Xbox Live Data Service which powers the information in this plugin because without his work this plugin wouldn’t be possible.

So heres a brief description on how this plugin works. As I meantion above the plugin pulls in your Gamercard details in from the Xbox Live Data Service using the  PHP DOMDocument::load function. Then using the DOMDocument::getElementsByTagName function it pulls in the sperate pieces of information it requires.

Now that I have all the Gamercard details I then created the new Gamercard using semantic HTML and style it with a seperate CSS file.

Ok so enough of all the techy part, let me talk you through steps of getting this added to your website.

Installation

  1. Login to your dashboard and under ‘Plugins’ click ‘Add New’.
  2. In the serach box type ‘My Xbox Profile’ and then click ‘Search Plugins’.
  3. Find the plugin in the list (should be the first one) and click install on the right hand side.
  4. When the lightbox window opens click the red ‘Install Now’ button.
  5. Once the installation has finished click ‘Activate Plugin’ next to the ‘Actions’ .

Changing Settings

Now that you have installed the plugin you should now see a ‘My Xbox Profile’ link under the ‘Settings’ tab in your admin dashboard. If you click the link you should see the page below.

Gamertag Details: In this section you need to enter your current Xbox Live Gamertag into the box provided.

Advanced Settings (Optional): There are currently a few additional settings that you can configure, I have listed them below.

  • Show Recent Games – You have the ability to show or hide the recent games section on the Gamercard.
  • Recent Game Image Size – If you are displaying the recent games then you can have the images in 2 different font sizes. (Please note if you are using the default stylesheet then this setting must be set to 32px)
  • Use JQuery – I have added this setting to allow you to remove the JQuery files if you see them duplicated in the head section of your website.

Placing the Gamercard on Your Website

There are two ways in which you can add Gamercard to your website.

In Your Theme (Template Tag)

You have the ability to add the Gamercard to any part of your theme by using the following code:

<?php echo myxboxprofile(); ?>

In Your Post/Page (Shortcode)

If you dont want to add it to your theme then you can add it to any post or page on your website using the shortcode below (without the spaces).

[ myxboxprofile ]

Additional Customisation

Now that you have installed and setup the plugin you will need to customise the Gamercard to fit the style or your website.

Within the plugin folder you will find a folder called ‘CSS’, in this folder you will find a file called ‘myxboxprofile.css’. This is the file that applies the design to your Gamercard once it is place on your website.

I have commented this file so you are free to change the look and feel of your Gamercard to suit your own website.

Conclusion

Im pretty please with this plugin and hopefully it will get used quite a bit, mainly because it is very customisable from a design point of view. I am going to come back to this plugin and develop it a further in the future but I wanted to see if there was much of a demand it first.

I have a few ideas on the direction I would like to take this plugin and here are a few of my ideas for the next version.

  • Include the use of templates for differnet layouts of Gamercards
  • The ability to create custom templates
  • Uterlise more of the information in the Data Service.

If you have any ideas of yourself then please do let me know and I will add the to the feature list.

Hopefully I have explained everything you will need to know about this plugin, but if not then please do leave a comment below.

Download

The download is now available from Wordpress.org, please feel free to give it a try.

4 Comments to “My Xbox Profile : Wordpress Plugin”

  1. I’m about to use your plugin for a team-blog, and wonder if I can use it to show the xbox-live-tag for each member of the blog? Either with some hardcoding on a page like “myxboxprofile(‘coolplayer’);” or by extending the author.php page.

    Do you have any good suggestions for me?

    And thx for the plugin :-D

    ./h

  2. Hi Henrik,

    It’s not going to be easy to convert this plugin to allow multiple users.

    I have however nearly finished a different version of this plugin which will give you this functionality.

    Im currently just getting rid of the last few bugs and should be releasing it to wordpress.org soon.

    I’ll let you know when it is available to download.

    Regards
    Pete

  3. Manuel says:

    Hi Peter, I would love to use your plugin, but I have some errors, if you could take a look please?

    —–> http://www.raccooncity.de/error.jpg

    And I have no choise to use the jquery thing.

    Thanks for the help dude.

    Manuel

  4. Hi Manuel,

    You are getting this error message because of a setting on your server.

    You will need to ask your hosting company to change the ‘allow_url_fopen’ setting in your PHP configuration (php.ini) file to be ‘ON’.

    Once they have done this, this should fix the issue you are having.

    Regards
    Pete

Leave a Comment