From b353439f4725ae6888f58ad28e00ab7b9a31538a Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 12 Jul 2026 11:25:28 +0800 Subject: [PATCH] =?UTF-8?q?feat(forum):=20=E8=AE=BA=E5=9D=9B=E9=A6=96?= =?UTF-8?q?=E9=A1=B5=E5=A3=B3=E5=B1=82=E6=94=B6=E6=9D=9F=20=E9=99=8D=20sta?= =?UTF-8?q?ts/pending/=E6=B2=BB=E7=90=86=E6=84=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 公开主 tabs 剔除 pending,待审核仅轻入口;发帖 CTA 移侧栏,去掉 header 看板 stats 与治理主按钮,回归主站社区入口语义。 Co-Authored-By: Claude Fable 5 --- assets/css/frontend/forum.css | 28 +++++++ templates/pages/page-forums.php | 128 ++++++++++++++++---------------- 2 files changed, 92 insertions(+), 64 deletions(-) diff --git a/assets/css/frontend/forum.css b/assets/css/frontend/forum.css index 7f126d62..39cdf2f1 100644 --- a/assets/css/frontend/forum.css +++ b/assets/css/frontend/forum.css @@ -2,3 +2,31 @@ @import url("forum/topic.css"); @import url("forum/compose.css"); @import url("forum/extras.css"); + + +/* Forum home shell: sidebar compose CTA */ +.aksrt-forum-sidebar-card--compose { + padding: 12px; +} +.aksrt-forum-sidebar-card--compose .aksrt-forum-quick-post__input { + display: flex; + align-items: center; + gap: 10px; + width: 100%; + padding: 10px 12px; + border-radius: 10px; + background: var(--body-bg-color, #f5f6f7); + color: var(--muted-color, #777); + text-decoration: none; +} +.aksrt-forum-sidebar-card--compose .aksrt-forum-quick-post__input:hover { + color: var(--focus-color, #f04494); +} +.aksrt-forum-sidebar-card--compose .aksrt-forum-header__action { + display: inline-flex; + width: 100%; + justify-content: center; +} +.aksrt-forum-header__stats { + display: none; /* stats demoted on home shell; counts remain in eyebrow meta */ +} diff --git a/templates/pages/page-forums.php b/templates/pages/page-forums.php index e5014eae..0ea6fecc 100644 --- a/templates/pages/page-forums.php +++ b/templates/pages/page-forums.php @@ -3,7 +3,7 @@ * Template Name: AKSRT - Forums * Template Post Type: page * - * §7.10 — Tab engine + quick post + plate grid + follow/synthesis/pending streams. + * §7.10 / stream-h §3 — 主站社区首页:公开 tabs + 侧栏发帖/热门,pending 不进公开主内容。 * * @package AKSRT */ @@ -57,6 +57,32 @@ if ($active_tab_type === '' && isset($home_tabs[$active_index])) { if ($active_tab_type === '') { $active_tab_type = 'synthesis'; } + +// 前台公开主 tabs 不允许 pending;未登录时 follow 回落到综合 +$can_manage = !empty($permissions['can_manage']); +if ($active_tab_type === 'pending') { + $active_tab_type = 'synthesis'; +} +if ($active_tab_type === 'follow' && $current_user_id <= 0) { + $active_tab_type = 'synthesis'; +} + +// 配置里的 pending 类型从公开 tab 列表剔除(治理入口单独渲染) +$public_home_tabs = []; +foreach ((array) $home_tabs as $tab_row) { + $tt = sanitize_key((string) ($tab_row['type'] ?? '')); + if ($tt === '' || $tt === 'pending') { + continue; + } + $public_home_tabs[] = $tab_row; +} +if (empty($public_home_tabs)) { + $public_home_tabs = [ + ['type' => 'synthesis', 'label' => __('综合', 'aksrt')], + ['type' => 'follow', 'label' => __('关注', 'aksrt')], + ['type' => 'plate', 'label' => $name_plate], + ]; +} ?>
@@ -77,42 +103,16 @@ if ($active_tab_type === '') { - -
-
- - -
-
- - -
-
- - -
- 0 && !empty($permissions['can_manage'])) : ?> -
- - -
- -
@@ -128,26 +128,25 @@ if ($active_tab_type === '') {
- -
- - - - -
- - - +
- - get_pending_stream($current_user_id) : ['items' => []]; - if (!empty($pending_data['items'])) : ?> -
- render_topic_row($topic); } ?> -
- -
- -

-
- - - +