Widgets
As part of the Nike+PHP service, we are looking to deliver easy to implement widgets. All of our widgets require JavaScript to work, but please feel free to build your own using the Nike+PHP class. jQuery is my library of choice for developing these widgets.
1. Flot widget
The first Nike+PHP widget uses Flot allows you to drop a graph plot of any specific Nike+ run on to your website. The widget automatically resizes to fit any container. In the example below, the container is 250px wide.
EXAMPLE
USAGE
<script type="text/javascript" src="http://widgets.nikeplusphp.org/js/widgets.js"></script> <script type="text/javascript"> nppWidget(1, 1234567890, true, 0); </script>
The options for the function that generate this widget are:
- mapType: 1
- userId: your Nike+ user ID
- * miles: would you like your results to be displayed in miles or km. boolean
- * runId: an optional value, if not specified, your last run will be shown
* = optional
You can see this widget in use on my own blog.
