Aquesta extensió no s’ha provat en les darreres 3 versions majors del WordPress. Segurament no està mantinguda o suportada, i pot tenir problemes de compatibilitat quan s’usa en versions recents del WordPress.

Nike+

Descripció

This is not an official Nike+ plugin but simply my work to integrate Nike+ stats into the WordPress enviroment.

Nike+ is a personal project for the purpose of posting your Nike+ running stats that you most definitely should be proud of. This plugin can be used for individual or team sites that want to post their collective numbers. Nike+ currently provides a few types of stats.

  1. Individual Totals – Your individual total stats since you started using Nike+. You can choose from most of Nike+’s metrics to be displayed such as Fuel, Number of Runs, Distance, Duration, Average Pace, and Calories. Choose to display only the stats you want.

  2. Personal Records – Want to show off your fastest race times, longest runs, or even your most burned calories. You have that option.

  3. Run History – You can now even display your entire run history, your last # of runs, or just the most recent extremely easily.

  4. Team Totals – Have multiple runners attached to your site? No problem. Nike+ can display the totals of the entire team so you can show off what you are accomplishing as a combined unit.

You can post these stats with three different methods. You can use the provided widgets, shortcodes, or functions in your page templates. For more information on how to use these methods check out the Frequently Asked Questions section.

IMPORTANT

Currently NIke+ plugin requires PHP 5 with cURL and JSON. While these are common it’s not beyond belief that not all web hosts have these exact specs set-up in your server.

Future Plans

I plan on adding a section very soon where you can manually add official race times for display as well as improved markup for styling. If you would like to see additional features or enhancements I welcome your suggestions.

Shout Out

This Nike+ WordPress plugin was built using Nike+PHP for easy connection to your Nike+ data. Nike+PHP is GPL as states here: License

Instal·lació

  1. Upload the plugin folder (i.e. nikeplus) to the /wp-content/plugins/ directory of your WordPress installation.
  2. Activate the plugin through the ‘Plugins’ menu in WordPress.
  3. Visit your “Edit My Profile” page and enter your Nike+ credentials.
  4. Visit the Nike+ settings page under the Nike+ Runs menu to set any additional preferences.
  5. Add one of the widgets or shortcodes to your site.
  6. Start Bragging!

PMF

How do I display my individual running totals?

You can use the Nike+ Individual Totals Widget, the [individual_totals] shortcode, or the nikeplus_individual_totals() function. Below are all the default options and how to use the shortcode and function.

Defaults

    $defaults = array(
        'runner'       => '', // accepts a single user_id
        'show_list'     => false,
        'show_name'     => false,
        'show_runs'     => true,
        'show_distance' => true,
        'show_duration' => true,
        'show_pace'     => true,
        'show_fuel'     => true,
        'show_calories' => true,
    );

In this example we have chosen to use the shortcode to show the totals for user_id 1 as an unordered list and without showing total fuel. Everything else was left with the default options. 1 being true and 0 being false.

    [individual_totals runner=1 show_list=1 show_fuel=0]

To do the same thing with the function you would simply pass an array of arguments to the function and echo it. It would look like this.

    $args = array(
        'runner'    => 1,
        'show_list' => 1,
        'show_fuel' => 0,
    );
    echo nikeplus_individual_totals( $args );
How do I display my personal records?

You can use the Nike+ Personal Records Widget, the [personal_records] shortcode, or the nikeplus_personal_records() function. Below are all the default options and how to use the shortcode and function.

Defaults

    $defaults = array(
        'runner'       => '', // accepts a single user_id
        'show_list'     => false,
        'show_name'     => false,
        'show_1k'       => false,
        'show_1m'       => true,
        'show_5k'       => true,
        'show_10k'      => true,
        'show_half'     => false,
        'show_full'     => false,
        'show_farthest' => true,
        'show_longest'  => true,
        'show_calories' => false,
    );

In the example below we have chosen to use the shortcode to show the records for user_id 3 our Half Marathon record bu not showing our longest run. Everything else was left with the default options. 1 being true and 0 being false.

    [personal_records runner=3 show_half=1 show_longest=0]

To do the same thing with the function you would simply pass an array of arguments to the function and echo it. It would look like this.

    $args = array(
        'runner'    => 3,
        'show_half' => 1,
        'show_longest' => 0,
    );
    echo nikeplus_personal_records( $args );
How do I display my run history?

You can use the Nike+ List Runs Widget, the [list_runs] shortcode, or the nikeplus_list_runs() function. Below are all the default options and how to use the shortcode and function.

Defaults

    $defaults = array(
        'runners'       => '', // accepts a single user_id, comma seprated list of user_id's, negative user_id's to exclude runners, or blank to show all
        'num_runs'      => '', // How many runs would you like to list. Accepts an int or '-1' to show all runs
        'show_list'     => false,
        'show_name'     => false,
        'show_date'     => true,
        'show_distance' => true,
        'show_duration' => true,
        'show_pace'     => true,
        'show_fuel'     => false,
        'show_calories' => false,
    );

In the example below we have chosen to use the shortcode to show the runs for users 1, 3, and 6 while displaying their names but hiding the pace. Everything else was left with the default options. 1 being true and 0 being false.

    [list_runs runners="1,3,6" show_name=1 show_pace=0]

To do the same thing with the function you would simply pass an array of arguments to the function and echo it. It would look like this.

    $args = array(
        'runners'    => "1,3,6",
        'show_name' => 1,
        'show_pace' => 0,
    );
    echo nikeplus_list_runs( $args );

Ressenyes

No hi ha ressenyes per a aquesta extensió.

Col·laboradors i desenvolupadors

«Nike+» és programari de codi obert. La següent gent ha col·laborat en aquesta extensió.

Col·laboradors

Registre de canvis

1.1

  • Upgraged to version 4.5.1 of Nike+PHP class
  • Fixed some notices being displayed
  • fixed some connectivitely issues some users have been reporting

1.0

This is a complete overhaul and adds several new features.

  • Data is now stored in Custom Post Types, options, amd user meta removing the needs to connect to Nike+ each time the page loads.
  • An option to choose how frequently it should check for new stats.
  • Now stores Nike+ Credentials under user profile so you can have multiple runners on one site.
  • added Personal Records.
  • added entire run history.
  • added Team Totals.
  • added better handling of pace and distance.

0.1

  • Initial release