Skip to content

Refresh the news page layout, add a lead image setting - #3

Merged
bonelifer merged 5 commits into
mainfrom
ui-refresh
Oct 19, 2026
Merged

bonelifer merged 5 commits into
mainfrom
ui-refresh

Conversation

@bonelifer

@bonelifer bonelifer commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Refreshes the news page's layout. It's the same on phpBB 3.3 and 4.0, using the extension's own template and stylesheet and nothing 4.0-only.

News items

  • Each news item is a card: the title, a byline (author, date and the forum it's in, linked), the text, and one footer line.
  • The footer replaces the old "Read full news", "Link to topic" and "Comments" lines and the separate arrow:
    • "Read more", only when the text was actually shortened;
    • the comment count in words ("No comments yet", "1 comment", "4 comments");
    • "View topic";
    • the back-to-top arrow.
  • With "Show user information" on, the avatar sits in the byline, and the rank, post count and profile fields go in a line under it, instead of the side column. The join date and the contact menu are no longer shown there.
  • With "Show post-related buttons" on, the buttons sit next to the title.

Filters

  • The forum and month filters are plain dropdown buttons ("All forums", "All months") that show the chosen value. The lists show a count per entry and, per forum, a "New" link for posting.
  • When a filter is active, a "Showing" line under the bar lists it as a chip that removes it, plus "Clear filters" when both are set.

Lead image (new setting, off by default)

  • A new migration adds news_lead_image, with an ACP checkbox: "Show the first image above the news".
  • When it's on, the news list shows each post's first image above the text, and takes it out of the text, along with line breaks that followed it. The image can be a BBCode image or an image attachment, inline or in the attachment box.
  • The search is in the new lead_image.php, with its own tests (smilies, linked images, attachment blocks, entities). A single news item still shows the whole post.

Single news item

  • The page heading is the news title; the card no longer repeats it, and the filters are hidden.
  • An "All news" link above the heading goes back to the list. The footer adds "Reply" for readers allowed to reply in that topic.

Removed

  • The template-event file that drew the old notice block, and the stylesheet that hid the profile column.
  • Unused CSS, and the old news icon image.

New and changed language strings are in English and German. README's feature list and the screenshot gallery are updated; the screenshots come from phpbbmodders/phpbb-release-tools#34.

Testing

Claude ran:

  • The unit tests on phpBB 3.3.x and master: 165 pass on both, 7 of them new for the lead image.
  • phpBB 3.3's and 4.0's code sniffers, EPV for both through the strict filter, and template_a11y.py: no findings.
  • On seed-forum boards with phpBB 3.3.19 and 4.0.0-a3-dev:
    • the news page with every setting on and off;
    • shortened news, with "Read more" only on the cut item;
    • each filter alone and both together, with the chip and "Clear filters" links;
    • the lead image from a BBCode image, an attachment-box image (3.3) and an inline attachment (4.0);
    • the single news page as a guest (no "Reply") and as the admin;
    • the ACP checkbox saving on and off;
    • disable, delete data and enable with the new migration (3.3).
  • Full-page and phone-width screenshots of each case on both boards.

Not covered: the new layout with styles other than prosilver.


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

🤖 Generated with Claude Code

bonelifer and others added 5 commits October 19, 2026 14:00
Each news item shows its title, a byline (author, date and forum), the
text, and one footer line: "Read more" only when the text was shortened,
the comment count in words, "View topic" and the back-to-top arrow.
With "Show user information" on, the avatar, rank, post count and
profile fields sit under the byline instead of in a side column; the
post buttons sit next to the title. The same template and stylesheet
serve phpBB 3.3 and 4.0.

The old notice block (an event listener on the extension's own post
template) and the stylesheet that hid the profile column are removed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The forum and month filters are plain dropdown buttons ("All forums",
"All months") that show the chosen value, with a muted count and a
"New" link per forum in the list. Under the bar, "Showing" lists each
active filter as a chip that removes it, plus "Clear filters" when both
are set. Unused CSS and the old news icon image are removed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A new migration adds news_lead_image, off by default, with a checkbox in
the ACP. When it is on, the news list shows the post's first image (a
BBCode image or an image attachment, inline or in the attachment box)
above the text and takes it out of the text, with any line breaks that
followed it. A single news item still shows the whole post. The image
search lives in lead_image.php and has its own tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The single news page no longer repeats the title in the card or shows
the filters. An "All news" link above the heading goes back to the
list, and the footer offers "Reply" to readers who may reply.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The gallery now shows the news page with the lead image, filtered by
forum, with poster information and buttons, shortened without the lead
image, without filters, a single news item, the ACP and the phone
layout. The README's feature list describes the new layout.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@bonelifer
bonelifer merged commit 95051aa into main Oct 19, 2026
57 checks passed
@bonelifer
bonelifer deleted the ui-refresh branch October 19, 2026 19:30
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