Skip to content

Rename to phpbbmodders/newspage, finish phpBB 3.3 and add 4.0 support - #2

Merged
bonelifer merged 7 commits into
mainfrom
phpbb-3.3
Oct 19, 2026
Merged

bonelifer merged 7 commits into
mainfrom
phpbb-3.3

Conversation

@bonelifer

@bonelifer bonelifer commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Finishes the phpBB 3.3 port of NV Newspage, moves it to the phpbbmodders/newspage name and adds phpBB 4.0 support. It builds on the 10/07–10/08/2026 work-in-progress commit already on this branch, which moved the settings to the ACP and replaced the old message-trimming library.

Name

  • The package, namespace, folder (ext/phpbbmodders/newspage), services, routes and language/template paths move to phpbbmodders/newspage.
  • The PHP events (nickvergessen.newspage.newspage, nickvergessen.newspage.single_news) and the template events (nickvergessen_newspage_*) keep their names, so listeners and styles written for them keep working.
  • ext.php refuses to enable while nickvergessen/newspage is enabled. When enabled, it moves the old install's migration history, ACP modules and extension record to the new name, using the same code as contactadmin and the wiki.

phpBB 3.3.19 to 4.0, PHP 7.4 or later

  • composer.json allows >=3.3.19,<4.1.0@dev. ext.php checks phpBB 3.3.19, PHP 7.4 and the DOM extension, which the message trimmer needs.
  • Avatars: phpBB 4.0 has no phpbb_get_user_avatar(). The news page gets 4.0's avatar helper as an optional service and builds the same <img> markup, so one template works on both.
  • phpBB 4.0 removed the Jabber field. The contact list only adds Jabber where the column exists, which fixes the PHP warnings on 4.0.
  • Icons: each icon also gets its Font Awesome 6 class (fas/far), so they draw on 4.0. The post icon before the author replaces the bare "Post" text the old image placeholder gave. The "Top" text link after each news item is now the back-to-top arrow, as in phpBB's viewtopic.
  • Who is online: phpBB 4.0 records news pages as index.php/news/..., not app.php/news/.... Both are recognised now.
  • The ACP module logs through the log service. add_log() no longer exists in 4.0.
  • public static instead of static public, which 4.0's code sniffer rejects.

Settings and tests

  • The settings service only saves the ACP form now. The front-end settings page and its route were already removed.
  • The tests run under phpBB's own test bootstrap, as the test framework runs them, on 3.3.x and master. New tests cover saving the settings, the message trimmer (from the WIP's standalone checks) and 4.0's Who is online pages. They call the listeners directly, since Symfony's dispatch() takes its arguments in a different order on 4.0.

CI and repository

  • tests.yml: the test framework on phpBB 3.3.x (PHP 7.4–8.2) and master (PHP 8.2–8.4), plus the strict EPV workflow for both. lint.yml: PHP 7.4 and 8.4 syntax and composer validate.
  • Removed: Travis, Phing (build.xml), composer.phar, composer.lock, the WIP's own workflows and its board scripts, the repository's own SECURITY.md and issue templates (the organization's apply), and the tests' own bootstrap.
  • .github/epv-allowed.txt keeps ext.php's unserialize and three htmlspecialchars calls that must not escape stored text twice.
  • File headers and composer.json follow the organization's format. There's no version-check block yet: no phpBB.com listing could be confirmed, which docs/TODO.md notes.
  • README rewritten (features, screenshots, requirements, installation, upgrading). Screenshots are in docs/images/screenshots/, with a gallery page that also shows the news page with poster information and buttons on, shortened, and without filters; docs/images/, tests and CI files are left out of release ZIPs.

Testing

Claude ran:

  • The unit tests on phpBB 3.3.x and master: 158 tests pass on both.

  • phpBB 3.3's and 4.0's code sniffers: no findings. EPV (for 3.3 and 4.0) through the strict workflow's filter: no findings outside the allowlist.

  • seed-forum boards on phpBB 3.3.19 and 4.0.0-a3-dev, each:

    • fresh install;
    • ACP settings saved, and the change logged;
    • the news page, pages 2 and 3, the forum and month filters, single news items, an attachment and an avatar;
    • Who is online;
    • disable/enable, which keeps the settings, and delete data/enable, which installs clean.
  • The upgrade on both boards: the original nickvergessen/newspage 1.1.1 from main enabled, settings changed, then:

    • the new package refuses to enable while the old one is on;
    • once the old one is disabled, enabling the new package moves its 14 migrations, runs only the new ACP migration, keeps the settings and removes the old record.

    The original 1.1.1 news page itself returns HTTP 500 on phpBB 3.3, as expected for phpBB 3.1 code.

Not covered: the screenshot tool's board is phpBB 3.3 only, so the screenshots are from 3.3. The German translation has no ACP or install strings yet; they fall back to English (in docs/TODO.md).

The screenshots come from phpbbmodders/phpbb-release-tools#32, which adds Newspage to screenshots.py.


Investigated and written by Claude on behalf of William Jacoby (bonelifer).

🤖 Generated with Claude Code

bonelifer and others added 6 commits October 19, 2026 09:53
Work in progress, not finished or tested: ACP settings module with a
migration keeping existing settings, bundled message trimmer instead of
nickvergessen/phpbb-tool-trimmessage, version 1.4.0-dev for phpBB
3.3.19+, updated tests and a phpBB 3.3 compatibility workflow.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Package, namespace, services, routes and language/template paths move
  to phpbbmodders/newspage; the PHP events keep their old names. ext.php
  refuses to enable while nickvergessen/newspage is on and moves its
  migrations, modules and record when enabled.
- phpBB 3.3.19 to 4.0, PHP 7.4+: avatars through 4.0's avatar helper,
  no Jabber column, Font Awesome 6 icon classes, 4.0's index.php routes
  in Who is online, the log service instead of add_log().
- Settings service reduced to what the ACP uses; tests run under phpBB's
  test bootstrap, with new settings, trimmer and 4.0 Who is online tests.
- CI: test framework on 3.3.x and master, strict EPV, PHP 7.4/8.4 lint;
  Travis, Phing, composer.phar/lock and the WIP workflow removed.
- Org file headers and composer.json.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- README rewritten for the org layout: features, screenshots,
  requirements, installation and upgrading from nickvergessen/newspage.
- Screenshots of the news page, a news item, the ACP settings and the
  phone layout, with a gallery page; docs/images is left out of release
  ZIPs, as are tests and CI files.
- The template events keep their nickvergessen_newspage_* names, as the
  PHP events do, so styles and listeners written for them keep working.
- docs/TODO.md lists what is left; the repository's own SECURITY.md and
  issue templates are removed so the organization's apply.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
phpBB's CI configuration names a functional test folder, and its
PostgreSQL, MySQL, MSSQL and Windows jobs stop when it is missing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@bonelifer
bonelifer merged commit 79862d5 into main Oct 19, 2026
57 checks passed
@bonelifer
bonelifer deleted the phpbb-3.3 branch October 19, 2026 18:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant