WordPress.org

Ready to get started?Download WordPress

Forums

Nike+
[resolved] incorrect stats displayed (12 posts)

  1. mkomon
    Member
    Posted 1 year ago #

    Hi,

    I have two problems with the stats displated by Nike+ plugin:
    1/ the Most Recent feature shows zeros for all stats:
    0.00KM Distance
    00:00 Duration
    '00"/KM Pace
    0CAL Calories Burned

    2/ the All Time feature provides incorrect Total Duration and Average Pace values:
    on the official Nike+ website I can see my Total Duration as 71:18:33 but the plugin shows 11:18:33; also the average pace should be 5'38"/KM instead of 0'54"/KM. Other values are correct (total runs, distance, calories).

    I have tried WP 3.3 and also latest version as of today with the same results. Is there any chance this problem does not affect just me? I will be happy to help with troubleshooting.

    http://wordpress.org/extend/plugins/nikeplus/

  2. James Laws
    The WP Ninjas
    Plugin Author

    Posted 1 year ago #

    I've just updated the plugin to a new way of handking the data. Let me know if that works better for you.

    And be sure to read the Frequently Asked Questions.

  3. mkomon
    Member
    Posted 1 year ago #

    Hi,

    the FAQ and the whole concept looks promising but the plugin fetches no data for me. Again I tried two different platforms and WP versions with the same outcome. I deleted the previous version of the plugin and dowloaded the new one. Then I entered my mail and password for Nike+ web, went to Nike+ Runs/Nike+ Settings and hit Save changes and Update runs. In netstat I can see a TCP connection to Nike+ server (same IP as I get resolved for secure-nikeplus.nike.com, port 443) but that is about all I can do, there is no point in sniffing HTTPS communication. Any hints on how to debug, where to enable debug prints and so on? I am fairly skilled in programming but some hints would be appreciated, PHP is not my cup of tea and I am new to WP.

    Thanks!

  4. James Laws
    The WP Ninjas
    Plugin Author

    Posted 1 year ago #

    I'm using the plugin on my site so I know it fetches the data so I would probably start by looking in your database and see if there is any user meta there with your data stored. I'm not at my computer at the moment so I don't remember all the meta keys off hand.

    You will also want to make sure your Nike+ credentials are correct in the database.

    If the credentials are correct and there still isn't any data making it into the database I would go into the main file, nike_data.php I think, and start print some of the data that's supposed to be coming from Nike and see what you get.

    Also are you sure you have php5 and curl running on your server?

    Those would be my starting points.

  5. mkomon
    Member
    Posted 1 year ago #

    OK thanks, I will investigate the issue further. I'll keep you posted.

  6. mkomon
    Member
    Posted 1 year ago #

    The database metadata is populated just fine, password is copy/pasted from a password manager and it matches perfectly. I assume PHP is ok since wordpress uses it, curl is present as well. Also I can see the TCP connection to Nike website in netstat which supports my assumptions that PHP and curl are working ok. I will now dig into the code and debug prints.

  7. mkomon
    Member
    Posted 1 year ago #

    OK got it. In one of the runs there were national characters which blew away the json_decode call in _getNikePlusFile() in nikeplusphp.x.x.php. With the characters corrected I loaded my runs and can start exploring the new features. Thanks for hints, they've been really helpful.

  8. mkomon
    Member
    Posted 1 year ago #

    marking as resolved

  9. mfresh
    Member
    Posted 1 year ago #

    This is a great plugin - finally I can display my run stats - thanks! I see that the plugin's latest nikeplusphp version is 4.3.2. The latest version is 4.5. When viewing my site, http://www.vibesnscribes.com/running, I'm getting the following error:

    Warning: Division by zero in /home/xvibe/vibesnscribes.com/wp-content/plugins/nikeplus/inc/nikeplusphp.4.3.2.php on line 346

    I don't know much about php, but could this be fixed by using the latest version in the plugin?

    Thanks again, I'm happy with the results.

  10. James Laws
    The WP Ninjas
    Plugin Author

    Posted 1 year ago #

    It's possible. I' haven't had much time for updates on this project. I'll check it out and see if I can push out an update in the next week or so.

  11. mfresh
    Member
    Posted 1 year ago #

    Thanks...and thanks again for a great plugin!

  12. James Laws
    The WP Ninjas
    Plugin Author

    Posted 1 year ago #

    You are very welcome and I;m glad you like it.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic