[UPDATE] Three coordinated upgrades to /bbs-directory.
1) Community directory is now paginated, searchable, and sortable (25 per page)
- Search — a single text box that matches against name, description, software, location, and URL (LIKE, case-insensitive).
- Sort — dropdown with five options:
- Name (A–Z) — default
- Location
- Software
- Recently added
- Reported down first (BBSes with open down-reports float to the top, then sorted by name)
- Pagination — 25 entries per page with First / Prev / numeric window / Next / Last controls, and a "Page N of M · T results" footer.
- Clear filter shortcut appears whenever a search or non-default sort is active.
- Query params (
?q=,?sort=,?page=) are preserved across every pagination link and in the form's submit target.
2) Featured BBSes section is now collapsible (default open)
- Implemented as a native
<details open>with a chevron that rotates on toggle. - Collapse state persists per-browser via
localStorageunderbbs.featured.open. - Count of featured BBSes shown next to the header in muted text.
3) Super admins can promote a directory BBS to Featured in one click
- New Promote button (green, star icon) appears next to Reset / Remove on every community row for
role >= 5. - Click prompts for confirmation, then atomically:
- Parses host + port from the directory entry's URL.
- Generates a unique slug (collision-safe — appends
-1,-2, ... if needed). - Inserts into
bbs_listingswithlisting_type = 'premium',is_active = 1,sort_order = MAX(existing) + 1, and the correct terminal-type mapping. - Re-points any existing
bbs_down_reportsrows fromtarget_type='directory'→'listing'so reporter history carries over. - Deletes the
bbs_directoryrow.
- Wrapped in a DB transaction — any failure rolls back entirely.
- Audit-logged as
bbs.promoted_to_featuredand auto-posts to/forums/admin-system-log-files. - Redirects to the anchor of the new featured card so the super admin lands right on the promoted BBS.
Files changed:
src/Models/BbsEntry.php— newpaginate(q, sort, page, perPage)with composable WHERE + ORDER + LIMIT + total count.src/Controllers/BbsListingController.php—index()reads query params and threads filters/pagination through to the view; newpromoteToFeatured()handler.src/Models/AuditLog.php—bbs.promoted_to_featuredadded to the log-forum allowlist.src/routes.php— newPOST /bbs-directory/promoteroute.templates/bbs/index.php— collapsible featured block, search/sort form, pagination nav, promote button.
Verified: HTTP smoke confirmed 25 rows/page, filtered search (?q=mystic&sort=location&page=2) returns the expected 20 rows with form state preserved. Promote smoke in a rolled-back transaction confirmed the directory row is deleted, the listing row is created with correct host/port/terminal-type/slug, and collision handling works. 86/86 PHPUnit tests still green.
Automated system post — 2026-04-17 17:16:57 CDT
. __ ____ ___ ____ _ _
/ /_| ___| / _ \___ \(_)___| |__
| '_ \___ \| | | |__) | / __| '_ \
| (_) |__) | |_| / __/| \__ \ | | |
\___/____/ \___/_____|_|___/_| |_|
D2sk - Sysop