[wordpress插件] Custom Strava Integration自定义Strava集成

wordpress 插件 文章 2020-04-09 21:20 547 0 全屏看文

AI助手支持GPT4.0

评分
0
描述

The “Custom Strava Integration” is a powerful plugin that makes integrating strava activities easy and simple.

“自定义Strava集成”是一个功能强大的插件,可轻松轻松地集成strava活动。

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.

该插件的基本作用是在您的帖子中添加短代码[strava id =” [活动ID]”],通过Strava API v3接收数据,并使用此信息填充预配置的模板。

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.

您可以在设置页面上指定模板,并定义strava信息的位置。

Therefore ‘Custom Strava Integration’ provides these placeholders:

因此,“ Custom Strava Integration”提供了以下占位符:

    • [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.

    您不仅可以使用CSS功能自定义样式,而且可以完全控制html输出。

    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:

    我们知道strava也确实提供了自己的嵌入式小部件,但是这个插件:

      • does not use iframes (if you want to)
      • 不使用iframe(如果需要)

      • 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!

      您可以专注于重要的事情-撰写优秀的博客文章!

安装步骤

    1. Upload the folder strava-for-wordpress to the /wp-content/plugins/ directory
    2. 将文件夹 strava-for-wordpress 上载到 / wp-content / plugins / 目录

    3. Activate the plugin through the ‘Plugins’ menu in WordPress
    4. 通过WordPress中的“插件”菜单激活插件

    Plugin Setup

    插件设置

      1. Please create a application on Strava first!

      2. 请先在Strava上创建一个应用程序!

        Go here [http://www.strava.com/developers] for more details.

        请访问此处[http://www.strava.com/developers]了解更多详细信息。

      3. It is also important to make sure that the redirect URI you enter is the same as your site.
      4. 同样重要的是要确保您输入的重定向URI与您的站点相同。

      5. After creating the application go to the Settings page and enter the client id and secret.
      6. 创建应用程序后,转到“设置”页面,然后输入客户端ID和密码。

      7. Save settings
      8. 保存设置

      9. Click “Connect with Strava” on the settings page to generate an access token
      10. 在设置页面上单击“与Strava连接”以生成访问令牌

      Add to page/post

      添加到页面/帖子

      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.

      该插件的基本作用是在您的帖子中添加短代码[strava id =” [activity id]”],通过Strava API v3接收数据,并使用此信息填充预配置的模板。

      Of course you could paste the snippet manually, but in order to do so you would have to leave your site and find the needed id by yourself.

      当然,您可以手动粘贴该代码段,但要这样做,您将不得不离开站点并自行找到所需的ID。

      The easier way is to choose one of the listed activities in the right corner of your post editing page and let the plugin do the work for you.

      更简单的方法是选择帖子编辑页面右上角列出的活动之一,然后让插件为您完成工作。

      No more copy and paste!

      无需复制和粘贴!

下载地址
https://downloads.wordpress.org/plugin/custom-strava-integration.zip
-EOF-

AI助手支持GPT4.0