
內容簡介
「Custom Strava Integration」是一個強大的外掛程式,讓整合 Strava 活動變得簡單易行。使用這個外掛程式,您可以根據個人喜好創建輸出。
外掛程式
這個外掛程式的基本功能,是在您的文章中加入短代碼 [strava id=”[activity id]”],透過 Strava API v3 取得資料,並將此資訊填充於預先設定的模板中。
設定
您想完全控制短代碼的輸出嗎?沒問題。您可以在設定頁面上指定一個模板,並定義 Strava 資訊的位置。因此「Custom Strava Integration」提供了以下的佔位符號:
[distance] – 活動的總距離
[description] – 活動的描述
[duration] – 活動的時間
[elevation] – 活動的總爬升高度
[location] – 活動的位置
[name] – 活動的名稱
[speed] – 依據活動類型(騎車或跑步)來決定輸出的內容,有可能是跑步配速,也有可能是騎車速度
[time] – 活動的當地開始時間
[type] – 活動的類型(跑步、騎車或游泳)
您不僅可以使用 CSS 功能來自訂樣式,同時還可以完全控制 HTML 的輸出。
此外,您還可以選擇欲使用的顯示單位(mi/ft 或 km/m)。
與其他解決方案的不同之處
我們知道,Strava 也提供自已的嵌入式 widget,但是此外掛程式具有以下優勢:
不使用 iframes(如果您不想使用的話)
允許您完全自訂內容
可以顯示比 widget 更多的資訊
並不需要您離開網站
所以,您可以專注於重要的事情 - 撰寫出優秀的部落格文章!
外掛標籤
開發者團隊
原文外掛簡介
The “Custom Strava Integration” is a powerful plugin that makes integrating strava activities easy and simple. It gives you the opportunity to create output exactly the way you like it.
The Plugin
Basically what this plugin does is adding the shortcode [strava id=”[activity id]”] to your post, receiving data via Strava API v3 and filling the preconfigured template with this information.
Configuration
You want full control of the shortcode’s output ? No Problem. You can specify a template at the settings page and define the positions of strava information. Therefore ‘Custom Strava Integration’ provides these placeholders:
[distance] – Overall distance of the activity
[description] – Description of the activity
[duration] – Duration of the activity
[elevation] – Overall elevation of the activity
[location] – Location of the activity
[name] – Name of the activity
[speed] – Depending on type (ride or run) – either running pace or riding speed
[time] – Local start time of the activity
[type] – Type of the activity (run – ride – swim)
You can not only customize the style by using CSS features, moreover you have full control over the html output.
Moreover you can choose the type of display unit (mi/ft or km/m) you want to use.
Difference to other solutaions
We know that strava also does offer their own embedded widget, but this plugin:
does not use iframes (if you want to)
allows you to fully customize the content
can display more information than the widget
does not require you to leave the site
You can concentrate on the important things – writing good blog posts!
