# Development

**URL:** https://meta.discourse.org/c/dev/7.md?page=103

[最新版本](https://meta.discourse.org/latest.md) · [分類](https://meta.discourse.org/categories.md) · [標簽](https://meta.discourse.org/tags.md)

**Page:** 104

---

## [修复 Discourse API Gem 中的 Faraday 弃用项](https://meta.discourse.org/t/fix-faraday-deprecations-in-discourse-api-gem/129974)

<div class="topic-metadata">

**Author:** [@blake](https://meta.discourse.org/u/blake)\
**回覆:** 1\
**Last updated:** [2019年十月1日 18:28 UTC](https://meta.discourse.org/t/fix-faraday-deprecations-in-discourse-api-gem/129974 "2019-10-01T18:28:23Z")

</div>

继续 GitHub 上的讨论，以免在无关的已关闭 PR 中讨论问题…… @blake： 太好了，感谢你的 PR。这些错误与新版本的 faraday 有关。如果你运行 bundle install，你应…

---

## [预览 API](https://meta.discourse.org/t/api-for-preview/129866)

<div class="topic-metadata">

**Author:** [@joa](https://meta.discourse.org/u/joa)\
**回覆:** 1\
**Last updated:** [2019年十月1日 07:26 UTC](https://meta.discourse.org/t/api-for-preview/129866 "2019-10-01T07:26:50Z")

</div>

我正在尝试使用 JSON API 为 Discourse 开发一个原生客户端。 像发帖、加载帖子等功能似乎都可以实现。但我目前遇到的一个难题是如何在 Web 端实现预览功能。我可以……

---

## [通过用户名或 ID 获取用户对象 JavaScript](https://meta.discourse.org/t/get-a-user-object-by-username-or-id-javascript/95342)

<div class="topic-metadata">

**Author:** [@Ashesh](https://meta.discourse.org/u/Ashesh)\
**回覆:** 6\
**Last updated:** [2019年九月29日 05:19 UTC](https://meta.discourse.org/t/get-a-user-object-by-username-or-id-javascript/95342 "2019-09-29T05:19:54Z")

</div>

是否可以通过用户名或ID使用JavaScript获取用户对象？

---

## [用户跳出率](https://meta.discourse.org/t/bounce-rate-of-users/129621)

<div class="topic-metadata">

**Author:** [@Phillip\_Rooney](https://meta.discourse.org/u/Phillip_Rooney)\
**回覆:** 1\
**Last updated:** [2019年九月28日 19:55 UTC](https://meta.discourse.org/t/bounce-rate-of-users/129621 "2019-09-28T19:55:41Z")

</div>

大家好。 这个论坛非常棒，一直对我很有帮助 :slight\_smile: 我想知道是否可以看到用户的跳出率以及他们在网站上停留的时间？ 还是说我需要通过某种方式集成 Google Analytics（GA）？ R…

---

## [群组中的精选帖子](https://meta.discourse.org/t/highlighted-posts-from-a-group/129647)

<div class="topic-metadata">

**Author:** [@Fraffel\_Media](https://meta.discourse.org/u/Fraffel_Media)\
**回覆:** 3\
**Last updated:** [2019年九月28日 01:29 UTC](https://meta.discourse.org/t/highlighted-posts-from-a-group/129647 "2019-09-28T01:29:07Z")

</div>

嘿，我注意到有几个 Discourse 论坛在帖子下方显示了高亮功能。这是一个插件还是主题组件？如果是的话，它是否已在此发布？ 如果发错了地方，抱歉：stuck\_out\_tongue:

---

## [通过帮助我来学习如何构建 Discourse 插件](https://meta.discourse.org/t/learn-how-to-build-discourse-plugins-by-helping-me/87048)

<div class="topic-metadata">

**Author:** [@angus](https://meta.discourse.org/u/angus)\
**回覆:** 15\
**Last updated:** [2019年九月28日 01:05 UTC](https://meta.discourse.org/t/learn-how-to-build-discourse-plugins-by-helping-me/87048 "2019-09-28T01:05:15Z")

</div>

如果有人想进一步了解如何构建 Discourse 插件，或者只是想学习 Ruby on Rails 和 Ember.js，这里有一个长期有效的提议。 我可以为您提供培训，提供详细的个人指导，内容包括： 如何编写代码； Discourse 如何运作…

---

## [如何根据当前用户组和主题位置创建主题过滤器](https://meta.discourse.org/t/how-to-make-a-topic-filter-based-on-current-user-group-and-topic-location/129512)

<div class="topic-metadata">

**Author:** [@Oliver\_Walker](https://meta.discourse.org/u/Oliver_Walker)\
**回覆:** 1\
**Last updated:** [2019年九月27日 17:28 UTC](https://meta.discourse.org/t/how-to-make-a-topic-filter-based-on-current-user-group-and-topic-location/129512 "2019-09-27T17:28:07Z")

</div>

你好， 我正在开发一个插件，根据话题发布的位置以及查看话题的用户所属的群组来过滤所有话题。这里的用例是，让位于不同国家的支持团队处理问…

---

## [本地机器上的 wizard\_builder\_spec 和 application\_controller\_spec 已损坏](https://meta.discourse.org/t/broken-wizard-builder-spec-and-application-controller-spec-on-local-machine/128093)

<div class="topic-metadata">

**Author:** [@kris.kotlarek](https://meta.discourse.org/u/kris.kotlarek)\
**回覆:** 6\
**Last updated:** [2019年九月26日 22:20 UTC](https://meta.discourse.org/t/broken-wizard-builder-spec-and-application-controller-spec-on-local-machine/128093 "2019-09-26T22:20:56Z")

</div>

我想请您帮忙解决我本地机器上损坏的测试规范。今天早上我克隆了最新的 master 分支，但有 4 个测试规范在我的本地机器上失败了： 1) Wizard::Builder 在默认主题被覆...

---

## [重新开放模型类的原因是什么？](https://meta.discourse.org/t/what-is-the-reason-behind-reopening-the-model-class/129627)

<div class="topic-metadata">

**Author:** [@rimian](https://meta.discourse.org/u/rimian)\
**回覆:** 1\
**Last updated:** [2019年九月27日 02:53 UTC](https://meta.discourse.org/t/what-is-the-reason-behind-reopening-the-model-class/129627 "2019-09-27T02:53:29Z")

</div>

我注意到备份模型先定义了一个模型，然后在同一文件的几行之后重新打开它，添加了如 find、start、cancel 等功能。我想知道这样做的理由是什么？为什么这个类需要……

---

## [如何在用户页面显示 {{navigation-bar}}](https://meta.discourse.org/t/how-to-display-navigation-bar-on-users-page/129469)

<div class="topic-metadata">

**Author:** [@fzngagan](https://meta.discourse.org/u/fzngagan)\
**回覆:** 1\
**Last updated:** [2019年九月26日 16:28 UTC](https://meta.discourse.org/t/how-to-display-navigation-bar-on-users-page/129469 "2019-09-26T16:28:41Z")

</div>

目前，我正在开发一个主题组件，需要在 /u 路由上使用 {{navigation-bar}}。 目标是在用户页面添加一个导航栏，以便用户可以在“最新”和“分类”之间导航，同时……

---

## [新的 React.js 模板](https://meta.discourse.org/t/new-react-js-template/129541)

<div class="topic-metadata">

**Author:** [@19tom34](https://meta.discourse.org/u/19tom34)\
**回覆:** 4\
**Last updated:** [2019年九月26日 11:26 UTC](https://meta.discourse.org/t/new-react-js-template/129541 "2019-09-26T11:26:01Z")

</div>

嗨， 有没有人有将Discourse集成到一个新的react.js模板中的经验，而不是ember？ 插件或未来的更新会有任何问题吗？

---

## [需要帮助在页面顶部添加外部链接](https://meta.discourse.org/t/need-help-adding-external-links-at-top-of-page/129513)

<div class="topic-metadata">

**Author:** [@zavala](https://meta.discourse.org/u/zavala)\
**回覆:** 4\
**Last updated:** [2019年九月26日 00:06 UTC](https://meta.discourse.org/t/need-help-adding-external-links-at-top-of-page/129513 "2019-09-26T00:06:20Z")

</div>

我不确定这是否是主题问题，但我们的 Discourse 页面是更大网站的一部分。网站的整体外观和感觉正在发生变化，我正在尝试找出如何让 Discourse 页面与之匹配。我一直在……

---

## [是否可以从 Discourse 后端数据库中提取帖子 URL？](https://meta.discourse.org/t/is-there-any-way-to-extract-a-url-to-a-post-from-discourse-backend-db/129426)

<div class="topic-metadata">

**Author:** [@olegbc1](https://meta.discourse.org/u/olegbc1)\
**回覆:** 2\
**Last updated:** [2019年九月25日 03:35 UTC](https://meta.discourse.org/t/is-there-any-way-to-extract-a-url-to-a-post-from-discourse-backend-db/129426 "2019-09-25T03:35:13Z")

</div>

我需要生成一份由特定群体发布的帖子报告，因此我从帖子表中提取这些帖子，并通过用户和主题进行连接。这为我提供了每个帖子的内容、作者以及所属主题的清晰视图…

---

## [Webhooks: how best to differentiate a PM from a public post](https://meta.discourse.org/t/webhooks-how-best-to-differentiate-a-pm-from-a-public-post/76363)

<div class="topic-metadata">

**Author:** [@johnaschroeder](https://meta.discourse.org/u/johnaschroeder)\
**回覆:** 12\
**Last updated:** [2019年九月24日 23:48 UTC](https://meta.discourse.org/t/webhooks-how-best-to-differentiate-a-pm-from-a-public-post/76363 "2019-09-24T23:48:19Z")

</div>

Hi All, I’ve been scrutinizing the various JSON post results from our webhooks. We record and react to public posts that contribute to our common knowledge-base differently than PMs or discobot conversations. For exam…

---

## [创建主题的匿名表单](https://meta.discourse.org/t/anonymous-form-that-creates-a-topic/115718)

<div class="topic-metadata">

**Author:** [@dsims](https://meta.discourse.org/u/dsims)\
**回覆:** 4\
**Last updated:** [2019年九月24日 11:06 UTC](https://meta.discourse.org/t/anonymous-form-that-creates-a-topic/115718 "2019-09-24T11:06:09Z")

</div>

我希望访客能够无需注册即可发布简单的留言或提问，类似于集成的“联系我们”表单或“留言板”。因此，我正在考虑使用 API 设置一个简单的表单来创建帖…

---

## [如何查看特定主题的用户通知状态](https://meta.discourse.org/t/how-to-view-users-notification-status-for-a-specific-topic/129164)

<div class="topic-metadata">

**Author:** [@Thomas\_Bergen](https://meta.discourse.org/u/Thomas_Bergen)\
**回覆:** 0\
**Last updated:** [2019年九月21日 00:15 UTC](https://meta.discourse.org/t/how-to-view-users-notification-status-for-a-specific-topic/129164 "2019-09-21T00:15:38Z")

</div>

大家好， 我需要查看特定主题下用户的通知状态。目前是否有简单的方法通过 REST API 获取此信息？我尝试查阅了相关文档，但未能找到……

---

## [如何订阅事件（创建主题、关闭主题等）](https://meta.discourse.org/t/how-to-subscribe-to-events-topic-created-topic-closed-etc/116242)

<div class="topic-metadata">

**Author:** [@Ivan.bacher](https://meta.discourse.org/u/Ivan.bacher)\
**回覆:** 3\
**Last updated:** [2019年九月20日 20:33 UTC](https://meta.discourse.org/t/how-to-subscribe-to-events-topic-created-topic-closed-etc/116242 "2019-09-20T20:33:42Z")

</div>

我目前正在创建一个插件，想知道如何订阅不同的事件。initializePlugin() 暴露了一个包含 onAppEvent(name, fn) 函数的 API 对象。是否有某个地方列出了这些事件的名称…

---

## [寻找修改评论页面的插件示例](https://meta.discourse.org/t/looking-for-a-plugin-example-that-modifies-the-review-page/129111)

<div class="topic-metadata">

**Author:** [@Oliver\_Walker](https://meta.discourse.org/u/Oliver_Walker)\
**回覆:** 0\
**Last updated:** [2019年九月20日 13:13 UTC](https://meta.discourse.org/t/looking-for-a-plugin-example-that-modifies-the-review-page/129111 "2019-09-20T13:13:32Z")

</div>

你好， 是否有插件可以在主题标题旁边的评论页面添加内容？我正在寻找一个如何实现这一功能的具体示例。 谢谢

---

## [更改分类页面中分类名称的字体设置](https://meta.discourse.org/t/change-the-font-settings-of-name-of-categories-on-the-categories-page/129005)

<div class="topic-metadata">

**Author:** [@AnkitJain](https://meta.discourse.org/u/AnkitJain)\
**回覆:** 5\
**Last updated:** [2019年九月20日 13:37 UTC](https://meta.discourse.org/t/change-the-font-settings-of-name-of-categories-on-the-categories-page/129005 "2019-09-20T13:37:59Z")

</div>

请帮忙提供 CSS 代码以更改字体类型、颜色和粗细 感谢您的帮助。 我尝试了以下代码，但颜色未发生变化： .category-list tbody .category h3 { font-weight: 370; font-size: 18; line-he…

---

## [用于验证已更新用户邮箱的 Rest API，并希望禁用 Discourse 邮箱](https://meta.discourse.org/t/rest-api-for-authenticate-updated-user-email-and-want-discourse-emails-disabled/129104)

<div class="topic-metadata">

**Author:** [@Pratul\_Jain](https://meta.discourse.org/u/Pratul_Jain)\
**回覆:** 0\
**Last updated:** [2019年九月20日 11:49 UTC](https://meta.discourse.org/t/rest-api-for-authenticate-updated-user-email-and-want-discourse-emails-disabled/129104 "2019-09-20T11:49:36Z")

</div>

如何在未对 Discourse 进行身份验证的情况下更新用户电子邮件，因为我已经禁用了 Discourse 邮件。我们有一个更新电子邮件的 API，但没有用于验证电子邮件的身份验证 API。我们正尝试通过 … 更新电子邮件。

---

## [弹出式自动补全的插件示例](https://meta.discourse.org/t/plugin-example-for-pop-up-auto-completion/128998)

<div class="topic-metadata">

**Author:** [@AlexanderFillbrunn](https://meta.discourse.org/u/AlexanderFillbrunn)\
**回覆:** 0\
**Last updated:** [2019年九月19日 08:39 UTC](https://meta.discourse.org/t/plugin-example-for-pop-up-auto-completion/128998 "2019-09-19T08:39:22Z")

</div>

您好， 我想编写一个简单的插件，当用户输入特定字符时，弹出一个列表，显示来自我们 API 的搜索结果。当用户点击列表中的某一项时，文本 fr…

---

## [How to set text color of topic that was read already?](https://meta.discourse.org/t/how-to-set-text-color-of-topic-that-was-read-already/46773)

<div class="topic-metadata">

**Author:** [@Greg11](https://meta.discourse.org/u/Greg11)\
**回覆:** 5\
**Last updated:** [2019年九月17日 18:11 UTC](https://meta.discourse.org/t/how-to-set-text-color-of-topic-that-was-read-already/46773 "2019-09-17T18:11:13Z")

</div>

How to set text color of topic that was read already in the list of topics? It is grayed out too much and it hurts usability.

---

## [Procourse 会员 API 端点](https://meta.discourse.org/t/procourse-membership-api-endpoints/128513)

<div class="topic-metadata">

**Author:** [@kimardenmiller](https://meta.discourse.org/u/kimardenmiller)\
**回覆:** 2\
**Last updated:** [2019年九月16日 21:30 UTC](https://meta.discourse.org/t/procourse-membership-api-endpoints/128513 "2019-09-16T21:30:19Z")

</div>

@blake，对于插件端点（本例中为 Procourse 会员）的 PR 有兴趣吗？例如： def membership\_subscriptions(user\_id) response = get("/memberships/subscriptions/#{user\_id}.json") response\[...\]

---

## [Associating plugin versions with Discourse versions](https://meta.discourse.org/t/associating-plugin-versions-with-discourse-versions/59841)

<div class="topic-metadata">

**Author:** [@Mittineague](https://meta.discourse.org/u/Mittineague)\
**回覆:** 3\
**Last updated:** [2017年三月24日 19:10 UTC](https://meta.discourse.org/t/associating-plugin-versions-with-discourse-versions/59841 "2017-03-24T19:10:53Z")

</div>

Continuing the discussion from Babble - A Chat Plugin: I have noticed this problem come up a few times here. Often the solution is “update your version of Discourse, update your version of the plugin” This works fine …

---

## [Https://docs.discourse.org/ 加载中](https://meta.discourse.org/t/https-docs-discourse-org-spinning/128434)

<div class="topic-metadata">

**Author:** [@Bethany\_Connor](https://meta.discourse.org/u/Bethany_Connor)\
**回覆:** 8\
**Last updated:** [2019年九月14日 23:50 UTC](https://meta.discourse.org/t/https-docs-discourse-org-spinning/128434 "2019-09-14T23:50:06Z")

</div>

您好 – https://docs.discourse.org/ 对我来说似乎无法访问。页面一直在加载，控制台显示一条错误信息：Uncaught (in promise) TypeError: Method Promise.prototype.then called on incompatible receiver \[object Obj…

---

## [C# 验证 Webhook 签名的示例](https://meta.discourse.org/t/c-example-of-validating-webhook-signature/97015)

<div class="topic-metadata">

**Author:** [@Julian\_Elve](https://meta.discourse.org/u/Julian_Elve)\
**回覆:** 3\
**Last updated:** [2018年九月12日 18:28 UTC](https://meta.discourse.org/t/c-example-of-validating-webhook-signature/97015 "2018-09-12T18:28:13Z")

</div>

如果这是错误的类别，敬请谅解。请问有人有在 C# 中验证 Webhook 签名的已发布可用示例吗？我正在 Azure Functions 中构建一些外部供应逻辑，但尚未……

---

## [最新帖子 API 分页](https://meta.discourse.org/t/latest-posts-api-pagination/88589)

<div class="topic-metadata">

**Author:** [@dawid.urbanski](https://meta.discourse.org/u/dawid.urbanski)\
**回覆:** 6\
**Last updated:** [2019年九月13日 17:18 UTC](https://meta.discourse.org/t/latest-posts-api-pagination/88589 "2019-09-13T17:18:15Z")

</div>

大家好！ 我正在通过这个端点获取最新的帖子：https://community.learnaboutgmp.com/posts.json 如何获取更多最新帖子的结果？这可行吗？ 我尝试了 https://community.learnabou…

---

## [仅在落地页显示标题后内容](https://meta.discourse.org/t/show-after-header-content-on-landing-page-only/99222)

<div class="topic-metadata">

**Author:** [@Clark\_Varner](https://meta.discourse.org/u/Clark_Varner)\
**回覆:** 6\
**Last updated:** [2019年九月13日 04:42 UTC](https://meta.discourse.org/t/show-after-header-content-on-landing-page-only/99222 "2019-09-13T04:42:53Z")

</div>

大家好，我有一些只想在着陆页显示的页眉后内容。 目前，我可以使用 body 类来创建仅针对所有其他子页面的内容，如下所示： .showthisdiv {display:b…

---

## [从 URL 导入个人资料图片](https://meta.discourse.org/t/importing-profile-image-from-url/128445)

<div class="topic-metadata">

**Author:** [@csmu](https://meta.discourse.org/u/csmu)\
**回覆:** 3\
**Last updated:** [2019年九月12日 21:11 UTC](https://meta.discourse.org/t/importing-profile-image-from-url/128445 "2019-09-12T21:11:54Z")

</div>

我正在寻找一些 Ruby 代码示例，用于从 URL 导入个人资料图片。

---

## [持续运行的 API 代码](https://meta.discourse.org/t/continuously-running-api-code/127514)

<div class="topic-metadata">

**Author:** [@kimardenmiller](https://meta.discourse.org/u/kimardenmiller)\
**回覆:** 2\
**Last updated:** [2019年九月12日 05:35 UTC](https://meta.discourse.org/t/continuously-running-api-code/127514 "2019-09-12T05:35:41Z")

</div>

我们构建了一套持续运行的进程，利用 Ruby API 扩展 Discourse 的行为，观察各种条件并采取行动，例如发送私信、将用户添加到群组等。回顾起来，它……

[上一頁](https://meta.discourse.org/c/dev/7.md?page=102)

[下一頁](https://meta.discourse.org/c/dev/7.md?page=104)
