Blog & Commenting Module

Overview and Core Capabilities

The Zero CMS Blog Module provides a full-featured publishing suite built on strict multi-tenant database isolation. It enables site tenant administrators to post articles, organize rich layouts with the page builder, and toggle public comments on a per-post basis.

Key Features

  • Relational Commenting: Supports secure, paginated article comments with dynamic visual stats badge overlays.
  • Strict Moderation: All public comment submissions default to pending and require back-office approval before displaying on public views.
  • Comment Notifiers: Multi-select administration panel lets editors select multiple users (mapped by UUIDv7) to receive instant SMTP HTML email notifications.

Module Previews & Mockups

Below are mock-ups representing the module's administrative interface layout and public frontend views:

Backend Administrative Edit View

https://d6laptop.zero/admin/blog/posts/edit?id=019ec7cd
[EDIT POST] - The Aesthetics of High-Contrast Dark Mode
Allow Comments: Yes (Dropdown)
Comment Notifiers:
  [x] admin (admin@d6laptop.zero)
  [ ] editor (editor@d6laptop.zero)

Public Frontend Comments List

https://d6laptop.zero/blog/posts/high-contrast-dark-mode#comments
Sarah Connor Awaiting Moderation

This is an absolute masterpiece of clean coding! Zero dependencies is truly the future.

Relational Commenting Model (Comment.php)

Relational Commenting Model (Comment.php) php
namespace App\Modules\Blog\Models;

class Comment implements Model
{
    use IsModel;
    protected static string $tableName = 'blog_comments';
    protected static array $fillable = ['site_id', 'post_id', 'author_name', 'author_email', 'content', 'status'];

    public $post_id;
    public $author_name;
    public $author_email;
    public $content;
    public $status = 'pending';
}

Blog Module Developer Tutorials