# Wiki

**URL:** https://meta.discourse.org/c/wiki/177.md?page=4

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

**Page:** 5

---

## [🇨🇳 The IP address in Discourse’s user information shows CloudFlare’s IP address | Discourse 的用户信息中的 IP 地址显示的是 CloudFlare 的 IP 地址](https://meta.discourse.org/t/the-ip-address-in-discourse-s-user-information-shows-cloudflare-s-ip-address-discourse-ip-cloudflare-ip/265556)

<div class="topic-metadata">

**Author:** [@honeymoose](https://meta.discourse.org/u/honeymoose)\
**回覆:** 22\
**Last updated:** [2024年四月14日 15:56 UTC](https://meta.discourse.org/t/the-ip-address-in-discourse-s-user-information-shows-cloudflare-s-ip-address-discourse-ip-cloudflare-ip/265556 "2024-04-14T15:56:11Z")

</div>

因为使用了 CloudFlare 的反向地址。 所有 Discourse 获得的用户的 IP 地址其实是 CloudFlare 的服务器地址。 修改 好在 Discourse 已经提供了相关的解决方案。 需要在 Discourse 的配置文件中，添加下面的内容： “templates/cloudflare.template.yml” 然后重新 Build 你的 Discourse 的安装实例。 ./launch…

---

## [配置对传入邮件的身份验证检查](https://meta.discourse.org/t/configure-authentication-checks-on-incoming-email/134358)

<div class="topic-metadata">

**Author:** [@LeoMcA](https://meta.discourse.org/u/LeoMcA)\
**回覆:** 3\
**Last updated:** [2024年四月2日 07:14 UTC](https://meta.discourse.org/t/configure-authentication-checks-on-incoming-email/134358 "2024-04-02T07:14:55Z")

</div>

As of this commit, Discourse now supports parsing the Authentication-Results header of incoming emails. This header contains information about whether we can trust that an email is actually coming from the person who cla…

---

## [🇨🇳 Discourse Post Formatting Guide 加点格式，让帖子多姿多彩](https://meta.discourse.org/t/discourse-post-formatting-guide/287103)

<div class="topic-metadata">

**Author:** [@Dotila\_Li](https://meta.discourse.org/u/Dotila_Li)\
**回覆:** 4\
**Last updated:** [2024年三月4日 10:34 UTC](https://meta.discourse.org/t/discourse-post-formatting-guide/287103 "2024-03-04T10:34:55Z")

</div>

有时，对帖子做些小改动，就能很有效提高帖子的可读性和互动性！本文专门介绍关于帖子格式的 “小改动”。 此刻打开帖子编辑器照着学习效果更佳，帖子编辑器里自带预览效果页面： 先喝口水、伸下腰。准备好打开您的帖子编辑器了吗？好，开始吧！ 标题 在行前面加 # 号即可将行内容转换成标题，# 号数量对应标题级别。 输入： # 一级标题 ## 二级标题 ### 三级标题 #### 四级标题 效果： …

---

## [安装并配置 WP Discourse WordPress 插件以集成 Discourse](https://meta.discourse.org/t/install-and-configure-the-wp-discourse-wordpress-plugin-for-discourse/50752)

<div class="topic-metadata">

**Author:** [@angus](https://meta.discourse.org/u/angus)\
**回覆:** 0\
**Last updated:** [2016年九月27日 20:03 UTC](https://meta.discourse.org/t/install-and-configure-the-wp-discourse-wordpress-plugin-for-discourse/50752 "2016-09-27T20:03:49Z")

</div>

To get started with the WP Discourse Plugin, go through each of these topics in order and watch the videos at the top of the topic. Install the plugin Connect to Discourse Set up Publishing Set up Commenting Set up D…

---

## [将Kunena 3论坛迁移到Discourse](https://meta.discourse.org/t/migrate-a-kunena-3-forum-to-discourse/43776)

<div class="topic-metadata">

**Author:** [@tarek](https://meta.discourse.org/u/tarek)\
**回覆:** 34\
**Last updated:** [2023年十二月14日 09:33 UTC](https://meta.discourse.org/t/migrate-a-kunena-3-forum-to-discourse/43776 "2023-12-14T09:33:11Z")

</div>

Want to migrate from Kunena3 to Discourse? Great! Let’s get started. Note: @tarek’s fine work on this topic was replaced wholesale after @pfaffman made considerable changes to the importer. Do not blame @tarek for mista…

---

## [自定义提及颜色](https://meta.discourse.org/t/customize-mention-colors/219023)

<div class="topic-metadata">

**Author:** [@Alexander](https://meta.discourse.org/u/Alexander)\
**回覆:** 3\
**Last updated:** [2023年十二月13日 17:04 UTC](https://meta.discourse.org/t/customize-mention-colors/219023 "2023-12-13T17:04:32Z")

</div>

受 此主题 和 Discord 角色自定义颜色的启发，我编写了这段非常简单的代码，它为群组和用户的提及添加了 data-mention，这样就可以通过 CSS 设置不同的颜色（而不是“通用颜色”）：smile: 目前的代码是 JQuery，但将来我也会将其更改为 Vanilla JavaScript：sweat\_smile: 要应用它，只需将代码粘贴到你的主题或组件的头部： \<script type="text/discours…

---

## [使用需要MySQL的导入脚本](https://meta.discourse.org/t/use-an-import-script-that-requires-mysql/63349)

<div class="topic-metadata">

**Author:** [@lead4good](https://meta.discourse.org/u/lead4good)\
**回覆:** 51\
**Last updated:** [2023年十二月12日 14:41 UTC](https://meta.discourse.org/t/use-an-import-script-that-requires-mysql/63349 "2023-12-12T14:41:11Z")

</div>

:information\_source: For a more general guide for setting up an docker environment for running import scripts to migrate your forum see: Set up an environment to migrate another forum to Discourse So, you’ve been weep…

---

## [🇨🇳 Chatting and Posting - Better Together 群聊与发帖：双剑合璧](https://meta.discourse.org/t/chatting-and-posting-better-together/287159)

<div class="topic-metadata">

**Author:** [@Dotila\_Li](https://meta.discourse.org/u/Dotila_Li)\
**回覆:** 0\
**Last updated:** [2023年十二月1日 07:35 UTC](https://meta.discourse.org/t/chatting-and-posting-better-together/287159 "2023-12-01T07:35:08Z")

</div>

群聊与发帖，是论坛里的两种主要交流方式。它们有各自适合的场景，不同场景下选择不同的交流方式、充分发挥两者的优势，或许能带来愉快的论坛体验。 群聊交流的特点 方便即时沟通交流，对于小范围的交流、快速互动建立联系，群聊是个理想的选择。 内容发散、自由，想到什么就聊什么，话题没有方向随时切换，像只正在欢快采蜜的蝴蝶，你永远不知道它下一朵落脚的花是哪一朵。 消息很快被顶上去，聊天记录难以追溯，重要信息可能埋没其中。 发帖交流的特点 即时…

---

## [将Discourse与MemberMouse集成](https://meta.discourse.org/t/integrate-discourse-with-membermouse/79636)

<div class="topic-metadata">

**Author:** [@lkramer](https://meta.discourse.org/u/lkramer)\
**回覆:** 36\
**Last updated:** [2023年十一月27日 05:54 UTC](https://meta.discourse.org/t/integrate-discourse-with-membermouse/79636 "2023-11-27T05:54:53Z")

</div>

I maintain Discourse and MemberMouse running on 2 sites. Hopefully this guide will be helpful to people. Your exact specifications may differ from what my desired results were. This guide assumes that you are familiar wi…

---

## [将使用 Redis 的 NodeBB 论坛迁移到 Discourse](https://meta.discourse.org/t/migrate-a-nodebb-forum-with-redis-to-discourse/124897)

<div class="topic-metadata">

**Author:** [@enigmaty](https://meta.discourse.org/u/enigmaty)\
**回覆:** 2\
**Last updated:** [2023年十一月17日 19:28 UTC](https://meta.discourse.org/t/migrate-a-nodebb-forum-with-redis-to-discourse/124897 "2023-11-17T19:28:34Z")

</div>

This tutorial will show you how to use the NodeBB Importer to migrate NodeBB forum to Discourse platform. If your NodeBB forum uses MongoDB as backend then follow this tutorial. Do not worry, It is an easy process. Let’s…

---

## [学习如何为Discourse开始搭建东西，如果你是新手（就像我一样）](https://meta.discourse.org/t/learn-how-to-start-building-stuff-for-discourse-if-youre-newbie-like-myself/45954)

<div class="topic-metadata">

**Author:** [@angus](https://meta.discourse.org/u/angus)\
**回覆:** 14\
**Last updated:** [2023年十月15日 20:19 UTC](https://meta.discourse.org/t/learn-how-to-start-building-stuff-for-discourse-if-youre-newbie-like-myself/45954 "2023-10-15T20:19:53Z")

</div>

There are a few ‘how to start’ guides for working with Discourse already and a wealth of useful info on meta, but I thought it might help to give an insight to the mental processes of starting from little, if any, prior …

---

## [🇨🇳 Installing the Discourse development environment on Ubuntu 在 Ubuntu 上安装 Discourse 开发环境](https://meta.discourse.org/t/installing-the-discourse-development-environment-on-ubuntu-ubuntu-discourse/248481)

<div class="topic-metadata">

**Author:** [@honeymoose](https://meta.discourse.org/u/honeymoose)\
**回覆:** 5\
**Last updated:** [2023年十月13日 06:20 UTC](https://meta.discourse.org/t/installing-the-discourse-development-environment-on-ubuntu-ubuntu-discourse/248481 "2023-10-13T06:20:08Z")

</div>

:warning: 本指南只针对 Discourse 开发环境的配置，如果你需要在生产环境中安装 Discourse ，请访问页面：Install Discourse in production with the official supported instructions 中的内容。 :information\_source: 有关开发环境的设置英文原文，请参考：Set up a local Discourse Dev…

---

## [通过 Google Tag Manager 将 Google Auto Ads 添加到 Discourse](https://meta.discourse.org/t/add-google-auto-ads-to-discourse-via-google-tag-manager/126308)

<div class="topic-metadata">

**Author:** [@tohaitrieu](https://meta.discourse.org/u/tohaitrieu)\
**回覆:** 5\
**Last updated:** [2022年七月14日 04:29 UTC](https://meta.discourse.org/t/add-google-auto-ads-to-discourse-via-google-tag-manager/126308 "2022-07-14T04:29:19Z")

</div>

I tried and found the way to add Google Auto Ads to Discourse via Google Tag Manager. Login to Google Tag Manager: https://tagmanager.google.com/#/home, Choose Workspace Create a new user defined variable and call …

---

## [将Discourse插件打包成gem](https://meta.discourse.org/t/package-a-discourse-plugin-as-a-gem/273036)

<div class="topic-metadata">

**Author:** [@angus](https://meta.discourse.org/u/angus)\
**回覆:** 4\
**Last updated:** [2023年七月27日 16:59 UTC](https://meta.discourse.org/t/package-a-discourse-plugin-as-a-gem/273036 "2023-07-27T16:59:01Z")

</div>

Pavilion 已开始将一些 Discourse 插件打包成 Ruby gems，首先是我们的订阅客户端。 我们的订阅客户端仍然是一个单独的插件，现在加载这个 gem，但它的后端现在完全打包成了一个 gem，并且该单独的插件将很快被完全弃用。这是一个关于如何为更适合打包成 gem 的插件做同样事情的简要介绍。 如何使用 gem 首先，你需要了解如何使用 Ruby gems。如果你以前从未创建过 gem，我建议你在尝试将 Dis…

---

## [可插入的、集中维护的文本/Markdown 片段](https://meta.discourse.org/t/insertable-centrally-maintained-text-markdown-snippets/97246)

<div class="topic-metadata">

**Author:** [@merefield](https://meta.discourse.org/u/merefield)\
**回覆:** 9\
**Last updated:** [2023年七月23日 05:28 UTC](https://meta.discourse.org/t/insertable-centrally-maintained-text-markdown-snippets/97246 "2023-07-23T05:28:29Z")

</div>

I was wondering if there was any way I could define a string of text in a single place and insert it within posts with a single, short reference. It’s a bit like the out of the box Admin -\> Customize -\> Text Content, bu…

---

## [将 Google Workspace 配置为 SMTP 中继](https://meta.discourse.org/t/configure-google-workspace-as-a-smtp-relay/237662)

<div class="topic-metadata">

**Author:** [@poyrazdursuncan](https://meta.discourse.org/u/poyrazdursuncan)\
**回覆:** 4\
**Last updated:** [2023年七月13日 19:56 UTC](https://meta.discourse.org/t/configure-google-workspace-as-a-smtp-relay/237662 "2023-07-13T19:56:38Z")

</div>

:e\_mail: 1. 购买 Google Workspace 服务 我推荐 Business Standard 套餐。您创建的电子邮件帐户的密码将发送到您在 Google Workspace 购买套餐时使用的帐户。 2. 配置 Google Workspace MX 名称/主机/别名 生存时间 (TTL\*) 记录类型 优先级 值/答案/目标 @ 或留空 3600 MX 1 ASPMX.L.GOOGLE.COM …

---

## [🇨🇳 DiscoTOC 自动内容表格](https://meta.discourse.org/t/discotoc/268164)

<div class="topic-metadata">

**Author:** [@honeymoose](https://meta.discourse.org/u/honeymoose)\
**回覆:** 0\
**Last updated:** [2023年六月13日 12:48 UTC](https://meta.discourse.org/t/discotoc/268164 "2023-06-13T12:48:04Z")

</div>

:information\_source: 概述 DiscoTOC 允许你针对你的主题一键创建一个内容列表。 :eyeglasses: 预览 Beginner's guide to using Discourse Themes （请在一个新的标签页上访问链接） :hammer\_and\_wrench: 仓库链接 https://github.com/discourse/DiscoTOC …

---

## [🇨🇳 Configure MAXMIND for reverse IP lookups | Discourse 如何配置 MAXMIND 来对 IP 地址反向查询](https://meta.discourse.org/t/configure-maxmind-for-reverse-ip-lookups-discourse-maxmind-ip/265932)

<div class="topic-metadata">

**Author:** [@honeymoose](https://meta.discourse.org/u/honeymoose)\
**回覆:** 0\
**Last updated:** [2023年五月23日 14:59 UTC](https://meta.discourse.org/t/configure-maxmind-for-reverse-ip-lookups-discourse-maxmind-ip/265932 "2023-05-23T14:59:20Z")

</div>

:warning: 【配置 MAXMIND，Discourse 需要重新构建，这将会导致服务中断。 】 什么是 MAXMIND 和为什么我们需要使用这个服务 Discourse 使用 MAXMIND 来通过 IP 地址反向查询具体的物理地址。 如果 Discourse 没有配置 Maxmind’s 数据库，我们看到的配置信息如下： 或者在对 Discourse 容器重新编译的时候，看到下面的信息： MaxM…

---

## [🇨🇳 Discourse Math 插件](https://meta.discourse.org/t/discourse-math/265331)

<div class="topic-metadata">

**Author:** [@honeymoose](https://meta.discourse.org/u/honeymoose)\
**回覆:** 1\
**Last updated:** [2023年五月17日 13:35 UTC](https://meta.discourse.org/t/discourse-math/265331 "2023-05-17T13:35:20Z")

</div>

:information\_source: 概述 Discourse Math 使用 MathJax (默认) 或者 KaTeX 来让你在你的 Discourse 中使用数学公式。 :hammer\_and\_wrench: 仓库链接 https://github.com/discourse/discourse-math :open\_book: Install Guide 如何在 Discourse 中安装插件 …

---

## [使用多个侧边栏链接到文档页面](https://meta.discourse.org/t/using-multiple-sidebar-links-to-the-docs-page/264791)

<div class="topic-metadata">

**Author:** [@manuel](https://meta.discourse.org/u/manuel)\
**回覆:** 0\
**Last updated:** [2023年五月12日 10:09 UTC](https://meta.discourse.org/t/using-multiple-sidebar-links-to-the-docs-page/264791 "2023-05-12T10:09:57Z")

</div>

我花了一段时间才详细弄清楚这一点，所以简要分享一下如何实现这一目标的设置。想法是在自定义侧边栏部分提供指向“文档”页面的各种快捷方式。例如，这里我使用了三个标签过滤器（issue、resource 和 manual），我还向默认类别 General 和 Site Feedback 添加了两个类别过滤器： 现在，这些链接的普通 URL 看起来像这样： /docs?tags=issue /docs?tags=resource /d…

---

## [使用 WP Discourse SSO 管理 Discourse 中的群组成员](https://meta.discourse.org/t/manage-group-membership-in-discourse-with-wp-discourse-sso/74724)

<div class="topic-metadata">

**Author:** [@simon](https://meta.discourse.org/u/simon)\
**回覆:** 77\
**Last updated:** [2023年五月7日 17:36 UTC](https://meta.discourse.org/t/manage-group-membership-in-discourse-with-wp-discourse-sso/74724 "2023-05-07T17:36:03Z")

</div>

WP Discourse functions The WP Discourse plugin has a couple of functions that can be used to associate WordPress users with Discourse groups. These functions are only enabled on sites that are using WordPress as the SSO…

---

## [将 MyBB 论坛迁移到 Discourse](https://meta.discourse.org/t/migrate-a-mybb-forum-to-discourse/130789)

<div class="topic-metadata">

**Author:** [@enigmaty](https://meta.discourse.org/u/enigmaty)\
**回覆:** 21\
**Last updated:** [2023年三月21日 14:45 UTC](https://meta.discourse.org/t/migrate-a-mybb-forum-to-discourse/130789 "2023-03-21T14:45:24Z")

</div>

In this tutorial, we will learn how to migrate MyBB forum to :discourse: platform using the official MyBB Importer script. What can be migrated Categories Root category =\> root category Child category =\> sub category R…

---

## [Discourse 新手指南（西班牙语版）](https://meta.discourse.org/t/discourse-new-user-guide-in-spanish/242955)

<div class="topic-metadata">

**Author:** [@Shirly\_Nowak](https://meta.discourse.org/u/Shirly_Nowak)\
**回覆:** 3\
**Last updated:** [2023年三月20日 14:39 UTC](https://meta.discourse.org/t/discourse-new-user-guide-in-spanish/242955 "2023-03-20T14:39:45Z")

</div>

Hi eveyone, Based on this amazing post I decided to create my own begginer’s guide in spanish for my comunity. It’s similar to the OP but I changed some parts and also enlarged it with extra info about personal preferen…

---

## [使用Edge浏览器时烦人的搜索弹出窗口](https://meta.discourse.org/t/annoying-search-pop-up-when-using-edge-browser/257071)

<div class="topic-metadata">

**Author:** [@merefield](https://meta.discourse.org/u/merefield)\
**回覆:** 0\
**Last updated:** [2023年三月4日 17:55 UTC](https://meta.discourse.org/t/annoying-search-pop-up-when-using-edge-browser/257071 "2023-03-04T17:55:09Z")

</div>

这会干扰 Discourse 的迷你菜单，例如在突出显示文本进行引用时，他们怎么敢这样做！:facepalm: 转到设置 → 外观 → 迷你菜单并将其关闭！

---

## [在 Discourse 中使用 Protonmail Bridge](https://meta.discourse.org/t/use-protonmail-bridge-with-discourse/229503)

<div class="topic-metadata">

**Author:** [@meglio](https://meta.discourse.org/u/meglio)\
**回覆:** 4\
**Last updated:** [2023年二月25日 19:41 UTC](https://meta.discourse.org/t/use-protonmail-bridge-with-discourse/229503 "2023-02-25T19:41:34Z")

</div>

问题：a) Protonmail Bridge 无法监听除 127.0.0.1 以外的 IP，b) Docker 容器中的 Discourse 无法向主机机器的 127.0.0.1 发送 SMTP 请求。 解决方案：我们将其配置为发送到 172.17.0.1（主机上的 Docker 的桥接 IP），然后重定向到 Protonmail Bridge 正在监听的 127.0.0.1。 我们使用 Socat 来实现这一点。 操作方法 首…

---

## [在discourse上设置智能聊天机器人🤖](https://meta.discourse.org/t/set-up-a-smart-chatbot-on-discourse/82632)

<div class="topic-metadata">

**Author:** [@Timothy\_Vail](https://meta.discourse.org/u/Timothy_Vail)\
**回覆:** 14\
**Last updated:** [2023年二月9日 00:52 UTC](https://meta.discourse.org/t/set-up-a-smart-chatbot-on-discourse/82632 "2023-02-09T00:52:36Z")

</div>

Hello, After weeks of tinkering, I finally managed to set up an AI bot, similar to discobot but one that learns and is more responsive. Here is how I did it for anyone interested in setting it up. There is quite a few…

---

## [将 Vanilla 论坛迁移到 Discourse](https://meta.discourse.org/t/migrate-a-vanilla-forum-to-discourse/27273)

<div class="topic-metadata">

**Author:** [@Abdul\_Munim\_Zahid](https://meta.discourse.org/u/Abdul_Munim_Zahid)\
**回覆:** 44\
**Last updated:** [2023年一月30日 18:36 UTC](https://meta.discourse.org/t/migrate-a-vanilla-forum-to-discourse/27273 "2023-01-30T18:36:56Z")

</div>

I know there are a lot of posts about importing contents from a vanilla forum, but theres a lack of comprehensive guide! Not everyone can afford to hire a developer to migrate their forums and this is my way of giving b…

---

## [为标记的主题添加版权保护](https://meta.discourse.org/t/add-copyright-protection-to-tagged-topics/208970)

<div class="topic-metadata">

**Author:** [@Don](https://meta.discourse.org/u/Don)\
**回覆:** 14\
**Last updated:** [2022年十二月17日 14:46 UTC](https://meta.discourse.org/t/add-copyright-protection-to-tagged-topics/208970 "2022-12-17T14:46:39Z")

</div>

你好， 我们的许多会员都有优质话题、博客文章等。不幸的是，其他人会窃取这些内容（并将其公开到其他网站，冒充自己的内容，而不注明任何来源），即使作者明确说明。“我只在此网站上撰写，请勿窃取。如果您想使用此内容，请先与我联系。”我们不得不采取一些措施，因为我们的作者只是因为创作新优质内容而感到沮丧。我们不想将论坛设为封闭（私有），因为许多访客都在论坛外阅读这些内容。 我们知道这是互联网，无法对版权内容提供 100% 的解决方案，但我们可…

---

## [关于 Google Cloud S3 的提示](https://meta.discourse.org/t/tips-on-google-cloud-s3/247555)

<div class="topic-metadata">

**Author:** [@Jerome\_Hordies](https://meta.discourse.org/u/Jerome_Hordies)\
**回覆:** 4\
**Last updated:** [2022年八月25日 14:08 UTC](https://meta.discourse.org/t/tips-on-google-cloud-s3/247555 "2022-08-25T14:08:01Z")

</div>

@Pfaffman 将此 Google Cloud 信息分拆出来，该信息不一定适合放在 OP 中，但应为遇到 Google Cloud 问题的用户保存。 您好， 感谢您的提示，但直到我将角色从“存储旧版对象所有者”更改为“存储旧版存储桶所有者”后，它才对我起作用。 在选择角色时，工具提示中明确写着： 存储旧版对象所有者 对现有对象的读/写访问权限不包括列出。 存储旧版存储桶所有者 对现有存储桶的读写访问权限，包括列出、创…

---

## [🇨🇳 Code syntax highlighting 代码的语法高亮](https://meta.discourse.org/t/code-syntax-highlighting/245387)

<div class="topic-metadata">

**Author:** [@honeymoose](https://meta.discourse.org/u/honeymoose)\
**回覆:** 0\
**Last updated:** [2022年十一月13日 00:51 UTC](https://meta.discourse.org/t/code-syntax-highlighting/245387 "2022-11-13T00:51:32Z")

</div>

Discourse 项目是默认支持语法高亮的，Discourse 会默认使用 highlight.js 来显示语法高亮。 如果你的代码没有正确使用语法高亮的话，你可以在代码块中强制使用你希望使用的语言，例如下面： \`\`\` ruby 3.times do |stuff| stuff.do end \`\`\` 显示结果： 3.times do |stuff| stuff.do end 设定的语言，必须满足平台中设置的，可以查看…

[上一頁](https://meta.discourse.org/c/wiki/177.md?page=3)

[下一頁](https://meta.discourse.org/c/wiki/177.md?page=5)
