This is a WordPress Plugin that I have been meaning to create for sometime now. After writing a similar application forthe previous website design I had I always wanted to create an Xbox Live Gamercard Plugin for WordPress for everyone to use. So, here is the first version of the plugin, it is quite simple, using only a few options, but it’s best feature 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 have been possible.
There is a brief description on how this plugin works. As I meantioned above the plugin pulls in your Gamercard details from the Xbox Live Data Service using theĀ PHP DOMDocument::load function. Then, using the DOMDocument::getElementsByTagName function it pulls in the separate pieces of information it requires.
Once I had all the Gamercard details, I created the new Gamercard using semantic HTML and styled it with a seperate CSS file.
Ok, so enough of all the techy stuff, let me talk you through how you can add this to your website.
Installation
- Login to your dashboard and under ‘Plugins’ click ‘Add New’.
- In the serach box type ‘My Xbox Profile’ and then click ‘Search Plugins’.
- Find the plugin in the list (it should be the first one) and click ‘install’ on the right hand side.
- When the lightbox window opens click the red ‘Install Now’ button.
- Once the installation has finished click ‘Activate Plugin’ next to the ‘Actions’ .
Changing Settings
Once you have installed the plugin you should 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 don’t 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 configured the plugin you will need to customise the Gamercard to fit the style of your website.
Within the plugin folder, you will find a folder called ‘CSS’ and in this folder you will find a file called ‘myxboxprofile.css’. This is the file that applies the design to your Gamercard once you have placed it 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
I’m very pleased with this plugin and hopefully it will get a lot of use, primarilybecause it is extremely customisable from a design perspective. I am going to come back to this plugin and develop it further in the future, but I wanted to assess demand first.
I have a few ideas on the direction in which 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 different layouts of Gamercards;
- The ability to create custom templates;
- Utirlise more of the information in the Data Service.
If you have any ideas of your own then please do let me know and I will add them to the feature list.
Hopefully I have explained everything you 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.



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
./h
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
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
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
Hi Peter,
I’m too intrested in Henrik idea of having the Gamerstag, tied into the user’s profile.
What would be realy great is an Avatar Option, that uses the gamerstag mini avatar as your user profile avatar. At the moment, my members are doing it the hard way… I.E. importing the avatar pic from xbox.com, then uploading to our wordpress site via Peter Sterling “Avatars” WP Plugin.
Hi Pete, any updates on the new multi-user version of this plugin?
I own an Xbox and a Playstation and both are really good game consoles. Let’s see what are Microsoft’s future updgrades on its Xbox game console.,.:
Great Plugin Peter!
Couple things. Are you going to add a sidebar widget in your next release? as I would like to place this plugin inbetween some of my sidebar widgets.
Also not sure if this can be done but it would be great to have a small gamertag league table, ideal for some gamer blogs who like to have a bit of competiton.
Thanks!
Hey guys,
Thanks for all your comments, sorry the delay in ggetting back to you all. I’m currently working on a seperate project at the moment so I don’t have any updates on this plugin as of yet.
Don’t worry though as soon as I get this project out of the way, I’ll be adding all of your suggestions as new features, so please do bear with me.
Thanks
Pete
[...] here to go directly to info about Peter's Xbox Live plugin. Filed under: Server, Website, & [...]
Any status on updating with the added features, etc?
Hi Guys,
Sorry for the delay in the new updates, i recently got accepted onto the Xbox Live Community Development Program and a few issues have come up when using my own feed for this plugin.
Once these issues are fixed I will get the new updates rolled out.
I appreciate your patience and support with this plugin and I promise to upgrade it soon.
Cheers
Pete
Any more luck with the multiple user version of the plugin? We have 3 writers on our site right now and would love to have something like this.
Thanks.
Hi Pete,
any Updates on your modification?
Cheers