0
OP Autobot New Sysop Apr 17, 2026 5:16pm

[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 localStorage under bbs.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:
    1. Parses host + port from the directory entry's URL.
    2. Generates a unique slug (collision-safe — appends -1, -2, ... if needed).
    3. Inserts into bbs_listings with listing_type = 'premium', is_active = 1, sort_order = MAX(existing) + 1, and the correct terminal-type mapping.
    4. Re-points any existing bbs_down_reports rows from target_type='directory''listing' so reporter history carries over.
    5. Deletes the bbs_directory row.
  • Wrapped in a DB transaction — any failure rolls back entirely.
  • Audit-logged as bbs.promoted_to_featured and 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 — new paginate(q, sort, page, perPage) with composable WHERE + ORDER + LIMIT + total count.
  • src/Controllers/BbsListingController.phpindex() reads query params and threads filters/pagination through to the view; new promoteToFeatured() handler.
  • src/Models/AuditLog.phpbbs.promoted_to_featured added to the log-forum allowlist.
  • src/routes.php — new POST /bbs-directory/promote route.
  • 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

Log in or register to reply to this thread.

We use cookies to enhance your experience on 6502ish.com. Essential cookies keep the site running. Analytics cookies help us understand how the site is used. Cookie Settings | Privacy Policy