feat: 收口 1:1 剩余欠账(论坛壳/圈子/501/私信默认/资源死码)
- 论坛 board/topic/plate/tag/plate-cat 接入 content-wrap/content-layout 主站流壳 - 公共主页 plate 圈子 tab 接关注/管理版块真实数据并计数 - forum-topic 渲染封面/付费扩展位 meta(§7.3) - 后台删除消息/背景图/评论图 REST 从 501 补齐为真实实现 - 私信 private_s 缺省 true(完整 1:1,不再兼容默认关) - 清理 aksrt_get_resource_meta 不可达旧实现;挂载 AKSRT_AI 配置门控实例 - 登录 modal 启用 colorful-header;订单页粉边 focus 软化;侧栏次级入口视觉弱化 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
0941c7d23f
commit
fb68b3f8c6
16 files changed
+313
-82
No files matched your search
@@ -54,10 +54,14 @@ $name_topic = $forum_names['posts'] ?? __('主题', 'aksrt');
|
||||
$name_reply = $forum_names['comment'] ?? __('回复', 'aksrt');
|
||||
?>
|
||||
|
||||
<main id="main-content" class="site-main content-shell" tabindex="-1">
|
||||
<main id="main-content" class="site-main content-shell content-shell--stream content-shell--forum" tabindex="-1">
|
||||
<div class="content-wrap container">
|
||||
<div class="content-layout content-layout--no-sidebar">
|
||||
<div class="content-layout__primary">
|
||||
|
||||
<?php if (function_exists('aksrt_breadcrumbs')) { aksrt_breadcrumbs(); } ?>
|
||||
|
||||
<div class="aksrt-forum-board container"
|
||||
<div class="aksrt-forum-board"
|
||||
data-board-id="<?php echo esc_attr((string) $board_id); ?>"
|
||||
data-nonce="<?php echo esc_attr($nonce); ?>"
|
||||
data-active-sort="<?php echo esc_attr($active_sort); ?>">
|
||||
@@ -141,6 +145,10 @@ $name_reply = $forum_names['comment'] ?? __('回复', 'aksrt');
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
|
||||
@@ -42,10 +42,14 @@ if (is_array($cat_moderator_ids)) {
|
||||
}
|
||||
?>
|
||||
|
||||
<main id="main-content" class="site-main content-shell" tabindex="-1">
|
||||
<main id="main-content" class="site-main content-shell content-shell--stream content-shell--forum" tabindex="-1">
|
||||
<div class="content-wrap container">
|
||||
<div class="content-layout content-layout--no-sidebar">
|
||||
<div class="content-layout__primary">
|
||||
|
||||
<?php if (function_exists('aksrt_breadcrumbs')) { aksrt_breadcrumbs(); } ?>
|
||||
|
||||
<div class="aksrt-forum-plate-cat container">
|
||||
<div class="aksrt-forum-plate-cat">
|
||||
<div class="aksrt-forum-plate-cat__header">
|
||||
<h1><?php echo esc_html($term ? $term->name : ''); ?></h1>
|
||||
<?php if ($term && $term->description) : ?>
|
||||
@@ -101,6 +105,10 @@ if (is_array($cat_moderator_ids)) {
|
||||
<i class="fas fa-arrow-left"></i> <?php printf(esc_html__('返回%s', 'aksrt'), esc_html($forum_name)); ?>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
|
||||
@@ -55,11 +55,15 @@ $is_followed = $forum && $current_user_id > 0 ? $forum->is_user_following_pla
|
||||
$max_pages = (int) ($view['pagination']['max_pages'] ?? 1);
|
||||
?>
|
||||
|
||||
<main id="main-content" class="site-main content-shell" tabindex="-1">
|
||||
<main id="main-content" class="site-main content-shell content-shell--stream content-shell--forum" tabindex="-1">
|
||||
<div class="content-wrap container">
|
||||
<div class="content-layout content-layout--no-sidebar">
|
||||
<div class="content-layout__primary">
|
||||
|
||||
<?php if (function_exists('aksrt_breadcrumbs')) { aksrt_breadcrumbs(); } ?>
|
||||
|
||||
<?php if (!empty($permissions['access_denied'])) : ?>
|
||||
<div class="aksrt-forum-board container">
|
||||
<div class="aksrt-forum-board">
|
||||
<div class="aksrt-forum-board__access-denied">
|
||||
<i class="fas fa-lock"></i>
|
||||
<h2><?php esc_html_e('访问受限', 'aksrt'); ?></h2>
|
||||
@@ -283,6 +287,10 @@ $max_pages = (int) ($view['pagination']['max_pages'] ?? 1);
|
||||
</div>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<?php get_footer(); ?>
|
||||
@@ -24,9 +24,13 @@ $term_name = $term->name ?? '';
|
||||
$term_desc = $term->description ?? '';
|
||||
?>
|
||||
|
||||
<main id="main-content" class="site-main content-shell" tabindex="-1">
|
||||
<main id="main-content" class="site-main content-shell content-shell--stream content-shell--forum" tabindex="-1">
|
||||
<div class="content-wrap container">
|
||||
<div class="content-layout content-layout--no-sidebar">
|
||||
<div class="content-layout__primary">
|
||||
|
||||
<div class="aksrt-forum-tag container">
|
||||
|
||||
<div class="aksrt-forum-tag">
|
||||
<header class="aksrt-forum-tag__header">
|
||||
<h1 class="aksrt-forum-tag__title">
|
||||
<i class="fas fa-tag"></i>
|
||||
@@ -61,6 +65,10 @@ $term_desc = $term->description ?? '';
|
||||
<p><?php esc_html_e('内容空空如也', 'aksrt'); ?></p>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
|
||||
@@ -60,8 +60,12 @@ if (empty($topic['can_view'])) :
|
||||
$credits_cost = (int) get_post_meta($topic_id, '_aksrt_credits_cost', true);
|
||||
$pay_price = get_post_meta($topic_id, '_aksrt_pay_price', true);
|
||||
?>
|
||||
<main id="main-content" class="site-main content-shell" tabindex="-1">
|
||||
<div class="aksrt-forum-topic container">
|
||||
<main id="main-content" class="site-main content-shell content-shell--stream content-shell--forum" tabindex="-1">
|
||||
<div class="content-wrap container">
|
||||
<div class="content-layout content-layout--no-sidebar">
|
||||
<div class="content-layout__primary">
|
||||
|
||||
<div class="aksrt-forum-topic">
|
||||
<div class="aksrt-forum-topic__denied">
|
||||
<i class="fas fa-eye-slash"></i>
|
||||
<h1><?php esc_html_e('当前主题暂不可访问', 'aksrt'); ?></h1>
|
||||
@@ -94,7 +98,11 @@ if (empty($topic['can_view'])) :
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
<?php
|
||||
get_footer();
|
||||
return;
|
||||
@@ -109,11 +117,43 @@ $is_locked = !empty($topic['locked']);
|
||||
$comments_enabled = !empty($permissions['can_reply']);
|
||||
?>
|
||||
|
||||
<main id="main-content" class="site-main content-shell" tabindex="-1">
|
||||
<main id="main-content" class="site-main content-shell content-shell--stream content-shell--forum" tabindex="-1">
|
||||
<div class="content-wrap container">
|
||||
<div class="content-layout content-layout--no-sidebar">
|
||||
<div class="content-layout__primary">
|
||||
|
||||
|
||||
<?php if (function_exists('aksrt_breadcrumbs')) { aksrt_breadcrumbs(); } ?>
|
||||
|
||||
<div class="aksrt-forum-topic container">
|
||||
<div class="aksrt-forum-topic">
|
||||
<?php
|
||||
// Cover + paid extensions for forum topics.
|
||||
$cover_type = (string) get_post_meta(get_the_ID(), '_aksrt_cover_type', true);
|
||||
$cover_image = (string) get_post_meta(get_the_ID(), '_aksrt_cover_image', true);
|
||||
$cover_video = (string) get_post_meta(get_the_ID(), '_aksrt_featured_video', true);
|
||||
$cover_ratio = (string) get_post_meta(get_the_ID(), '_aksrt_cover_ratio', true);
|
||||
if ($cover_ratio === '') { $cover_ratio = '16:9'; }
|
||||
if ($cover_type === 'image' && $cover_image !== '') : ?>
|
||||
<div class="aksrt-forum-topic__cover aksrt-forum-topic__cover--image" style="--cover-ratio:<?php echo esc_attr(str_replace(':', '/', $cover_ratio)); ?>">
|
||||
<img src="<?php echo esc_url($cover_image); ?>" alt="" loading="lazy">
|
||||
</div>
|
||||
<?php elseif ($cover_type === 'video' && $cover_video !== '') : ?>
|
||||
<div class="aksrt-forum-topic__cover aksrt-forum-topic__cover--video">
|
||||
<?php echo wp_oembed_get($cover_video) ?: esc_html($cover_video); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
|
||||
</div>
|
||||
<?php elseif ($cover_type === 'slide') :
|
||||
$slides = get_post_meta(get_the_ID(), '_aksrt_featured_slide', true);
|
||||
if (is_array($slides) && $slides) : ?>
|
||||
<div class="aksrt-forum-topic__cover aksrt-forum-topic__cover--slide">
|
||||
<?php foreach ($slides as $slide) :
|
||||
$src = is_array($slide) ? (string) ($slide['url'] ?? $slide['src'] ?? '') : (string) $slide;
|
||||
if ($src === '') { continue; } ?>
|
||||
<img src="<?php echo esc_url($src); ?>" alt="" loading="lazy">
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($show_breadcrumbs) : ?>
|
||||
<div class="aksrt-forum-topic__breadcrumb">
|
||||
<?php if ($bc_show_home) : ?>
|
||||
@@ -667,6 +707,10 @@ $comments_enabled = !empty($permissions['can_reply']);
|
||||
<a href="<?php echo esc_url(wp_login_url(get_permalink())); ?>"><?php esc_html_e('登录后参与回复', 'aksrt'); ?></a>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@ $logo_url = class_exists('AKSRT_Settings') ? AKSRT_Settings::user_logo_url() : '
|
||||
<i class="fas fa-times"></i>
|
||||
</button>
|
||||
|
||||
<div class="aksrt-modal-auth__header">
|
||||
<div class="aksrt-modal-auth__header modal-colorful-header">
|
||||
<?php if ($logo_url) : ?>
|
||||
<div class="aksrt-modal-auth__logo aksrt-modal-auth__logo--image"><img src="<?php echo esc_url($logo_url); ?>" alt=""></div>
|
||||
<?php else : ?>
|
||||
|
||||
@@ -172,6 +172,50 @@ extract($args, EXTR_SKIP); // phpcs:ignore WordPress.PHP.DontExtract.extract_ext
|
||||
|
||||
<?php if (in_array('plate', $enabled_tabs, true)) : ?>
|
||||
<div id="panel-plate" class="dashboard-panel<?php echo $active_tab === 'plate' ? ' is-active' : ''; ?>" role="tabpanel"<?php echo $active_tab !== 'plate' ? ' hidden' : ''; ?>>
|
||||
<?php aksrt_render_profile_empty($svg_empty_post, __('暂无圈子内容', 'aksrt')); ?>
|
||||
<?php
|
||||
$plate_items = [];
|
||||
if ($forum_instance) {
|
||||
if (method_exists($forum_instance, 'get_user_followed_plates')) {
|
||||
$plate_items = array_merge($plate_items, (array) $forum_instance->get_user_followed_plates((int) $user_id));
|
||||
}
|
||||
if (method_exists($forum_instance, 'get_user_managed_plates')) {
|
||||
$managed = (array) $forum_instance->get_user_managed_plates((int) $user_id);
|
||||
foreach (['owned', 'moderating'] as $bucket) {
|
||||
foreach ((array) ($managed[$bucket] ?? []) as $plate) {
|
||||
$plate_items[] = $plate;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// de-dupe by id
|
||||
$seen = [];
|
||||
$unique_plates = [];
|
||||
foreach ($plate_items as $plate) {
|
||||
$pid = (int) ($plate['id'] ?? 0);
|
||||
if ($pid <= 0 || isset($seen[$pid])) {
|
||||
continue;
|
||||
}
|
||||
$seen[$pid] = true;
|
||||
$unique_plates[] = $plate;
|
||||
}
|
||||
if (!empty($unique_plates)) :
|
||||
?>
|
||||
<div class="uh-forum__plate-grid">
|
||||
<?php foreach ($unique_plates as $plate) :
|
||||
$purl = !empty($plate['url']) ? (string) $plate['url'] : get_permalink((int) ($plate['id'] ?? 0));
|
||||
?>
|
||||
<a class="uh-forum__plate-card" href="<?php echo esc_url((string) $purl); ?>">
|
||||
<div class="uh-forum__plate-name"><?php echo esc_html((string) ($plate['name'] ?? '')); ?></div>
|
||||
<div class="uh-forum__plate-stats">
|
||||
<span><?php printf(esc_html__('%d 帖子', 'aksrt'), (int) ($plate['topic_count'] ?? $plate['post_count'] ?? 0)); ?></span>
|
||||
<span><?php printf(esc_html__('%d 关注', 'aksrt'), (int) ($plate['follow_count'] ?? 0)); ?></span>
|
||||
</div>
|
||||
</a>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<?php else :
|
||||
aksrt_render_profile_empty($svg_empty_post, __('暂无圈子内容', 'aksrt'));
|
||||
endif;
|
||||
?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
Reference in new issue
Block a user