
语言 🇨🇳 简体中文
🇺🇸
English
🇧🇬
Български
🇨🇳
简体中文
🇹🇼
繁體中文
🇭🇷
Hrvatski
🇩🇰
Dansk
🇳🇱
Nederlands
🇺🇸
English (US)
🇨🇦
Français (Canada)
🇫🇷
Français (France)
🇩🇪
Deutsch
🇨🇾
Ελληνικά (Κύπρος)
🇬🇷
Ελληνικά
🇮🇱
עברית
🇮🇹
Italiano
🇯🇵
日本語
🇰🇷
한국어
🇵🇱
Polski
🇧🇷
Português (Brasil)
🇷🇺
Русский
🇺🇦
Русский (Украина)
🇧🇦
Српски (БиХ)
🇷🇸
Srpski (Latinica)
🇲🇪
Српски (Црна Гора)
🇷🇸
Српски
🇸🇮
Slovenščina
🇪🇸
Español
🇺🇦
Українська
🇹🇷
Türkçe
入门
配置
文档
Add Comments to Your Drupal Site
这是 FastComments 的官方 Drupal 模块。
一个将 FastComments 与 Drupal 10/11 集成的 Drupal 模块,提供小部件块、实体字段集成、SSO 和细粒度权限。
存储库
安装 
- 将此模块放置到您的 Drupal 站点的
modules/custom/fastcomments/目录(或通过 Composer 安装:composer require drupal/fcom)。 - 启用该模块:
或者通过管理界面在 扩展 (drush en fastcomments/admin/modules) 启用。
配置 
导航到 管理 > 配置 > 内容 > FastComments (/admin/config/content/fastcomments)。
设置
- 租户 ID(必填) - 您的 FastComments 租户 ID。可在 设置 > API/SSO(EU)下找到。
- API 密钥 - Secure SSO、webhook 验证和页面同步所需。在 设置 > API/SSO(EU)下可找到。
- 单点登录模式 - 单点登录集成:
- 无 - 无 SSO,用户以访客身份评论或创建 FastComments 帐户。
- 简单 - 将 Drupal 用户信息(姓名、电子邮件、头像)传递给 FastComments,但不进行服务器端验证。
- 安全 - 使用 HMAC-SHA256 验证来安全地将 Drupal 用户与 FastComments 进行身份验证(推荐)。
- 评论样式 - 要显示的小部件类型:
- 实时评论 - 实时线程化评论。
- 流式聊天 - 实时聊天界面。
- 协作聊天 - 在主内容区域进行协作文本选择注释。
- 协作聊天 + 评论 - 同时显示协作聊天和标准评论。
- CDN URL - FastComments CDN URL(默认:
https://cdn.fastcomments.com)。 - 站点 URL - FastComments 站点 URL(默认:
https://fastcomments.com)。 - 电子邮件通知 - 当某内容上有新评论发布时,向内容作者发送电子邮件。
将评论添加到内容类型
通过 结构 > 内容类型 > [类型] > 管理字段 将 FastComments 字段添加到您的内容类型。该字段具有状态切换,并且每个实体可选的自定义标识符。
欧盟数据驻留
若需欧盟数据驻留,请更新:
- CDN URL 为
https://cdn-eu.fastcomments.com - 站点 URL 为
https://eu.fastcomments.com
小部件区块 
可以通过 结构 > 区块布局 (/admin/structure/block) 使用多个区块:
- FastComments Widget - 主要的评论小部件。自动检测当前实体。跳过已经有 FastComments 字段的实体(以防重复)。
- FastComments Live Chat - 实时流式聊天。可以与同一页面上的评论字段并排放置。
- FastComments Collab Chat - 基于文本选择的注释与讨论。
- FastComments Image Chat - 基于坐标的图像注释。
- FastComments Recent Comments - 显示整个站点的最新评论。可配置的评论数量。
- FastComments Top Pages - 显示评论数最多的页面。
以内容为中心的区块(Live Chat、Collab Chat、Image Chat)会自动检测当前实体;在非实体页面上则回退为基于路径的标识符。
权限 
- 管理 FastComments - 访问 FastComments 设置表单。
- 查看 FastComments - 查看评论小部件所需。
- 切换 FastComments - 允许用户通过字段小部件针对每个实体启用/禁用评论。
工作原理 
当用户访问启用了 FastComments 字段的实体时:
- FastComments 的 JavaScript 小部件从 CDN 加载。
- 如果配置了 SSO,用户的 Drupal 身份会传递给 FastComments。
- 一个
<noscript>回退为没有 JavaScript 的用户提供服务器渲染的评论(仅限 Live Comments 和 Streaming Chat 模式)。
需要帮助?
如果您在使用 Drupal 模块时遇到任何问题或有任何疑问,请:
贡献
欢迎贡献!请访问 GitHub 仓库 查看贡献指南。