pubvana/comments

Nested, moderated comments for Pubvana with captcha support

Maintainers

Package info

github.com/Pubvana-CMS/comments

Type:flightphp-plugin

pkg:composer/pubvana/comments

Transparency log

Statistics

Installs: 3

Dependents: 1

Suggesters: 0

Stars: 0

Open Issues: 0

0.2.2 2026-05-06 00:23 UTC

This package is auto-updated.

Last update: 2026-07-06 00:44:44 UTC


README

Stable? Not Quite Yet License PHP Version Monthly Downloads Total Downloads GitHub Issues Contributors Latest Release Contributions Welcome

pubvana/comments

I noticed folks downloading some of these packages. I'm super grateful, Thank You! I would like to let folks know until this notice disappears I'm doing a lot of breaking changes without worrying about them. Once versions are up around 0.5.x things should settle down.

Nested, moderated comments for Pubvana with hCaptcha and reCAPTCHA support.

Features

  • Polymorphic comments on posts and pages
  • Nested/threaded replies (configurable max depth, default 3)
  • Guest comments (admin-configurable)
  • Moderation workflow: auto-approve or pending queue (admin-configurable)
  • Captcha support: hCaptcha, reCAPTCHA v2, or none
  • HTMLPurifier sanitization on comment body
  • Comment service: $app->comments()

Configuration

In app/config/config.php:

'plugins' => [
    'pubvana/comments' => [
        'enabled'  => true,
        'priority' => 55,
    ],
],

This package uses Flight School's return-array config format. src/Config/Config.php returns the package defaults as an array, Flight School stores that array under pubvana.comments on $app, and the current public route prefix is defined there with 'routePrepend' => 'comments'.

Service API

$comments = $app->comments();

$comments->findForContent('post', $postId);        // Threaded tree for display
$comments->create($data);                           // Create comment (validates depth, captcha, purifies)
$comments->approve($id);                            // Set status to approved
$comments->reject($id);                             // Set status to rejected
$comments->delete($id);                             // Hard delete
$comments->list($page, $perPage, $status);          // Admin listing
$comments->countByStatus($status);                  // Count by status
$comments->verifyCaptcha($token, $remoteIp);        // Manual captcha check

Admin

Moderation panel at /admin/comments with status filters, approve/reject/delete actions, and comment detail view.

Permissions

  • comments.moderate - Approve, reject, and delete comments

Requirements

  • PHP ^8.1
  • enlivenapp/flight-school ^0.2
  • enlivenapp/flight-settings
  • enlivenapp/flight-shield
  • enlivenapp/migrations
  • ezyang/htmlpurifier
  • flightphp/active-record ^0.7

License

MIT