
內容簡介
「Strava Ride Details」外掛可以透過簡短代碼在你的文章或頁面中顯示指定 Strava 騎乘詳情。此外掛使用 Strava 的 v3 API 並使用 OAuth 進行驗證。
「Strava Ride Details」預設會顯示以下騎行詳情:
騎行名稱
里程
海拔高度
行進時間
地點
每個詳情都可以開啟或關閉,並以無序列表顯示,你可以使用 CSS 自定義詳情元素的樣式。
你也可以選擇將單位顯示為 mi/ft 或 km/m。
雖然 Strava 有提供內嵌元件,但本外掛:
不需要 iframe
可以讓你將結果風格套用於網站上
能夠適用於響應式佈景主題中
預設會使用代碼 [strava id="ride_id"] 顯示所有詳情。其中,ride_id 是在 Strava 上查看單個騎乘時 URL 結尾的一串數字。
如果你想要隱藏某些詳情,只需在代碼中將其設為 false。例如,如果你只想要顯示里程,請使用以下代碼:
[strava id="ride_id" name="false" elevation="false" moving_time="false" location="false"]
外掛設定
登入你的 Strava 帳號,並建立應用程式 [http://www.strava.com/developers]。
確認應用程式的重新導向 URI 與你的網站域名相同。
將應用程式的用戶端 ID 和用戶端密鑰從 Strava Ride Details 的設定頁面複製到相應欄位中。
在設定頁面上點擊「與 Strava 連接」,以生成存取令牌。
保存設定。
新增到頁面或文章
在你的文章或頁面中插入 [strava id="ride_id"]。
外掛標籤
開發者團隊
原文外掛簡介
Strava Ride Details allows you to display Strava ride details from a specific ride in your posts and pages using a shortcode. It uses v3 of Strava’s API, and uses OAuth for authentication.
The details displayed by default are:
Ride Name
Distance
Elevation Gain
Moving Time
Location
Each of the details can be turned on or off. The details are displayed in an unordered list so you can style the elements however you would like using CSS.
You can also choose to display units in mi/ft or km/m.
While Strava does offer their own embed widget, this plugin:
does not require an iframe
allows you to style the results to match your site
will work in responsive themes
By default all details are display using the shortcode [strava id="ride_id"], where ride_id is the string of digits at the end of the URL when viewing a single ride on Strava.
If you would like to remove a detail, just set it to false in the shortcode. For example, if you would like to show only the distance, then use this shortcode:
[strava id="ride_id" name="false" elevation="false" moving_time="false" location="false"]
Plugin Setup
Log in to your Strava account and create an application [http://www.strava.com/developers]
Make sure the redirect URI of your application is the same domain as your site
Copy your client ID and client secret from your application into the Strava Ride Details settings page
Click “Connect with Strava” on the settings page to generate an access token
Save settings
Add to page/post
Insert [strava id="ride_id"] in your post or page
