# Development

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

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

**Page:** 7

---

## [帖子中显示图片的帮助](https://meta.discourse.org/t/help-with-displaying-images-in-a-post/386462)

<div class="topic-metadata">

**Author:** [@Miro1](https://meta.discourse.org/u/Miro1)\
**回覆:** 10\
**Last updated:** [2025年十一月3日 20:29 UTC](https://meta.discourse.org/t/help-with-displaying-images-in-a-post/386462 "2025-11-03T20:29:11Z")

</div>

您好， 我有几张图片（链接如下），我想在我的 Discourse 帖子中显示它们，可以作为简单的图库/滑块，或者按顺序显示。我不知道该怎么做。我也找不到相关帖子 :confused: 图片……

---

## [移动端使用 Carousel 滑块和 Featured Tiles 组件？](https://meta.discourse.org/t/carousel-sliders-with-featured-tiles-component-on-mobiles/282988)

<div class="topic-metadata">

**Author:** [@Dennis\_P\_Z](https://meta.discourse.org/u/Dennis_P_Z)\
**回覆:** 40\
**Last updated:** [2025年十一月2日 11:55 UTC](https://meta.discourse.org/t/carousel-sliders-with-featured-tiles-component-on-mobiles/282988 "2025-11-02T11:55:33Z")

</div>

我希望在我的网站主页和分类页面顶部有一个轮播滑块，可以通过设置面板选择和指定一些精选主题和图片。 之前我希望在桌面和移动设备上都实现以下效果 :point\_down: 这个提供了一个线索，但工作仍在进行中 所以我听取了@Moin的建议，尝试了Featured Tiles组件。但是没有轮播效果，而且对移动设备不友好。我做了一些工作来实现这个效果 :point\_down: 桌面 移动设备 但是移动…

---

## [我认为 discourse-ai API 需要一次回归](https://meta.discourse.org/t/i-think-discourse-ai-api-needs-a-regression/387355)

<div class="topic-metadata">

**Author:** [@MoRanYue](https://meta.discourse.org/u/MoRanYue)\
**回覆:** 2\
**Last updated:** [2025年十一月1日 18:04 UTC](https://meta.discourse.org/t/i-think-discourse-ai-api-needs-a-regression/387355 "2025-11-01T18:04:20Z")

</div>

Discourse AI 现在使用结构化输出来生成内容，但很多 API 提供商并不支持结构化输出，我所在国家几乎所有的 AI 提供商，如 DeepSeek 或 Qwen 都不支持。使用……

---

## [侧边栏组件中添加链接的活动状态未生效](https://meta.discourse.org/t/active-state-not-working-for-added-links-in-the-sidebar-component/323422)

<div class="topic-metadata">

**Author:** [@bekircem](https://meta.discourse.org/u/bekircem)\
**回覆:** 1\
**Last updated:** [2025年十月31日 13:21 UTC](https://meta.discourse.org/t/active-state-not-working-for-added-links-in-the-sidebar-component/323422 "2025-10-31T13:21:23Z")

</div>

您好，我正在将一些类别添加为指向 Discourse 侧边栏顶部的独立链接，但当我点击这些链接时，与其他组件中的原生链接不同，单个链接或部分链接的 CSS active 状态不起作用。由于 active 状态不起作用，访客无法确定他们正在查看哪个页面。有什么方法可以解决这个问题吗？ active 状态正常工作： active 状态不工作

---

## [邀请链接的生成是否能防止数据竞争？](https://meta.discourse.org/t/is-the-generation-of-invitation-links-secure-against-data-races/385878)

<div class="topic-metadata">

**Author:** [@Willy](https://meta.discourse.org/u/Willy)\
**回覆:** 6\
**Last updated:** [2025年十月28日 18:18 UTC](https://meta.discourse.org/t/is-the-generation-of-invitation-links-secure-against-data-races/385878 "2025-10-28T18:18:04Z")

</div>

我想在每次用户提交请求时都创建一个邀请链接，但如果存在数据争用，即两个用户同时请求 Discourse 邀请链接，我担心其中一个甚至两个用户都会……

---

## [是否可以为用户帐户设置到期日期？](https://meta.discourse.org/t/is-it-possible-to-set-an-expiration-date-for-user-accounts/385691)

<div class="topic-metadata">

**Author:** [@Willy](https://meta.discourse.org/u/Willy)\
**回覆:** 6\
**Last updated:** [2025年十月28日 18:14 UTC](https://meta.discourse.org/t/is-it-possible-to-set-an-expiration-date-for-user-accounts/385691 "2025-10-28T18:14:36Z")

</div>

每次用户使用邀请链接注册时，我都希望该帐户仅能持续 x 个月，并且一旦到期，用户必须续订其帐户，是否可以这样做？ 这基本上是一个会员……

---

## [使用 api.onToolbarCreate 添加图片标签](https://meta.discourse.org/t/add-image-tag-using-api-ontoolbarcreate/386800)

<div class="topic-metadata">

**Author:** [@NateDhaliwal](https://meta.discourse.org/u/NateDhaliwal)\
**回覆:** 1\
**Last updated:** [2025年十月27日 10:36 UTC](https://meta.discourse.org/t/add-image-tag-using-api-ontoolbarcreate/386800 "2025-10-27T10:36:22Z")

</div>

如果我在 api.onToolbarCreate 中有以下内容： perform: (e) =\> { e.applySurround( \`\[wrap="Carousel" autoplay=${settings.autoplay}\]\\n\`, \`\\n\[/wrap\]\`, \`image\_carousel\_placeholder\` ); } 以及我的 image\_carousel\_pla…

---

## [主页 Logo Wrapper 区域是否基本没用？](https://meta.discourse.org/t/home-logo-wrapper-outlet-is-effectively-useless/386758)

<div class="topic-metadata">

**Author:** [@merefield](https://meta.discourse.org/u/merefield)\
**回覆:** 1\
**Last updated:** [2025年十月26日 16:22 UTC](https://meta.discourse.org/t/home-logo-wrapper-outlet-is-effectively-useless/386758 "2025-10-26T16:22:25Z")

</div>

我认为聊天功能正在使用此功能，如果聊天功能处于活动状态，此输出将被占用，因此实际上毫无用处？

---

## [second-factor.gjs 组件和 second-factor-add-totp.gjs 组件缺少 PluginOutlet](https://meta.discourse.org/t/missing-pluginoutlet-for-second-factor-gjs-component-and-for-second-factor-add-totp-gjs/385542)

<div class="topic-metadata">

**Author:** [@Yan\_Rudenko](https://meta.discourse.org/u/Yan_Rudenko)\
**回覆:** 12\
**Last updated:** [2025年十月24日 18:05 UTC](https://meta.discourse.org/t/missing-pluginoutlet-for-second-factor-gjs-component-and-for-second-factor-add-totp-gjs/385542 "2025-10-24T18:05:47Z")

</div>

您好 我最近开始使用 Discourse，根据我一周的经验，我可以肯定地说，对于那些需要修改核心内容的开发者来说，入门门槛相当高，这是由于缺乏真实的……

---

## [允许轻松切换用户账户](https://meta.discourse.org/t/allow-easy-switching-between-user-accounts/108791)

<div class="topic-metadata">

**Author:** [@jshort](https://meta.discourse.org/u/jshort)\
**回覆:** 4\
**Last updated:** [2025年十月24日 16:10 UTC](https://meta.discourse.org/t/allow-easy-switching-between-user-accounts/108791 "2025-10-24T16:10:37Z")

</div>

你好， 过去几年，我一直使用基于 PHP 的论坛软件运营一个角色扮演论坛。我们目前正在考虑切换到 Discourse，因为我们很喜欢它的许多内置功能，尤其是用于 moder…

---

## [我想在github上分享插件，需要添加许可证文件吗？哪种？](https://meta.discourse.org/t/i-want-to-share-plugin-on-github-do-i-have-to-add-any-license-file-which-one/386418)

<div class="topic-metadata">

**Author:** [@jvermach](https://meta.discourse.org/u/jvermach)\
**回覆:** 2\
**Last updated:** [2025年十月24日 06:21 UTC](https://meta.discourse.org/t/i-want-to-share-plugin-on-github-do-i-have-to-add-any-license-file-which-one/386418 "2025-10-24T06:21:34Z")

</div>

您好， 我们为 Discourse 编写了一个插件。我们将其放在 GitHub 上，并希望与 Discourse 分享。我们应该使用什么许可证才能正确地分享它？ 谢谢， Josef

---

## [迁移脚本文档](https://meta.discourse.org/t/database-migration-script-documentation/384880)

<div class="topic-metadata">

**Author:** [@Honeyxilia](https://meta.discourse.org/u/Honeyxilia)\
**回覆:** 6\
**Last updated:** [2025年十月23日 14:04 UTC](https://meta.discourse.org/t/database-migration-script-documentation/384880 "2025-10-23T14:04:10Z")

</div>

您好 - 由于我们 Discourse 实例中使用的某个插件（Multilingual）已不再更新，并且其部分功能在 Discourse 的新版本中得到了支持，因此我们希望使用一个迁移脚本来移动……

---

## [主题列表中的标签显示组件 - 展开/折叠主题列表中的标签](https://meta.discourse.org/t/asking-for-feedback-tag-reveal-component-in-topic-lists-expand-collapse-tags-in-topic-lists/386072)

<div class="topic-metadata">

**Author:** [@jrgong](https://meta.discourse.org/u/jrgong)\
**回覆:** 18\
**Last updated:** [2025年十月22日 16:58 UTC](https://meta.discourse.org/t/asking-for-feedback-tag-reveal-component-in-topic-lists-expand-collapse-tags-in-topic-lists/386072 "2025-10-22T16:58:07Z")

</div>

注意：在将此主题组件发布到主题组件之前，我想先征求一些反馈，看看这个主题组件是否合格，或者是否存在任何重大问题。 披露：此主题组件经过规划、实施，以及……

---

## [将我的导航添加到标题栏](https://meta.discourse.org/t/adding-my-nav-into-the-header-bar/385041)

<div class="topic-metadata">

**Author:** [@Joe\_F](https://meta.discourse.org/u/Joe_F)\
**回覆:** 4\
**Last updated:** [2025年十月20日 19:31 UTC](https://meta.discourse.org/t/adding-my-nav-into-the-header-bar/385041 "2025-10-20T19:31:41Z")

</div>

您好， 我想添加下面看到的导航栏： 在标题栏的徽标旁边，我该如何操作？顶部导航栏是自定义编码到我的 CSS 中的。 谢谢 Joe

---

## ["controller:edit-category.tabs" 模型上的 Observer 未触发](https://meta.discourse.org/t/observer-on-controller-edit-category-tabs-model-not-triggered/385559)

<div class="topic-metadata">

**Author:** [@pirhoo](https://meta.discourse.org/u/pirhoo)\
**回覆:** 2\
**Last updated:** [2025年十月20日 12:31 UTC](https://meta.discourse.org/t/observer-on-controller-edit-category-tabs-model-not-triggered/385559 "2025-10-20T12:31:05Z")

</div>

你好， 我正在尝试观察 \`EditCategoryTabs\` 控制器的模型更改，但不知何故，没有任何反应： \`\`\`javascript import { observes } from "@ember-decorators/object"; import { withPluginApi } from "discourse/li… \`\`\`

---

## [编写一个漂亮的界面...值得提交给上游吗？](https://meta.discourse.org/t/writing-a-fancy-theme-worth-sending-upstream-or-no/258076)

<div class="topic-metadata">

**Author:** [@ToyKeeper](https://meta.discourse.org/u/ToyKeeper)\
**回覆:** 10\
**Last updated:** [2025年十月17日 09:43 UTC](https://meta.discourse.org/t/writing-a-fancy-theme-worth-sending-upstream-or-no/258076 "2025-10-17T09:43:15Z")

</div>

你好！ 上个月，我最喜欢的论坛切换到了 Discourse。这在很大程度上是一次升级，但人们\*抱怨它的外观和感觉。所以我决定修复它，并最终进行了重大的风格改造。现在我正试图……

---

## [jQuery驱动的自动完成功能现已弃用](https://meta.discourse.org/t/deprecation-upcoming-removal-of-jquery-based-autocomplete/385527)

<div class="topic-metadata">

**Author:** [@kelv](https://meta.discourse.org/u/kelv)\
**回覆:** 0\
**Last updated:** [2025年十月14日 10:04 UTC](https://meta.discourse.org/t/deprecation-upcoming-removal-of-jquery-based-autocomplete/385527 "2025-10-14T10:04:36Z")

</div>

Discourse 核心中通过 $.autocomplete() 函数调用的基于 jQuery 的自动完成库现已弃用。我们正朝着提供更好的性能和自动补全定位抽象的现代化解决方案迈进……

---

## [关于使用AI助手开发的彩票插件中的MessageBus实时更新求助](https://meta.discourse.org/t/need-help-with-messagebus-real-time-updates-in-lottery-plugin-developed-with-ai-assistance/385371)

<div class="topic-metadata">

**Author:** [@joo](https://meta.discourse.org/u/joo)\
**回覆:** 0\
**Last updated:** [2025年十月12日 15:39 UTC](https://meta.discourse.org/t/need-help-with-messagebus-real-time-updates-in-lottery-plugin-developed-with-ai-assistance/385371 "2025-10-12T15:39:14Z")

</div>

大家好， 我正在为 Discourse 开发一个彩票插件，用户可以通过回复彩票主题来参与。坦白说：我不是程序员——我完全是在 AI 的协助下（Claude Code）构建这个插件的……

---

## [Webhook 竞态条件缓解策略](https://meta.discourse.org/t/webhook-race-condition-mitigation-strategies/385090)

<div class="topic-metadata">

**Author:** [@devaoc](https://meta.discourse.org/u/devaoc)\
**回覆:** 4\
**Last updated:** [2025年十月10日 13:40 UTC](https://meta.discourse.org/t/webhook-race-condition-mitigation-strategies/385090 "2025-10-10T13:40:46Z")

</div>

大家好！ :waving\_hand: 我正在构建 Discourse 和 Discord 之间的双向同步。在 Discourse 端，我使用 webhook 来处理主题和帖子的事件（创建、编辑、删除、恢复），以传递更新……

---

## [使用 LightDarkImg 抛出错误](https://meta.discourse.org/t/using-lightdarkimg-throws-error/384869)

<div class="topic-metadata">

**Author:** [@NateDhaliwal](https://meta.discourse.org/u/NateDhaliwal)\
**回覆:** 5\
**Last updated:** [2025年十月7日 10:41 UTC](https://meta.discourse.org/t/using-lightdarkimg-throws-error/384869 "2025-10-07T10:41:07Z")

</div>

使用 \`\` 时，我遇到了一个令人费解的错误，该错误并未提供问题的实际线索。 错误： index.js:1755 未捕获（在承诺中）TypeError：eC(...) 不是一个函数 at index.js:1755:48 …

---

## [回复旧帖时的最后警告](https://meta.discourse.org/t/creating-a-component-to-show-last-chance-warning-when-replying-to-old-topics/382689)

<div class="topic-metadata">

**Author:** [@CT075](https://meta.discourse.org/u/CT075)\
**回覆:** 6\
**Last updated:** [2025年十月6日 20:48 UTC](https://meta.discourse.org/t/creating-a-component-to-show-last-chance-warning-when-replying-to-old-topics/382689 "2025-10-06T20:48:11Z")

</div>

您好， 我正在运行一个实例，该实例在历史上一直存在“necro-bumping”帖子的麻烦。 我熟悉 warn\_reviving\_old\_topic\_age（我们已经设置了它），但似乎许多用户没有看到……

---

## [添加带有下拉菜单的自定义标题](https://meta.discourse.org/t/add-a-custom-header-with-a-dropdown-menu/33451)

<div class="topic-metadata">

**Author:** [@neil](https://meta.discourse.org/u/neil)\
**回覆:** 0\
**Last updated:** [2015年九月18日 21:23 UTC](https://meta.discourse.org/t/add-a-custom-header-with-a-dropdown-menu/33451 "2015-09-18T21:23:11Z")

</div>

We’ll be implementing a black header with one link that reveals a menu of more links, like this: In Admin \> Customize \> CSS/HTML, create a new customization. Remember that you can have multiple customizations active …

---

## [主题ID作为变量？](https://meta.discourse.org/t/topic-id-as-a-variable/374168)

<div class="topic-metadata">

**Author:** [@tknospdr](https://meta.discourse.org/u/tknospdr)\
**回覆:** 34\
**Last updated:** [2025年十月6日 17:11 UTC](https://meta.discourse.org/t/topic-id-as-a-variable/374168 "2025-10-06T17:11:56Z")

</div>

有没有办法在主题中将主题 ID 作为变量获取？ 用例，我们有支持和错误跟踪票证的类别。我想像这样使用模板设置它们。 这个： \> \*\*不要\*\*删除此行：…

---

## [REST API 编辑中对 bypass\_bump 的赞赏](https://meta.discourse.org/t/appreciation-for-bypass-bump-in-rest-api-calls-to-edit-first-post-in-topics/381366)

<div class="topic-metadata">

**Author:** [@Ethsim2](https://meta.discourse.org/u/Ethsim2)\
**回覆:** 6\
**Last updated:** [2025年十月2日 18:03 UTC](https://meta.discourse.org/t/appreciation-for-bypass-bump-in-rest-api-calls-to-edit-first-post-in-topics/381366 "2025-10-02T18:03:21Z")

</div>

继续讨论“如何使用 API 编辑帖子而不顶起主题？”： 我只想对 Discourse 团队包含 bypass\_bump 参数表示衷心的感谢！它是一个小巧但功能强大的工具——它允许……

---

## [回复旧帖时添加确认框](https://meta.discourse.org/t/add-confirmation-box-when-replying-to-old-topics/384483)

<div class="topic-metadata">

**Author:** [@CT075](https://meta.discourse.org/u/CT075)\
**回覆:** 0\
**Last updated:** [2025年十月1日 18:27 UTC](https://meta.discourse.org/t/add-confirmation-box-when-replying-to-old-topics/384483 "2025-10-01T18:27:23Z")

</div>

（大部分内容从 https://meta.discourse.org/t/last-chance-warning-when-replying-to-old-topics/382689 复制粘贴而来） 我正在运营一个社区，该社区过去在“挖坟”主题方面存在一些问题。 我熟悉……

---

## [我可以在开发移动应用后使用 discourse:// 方案吗？](https://meta.discourse.org/t/can-i-develop-an-mobile-app-then-use-the-discourse-scheme/384259)

<div class="topic-metadata">

**Author:** [@Sunchecer\_Manfill](https://meta.discourse.org/u/Sunchecer_Manfill)\
**回覆:** 10\
**Last updated:** [2025年九月29日 17:56 UTC](https://meta.discourse.org/t/can-i-develop-an-mobile-app-then-use-the-discourse-scheme/384259 "2025-09-29T17:56:35Z")

</div>

我正在开发一个使用基于用户密钥的授权进行登录的移动应用程序，这需要一个自定义方案。我可以使用“discourse://”方案吗？

---

## [有哪些不错的欢迎横幅设计？](https://meta.discourse.org/t/what-are-some-good-welcome-banner-designs/384137)

<div class="topic-metadata">

**Author:** [@anoedo](https://meta.discourse.org/u/anoedo)\
**回覆:** 4\
**Last updated:** [2025年九月29日 13:36 UTC](https://meta.discourse.org/t/what-are-some-good-welcome-banner-designs/384137 "2025-09-29T13:36:24Z")

</div>

我正在使用 Horizon 主题，我注意到设置的欢迎图片无法在页面上完全显示（红色框表示我想显示的区域）。此外，一个重大问题是搜索框……

---

## [AI 论坛 管理：征求见解和经验](https://meta.discourse.org/t/ai-forum-moderation-seeking-insights-and-experiences/299018)

<div class="topic-metadata">

**Author:** [@SethWilliams](https://meta.discourse.org/u/SethWilliams)\
**回覆:** 8\
**Last updated:** [2025年九月27日 04:26 UTC](https://meta.discourse.org/t/ai-forum-moderation-seeking-insights-and-experiences/299018 "2025-09-27T04:26:23Z")

</div>

我正在寻找将人工智能集成到我的 Discourse 论坛以协助审核的方法。我不希望它取代我的版主，我只是需要帮助捕捉人类通常看不到的东西。有时，这是因为这些问题对版主来说实际上是看不见的（例如，一个垃圾邮件发送者从同一个 IP 地址创建了多个帐户）。其他时候，它对版主来说是可见的，但很容易变得懒惰而错过这些事情（例如，一个帖子被发布到错误的类别，或者一个帖子跑题了）。 人工智能版主可以帮助完成无数的任务。我能想到的一些想法： 监控…

---

## [插件中导入插件模型或组件：测试失败](https://meta.discourse.org/t/importing-a-model-or-component-from-a-plugin-into-a-custom-plugin-tests-fail/383005)

<div class="topic-metadata">

**Author:** [@Marine](https://meta.discourse.org/u/Marine)\
**回覆:** 6\
**Last updated:** [2025年九月26日 12:44 UTC](https://meta.discourse.org/t/importing-a-model-or-component-from-a-plugin-into-a-custom-plugin-tests-fail/383005 "2025-09-26T12:44:30Z")

</div>

您好， 我们正在使用 Discourse 版本 3.5.0。 我们有自己的插件，在其中我们覆盖了各种 Discourse 元素并添加了自己的功能。 在此插件中，我们希望……

---

## [小型操作 CustomComponent 参数问题](https://meta.discourse.org/t/small-action-customcomponent-argument-issue/383606)

<div class="topic-metadata">

**Author:** [@RGJ](https://meta.discourse.org/u/RGJ)\
**回覆:** 5\
**Last updated:** [2025年九月24日 20:56 UTC](https://meta.discourse.org/t/small-action-customcomponent-argument-issue/383606 "2025-09-24T20:56:34Z")

</div>

我正尝试用一个 CustomComponent 可选地替换一个帖子的简短操作描述。 然而，帖子没有被正确地传递给 value transformer。 核心代码 @cached get CustomComponent() { return app……

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

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