[WordPress] 外掛分享: WP-Strava

WordPress 外掛 WP-Strava 的封面圖片。

前言介紹

  • 這款 WordPress 外掛「WP-Strava」是 2013-04-09 上架。 目前已經下架不再更新,不建議安裝使用。
  • 目前有 1000 個安裝啟用數。
  • 上一次更新是 2022-11-25,距離現在已有 891 天。超過一年沒更新,安裝要確認版本是否可用。以及後續維護問題!
  • 外掛最低要求 WordPress 4.6 以上版本才可以安裝。
  • 外掛要求網站主機運作至少需要 PHP 版本 5.3 以上。
  • 有 13 人給過評分。
  • 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。

外掛協作開發者

cmanon | jrfoell | dlintott | lancewillett | sebastianerb |

外掛標籤

biking | strava | bicycle | cycling | activity |

內容簡介

本外掛使用 Strava API 在您的 WordPress 網站上嵌入運動員的地圖和活動。包括數個小工具和簡碼,可顯示地圖和活動摘要。

區塊:

在 WordPress 5.0 及以上版本中可用。

本區段中的嵌入只能在 WP Block (Gutenberg) 編輯器中運作。與 WPBakery、Visual Composer、Elementor、Beaver Builder 等工具的相容性可能有所不同。

Strava 活動:

在任何頁面或文章中嵌入一項活動。顯示活動摘要及地圖(如果已添加地圖密鑰)。

將 Strava 的完整活動 URL 貼上,例如 https://www.strava.com/activities/1793155844,然後點擊 "嵌入"(直接貼上連結到編輯器中也可以)。編輯器將顯示預覽地圖,類似於在前端顯示的地圖。在側邊面板中,您可以選擇一些選項,例如只顯示圖片(不顯示詳細表格),在起點和終點顯示標記,以及覆寫您在“設定 ->Strava”下的默認選擇的計量系統。

Strava 路線:

在任何頁面或文章中嵌入路線。顯示路線摘要及地圖(如果已添加地圖密鑰)。

貼上來自 Strava 的完整路線 URL,例如 https://www.strava.com/routes/2326567,然後點擊 "嵌入"(直接貼上連結到編輯器中也可以)。編輯器將顯示預覽地圖,類似於在前端顯示的地圖。在側邊面板中,您可以選擇一些選項,例如只顯示圖片(不顯示詳細表格),在起點和終點顯示標記,以及覆寫您在“設定 ->Strava”下的默認選擇的計量系統。

Strava 活動列表:

以項目符號列出您最近的活動。

Strava 段:

在頁面或文章中嵌入一個段。顯示段落摘要及地圖(如果已添加地圖密鑰)。

貼上從 Strava 取得的完整段 URL,例如 https://www.strava.com/segments/18803428,然後點擊 "嵌入"(直接貼上連結到編輯器中也可以)。在查看活動的段時,最簡單的方法是從 strava.com 點擊 "查看完整排行榜" 或 "查看本地傳奇統計數據"。

編輯器中將顯示預覽地圖,類似於在前端顯示的地圖。在側邊面板中,您可以選擇一些選項,例如只顯示圖片(不顯示詳細表格),在起點和終點顯示標記,以及覆寫您在“設定 ->Strava”下的默認選擇的計量系統。

簡碼:

[activity id=NUMBER] - 添加到任何頁面或文章中。顯示活動摘要及地圖(如果已添加地圖密鑰)。

您應該用 Strava 的活動 ID 替換 NUMBER。最簡單的方法是從像 https://www.strava.com/activities/1793155844 這樣的 Strava 網址中找到它(其中 1793155844 是活動 ID 號碼)。

也可以傳遞以下可選參數:

- som - 英制/公制(計量系統 - 覆寫默認設置)。

