FastComments.com

Add Comments to Your Drupal Site

这是 FastComments 的官方 Drupal 模块。

一个将 FastComments 与 Drupal 10/11 集成的 Drupal 模块,提供小部件块、实体字段集成、SSO 和细粒度权限。

存储库

在 GitHub 上查看


安装 Internal Link

  1. 将此模块放置到您的 Drupal 站点的 modules/custom/fastcomments/ 目录(或通过 Composer 安装:composer require drupal/fcom)。
  2. 启用该模块:
    drush en fastcomments
    或者通过管理界面在 扩展 (/admin/modules) 启用。

小部件区块 Internal Link

可以通过 结构 > 区块布局 (/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)会自动检测当前实体;在非实体页面上则回退为基于路径的标识符。

多语言 Internal Link

该模块会自动将当前 Drupal 站点的语言传递给所有小部件。

权限 Internal Link

  • 管理 FastComments - 访问 FastComments 设置表单。
  • 查看 FastComments - 查看评论小部件所需。
  • 切换 FastComments - 允许用户通过字段小部件针对每个实体启用/禁用评论。

工作原理 Internal Link

当用户访问启用了 FastComments 字段的实体时:

  1. FastComments 的 JavaScript 小部件从 CDN 加载。
  2. 如果配置了 SSO,用户的 Drupal 身份会传递给 FastComments。
  3. 一个 <noscript> 回退为没有 JavaScript 的用户提供服务器渲染的评论(仅限 Live Comments 和 Streaming Chat 模式)。

需要帮助?

如果您在使用 Drupal 模块时遇到任何问题或有任何疑问,请:

贡献

欢迎贡献!请访问 GitHub 仓库 查看贡献指南。