From ffad7fccb03495020ce8da64911e325176bd0525 Mon Sep 17 00:00:00 2001 From: William Jacoby Date: Mon, 19 Oct 2026 14:00:21 -0500 Subject: [PATCH 1/5] Lay out news items as cards with a byline and one footer line 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 --- language/de/newspage.php | 8 + language/en/newspage.php | 8 + newspage.php | 13 +- .../event/overall_header_head_append.html | 3 - ...topic_body_postrow_post_notices_after.html | 12 - .../prosilver/template/viewtopic_postrow.html | 268 +++++++----------- .../prosilver/theme/newspage-no-userinfo.css | 21 -- styles/prosilver/theme/newspage.css | 107 +++++++ 8 files changed, 237 insertions(+), 203 deletions(-) delete mode 100644 styles/prosilver/template/event/viewtopic_body_postrow_post_notices_after.html delete mode 100644 styles/prosilver/theme/newspage-no-userinfo.css diff --git a/language/de/newspage.php b/language/de/newspage.php index 369f9c6..303ccd4 100644 --- a/language/de/newspage.php +++ b/language/de/newspage.php @@ -33,6 +33,14 @@ 'NEWS_CHAR_LIMIT' => 'News-Einträge kürzen', 'NEWS_CHAR_LIMIT_EXPLAIN' => 'Textlänge, „0“ um Kürzen zu unterbinden', 'NEWS_COMMENTS' => 'Kommentare', + 'NEWS_COMMENTS_COUNT' => array( + 0 => 'Noch keine Kommentare', + 1 => '%d Kommentar', + 2 => '%d Kommentare', + ), + 'NEWS_IN_FORUM' => 'in %s', + 'NEWS_READ_MORE' => 'Weiterlesen', + 'NEWS_VIEW_TOPIC' => 'Thema ansehen', 'NEWS_FILTER_ARCHIVE' => 'Datum filtern', 'NEWS_FILTER_BY_ARCHIVE' => 'Filter News-Einträge nach Jahr und Monat', 'NEWS_FILTER_BY_CATEGORY' => 'Filter News-Einträge nach Forum', diff --git a/language/en/newspage.php b/language/en/newspage.php index e5cda0d..f97f48d 100644 --- a/language/en/newspage.php +++ b/language/en/newspage.php @@ -33,6 +33,14 @@ 'NEWS_CHAR_LIMIT' => 'Shorten news text', 'NEWS_CHAR_LIMIT_EXPLAIN' => 'Text length, “0” to disable shortening', 'NEWS_COMMENTS' => 'Comments', + 'NEWS_COMMENTS_COUNT' => array( + 0 => 'No comments yet', + 1 => '%d comment', + 2 => '%d comments', + ), + 'NEWS_IN_FORUM' => 'in %s', + 'NEWS_READ_MORE' => 'Read more', + 'NEWS_VIEW_TOPIC' => 'View topic', 'NEWS_FILTER_ARCHIVE' => 'Filter date', 'NEWS_FILTER_BY_ARCHIVE' => 'Filter news by date', 'NEWS_FILTER_BY_CATEGORY' => 'Filter news by forum', diff --git a/newspage.php b/newspage.php index a14e36e..1d80bc4 100644 --- a/newspage.php +++ b/newspage.php @@ -309,9 +309,13 @@ public function base() } $sql_array = array( - 'SELECT' => 't.*, p.*, u.*', + 'SELECT' => 't.*, p.*, u.*, f.forum_name', 'FROM' => array(TOPICS_TABLE => 't'), 'LEFT_JOIN' => array( + array( + 'FROM' => array(FORUMS_TABLE => 'f'), + 'ON' => 'f.forum_id = t.forum_id', + ), array( 'FROM' => array(POSTS_TABLE => 'p'), 'ON' => 'p.post_id = t.topic_first_post_id', @@ -347,10 +351,13 @@ public function base() $parse_flags = ($row['enable_bbcode'] ? OPTION_FLAG_BBCODE : 0) | ($row['enable_smilies'] ? OPTION_FLAG_SMILIES : 0) | ($row['enable_magic_url'] ? OPTION_FLAG_LINKS : 0); $message = generate_text_for_display($row['post_text'], $row['bbcode_uid'], $row['bbcode_bitfield'], $parse_flags, true); + $shortened = false; if (!$this->news && (int) $this->config['news_char_limit'] > 0) { $trimmer = new message_trimmer(); + $full_message = $message; $message = $trimmer->trim($message, (int) $this->config['news_char_limit']); + $shortened = $message !== $full_message; } if (!$this->auth->acl_get('f_download', $forum_id)) @@ -482,6 +489,10 @@ public function base() 'EDIT_REASON' => htmlspecialchars($row['post_edit_reason'], ENT_QUOTES, 'UTF-8', false), 'SIGNATURE' => ($row['enable_sig']) ? $row['user_sig'] : '', 'NEWS_COMMENTS' => $this->content_visibility->get_count('topic_posts', $row, $forum_id) - 1, + 'NEWS_COMMENTS_TEXT' => $this->user->lang('NEWS_COMMENTS_COUNT', $this->content_visibility->get_count('topic_posts', $row, $forum_id) - 1), + 'S_NEWS_SHORTENED' => $shortened, + 'NEWS_FORUM_NAME' => isset($row['forum_name']) ? $row['forum_name'] : '', + 'U_NEWS_FORUM' => append_sid("{$this->root_path}viewforum.{$this->php_ext}", 'f=' . $forum_id), 'POSTER_AVATAR' => ($this->user->optionget('viewavatars')) ? $this->get_poster_avatar($row) : '', 'U_POST_AUTHOR' => get_username_string('profile', $poster_id, $row['username'], $row['user_colour'], $row['post_username']), diff --git a/styles/prosilver/template/event/overall_header_head_append.html b/styles/prosilver/template/event/overall_header_head_append.html index 06a8fe3..c0fdd0f 100644 --- a/styles/prosilver/template/event/overall_header_head_append.html +++ b/styles/prosilver/template/event/overall_header_head_append.html @@ -1,4 +1 @@ - - - diff --git a/styles/prosilver/template/event/viewtopic_body_postrow_post_notices_after.html b/styles/prosilver/template/event/viewtopic_body_postrow_post_notices_after.html deleted file mode 100644 index 65d4637..0000000 --- a/styles/prosilver/template/event/viewtopic_body_postrow_post_notices_after.html +++ /dev/null @@ -1,12 +0,0 @@ - - - diff --git a/styles/prosilver/template/viewtopic_postrow.html b/styles/prosilver/template/viewtopic_postrow.html index 1786d4b..4c38ef1 100644 --- a/styles/prosilver/template/viewtopic_postrow.html +++ b/styles/prosilver/template/viewtopic_postrow.html @@ -1,91 +1,7 @@ - +
{postrow.MESSAGE}
+ + +
+
+ {L_ATTACHMENTS} +
+ +
{postrow.attachment.DISPLAY_ATTACHMENT}
+ +
+ -
+ + +

{L_NEWS_POLL}{L_COLON} {postrow.POLL_QUESTION} » {L_NEWS_POLL_GOTO}

+ +
{L_DOWNLOAD_NOTICE}
+ +
+ {postrow.DELETED_MESSAGE} +
{L_REASON}{L_COLON} {postrow.DELETE_REASON} +
+ +
+ {postrow.EDITED_MESSAGE} +
{L_REASON}{L_COLON} {postrow.EDIT_REASON} +
+ +
{postrow.BUMPED_MESSAGE}
+ +
{postrow.SIGNATURE}
+ + + + diff --git a/styles/prosilver/theme/newspage-no-userinfo.css b/styles/prosilver/theme/newspage-no-userinfo.css deleted file mode 100644 index cac39cc..0000000 --- a/styles/prosilver/theme/newspage-no-userinfo.css +++ /dev/null @@ -1,21 +0,0 @@ -dl.postprofile { - display: none; -} - -div.postbody { - width: 100%; -} - -@media only screen and (max-width: 700px), only screen and (max-device-width: 700px) { - dl.postprofile { - display: block; - } - - .post .postprofile { - min-height: 0; - } - - div.postbody { - width: 74%; - } -} diff --git a/styles/prosilver/theme/newspage.css b/styles/prosilver/theme/newspage.css index 42e47a5..35f7e27 100644 --- a/styles/prosilver/theme/newspage.css +++ b/styles/prosilver/theme/newspage.css @@ -24,3 +24,110 @@ a.arrow-right-on-left:hover { #newspage_settings .dropdown-contents ul li { padding: 5px; } + +/* News items: title, byline, text, then one footer line */ +.newspage-item { + background-color: #ecf3f7; + border-radius: 7px; + margin-bottom: 10px; + padding: 10px 14px; +} + +.newspage-item-header { + margin-bottom: 8px; +} + +.newspage-item .post-buttons { + float: right; + margin-left: 10px; +} + +.newspage-item-title { + border-bottom: 0; + font-family: "Trebuchet MS", Helvetica, Arial, sans-serif; + font-size: 1.7em; + margin: 0 0 3px; + padding: 0; + text-transform: none; +} + +.newspage-byline, +.newspage-poster { + color: #4c5d77; + font-size: 1.1em; + line-height: 1.6; + margin: 0; +} + +.newspage-poster { + font-size: 1em; +} + +.newspage-poster span + span::before { + content: "\00B7"; + margin: 0 0.4em; +} + +.newspage-separator { + margin: 0 0.3em; +} + +.newspage-avatar img { + border-radius: 50%; + height: 24px; + margin-right: 4px; + vertical-align: middle; + width: 24px; +} + +.newspage-item .content { + font-size: 1.3em; + line-height: 1.5; + min-height: 0; + padding-bottom: 0; +} + +.newspage-item .signature { + border-top-color: #ccc; +} + +.newspage-item-footer { + align-items: center; + border-top: 1px solid #cad9e5; + clear: both; + display: flex; + flex-wrap: wrap; + font-size: 1.1em; + gap: 6px 18px; + margin-top: 10px; + padding-top: 8px; +} + +.newspage-item-footer .icon { + font-size: 1em; +} + +.newspage-comments .icon { + margin-right: 3px; +} + +.newspage-read-more { + font-weight: bold; +} + +.newspage-comments { + color: #4c5d77; +} + +.newspage-item-footer .newspage-top { + color: #8f8f8f; + font-size: 1.3em; + margin-left: auto; +} + +@media only screen and (max-width: 700px), only screen and (max-device-width: 700px) { + .newspage-item .post-buttons { + float: none; + margin: 0 0 6px; + } +} From e1ee8e3e20a7afc567463db1fe29ce3a249b7f0b Mon Sep 17 00:00:00 2001 From: William Jacoby Date: Mon, 19 Oct 2026 14:07:45 -0500 Subject: [PATCH 2/5] Show the news filters as one bar with the active filters 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 --- language/de/newspage.php | 8 +- language/en/newspage.php | 8 +- .../template/newspage_archives_dropdown.html | 17 ++- styles/prosilver/template/newspage_body.html | 16 ++- .../newspage_categories_dropdown.html | 22 ++-- styles/prosilver/theme/images/icon_news.gif | Bin 1009 -> 0 bytes styles/prosilver/theme/newspage.css | 106 +++++++++++++----- 7 files changed, 120 insertions(+), 57 deletions(-) delete mode 100644 styles/prosilver/theme/images/icon_news.gif diff --git a/language/de/newspage.php b/language/de/newspage.php index 303ccd4..221c592 100644 --- a/language/de/newspage.php +++ b/language/de/newspage.php @@ -28,7 +28,7 @@ 'NEWS_ARCHIVE_OF' => 'Archiv vom %s', 'NEWS_ATTACH_SHOW' => 'Anhänge anzeigen', 'NEWS_ATTACH_SHOW_EXPLAIN' => 'Anhänge die in Beiträge eingefügt wurden, werden immer angezeigt.', - 'NEWS_CAT' => 'Kategorien', + 'NEWS_CAT' => 'Foren', 'NEWS_CAT_SHOW' => 'Erlaube die Foren einzuschränken', 'NEWS_CHAR_LIMIT' => 'News-Einträge kürzen', 'NEWS_CHAR_LIMIT_EXPLAIN' => 'Textlänge, „0“ um Kürzen zu unterbinden', @@ -41,11 +41,13 @@ 'NEWS_IN_FORUM' => 'in %s', 'NEWS_READ_MORE' => 'Weiterlesen', 'NEWS_VIEW_TOPIC' => 'Thema ansehen', - 'NEWS_FILTER_ARCHIVE' => 'Datum filtern', + 'NEWS_FILTER_ARCHIVE' => 'Alle Monate', 'NEWS_FILTER_BY_ARCHIVE' => 'Filter News-Einträge nach Jahr und Monat', 'NEWS_FILTER_BY_CATEGORY' => 'Filter News-Einträge nach Forum', - 'NEWS_FILTER_CATEGORY' => 'Kategorie filtern', + 'NEWS_FILTER_CATEGORY' => 'Alle Foren', 'NEWS_FILTER_REMOVE' => 'Filter entfernen', + 'NEWS_FILTER_CLEAR' => 'Filter zurücksetzen', + 'NEWS_FILTER_SHOWING' => 'Angezeigt', 'NEWS_FORUMS' => 'News-Foren auswählen', 'NEWS_GO_TO_TOPIC' => 'Link zum Thema', 'NEWS_NUMBER' => 'News pro Seite', diff --git a/language/en/newspage.php b/language/en/newspage.php index f97f48d..f7bb012 100644 --- a/language/en/newspage.php +++ b/language/en/newspage.php @@ -28,7 +28,7 @@ 'NEWS_ARCHIVE_OF' => 'Archive %s', 'NEWS_ATTACH_SHOW' => 'Show attachments', 'NEWS_ATTACH_SHOW_EXPLAIN' => 'Inline attachments will always be displayed.', - 'NEWS_CAT' => 'Categories', + 'NEWS_CAT' => 'Forums', 'NEWS_CAT_SHOW' => 'Allow to filter by forums', 'NEWS_CHAR_LIMIT' => 'Shorten news text', 'NEWS_CHAR_LIMIT_EXPLAIN' => 'Text length, “0” to disable shortening', @@ -41,11 +41,13 @@ 'NEWS_IN_FORUM' => 'in %s', 'NEWS_READ_MORE' => 'Read more', 'NEWS_VIEW_TOPIC' => 'View topic', - 'NEWS_FILTER_ARCHIVE' => 'Filter date', + 'NEWS_FILTER_ARCHIVE' => 'All months', 'NEWS_FILTER_BY_ARCHIVE' => 'Filter news by date', 'NEWS_FILTER_BY_CATEGORY' => 'Filter news by forum', - 'NEWS_FILTER_CATEGORY' => 'Filter forum', + 'NEWS_FILTER_CATEGORY' => 'All forums', 'NEWS_FILTER_REMOVE' => 'Remove filter', + 'NEWS_FILTER_CLEAR' => 'Clear filters', + 'NEWS_FILTER_SHOWING' => 'Showing', 'NEWS_FORUMS' => 'Select News-Forums', 'NEWS_GO_TO_TOPIC' => 'Link to topic', 'NEWS_NUMBER' => 'News per page', diff --git a/styles/prosilver/template/newspage_archives_dropdown.html b/styles/prosilver/template/newspage_archives_dropdown.html index 0b91aac..7286130 100644 --- a/styles/prosilver/template/newspage_archives_dropdown.html +++ b/styles/prosilver/template/newspage_archives_dropdown.html @@ -1,11 +1,8 @@ -