# Development

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

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

**Page:** 43

---

## [取消所有排队的常规任务](https://meta.discourse.org/t/cancel-all-enqueued-regular-jobs/276686)

<div class="topic-metadata">

**Author:** [@AhmedLoud](https://meta.discourse.org/u/AhmedLoud)\
**回覆:** 0\
**Last updated:** [2023年八月25日 21:33 UTC](https://meta.discourse.org/t/cancel-all-enqueued-regular-jobs/276686 "2023-08-25T21:33:26Z")

</div>

使用 Jobs 类是否可以取消所有已排队的常规作业。 例如，如果我执行 Jobs.enqueue(:some\_job, some\_param: 1)，是否可以在稍后的代码中取消它们。类似 Jobs.cancel\_enqueued(...)

---

## [如何在主题组件中加载库](https://meta.discourse.org/t/how-to-load-library-in-a-theme-component/276621)

<div class="topic-metadata">

**Author:** [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**回覆:** 6\
**Last updated:** [2023年八月25日 21:20 UTC](https://meta.discourse.org/t/how-to-load-library-in-a-theme-component/276621 "2023-08-25T21:20:50Z")

</div>

来自 How to require external libraries in a component helper file? - #2 by merefield 嘿 @merefield – 这仍然是这样做的方法吗？ 我正在尝试引入 qrcode.js 来在浏览器中生成 QRcode。 我遇到了 blo…

---

## [可以更改下拉列表的名称吗？](https://meta.discourse.org/t/is-it-possible-to-change-dropdown-names/276269)

<div class="topic-metadata">

**Author:** [@Helga\_Razinkova](https://meta.discourse.org/u/Helga_Razinkova)\
**回覆:** 13\
**Last updated:** [2023年八月25日 11:57 UTC](https://meta.discourse.org/t/is-it-possible-to-change-dropdown-names/276269 "2023-08-25T11:57:13Z")

</div>

社区你好 :slight\_smile: 有人知道是否有一个选项可以更改特定类别内的下拉菜单名称吗？我很想自定义‘全部’和‘所有标签’部分：

---

## [拉取请求的周转时间是多久？](https://meta.discourse.org/t/what-is-the-turn-around-time-for-pull-request/276488)

<div class="topic-metadata">

**Author:** [@Suec78](https://meta.discourse.org/u/Suec78)\
**回覆:** 2\
**Last updated:** [2023年八月24日 18:23 UTC](https://meta.discourse.org/t/what-is-the-turn-around-time-for-pull-request/276488 "2023-08-24T18:23:54Z")

</div>

我向 discourse\_api 仓库提交了一个 PR，我想知道通常审查需要多长时间？

---

## [如何将特定的链接项目移动到头部的右侧？](https://meta.discourse.org/t/how-to-move-a-specific-link-item-to-the-right-of-the-header/276422)

<div class="topic-metadata">

**Author:** [@pacharanero](https://meta.discourse.org/u/pacharanero)\
**回覆:** 2\
**Last updated:** [2023年八月24日 09:33 UTC](https://meta.discourse.org/t/how-to-move-a-specific-link-item-to-the-right-of-the-header/276422 "2023-08-24T09:33:54Z")

</div>

很棒的TC，有个关于用CSS将 .links 部分移到右边的快速问题。我一直试图将一个链接从 .nav .nav-pills 移到右侧，但还没有成功。我可以移动……

---

## [如何隐藏已归档主题，不显示在最新列表，但显示在其他页面？](https://meta.discourse.org/t/how-to-hide-archived-topics-from-latests-but-show-them-in-other-pages/276421)

<div class="topic-metadata">

**Author:** [@djagoo](https://meta.discourse.org/u/djagoo)\
**回覆:** 2\
**Last updated:** [2023年八月24日 09:00 UTC](https://meta.discourse.org/t/how-to-hide-archived-topics-from-latests-but-show-them-in-other-pages/276421 "2023-08-24T09:00:40Z")

</div>

是否可以从“最新”隐藏已存档主题，使其仍列在其类别中，但不在主页上显示？

---

## [在主题组件中用onclick打开登录表单](https://meta.discourse.org/t/opening-the-login-form-with-onclick-in-a-theme-component/275464)

<div class="topic-metadata">

**Author:** [@kuaza](https://meta.discourse.org/u/kuaza)\
**回覆:** 3\
**Last updated:** [2023年八月23日 17:14 UTC](https://meta.discourse.org/t/opening-the-login-form-with-onclick-in-a-theme-component/275464 "2023-08-23T17:14:46Z")

</div>

发帖前我搜索了很多，但没找到。我正在稍微修改这个主题组件，并添加一个新主题创建按钮。并且我希望非登录用户在点击该按钮时打开登录区域。该…

---

## [S3 上传 URL 是否应包含 http/https 协议？](https://meta.discourse.org/t/are-s3-upload-urls-supposed-to-have-the-http-https-protocol-included/148997)

<div class="topic-metadata">

**Author:** [@jamesmarkcook](https://meta.discourse.org/u/jamesmarkcook)\
**回覆:** 3\
**Last updated:** [2023年八月22日 09:01 UTC](https://meta.discourse.org/t/are-s3-upload-urls-supposed-to-have-the-http-https-protocol-included/148997 "2023-08-22T09:01:37Z")

</div>

我正在通过自定义 API 端点暴露一些上传 URL，任何上传到 S3 的内容在 Rails 控制台中都会返回类似以下内容： Upload.last.url =\> "//link-to-my-bucket.s3.dualstack......" Ra…

---

## [在 Discourse 中嵌入外部组件](https://meta.discourse.org/t/embedding-an-external-widget-in-discourse/273492)

<div class="topic-metadata">

**Author:** [@cokestroke](https://meta.discourse.org/u/cokestroke)\
**回覆:** 5\
**Last updated:** [2023年八月22日 08:34 UTC](https://meta.discourse.org/t/embedding-an-external-widget-in-discourse/273492 "2023-08-22T08:34:56Z")

</div>

你好， 我正在尝试将一个连接到我们 Jira Helpdesk 的小部件嵌入到我们的 Discourse 实例中，但脚本不起作用。你可以在我们的内容网站 https://mystrokeguide.com 上看到它运行正常，但当我…

---

## [去除页面源码中 noscript 部分的用户链接](https://meta.discourse.org/t/stripping-user-profile-links-from-noscript-section-of-page-source/276002)

<div class="topic-metadata">

**Author:** [@boltronics](https://meta.discourse.org/u/boltronics)\
**回覆:** 0\
**Last updated:** [2023年八月21日 10:35 UTC](https://meta.discourse.org/t/stripping-user-profile-links-from-noscript-section-of-page-source/276002 "2023-08-21T10:35:26Z")

</div>

你好！ 我需要在我们各个页面的\<noscript\>\</noscript\>部分进行一些更改，以阻止 Google 看到用户论坛链接的存在。例如，在 topics/show.html.erb 视图的此处。 我正在尝试…

---

## [登录弹窗不显示](https://meta.discourse.org/t/login-popup-not-display/275055)

<div class="topic-metadata">

**Author:** [@b.iyer](https://meta.discourse.org/u/b.iyer)\
**回覆:** 4\
**Last updated:** [2023年八月18日 10:44 UTC](https://meta.discourse.org/t/login-popup-not-display/275055 "2023-08-18T10:44:54Z")

</div>

你好， 我已经按照以下步骤安装了 Discourse： 在 Oracle Vitrual box 上安装 Ubuntu。 按照 URL 上的步骤操作：在 Ubuntu 或 Debian 上为开发安装 Discourse 实例。 安装……

---

## [Ruby Gem 选择 - 高效处理日期和时间操作的建议](https://meta.discourse.org/t/ruby-gem-selection-recommendations-for-efficiently-handling-date-and-time-manipulations/275666)

<div class="topic-metadata">

**Author:** [@vish234](https://meta.discourse.org/u/vish234)\
**回覆:** 1\
**Last updated:** [2023年八月18日 07:57 UTC](https://meta.discourse.org/t/ruby-gem-selection-recommendations-for-efficiently-handling-date-and-time-manipulations/275666 "2023-08-18T07:57:46Z")

</div>

我正在做一个 Ruby 项目，需要处理各种日期和时间操作，例如计算、格式化和时区转换。您能否推荐一些可靠且高效的 Ruby gem，它们在……

---

## [标题里的第一个 emoji 编码不匹配，而且更大](https://meta.discourse.org/t/the-first-emoji-inside-a-title-is-not-in-the-same-code-and-is-bigger/273626)

<div class="topic-metadata">

**Author:** [@Decrypt](https://meta.discourse.org/u/Decrypt)\
**回覆:** 25\
**Last updated:** [2023年八月16日 10:19 UTC](https://meta.discourse.org/t/the-first-emoji-inside-a-title-is-not-in-the-same-code-and-is-bigger/273626 "2023-08-16T10:19:15Z")

</div>

你好，:wave: 我正在尝试开发自己的主题，我注意到当你在标题中写入多个表情符号时，第一个表情符号会被包含在一个 \`\< img \>\` 标签内，而不是与文本的其余部分一起显示。这里有一些截图（在……之后

---

## [用户评分/声誉插件](https://meta.discourse.org/t/user-scores-reputation-plugin/92364)

<div class="topic-metadata">

**Author:** [@eatcodetravel](https://meta.discourse.org/u/eatcodetravel)\
**回覆:** 35\
**Last updated:** [2023年八月16日 12:36 UTC](https://meta.discourse.org/t/user-scores-reputation-plugin/92364 "2023-08-16T12:36:36Z")

</div>

大家好， 我开发了一个名为“Scores”的插件，用于根据 Discourse 统计数据计算用户得分。 该插件尚未准备好发布，但我希望能得到大家的反馈，并了解是否有人对此感兴趣……

---

## [处理 Fetch API 中的 CORS 问题](https://meta.discourse.org/t/handling-cors-issues-in-fetch-api/275350)

<div class="topic-metadata">

**Author:** [@vish234](https://meta.discourse.org/u/vish234)\
**回覆:** 0\
**Last updated:** [2023年八月16日 08:18 UTC](https://meta.discourse.org/t/handling-cors-issues-in-fetch-api/275350 "2023-08-16T08:18:52Z")

</div>

我正在做一个 Web 开发项目，其中我使用 Fetch API 向另一个域发起跨域请求。但是，我遇到了 CORS（跨域资源共享）问题，并且我的请求正在被……

---

## [如何隐藏主页上的“所有类别”选择栏？](https://meta.discourse.org/t/how-can-i-hide-the-all-categories-selection-bar-on-the-front-page/275202)

<div class="topic-metadata">

**Author:** [@Ellery](https://meta.discourse.org/u/Ellery)\
**回覆:** 4\
**Last updated:** [2023年八月16日 06:32 UTC](https://meta.discourse.org/t/how-can-i-hide-the-all-categories-selection-bar-on-the-front-page/275202 "2023-08-16T06:32:24Z")

</div>

我知道通过调整“启用标签”选项，可以隐藏下图所示的“所有标签”部分。 然而，我也想找到隐藏“所有类别”部分的方法。是否有办法…

---

## [如何从搜索中排除一个类别或搜索除一个类别外的所有类别+](https://meta.discourse.org/t/how-to-exclude-a-category-from-search-or-search-through-all-categories-except-one/275051)

<div class="topic-metadata">

**Author:** [@Alimot\_Akinbode](https://meta.discourse.org/u/Alimot_Akinbode)\
**回覆:** 2\
**Last updated:** [2023年八月14日 18:26 UTC](https://meta.discourse.org/t/how-to-exclude-a-category-from-search-or-search-through-all-categories-except-one/275051 "2023-08-14T18:26:09Z")

</div>

我正尝试从...排除一个类别，但此功能似乎不起作用。作为替代方案，我也尝试搜索多个类别，但这也不起作用。有什么解决办法吗？

---

## [某些偏好设置选项卡缺少 PluginOutlet](https://meta.discourse.org/t/missing-pluginoutlet-for-some-preference-tabs/274892)

<div class="topic-metadata">

**Author:** [@pangbo](https://meta.discourse.org/u/pangbo)\
**回覆:** 1\
**Last updated:** [2023年八月12日 12:50 UTC](https://meta.discourse.org/t/missing-pluginoutlet-for-some-preference-tabs/274892 "2023-08-12T12:50:38Z")

</div>

我即将向偏好设置的跟踪选项卡添加一个新设置，但在 tracking.hbs 中没有看到任何 PluginOutlets。我检查了其他选项卡，像界面、电子邮件等选项卡中有 user-prefere… 这样的 PluginOutlets。

---

## [无法删除分类的默认主题](https://meta.discourse.org/t/cant-delete-the-default-topic-of-a-category/274834)

<div class="topic-metadata">

**Author:** [@jucajuca](https://meta.discourse.org/u/jucajuca)\
**回覆:** 2\
**Last updated:** [2023年八月11日 19:05 UTC](https://meta.discourse.org/t/cant-delete-the-default-topic-of-a-category/274834 "2023-08-11T19:05:24Z")

</div>

您好，我正在尝试使用 API 端点来删除主题。 我可以删除“普通”主题，但我遇到了一个问题，即无法删除默认主题。那个名为“关于 \_\_\_\_\_\_\_\_ 类别”的主题 {{baseUrl}}/t/……

---

## [Rubocop-discourse可能导致自动更正失败](https://meta.discourse.org/t/rubocop-discourse-may-cause-autocorrect-failed/274807)

<div class="topic-metadata">

**Author:** [@hawm](https://meta.discourse.org/u/hawm)\
**回覆:** 0\
**Last updated:** [2023年八月11日 15:10 UTC](https://meta.discourse.org/t/rubocop-discourse-may-cause-autocorrect-failed/274807 "2023-08-11T15:10:56Z")

</div>

在 .rubocop.yml 中包含以下内容将导致 rubocop 自动更正失败 inherit\_gem: rubocop-discourse: default.yml 请参阅相关问题

---

## [更改“在线用户”在页面上的显示位置](https://meta.discourse.org/t/change-where-whos-online-appears-on-the-page/262970)

<div class="topic-metadata">

**Author:** [@OsaIsacson](https://meta.discourse.org/u/OsaIsacson)\
**回覆:** 2\
**Last updated:** [2023年八月11日 09:10 UTC](https://meta.discourse.org/t/change-where-whos-online-appears-on-the-page/262970 "2023-08-11T09:10:22Z")

</div>

我正在尝试将在线插件从这里： 移动到这里： 有什么线索吗？ 这是一个实时示例：https://bygg.boihop.co/

---

## [运行插件规格时出错](https://meta.discourse.org/t/error-when-running-plugin-specs/274701)

<div class="topic-metadata">

**Author:** [@merefield](https://meta.discourse.org/u/merefield)\
**回覆:** 1\
**Last updated:** [2023年八月10日 18:16 UTC](https://meta.discourse.org/t/error-when-running-plugin-specs/274701 "2023-08-10T18:16:51Z")

</div>

我在最新的两个开发实例上运行插件规范时遇到此问题。 (数据库已在测试环境中完全迁移)： 例如 bin/rake plugin:spec\[discourse-locations\] 加载时发生错误……

---

## [如何检索用户信息/详细信息并将其存储在变量中以与第三方应用程序集成？](https://meta.discourse.org/t/how-to-retrieve-users-information-details-and-store-them-in-variables-to-integrate-with-a-3rd-party-app/274485)

<div class="topic-metadata">

**Author:** [@Sid-Kandasamy](https://meta.discourse.org/u/Sid-Kandasamy)\
**回覆:** 0\
**Last updated:** [2023年八月9日 10:53 UTC](https://meta.discourse.org/t/how-to-retrieve-users-information-details-and-store-them-in-variables-to-integrate-with-a-3rd-party-app/274485 "2023-08-09T10:53:09Z")

</div>

你好。 我们目前拥有我们的 discourse 站点 - https://reachback.builtintelligence.com/ 目前我们希望集成一个名为 Appcues 的第三方应用程序。Appcues 允许我们向 ReachBack 上的用户创建提示，以…

---

## [分享您使用 Discourse REST API 的用例 🧑‍💻](https://meta.discourse.org/t/share-your-use-cases-of-using-discourse-rest-api/272139)

<div class="topic-metadata">

**Author:** [@Canapin](https://meta.discourse.org/u/Canapin)\
**回覆:** 2\
**Last updated:** [2023年八月8日 18:58 UTC](https://meta.discourse.org/t/share-your-use-cases-of-using-discourse-rest-api/272139 "2023-08-08T18:58:57Z")

</div>

大家好 :slight\_smile: 许多人出于各种目的使用 Discourse API，从自动化任务到与其他应用程序的交互。 你们能分享一下你们是如何使用它的吗？ 用于什么目的？ 什么技术/软件……

---

## [在“宿主”网站上显示 Discourse 未读消息数？](https://meta.discourse.org/t/displaying-discourse-unread-message-count-on-host-site/274348)

<div class="topic-metadata">

**Author:** [@ChrisBeach](https://meta.discourse.org/u/ChrisBeach)\
**回覆:** 0\
**Last updated:** [2023年八月8日 12:59 UTC](https://meta.discourse.org/t/displaying-discourse-unread-message-count-on-host-site/274348 "2023-08-08T12:59:31Z")

</div>

我有一个网站（称之为“宿主网站”），其中包含一个自托管的 Discourse 论坛，用于讨论和私人消息传递。 目前我使用一个 Discourse 网络钩子来通知宿主网站任何新的论坛帖子，……

---

## [强制 Discourse 订阅一次性支付](https://meta.discourse.org/t/forcing-a-discourse-subscription-to-be-a-one-off-payment/182582)

<div class="topic-metadata">

**Author:** [@MrDavis97](https://meta.discourse.org/u/MrDavis97)\
**回覆:** 12\
**Last updated:** [2023年八月7日 19:39 UTC](https://meta.discourse.org/t/forcing-a-discourse-subscription-to-be-a-one-off-payment/182582 "2023-08-07T19:39:04Z")

</div>

关于 Discourse Subscriptions 插件，如果我在 Stripe 本身更改一些设置会怎样？例如，在 Discourse 中，无法将产品的计划设置为一次性付款。它必须是……

---

## [DiscourseTagging.tag\_topic\_by\_names 在某些标签组合下永远不返回](https://meta.discourse.org/t/discoursetagging-tag-topic-by-names-never-returns-on-some-combinations-of-tags/274218)

<div class="topic-metadata">

**Author:** [@merefield](https://meta.discourse.org/u/merefield)\
**回覆:** 2\
**Last updated:** [2023年八月7日 18:30 UTC](https://meta.discourse.org/t/discoursetagging-tag-topic-by-names-never-returns-on-some-combinations-of-tags/274218 "2023-08-07T18:30:43Z")

</div>

这已经接近于 贡献 \> 错误 DiscourseTagging.tag\_topic\_by\_names(current\_topic, Guardian.new(tagging\_user), tag\_name\_short\_list, append: true) 我试图理解原因，但当我调用这个库函数 …

---

## [QUnit 奇怪的行为？：测试因设置值不持久而失败](https://meta.discourse.org/t/strange-qunit-behaviour-test-failing-because-setting-value-doesnt-survive/274165)

<div class="topic-metadata">

**Author:** [@merefield](https://meta.discourse.org/u/merefield)\
**回覆:** 3\
**Last updated:** [2023年八月7日 11:18 UTC](https://meta.discourse.org/t/strange-qunit-behaviour-test-failing-because-setting-value-doesnt-survive/274165 "2023-08-07T11:18:24Z")

</div>

我在 QUnit 上遇到一个奇怪的问题。 这个测试非常简单，应该很直接……但是…… 一个插件设置正在从我设置的那些地方改变。 当 JavaScript 作为 Composer 加载的结果运行时……

---

## [复制主题框架](https://meta.discourse.org/t/clone-topic-frame/273744)

<div class="topic-metadata">

**Author:** [@Tú\_Nguyễn](https://meta.discourse.org/u/T%C3%BA_Nguy%E1%BB%85n)\
**回覆:** 3\
**Last updated:** [2023年八月7日 09:18 UTC](https://meta.discourse.org/t/clone-topic-frame/273744 "2023-08-07T09:18:28Z")

</div>

当我在localhost:4200上运行Discourse时，我看到一个界面，该界面会执行与路由和控制器相关的操作。现在，我创建了一个插件，我希望当我访问localhost:4200/abc时，它能显示一个界面，该界面…

---

## [将Tagsname设为H2](https://meta.discourse.org/t/tagsname-as-h2/273935)

<div class="topic-metadata">

**Author:** [@fuchs](https://meta.discourse.org/u/fuchs)\
**回覆:** 3\
**Last updated:** [2023年八月6日 06:31 UTC](https://meta.discourse.org/t/tagsname-as-h2/273935 "2023-08-06T06:31:38Z")

</div>

是否可以在标签区域插入 H2 标题？H2 标题应该是标签的名称。 我无法使用标签横幅组件，因为 H2 不在右侧边栏的侧面，而是在上方。

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

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