Comments settings: moderation, limits, GIFs and attachments
Describes Comments 0.6.0.
The Comments settings page decides how comment threads behave across the whole site: whether new comments need approval, how long and how deeply nested they may be, and whether people can add GIFs, files and voice messages.
Where to find it
Open Settings in the admin sidebar, then Comments (/admin/settings/comments). The moderation page has a shortcut to it in its Actions tile. You need the Change the comments settings permission; without it the page sends you back with You do not have access to comments settings.
The page opens only while the module is switched on. If you turn comments off here, you turn them back on from the Modules page.
Comments settings.
How saving works
The settings are split over the tabs General, Moderation, Limits, Giphy Integration and Attachments, but they are one form. Save Settings saves every tab at once, not only the one in view, and Settings saved successfully confirms it.
Reset puts the moderation, rich text, limit, Giphy and attachment options back to their defaults after you confirm. It doesn’t switch the module off, doesn’t erase the Giphy API key and doesn’t touch the resource link patterns.
Every change is recorded in the settings history under your name.
General
- Enable Comments: switches the comments system on or off everywhere. With it off, comment threads are no longer shown on the pages that hold them, and the Comments admin page closes.
- Rich-Text Editor: gives the comment box a formatting editor. Turn it off for a plain text box. The page itself explains when to: if the editor stays stuck on its loading text, the site hasn’t been set up for it, and the plain box always works.
Moderation
- Require Moderation: new comments must be approved before they appear publicly. A new comment starts as Pending, and the person who posted it sees Your comment is awaiting approval. You approve it on the Comments admin page. A deleted comment you restore also comes back as pending while this is on.
Limits
- Max Thread Depth: how many levels of replies a thread may have, from 1 to 50 (default 10). A reply deeper than that is refused with Reply nesting is too deep.
- Max Comment Length: the longest a comment may be, in characters, from 100 to 100,000 (default 10,000).
A number outside the range is saved as the nearest allowed value.
Giphy integration
- Enable Giphy Picker: adds a GIF choice to the comment box’s attach menu, to search Giphy and post a GIF.
- Giphy API Key: your key from Giphy. The picker shows only when the toggle is on and a key is filled in. The key is stored in the database.
- Content Rating: the strongest rating Giphy search may return: G, PG, PG-13 or R (default G).
If the key is wrong, a search in the picker says Giphy search failed. Check the API key in settings.
Attachments
- Enable Comment Attachments: lets people attach images, video, audio and files (PDF, Word documents, text and Markdown files) and record voice messages in the browser. Files go to the storage set up under Settings, Storage. Pasting or dragging a file into the comment box needs this on too.
- Max attachments per comment: 1 to 10 (default 4).
- Max file size (MB): the limit for each file (default 20). The site’s global upload limit wins if it is lower.
Resource Link Patterns
The last tab tells the moderation page where each kind of record lives, so its comments link to it. It has its own guide.
What it doesn’t do
- It has no per-thread settings. These apply to every comment thread on the site; a page that shows a thread may still turn parts off for itself, such as reactions or the comment box.
- It doesn’t manage who may moderate. That is set with roles and permissions.
For developers
The rich-text editor needs Leaf’s JavaScript hook in the host’s LiveSocket, and a host LiveView that shows a thread with rich text on needs use PhoenixKitComments.Embed to forward the editor’s messages. The module README covers both.