# Development

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

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

**Page:** 102

---

## [是否可以更改帖子所有者？](https://meta.discourse.org/t/is-it-possible-change-the-post-owner/134308)

<div class="topic-metadata">

**Author:** [@zeroarst](https://meta.discourse.org/u/zeroarst)\
**回覆:** 4\
**Last updated:** [2019年十一月25日 08:51 UTC](https://meta.discourse.org/t/is-it-possible-change-the-post-owner/134308 "2019-11-25T08:51:18Z")

</div>

我可以通过管理工具进行更改，但我想知道是否可以通过 API 完成此操作？

---

## [在用户账户页面显示用户自定义字段](https://meta.discourse.org/t/put-user-custom-field-on-the-user-account-page/134090)

<div class="topic-metadata">

**Author:** [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**回覆:** 4\
**Last updated:** [2019年十一月23日 15:16 UTC](https://meta.discourse.org/t/put-user-custom-field-on-the-user-account-page/134090 "2019-11-23T15:16:19Z")

</div>

有人希望在账户页面显示用户自定义字段（由于某些原因，他们不喜欢个人资料页面）。 看来我应该在主题组件中实现这一功能。 https://github.com/discourse/discourse/blob/master/ap…

---

## [如何从 API 获取"badge-notification"？](https://meta.discourse.org/t/get-badge-notification-from-api/106614)

<div class="topic-metadata">

**Author:** [@rbrlortie](https://meta.discourse.org/u/rbrlortie)\
**回覆:** 3\
**Last updated:** [2019年十一月22日 17:23 UTC](https://meta.discourse.org/t/get-badge-notification-from-api/106614 "2019-11-22T17:23:55Z")

</div>

您好，\\n是否可以通过 API 获取通知数量？\\n即用户头像旁边的数字：\\n我们发现了一个调用 /notifications.json?recent=true&limit=5，但该调用返回的内容不仅限于徽章，而且……

---

## [用于用户匿名化的 API 请求](https://meta.discourse.org/t/api-request-for-anonymizing-users/134171)

<div class="topic-metadata">

**Author:** [@op\_ukrop](https://meta.discourse.org/u/op_ukrop)\
**回覆:** 2\
**Last updated:** [2019年十一月22日 15:05 UTC](https://meta.discourse.org/t/api-request-for-anonymizing-users/134171 "2019-11-22T15:05:56Z")

</div>

您好。 我们是否有机会同时匿名化多个用户？ 是通过 API 还是数据库请求？ 谢谢。

---

## [能否通过 API 对用户进行匿名化处理？](https://meta.discourse.org/t/can-i-anonymize-a-user-via-the-api/276049)

<div class="topic-metadata">

**Author:** [@op\_ukrop](https://meta.discourse.org/u/op_ukrop)\
**回覆:** 1\
**Last updated:** [2019年十一月22日 14:55 UTC](https://meta.discourse.org/t/can-i-anonymize-a-user-via-the-api/276049 "2019-11-22T14:55:42Z")

</div>

您好。我们是否可以通过 API 执行此操作？

---

## [API 文档问题](https://meta.discourse.org/t/api-documentation-issue/133707)

<div class="topic-metadata">

**Author:** [@Grayden\_Shand](https://meta.discourse.org/u/Grayden_Shand)\
**回覆:** 1\
**Last updated:** [2019年十一月20日 22:08 UTC](https://meta.discourse.org/t/api-documentation-issue/133707 "2019-11-20T22:08:26Z")

</div>

在 API 文档中发现了一个问题，具体是“更新群组”端点（https://docs.discourse.org/#tag/Groups/paths/~1groups~1{name}.json/put）。文档指出应使用群组名称来构造该端点，例如：PU…

---

## [在主导航中将个人资料图片替换为“个人资料”](https://meta.discourse.org/t/replacing-profile-image-with-profile-on-the-main-navigation/133918)

<div class="topic-metadata">

**Author:** [@ahmadabdolsaheb](https://meta.discourse.org/u/ahmadabdolsaheb)\
**回覆:** 0\
**Last updated:** [2019年十一月20日 13:44 UTC](https://meta.discourse.org/t/replacing-profile-image-with-profile-on-the-main-navigation/133918 "2019-11-20T13:44:27Z")

</div>

我相信负责个人资料图片导航项的组件是“user-dropdown”，因此我试图修改它，但我没有看到图片是在哪里被分配的。这是我目前进展到的程度。 任何帮助都将不胜感激……

---

## [我如何只运行discourse/plugins/poll/spec？](https://meta.discourse.org/t/how-do-i-run-only-discourse-plugins-poll-spec/47244)

<div class="topic-metadata">

**Author:** [@dachary](https://meta.discourse.org/u/dachary)\
**回覆:** 13\
**Last updated:** [2019年十一月20日 00:20 UTC](https://meta.discourse.org/t/how-do-i-run-only-discourse-plugins-poll-spec/47244 "2019-11-20T00:20:23Z")

</div>

Hi, I’d like to only run the tests at discourse/plugins/poll/spec instead of the whole suite with bundle exec rake autospec p l=5. How can I do that ? Ideally that would not be necessary if autospec detected changes ma…

---

## [访问主题的 JSON 端点是否计入其浏览量？](https://meta.discourse.org/t/does-hitting-a-topics-json-endpoint-count-towards-its-views/133763)

<div class="topic-metadata">

**Author:** [@Rick\_Viscomi](https://meta.discourse.org/u/Rick_Viscomi)\
**回覆:** 2\
**Last updated:** [2019年十一月19日 18:23 UTC](https://meta.discourse.org/t/does-hitting-a-topics-json-endpoint-count-towards-its-views/133763 "2019-11-19T18:23:50Z")

</div>

我有 20 个文章页面，它们分别调用不同的 Discourse 话题 JSON 端点以获取与每篇文章相关的评论数量。在论坛本身，我注意到这些话题的浏览量几乎与文章页...

---

## [是不是只有我觉得 Hyperscript 很丑？](https://meta.discourse.org/t/is-it-just-me-or-is-hyperscript-hideous/131635)

<div class="topic-metadata">

**Author:** [@edL](https://meta.discourse.org/u/edL)\
**回覆:** 24\
**Last updated:** [2019年十一月19日 09:41 UTC](https://meta.discourse.org/t/is-it-just-me-or-is-hyperscript-hideous/131635 "2019-11-19T09:41:10Z")

</div>

只是在此发泄一下，但用过的模板语言多到记不清（Jinja2、ERB、FTL、XSLT、JSX、Handlebars 等），我觉得 Hyperscript 用起来简直糟糕透顶。 按任意顺序，它的问题包括……

---

## [Gleam/JavaScript 嵌入代码是否受支持？](https://meta.discourse.org/t/is-gleam-javascript-embed-code-supported/132765)

<div class="topic-metadata">

**Author:** [@christian\_01](https://meta.discourse.org/u/christian_01)\
**回覆:** 5\
**Last updated:** [2019年十一月18日 22:50 UTC](https://meta.discourse.org/t/is-gleam-javascript-embed-code-supported/132765 "2019-11-18T22:50:07Z")

</div>

Discourse 支持托管 Gleam 抽奖活动吗？Gleam 提供 HTML 嵌入代码，但我尝试将其放入 Discourse 帖子中时，无法使其正常工作或显示。

---

## [如何在不登录的情况下获取标签组？](https://meta.discourse.org/t/how-to-fetch-tag-groups-without-log-in/133374)

<div class="topic-metadata">

**Author:** [@Siddhu\_Dhangar](https://meta.discourse.org/u/Siddhu_Dhangar)\
**回覆:** 3\
**Last updated:** [2019年十一月18日 03:59 UTC](https://meta.discourse.org/t/how-to-fetch-tag-groups-without-log-in/133374 "2019-11-18T03:59:02Z")

</div>

http://localhost:9292/tag\_groups.json 使用上述 URL 时，我可以获取所有标签组数据，但在浏览器的隐私模式下访问同一 URL 时，会报错“没有匹配 \[GET\] 请求的路由 '/tag\_groups.json'”。 我该如何解决……

---

## [如何获取昨天的所有帖子？](https://meta.discourse.org/t/how-to-fetch-all-the-posts-yesterday/133560)

<div class="topic-metadata">

**Author:** [@edisonking](https://meta.discourse.org/u/edisonking)\
**回覆:** 0\
**Last updated:** [2019年十一月16日 13:33 UTC](https://meta.discourse.org/t/how-to-fetch-all-the-posts-yesterday/133560 "2019-11-16T13:33:59Z")

</div>

我想获取昨天发布的所有帖子，然后找出在指定主题中标记为“已采纳答案”的帖子。我阅读了 API 文档，但没找到能实现此功能的方法。在文档中，只能获取部分帖子，而不是全部……

---

## [帮助设计自定义集成插件](https://meta.discourse.org/t/help-designing-custom-integration-plugin/133520)

<div class="topic-metadata">

**Author:** [@nonsequitur](https://meta.discourse.org/u/nonsequitur)\
**回覆:** 5\
**Last updated:** [2019年十一月16日 04:58 UTC](https://meta.discourse.org/t/help-designing-custom-integration-plugin/133520 "2019-11-16T04:58:04Z")

</div>

大家好！我正在研究不同的论坛平台，以便为巴西竞技程序员（CP）建立一个社区，但我似乎已经找到了！ 我希望在这个论坛上拥有的一个功能是集成…

---

## [获取子分类的最新主题](https://meta.discourse.org/t/get-latest-topic-of-a-subcategory/133414)

<div class="topic-metadata">

**Author:** [@Antichrist](https://meta.discourse.org/u/Antichrist)\
**回覆:** 4\
**Last updated:** [2019年十一月15日 14:11 UTC](https://meta.discourse.org/t/get-latest-topic-of-a-subcategory/133414 "2019-11-15T14:11:32Z")

</div>

有没有一种方法可以获取我从 category.subcategories 中接收到的子类别的最新主题？我可以使用 category.latestTopic 来获取主类别的最新主题，但无法将其用于子类别，任何建…

---

## [JSON 中的日期时间格式？](https://meta.discourse.org/t/date-time-format-in-json/133464)

<div class="topic-metadata">

**Author:** [@edisonking](https://meta.discourse.org/u/edisonking)\
**回覆:** 1\
**Last updated:** [2019年十一月15日 08:48 UTC](https://meta.discourse.org/t/date-time-format-in-json/133464 "2019-11-15T08:48:36Z")

</div>

我通过 Discourse API 获取了一些 JSON 数据。其中包含一些关于日期时间的字段，例如： "created\_at": "2019-07-24T12:25:02.016Z", "last\_posted\_at": "2019-07-25T06:21:58.328Z", 这里的“T”和“Z”代表什么？

---

## [不要观看已创建的帖子](https://meta.discourse.org/t/dont-watch-created-topic/133389)

<div class="topic-metadata">

**Author:** [@maggiomj](https://meta.discourse.org/u/maggiomj)\
**回覆:** 1\
**Last updated:** [2019年十一月14日 20:20 UTC](https://meta.discourse.org/t/dont-watch-created-topic/133389 "2019-11-14T20:20:14Z")

</div>

我正在尝试确认是否有一个配置选项可以设置创建主题时的默认通知级别（具体来说，我不希望用户自动关注他们创建的主题）。我正在使用 Discourse 作为论坛…

---

## [如何获取给定时间之后的所有主题？](https://meta.discourse.org/t/how-to-fetch-all-topics-since-a-given-time/133278)

<div class="topic-metadata">

**Author:** [@edisonking](https://meta.discourse.org/u/edisonking)\
**回覆:** 5\
**Last updated:** [2019年十一月13日 19:01 UTC](https://meta.discourse.org/t/how-to-fetch-all-topics-since-a-given-time/133278 "2019-11-13T19:01:12Z")

</div>

我想获取自某个时间点以来的所有主题。我阅读了 Discourse API 文档，但没有找到有用的内容。有什么方法可以实现吗？

---

## [仅在特定页面覆盖模板](https://meta.discourse.org/t/override-template-only-on-specific-page/132288)

<div class="topic-metadata">

**Author:** [@Antichrist](https://meta.discourse.org/u/Antichrist)\
**回覆:** 3\
**Last updated:** [2019年十一月12日 22:40 UTC](https://meta.discourse.org/t/override-template-only-on-specific-page/132288 "2019-11-12T22:40:40Z")

</div>

你好，我一直在主题的自定义字段中定制我的 Discourse 外观。我使用 \`| script type="text/x-handlebars" data-template-name="components/categories-only" |\` 以及类似的方法来覆盖某些特定模板……

---

## [Discourse 将支持旧版 Microsoft Edge 多长时间？](https://meta.discourse.org/t/how-long-will-discourse-support-the-old-microsoft-edge/133142)

<div class="topic-metadata">

**Author:** [@Justin\_Vega](https://meta.discourse.org/u/Justin_Vega)\
**回覆:** 15\
**Last updated:** [2019年十一月12日 18:18 UTC](https://meta.discourse.org/t/how-long-will-discourse-support-the-old-microsoft-edge/133142 "2019-11-12T18:18:11Z")

</div>

我的一位熟人有一个问题。 一旦微软在明年 1 月 15 日发布基于 Chromium 的 Edge 浏览器，Discourse 将继续支持旧版 Microsoft Edge 多长时间？是否有浏览器支持的路线图……

---

## [this.afterRefresh() 不是一个函数](https://meta.discourse.org/t/this-afterrefresh-is-not-a-function/133184)

<div class="topic-metadata">

**Author:** [@piratdavid](https://meta.discourse.org/u/piratdavid)\
**回覆:** 6\
**Last updated:** [2019年十一月12日 13:42 UTC](https://meta.discourse.org/t/this-afterrefresh-is-not-a-function/133184 "2019-11-12T13:42:51Z")

</div>

嗨！好久没查看我们的插件了。升级到 2.4.0 beta 后，我在上传时遇到错误。composer-editor.js 类报错“this.afterRefresh() 不是一个函数”。在我看来，这似乎是...

---

## [恢复插件](https://meta.discourse.org/t/restore-plugins/133097)

<div class="topic-metadata">

**Author:** [@vaibhavclecotech](https://meta.discourse.org/u/vaibhavclecotech)\
**回覆:** 1\
**Last updated:** [2019年十一月11日 13:23 UTC](https://meta.discourse.org/t/restore-plugins/133097 "2019-11-11T13:23:37Z")

</div>

大家好， 我将备份所有数据，并希望创建一个新的 Discourse 实例。我在现有的 Discourse 中使用了三个不同的插件。是否有任何方法可以一并恢复这些插件？

---

## [在 lib/secure\_session.rb 中发现未使用的变量 \`expires\`，这似乎是个错误](https://meta.discourse.org/t/found-unused-variable-expires-at-lib-secure-session-rb-it-seem-like-a-mistake/133027)

<div class="topic-metadata">

**Author:** [@coocooooo](https://meta.discourse.org/u/coocooooo)\
**回覆:** 2\
**Last updated:** [2019年十一月11日 00:22 UTC](https://meta.discourse.org/t/found-unused-variable-expires-at-lib-secure-session-rb-it-seem-like-a-mistake/133027 "2019-11-11T00:22:49Z")

</div>

在 lib/secure\_session.rb 中发现未使用的变量 expires，这似乎是一个错误 \`\`\`ruby def set(key, val, expires: nil) expires ||= SecureSession.expiry $redis.setex(prefixed\_key(key), SecureSession.expiry.to\_i, val.to… \`\`\`

---

## [在帖子正文中移动主题帖头像](https://meta.discourse.org/t/move-topic-post-avatar-within-post-body/133059)

<div class="topic-metadata">

**Author:** [@scottrepreneur](https://meta.discourse.org/u/scottrepreneur)\
**回覆:** 0\
**Last updated:** [2019年十一月10日 20:04 UTC](https://meta.discourse.org/t/move-topic-post-avatar-within-post-body/133059 "2019-11-10T20:04:58Z")

</div>

我正在寻求更多关于为我的实例实施请求的布局变更的指导。我希望将头像移动到帖子正文内。 我认为我需要重新打开 post-article 和 post-body 组件以…

---

## [Assign new users to a group automatically](https://meta.discourse.org/t/assign-new-users-to-a-group-automatically/70374)

<div class="topic-metadata">

**Author:** [@Ultim8](https://meta.discourse.org/u/Ultim8)\
**回覆:** 11\
**Last updated:** [2017年九月24日 21:17 UTC](https://meta.discourse.org/t/assign-new-users-to-a-group-automatically/70374 "2017-09-24T21:17:50Z")

</div>

Hey everyone, just signed up here but been using Discourse for a while now with a community that has just surpassed 400 users. As the topic title suggests, we’re hoping there is a way to automatically add new users to a…

---

## [部署错误下的测试](https://meta.discourse.org/t/testing-under-deploy-errors/132526)

<div class="topic-metadata">

**Author:** [@Fazyl\_Almeeve](https://meta.discourse.org/u/Fazyl_Almeeve)\
**回覆:** 1\
**Last updated:** [2019年十一月5日 00:41 UTC](https://meta.discourse.org/t/testing-under-deploy-errors/132526 "2019-11-05T00:41:38Z")

</div>

目前，我正在使用 Mac。 我遇到了以下错误。 我运行了“bundle exec rake autospec”。 我需要您的帮助。 原因是什么？

---

## [\[已解决\] 近期更改导致 Docker（及非 Docker）环境连接中断](https://meta.discourse.org/t/resolved-recent-change-breaks-connectivity-in-docker-non-docker/132498)

<div class="topic-metadata">

**Author:** [@bertieb](https://meta.discourse.org/u/bertieb)\
**回覆:** 2\
**Last updated:** [2019年十一月4日 07:40 UTC](https://meta.discourse.org/t/resolved-recent-change-breaks-connectivity-in-docker-non-docker/132498 "2019-11-04T07:40:24Z")

</div>

我在连接 Docker 化的开发实例时遇到了完全无法连接的问题。 我尝试使用非 Docker 的开发版本。在那里，我可以连接到 localhost，但无法连接到任何其他地址。随后我看到了 fe…

---

## [How Sam's Windows development environment is configured](https://meta.discourse.org/t/how-sams-windows-development-environment-is-configured/62444)

<div class="topic-metadata">

**Author:** [@sam](https://meta.discourse.org/u/sam)\
**回覆:** 18\
**Last updated:** [2019年十一月2日 18:57 UTC](https://meta.discourse.org/t/how-sams-windows-development-environment-is-configured/62444 "2019-11-02T18:57:02Z")

</div>

I wanted to do a post (that I try to keep up to date) with notes about my current dev environment. :warning: This was a setup I WAS using, I no longer really use it I develop on Linux native. This setup though is rea…

---

## [我需要安装 Docker 吗？](https://meta.discourse.org/t/do-i-need-to-install-docker/132411)

<div class="topic-metadata">

**Author:** [@Fazyl\_Almeeve](https://meta.discourse.org/u/Fazyl_Almeeve)\
**回覆:** 1\
**Last updated:** [2019年十一月1日 20:58 UTC](https://meta.discourse.org/t/do-i-need-to-install-docker/132411 "2019-11-01T20:58:09Z")

</div>

我打算在本地部署 Discourse。 目前，我使用 Mac OS 和 Ubuntu 18.04 进行开发。 我是否必须安装 Docker 才能在本地部署 Discourse？ 请帮我。

---

## [用户个人资料页面CSS/HTML元素命名不佳](https://meta.discourse.org/t/poor-css-html-element-naming-on-user-profile-page/132330)

<div class="topic-metadata">

**Author:** [@Lumi](https://meta.discourse.org/u/Lumi)\
**回覆:** 5\
**Last updated:** [2019年十月31日 17:23 UTC](https://meta.discourse.org/t/poor-css-html-element-naming-on-user-profile-page/132330 "2019-10-31T17:23:23Z")

</div>

如果设置了个人资料背景图片，它会错误地显示在用户个人资料页面的个人资料详情之上。此行为是在 中引入的，当时背景图片被移动到了其独立的 div 中。我认为这是一个不必要的…

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

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