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]](http://www.viper007bond.com/wordpress/wp-content/uploads/thumb-wp_bf2s.png)
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.
about 4 years ago
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
about 4 years ago
Thanks.
And I think it’s pretty much done. I can’t really think of anything else to add to it, else I woulda done so already.
Although others may have more ideas…
about 4 years ago
lol, I spoke too soon. Just released a new version. I had the percentage totally off and now it’s correct.
about 4 years ago
Updated again.
about 4 years ago
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
about 4 years ago
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.
about 4 years ago
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
about 4 years ago
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.
about 4 years ago
Thanks!! I figured it out. I guess I should learn to read more carefully. BTW great Plugin!! See you on the field….
about 4 years ago
A new version of this plugin should be out in a couple days. It’ll have support for the new ranks introduced in today’s version 1.2 patch as well as a couple new features.
about 4 years ago
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.
about 4 years ago
Version 1.10 has been released with a ton of new features. Download it now!
about 4 years ago
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.
about 4 years ago
[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…
about 4 years ago
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.
about 4 years ago
I need some translators to translate the language file for this plugin. If you’re interested, see this post.
about 4 years ago
Version 1.12 released.
about 4 years ago
Updated to version 1.13.
about 4 years ago
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??
about 4 years ago
What is your reported score ingame (in BFHQ)? What does BF2S.com say your score is?
And pfft, kicking my ass, yeah right.
about 4 years ago
Anyway you could intergrate this into flash?
about 4 years ago
No, I don’t know Flash. Why would you want this in Flash anyway? o_O
about 4 years ago
I like to make my sites in flash and it would have been useful to know how.
=)
about 4 years ago
Oh, I see, embed it into a total Flash site. Gotcha.
Well since you’re good at Flash, perhaps the original BF2S stats package would be helpful to you, especially if you aren’t using WordPress (which my version requires).
about 3 years ago
Any chance to add favorite kit, vehicle, map, army etc. ??
about 3 years ago
Pace on October 11th, 2006 at 2:06 PM2006-10-11T21:06:41ZF jS, Y \a\t g:i A wrote:
No, that data is not in the stats feed that this plugin uses.
about 3 years ago
Viper007Bond on October 11th, 2006 at 9:12 PM2006-10-12T04:12:06ZF jS, Y \a\t g:i A wrote:
To elaborate, here’s what’s available. I could probably go crazy and try and pull directly from EA, but that’s somewhat of a pain in the ass ’cause their servers are often slow / down, etc. and I’m not sure if they’d even allow it (I’ve never played around with the GameSpy feed).
about 3 years ago
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?
about 3 years ago
NightMare on October 19th, 2006 at 10:19 AM2006-10-19T17:19:16ZF jS, Y \a\t g:i A wrote:
I’m not physic. What’s your PID? Does the plugin’s log say it’s updating?
about 3 years ago
Thanks, I understand about the feed.
Love the plugin! And your weather one too!
about 3 years ago
Any plan for a BF2142 plugin?
about 3 years ago
Jeff on November 9th, 2006 at 1:30 PM2006-11-09T21:30:16ZF jS, Y \a\t g:i A wrote:
EA is currently not allowing websites to pull data from their feed, so at this point, it looks unlikely.
about 3 years ago
I want to display more than 1 player on my weblog and not only mine. Is there a way to do that?
about 3 years ago
Kultivate on January 9th, 2007 at 2:19 AM2007-01-09T10:19:59ZF jS, Y \a\t g:i A wrote:
Not with my plugin, no. I had plans to support them, but dropped them after I stopped playing BF2 and moved on to 2142 and other games.
Try the official BF2S.com leaderboard API: http://jrm.cc/extras/mlb/ (see the readme)
about 3 years ago
Please add an option that grabs the “Last Battle on …”-date.
about 3 years ago
Oliver on March 28th, 2007 at 9:35 AM2007-03-28T17:35:46ZF jS, Y \a\t g:i A wrote:
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.
about 2 years ago
im getting ready for bf2!!!!!!!!!
about 2 years ago
im getting ready for bf2!!!!!!!!!!!!!!!!!!!!!!!!!!!
about 2 years ago
ive got the same problem as other people, i play on ranked servers but my stats dont update. my nicks are 0_basalt_0 and BASALTWOLF.
about 1 year ago
how i put my rank close my name?
about 7 months ago
It doesnt work anymore. Its because of some error and it cant get the stats from the bf2 stats site or something…
about 7 months ago
In Reply To Dennis:
This plugin is long dead and the API that this plugin used to fetch your stats is no longer available. Sorry.
about 4 months ago
Hi Viper
any intention to write a Stats Plugin for Bad Company 2
about 4 months ago
In Reply To Peter Treier:
Nope. Much too busy and I have no idea where to fetch the data from.
Plus there’s so many fancy image based ones out there that it doesn’t seem worth it: http://bfbc2.statsverse.com/
about 3 weeks ago
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?
about 3 weeks ago
In Reply To keith:
It’s PHP code, but the code fetched your stats from BF2S.com who took down their API long ago. It did not fetch it directly from EA.
In short, this code would be worthless to you.