I’ve just released a new WordPress plug-in to display Fitocracy stats on your blog. Give it a whirl and let me know what you think: http://wordpress.org/extend/plugins/rb-fitocracy/
The next version will have more information available (total points, most recent workout, etc). As soon as its possible (via some sort of official Fitocracy API) I’ll be removing the need to enter your own account details too!
Warning: Declaration of Social_Walker_Comment::start_lvl(&$output, $depth, $args) should be compatible with Walker_Comment::start_lvl(&$output, $depth = 0, $args = Array) in /home/customer/www/arronwoods.com/public_html/blog/wp-content/plugins/social/lib/social/walker/comment.php on line 18
Warning: Declaration of Social_Walker_Comment::end_lvl(&$output, $depth, $args) should be compatible with Walker_Comment::end_lvl(&$output, $depth = 0, $args = Array) in /home/customer/www/arronwoods.com/public_html/blog/wp-content/plugins/social/lib/social/walker/comment.php on line 42
I really want to make a chart to summarize recent activities to make sure I’m not getting lazy or too busy. I was thinking D3.js for visualization, using logarithmic values so that jumping rope (150pts -> 3) isn’t drowned out by barbells (>1000pts -> 4). I really hope they make the api happen.
Congrats on your plugin. It’s too bad the json doesn’t contain the total points. Have you considered the dark & fragile path of scraping the value from the activities page? You could combine cron and scraping to interpolate the workout data over time.
I had briefly flirted with scraping the page but.. its always more trouble than its worth. I do want access to more data though!
Scraping the page would have to be done centrally and then the wordpress plugin would use that as a source I guess. Otherwise users would be updating the plugin every time Fitocracy changed their HTML! 🙂
I’m a huge fan of the weekly Fitocracy emails, where it displays the points and number of KG lifted each week. Think thats my next goal for stats in the plug-in. 14,000 KG lifted in one week sounds too good not to publish! 😉
Hi Arron, just tried installing the plugin on my self-hosted blog and when activating I get the following “fatal error”:
Warning: require_once(/src/RbFitocracy.php) [function.require-once]: failed to open stream: No such file or directory in C:SitesSingle19mikeknottwebrootkib_blogwp-contentpluginsrb-fitocracyrb-fitocracy.php on line 14
Fatal error: require_once() [function.require]: Failed opening required ‘/src/RbFitocracy.php’ (include_path=’.;.;C:phpPEAR’) in C:SitesSingle19mikeknottwebrootkib_blogwp-contentpluginsrb-fitocracyrb-fitocracy.php on line 14
WordPress version 3.5.1, if that has any impact. No problems with installing other plugins. Any quick fix that springs to mind, or do I need to get in under the hood?
Hey knottin,
Sorry to hear it isn’t working. It looks like the __DIR__ isn’t working, to load the plugin files. I’ve not tested the wordpress plugin on Windows, but I thought __DIR__ was cross platform.
Let me see if I can replace __DIR__ with a wordpress function to make the plugin more compatible. Are you happy to test it for me if I send you the changed files?
Arron