Battlefield 2 Stats

Description:

This plugin creates a function which outputs your Battlefield 2 profile statistics. The data is fetched via a XML feed from BF2S.com. It’s intended for your sidebar, but can also be used on a WordPress page.

It’s fully configurable via an options page in the WordPress admin area and only requires that you add the plugin’s output function to your theme’s sidebar to get it working.

To see it in action, look to your right in my sidebar, just below the weather.

Download:

This plugin has been moved!

You can now find it at the WordPress.org plugin database.

Support / Feature Request Forum:

http://www.viper007bond.com/wordpress-plugins/forums/viewforum.php?id=20

Donate

If you enjoy this plugin, please consider sending a few bucks my way. I’ve spent a lotta time on this plugin and all donated money will be put towards paying off my college loans and such. :)

Configuration Page Screenshot

Click for a larger version.

Battlefield 2 Stats Configuration Page [Thumbnail]

Change Log:

  • v1.14: Complete recode of the ranks code due to stupidity on my part when it was first coded. Also various bug fixes and improved error handling. Please make sure to upload the new image file as well.
  • v1.13: BF2S.com no longer allows the use of playernames, so this plugin now reflects that change. You can only use PIDs now. Also new are some minor improvements and bug fixes.
  • v1.12: WordPress Widgets support and long term logging added. Now if an error occurs, you’ll actually be able to see it later on rather than just at the time it occured. Also some various bug fixes I believe (hard to remember what I changed, lol).
  • v1.11: Localization support added. Now all of you non-English bloggers can display your stats in whatever language you wish. Also added are thousands seperators in the numbers (for easier reading) and unit abbreviations to the playtime (example: Playtime: 236h:06m:04s). You can toggle the use of that though.
  • v1.10: Ranks introduced in the BF2 v1.2 patch added as well as many new features / improvements including an optional update checker that connects to my website every once in a while to look for a new version.
  • v1.02: More improvements in the rank percentages (you can now choose from two percent types) as well as a widget for WP-Dash. You can also now use your player name to fetch your stats rather than only your PID.
  • v1.01: Major “percentage to next rank” improvements. Basically, I wasn’t correctly calculating the percenteage in v1.00.

60 thoughts on “Battlefield 2 Stats

  1. Pingback: WordPress Station » Blog Archive » Battlefield 2 Stats

  2. Nice work. A little gem of a plugin for those of us who are seriously addicted to BF2:)

    If you update this with any new features – let me know. I’d be keen to see it progress.

    c0y0te

  3. Updated again.

    v1.02: More improvements in the rank percentages (you can now choose from two percent types) as well as a widget for WP-Dash. You can also now use your player name to fetch your stats rather than only your PID.

  4. I’m currently using the code that Chuy posted to list the scores for all of our clan members at my site. I was going to write a WP plugin to wrap that functionality, but perhaps it would be better if you could add the functionality to your plugin. It would be nice to have an option to add multiple PIDs and allow a listing of users (like on the site above). Just a thought. I use your plugin on my personal blog (much appreciated). By the way, I wrapped a Teamspeak server status script to make it a plugin as well (in case someone needs that let me know).

    Sparky

  5. Problem with that is it’d require a whole recode. Besides only allowing the entering of one PID/playname (well, it doesn’t really only allow, but it’s only designed for one), it’s setup only to grab and store one set of data. Not to mention it’d have to have a whole other setup page on how to display multiple users and such.

    Plus, I think 99.9% of WordPress blogs that’d be interested in this plugin are single user and have no need to display the stats for more than one person. This plugin only has 25 downloads at the time of this comment as it is, the other version would only get 1, maybe 2 downloads. To be frank, not worth my time.

    So, I think for the select few who need to display multiple people, they’re better off just doing what you did and wrapping the official API into their WordPress theme. As you probably found out, it was very easy to do. ;)

  6. Pingback: Living in the Whine Country » BF2 Stats Plugin for WordPress

  7. I am having problems getting the rank icons to display. Where exactly should the rank images be added to? Currently I have them located in two locations and it still does not work:
    \wp-content\themes\default\images &
    \wp-content\plugins\images
    Thanks
    Dave

  8. The plugin file, readme, and the images folder should all be in a folder called “wp_bf2s” in your plugins folder. That results in the rank images being located here:

    /wp-content/plugins/wp_bf2s/images/

    Just keep the ZIP’s file structure intact and you should be good. :)

  9. Alright, the update is done I think. However, before I publicly release it to a ton of people, I need to triple check that it actually works. I’ve tested it on my local blog as well as here on my real blog, but I still would like a couple people to try it out first.

    So, if you use this plugin and would like to beta test the next version for me, contact me and I’ll send you a download link. :)

  10. Pingback: Hjelmengen’s Blog » Blog Archive » Battlefield2 Statistics Plugin to WordPress

  11. Pingback: Double Life » Blog Archive » Battlefield 2 Wordpress Plugin

  12. Hi, I am curious, seeing that I am pretty new at wordpress and plugins. I understand the concept of putting it in the sidebar, but how do you put it on a page?
    I want to display it on a page, what is the code for it?
    Thank you.

  13. [Comment ID #744 Will Be Quoted Here]
    Please accept my apologies for using the wrong venue for my support questions, will be posting it in the right area…

  14. No worries. I just like to keep support to the forums to make these comments less messy and to better get help to those that need it.

    Anyway, check out your thread. I’ve left a response. ;)

  15. Pingback: NanoBlog » Blog Archive » Out of the Dark

  16. Pingback: Rene - Just another Blog » Blog Archive » Battlefield 2 Stats Translation

  17. Pingback: krynsky.com » Battlefield 2 stats, tips and info

  18. Hi Viper,Herez a short question for ya. Im playing Bf2 now for a few months or so, but i’m not getting my stats to go up. My stats-counters stay down @ zero. That’s pretty crappy because everyone thinks there just playing against a fucking nooby. I think I even kicked your ass severall times.
    How can i get my stats to work properly??

  19. Pingback: What is on my Mind » Blog Archive » BF2 Stats Plugin

  20. Pingback: What is on my Mind » Blog Archive » Pimped out my Blog

  21. Pingback: BREWTALITY.NET » BF2 Stats for WordPress

  22. Pingback: Living in the Whine Country » What tweaks & plugins for Wordpress do I suggest?

  23. for the past 24 hours I have earned over 100 points for kills, flags, etc. but its not showing up in my stats. why am i not getting my points?

  24. Pingback: june6.com » Blog Archive » Added a BF2 Stats plug-in

  25. Pingback: 10 Web Widgets to Share Interests on Your Site at krynsky.com

  26. Oliver on March 28th, 2007 at 9:35 AM wrote:

    Please add an option that grabs the “Last Battle on …”-date.

    All information that’s available in the feed I use is currently available for display in the plugin.

    BF2S.com has just released a new, separate feed that contains nearly ALL data in your profile, however due to the age of this game and other priorities I have, this plugin is probably at it’s final release and will never be updated again.

  27. Pingback: 7 plugins curiosos para Wordpress » BlogMundi

  28. Is this still available, is it an html code or an actual program, can I get stats for my whole clan to show on there own pages? U got a link so I can download?

Leave a Reply