Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@

## 1.0.0 Alpha (unreleased)

While the module is in development the status carries the phase: 1.0.0 Alpha 5 is phase 5.

- Phase 0: module skeleton for ImpressCMS 2.0 in IPF mode, install and update routines, English and Dutch language files, CI on PHP 8.2 to 8.5.
- Phase 1: data model. 13 IPF objects with handlers (category, forum, moderator, topic, post, attachment, report, suspension, readmark, online, digest, archive, permtemplate), group permissions on categories and forums, counters and cascading deletes through handler events, indexes in `imforum_db_upgrade_1()`, labels in English and Dutch, integration tests against MySQL 5.5, MySQL 5.7 (MyISAM) and MariaDB 10.11.
- Phase 2: administration. Admin screens on `icms_ipf_view_Table` and `getSecureForm()` for categories and forums (moderators and group permissions on the forum form), a permission template that new forums start with and that can be applied to existing forums, reports, suspensions, digests, the archive, prune (with a preview and a confirmation) and a full recount. Every operation that writes runs only on POST with a valid security token, deletion confirmations included. Works around three core issues: a missing admin menu on the first request after the menu cache is rebuilt, `count(null)` when a permission select is left empty, and the date picker failing when a form is built before `icms_cp_header()`.
- Phase 3: reading. `index.php`, `forum.php`, `topic.php` (flat and threaded), `viewall.php` (latest, unread, featured), `archive.php`, `rss.php`, search, who is online, signatures, ranks and the poster bar, read marks per topic and per forum ("mark all as read" is a POST with a token), karma and required-reply locks that hide the text until unlocked, three blocks (recent, hot, top posters) and six preferences. Permissions are checked in one `PermissionService`: category access, forum access and view, switched-off forums for moderators and webmasters only. Our own pager replaces the core's, which prints `PHP_SELF` unescaped. Integration tests cover the permission checks, read marks, thread order, karma, online tracking, the archive and search.
- Phase 4: writing. `post.php` starts topics, replies, edits and deletes through one `PostService` that holds all rules: the permissions forum_post, forum_reply, forum_edit, forum_delete, forum_attach and forum_noapprove, suspensions, a flood limit, a time limit for members, locked topics, what the forum allows (HTML, signature, topic prefix), approval and the edit history. Members delete only their own last post of a topic. The form is built on the IPF secure form, with a preview, a disclaimer and a captcha for guests. Attachments go through `Uploader` (extension list per forum, a list of extensions that is never accepted, size limit, a random file name without extension in a folder the web server cannot reach) and are served by `attachment.php`, which checks the read permission and the karma lock and always sends a download. Subscriptions use the core notification system for topics, forums and all forums; the mail is only sent to members who may read the forum and never holds the text of a post. Post text is now stored as typed (`XOBJ_DTYPE_OTHER`): the IPF textarea type ran every text through HTMLPurifier when saving, which turned BBCode into HTML for good and made the HTML, smiley and line break switches of a post meaningless. The text is made safe when it is shown. The welcome post is left for a later release: the core has no event for a new registration to hook it on.
- Phase 5: moderation. `moderate.php` and one `ModerationService` that holds all rules: lock and unlock, pin, feature, move (the moderator must moderate both forums), merge (counters, last post, views and read marks follow), split from a post onward (replies are re-attached to the new first post), delete a topic, approve waiting posts (subscribers are told only then), a queue of waiting posts and a list of open reports per forum, and suspensions with a number of days (reading stays possible; moderators and webmasters cannot be suspended). `report.php` lets members report a post, one open report per member and post. Every action is a confirmation form followed by a POST with a security token. Restoring pruned topics from the archive stays an admin task for now. Integration tests cover each action, the counters after merge and split, and a suspended member who can read but not write.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Community forum module for ImpressCMS 2.0, built on the ImpressCMS Persistable Framework (IPF). imforum is the successor of iForum: same features, new code, and an importer that takes over the data of a running iForum installation.

Status: phase 4 (writing). Members start topics, reply (with a quick reply under the topic), quote, edit and delete their own posts, attach files and follow topics and forums by notification; guests can post where the group permissions allow it, behind a captcha. Posts wait for a moderator when the group lacks forum_noapprove. Moderation from the front end (move, merge, split, lock, approve, reports) comes in phase 5. Categories, forums, moderators, permissions, reports, suspensions, digests, the archive and pruning are managed from the admin area.
Status: phase 5 (moderation). Members start topics, reply (with a quick reply under the topic), quote, edit and delete their own posts, attach files and follow topics and forums by notification; guests can post where the group permissions allow it, behind a captcha. Posts wait for a moderator when the group lacks forum_noapprove. Moderators of a forum lock, pin and feature topics, move, merge and split them, delete topics, approve waiting posts, handle reports from members and suspend members, all from the front end through `moderate.php`; members report posts through `report.php`. Categories, forums, moderators, permissions, reports, suspensions, digests, the archive and pruning are managed from the admin area.

## Requirements

Expand Down
2 changes: 2 additions & 0 deletions src/assets/css/imforum.css
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,5 @@
.imforum .imforum-errors p { margin: 0.25em 0; }
.imforum .imforum-disclaimer { margin: 0.75em 0; padding: 0.5em 0.75em; border-left: 3px solid currentColor; opacity: 0.85; }
.imforum .imforum-confirm { margin: 1em 0; }
.imforum .imforum-modtools { margin: 0.5em 0; }
.imforum .imforum-modtools a { margin-right: 0.75em; }
Loading
Loading