- map_width - 寬度(圖像寬度,以像素為單位)。注意,寬度和高度參數都限制在 640 像素,除非您有高級 API 方案:https://developers.google.com/maps/documentation/maps-static/dev-guide#Imagesizes。

- map_height - 高度(圖像高度,以像素為單位)。請參見上面有關最大高度的注意事項。

- client_id - 指定不同的運動員(您可以從 https://www.strava.com/settings/api 或 wp-strava 設置頁面的 /wp-admin/options-general.php?page=wp-strava-options 複製此值)。

- markers - 在起點和終點顯示標記(true/false,預設為 false)。

- image_

原文外掛簡介

This plugin uses the Strava API to embed maps and activities for athletes on your WordPress site. Included are several widgets and shortcodes for showing maps and activity summaries.
Blocks
Available in WordPress 5.0 and up.
Embeds described in this section will only work in the WP Block (Gutenberg) editor. Compatibility with WPBakery, Visual Composer, Elementor, Beaver Builder, etc. may differ.
Strava Activity
Embed an activity in any page or post. Shows a summary of the activity plus a map if a map key has been added.
Paste in the full activity URL from Strava, such as https://www.strava.com/activities/1793155844 and click “Embed” (pasting a link directly into the editor also works). A preview map will be shown in the editor, similar to what will be displayed on the front-end. In the side-panel you can select options to show the image only (without the details table), display markers at the start & finish points, and override the system of measure from your default selection under Settings -> Strava.
Strava Route
Embed a route in any page or post. Shows a summary of the route plus a map if a map key has been added.
Paste in the full route URL from Strava, such as https://www.strava.com/routes/2326567 and click “Embed” (pasting a link directly into the editor also works). A preview map will be shown in the editor, similar to what will be displayed on the front-end. In the side-panel you can select options to show the image only (without the details table), display markers at the start & finish points, and override the system of measure from your default selection under Settings -> Strava.
Strava Activities List
Shows your most recent activities in a bulleted list.
Strava Segment
Embed a segment in a page or post. Shows a summary of the segment plugs a map if a map key has been added.
Paste in the full segment URL from Strava, such as https://www.strava.com/segments/18803428 and click “Embed” (pasting a link directly into the editor also works). The easiest way that to navigate to a segment URL on strava.com is by clicking “View Full Leaderboard” or “View Local Legend Stats” while you’re viewing a segment from an activity.
A preview map will be shown in the editor, similar to what will be displayed on the front-end. In the side-panel you can select options to show the image only (without the details table), display markers at the start & finish points, and override the system of measure from your default selection under Settings -> Strava.
Shortcodes
[activity id=NUMBER] – add to any page or post. Shows a summary of the activity plus a map if a map key has been added.
You should replace NUMBER with an activity ID from Strava. The easiest way to find it is from a Strava URL like https://www.strava.com/activities/1793155844 – where 1793155844 is the activity ID number.
Also takes the following optional parameters:

som – english/metric (system of measure – override from default setting).
map_width – width (width of image in pixels). Note both width and height parameters are limited to 640px except on premium API plans: https://developers.google.com/maps/documentation/maps-static/dev-guide#Imagesizes
map_height – height (height of image in pixels). See note above on max height.
client_id – specify a different athlete (you can copy this value from https://www.strava.com/settings/api or the wp-strava settings page at /wp-admin/options-general.php?page=wp-strava-options).
markers – Display markers at the start/finish point (true/false, defaults to false).
image_only – Display only the map image and not the table (true/false, defaults to false).

[ride] – an alias for [activity] that will accept the same parameters (kept for backwards compatibility).
[route id=NUMBER] – add to any page or post. Shows a summary of the activity plus a map if a google maps key has been added.
You should replace NUMBER with an route ID from Strava. The easiest way to find it is from a Strava URL like https://www.strava.com/routes/9001676 – where 9001676 is the route ID number.
This also takes the same optional parameters as the [activity] shortcode above.
[activities] – shows a list of recent activities the same way the “Strava Activities List” Widget does, but with a shortcode rather than a widget. Takes the following optional parameters:

som – english/metric (system of measure – override from default setting).
quantity – number of activities to show.
client_id – specify a different athlete (you can copy this value from https://www.strava.com/settings/api or the wp-strava settings page at /wp-admin/options-general.php?page=wp-strava-options).
strava_club_id – Will display activity from the specified Strava club ID instead of an athlete.
date_start – Will display activities after specified date – must be PHP DateTime compatible.
date_end – Will display activities before the specified date – must be PHP DateTime compatible.

[latest_map] – shows a map of your latest activity. Takes the following optional parameters:

som – english/metric (system of measure – override from default setting).
distance_min – show only the latest activity longer than this distance in km/mi.
client_id – specify a different athlete (you can copy this value from https://www.strava.com/settings/api or the wp-strava settings page at /wp-admin/options-general.php?page=wp-strava-options).

Widgets
Strava Activities List – shows a list of the most recent activities.
Strava Latest Map – shows map of latest activity with option to limit latest map to activities of a certain minimum distance.
Cron
Using WP-Strava 2.0+ may require a WordPress cron configuration. By default, WordPress has a built-in cron system to run scheduled events, but it relies on your website getting frequent visitors. The Strava authentication token system expires after 6 hours if not refreshed. If you think your site will not get any visitors over the span on 6 hours, you might want to set up a real cron: https://developer.wordpress.org/plugins/cron/hooking-wp-cron-into-the-system-task-scheduler/. Setting up this sort of cron is beyond the scope of support for this free plugin, so you should seek assistance through your host. Force-running the WordPress cron once an hour is good enough for WP-Strava.

各版本下載點

  • 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
  • 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「WP-Strava」來進行安裝。

(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。


1.0 | 1.1 | 0.62 | 1.1.1 | 1.2.0 | 1.3.0 | 1.4.0 | 1.4.1 | 1.4.2 | 1.4.3 | 1.5.0 | 1.6.0 | 1.7.0 | 1.7.1 | 1.7.2 | 1.7.3 | 2.0.0 | 2.0.1 | 2.1.0 | 2.2.0 | 2.3.0 | 2.3.1 | 2.3.2 | 2.4.0 | 2.5.0 | 2.5.1 | 2.6.0 | 2.7.0 | 2.8.0 | 2.9.0 | 2.9.1 | trunk | 2.10.0 | 2.10.1 | 2.11.0 | 2.11.1 | 2.12.0 | 2.12.1 |

延伸相關外掛(你可能也想知道)

  • Outdooractive Embed 》安装完 外掛 (plugin) 之後,在 WordPress 的頁面編輯器中將會出現該 外掛 (plugin) 的按鈕編輯器。使用它將您的 Outdooractive 內容添加到您的網站中。, 對...。
  • Strava Ride Details 》「Strava Ride Details」外掛可以透過簡短代碼在你的文章或頁面中顯示指定 Strava 騎乘詳情。此外掛使用 Strava 的 v3 API 並使用 OAuth 進行驗證。, 「Strav...。
  • Custom Strava Integration 》「Custom Strava Integration」是一個強大的外掛程式,讓整合 Strava 活動變得簡單易行。使用這個外掛程式,您可以根據個人喜好創建輸出。, 外掛程式, 這個外...。
  • Trail Status 》此外掛可讓您在網站上顯示步道狀態。具有作者或更高權限的任何使用者都可以更新狀態,而只有編輯和管理員可以新增和更新步道和狀態名稱。步道可以連結到更多...。
  • Lift & Trail Status 》此外掛可幫助您在網站上顯示即時的纜車和滑道狀態資訊。資料是以 XML 或 JSON 格式從 MTN.XML 標準匯入。任何安裝外掛程式的使用者都可設定和客製化。預設配...。

文章
Filter
Apply Filters
Mastodon