feat(ux): forum pay-hide depth, clogin OAuth, ban appeals admin, posts-navs widget

- Forum compose/save/draft: VIP prices, partial hide, coupons + shortcode tools
- Rainbow clogin aggregate login (rewrite + schema + CLoginClient)
- Native ban appeals tab: approve/reject + lift ban + notify
- WidgetPostsNavs + register missing forum widgets
- Submit editor shortcodes: login/reply/vip/payshow
This commit is contained in:
kate522 committed 2026-07-18 23:31:57 +08:00
1 parent 25aabb71a3
commit 24330653f0
15 files changed
+834 -35

No files matched your search

+35
View File
@@ -154,6 +154,17 @@ $initial_content = $draft_data ? $draft_data['content'] : '';
wp_editor($initial_content, 'compose-content', $editor_settings);
?>
<?php if (!empty($caps['can_set_hide']) || !empty($caps['can_set_paid'])) : ?>
<div class="aksrt-forum-compose__shortcode-tools">
<?php if (!empty($caps['can_set_hide'])) : ?>
<button type="button" class="but" data-insert-shortcode="hide"><i class="fas fa-eye-slash"></i> <?php esc_html_e('登录可见', 'aksrt'); ?></button>
<button type="button" class="but" data-insert-shortcode="reply"><i class="fas fa-comment-dots"></i> <?php esc_html_e('回复可见', 'aksrt'); ?></button>
<?php endif; ?>
<?php if (!empty($caps['can_set_paid'])) : ?>
<button type="button" class="but" data-insert-shortcode="payshow"><i class="fas fa-lock"></i> <?php esc_html_e('付费可见', 'aksrt'); ?></button>
<?php endif; ?>
</div>
<?php endif; ?>
</div>
</div>
@@ -276,6 +287,14 @@ $initial_content = $draft_data ? $draft_data['content'] : '';
<input type="number" id="compose-credits-cost" name="credits_cost" min="1" max="99999"
value="<?php echo esc_attr((string) ($draft_data['credits_cost'] ?? '')); ?>"
placeholder="<?php esc_attr_e('查看需要的积分数', 'aksrt'); ?>">
<label for="compose-credits-vip1" class="mt10"><?php esc_html_e('VIP1 积分价', 'aksrt'); ?></label>
<input type="number" id="compose-credits-vip1" name="credits_vip1" min="0" max="99999"
value="<?php echo esc_attr((string) ($draft_data['credits_vip1'] ?? '')); ?>"
placeholder="<?php esc_attr_e('留空=不设', 'aksrt'); ?>">
<label for="compose-credits-vip2" class="mt10"><?php esc_html_e('VIP2 积分价', 'aksrt'); ?></label>
<input type="number" id="compose-credits-vip2" name="credits_vip2" min="0" max="99999"
value="<?php echo esc_attr((string) ($draft_data['credits_vip2'] ?? '')); ?>"
placeholder="<?php esc_attr_e('留空=不设;0=免费', 'aksrt'); ?>">
</div>
<div class="aksrt-forum-compose__visibility-extra" id="compose-pay-price-field" style="display:none;">
@@ -283,6 +302,22 @@ $initial_content = $draft_data ? $draft_data['content'] : '';
<input type="number" id="compose-pay-price" name="pay_price" min="0.01" step="0.01" max="99999"
value="<?php echo esc_attr((string) ($draft_data['pay_price'] ?? '')); ?>"
placeholder="<?php esc_attr_e('查看需要的金额', 'aksrt'); ?>">
<label for="compose-pay-vip1" class="mt10"><?php esc_html_e('VIP1 价格(¥)', 'aksrt'); ?></label>
<input type="number" id="compose-pay-vip1" name="pay_vip1_price" min="0" step="0.01" max="99999"
value="<?php echo esc_attr((string) ($draft_data['pay_vip1_price'] ?? '')); ?>"
placeholder="<?php esc_attr_e('留空=不设', 'aksrt'); ?>">
<label for="compose-pay-vip2" class="mt10"><?php esc_html_e('VIP2 价格(¥)', 'aksrt'); ?></label>
<input type="number" id="compose-pay-vip2" name="pay_vip2_price" min="0" step="0.01" max="99999"
value="<?php echo esc_attr((string) ($draft_data['pay_vip2_price'] ?? '')); ?>"
placeholder="<?php esc_attr_e('留空=不设;0=免费', 'aksrt'); ?>">
<label class="aksrt-forum-compose__checkbox mt10">
<input type="checkbox" name="pay_hide_part" value="1" <?php checked(!empty($draft_data['pay_hide_part'])); ?>>
<span><?php esc_html_e('仅隐藏部分内容(正文用 [payshow] 包裹)', 'aksrt'); ?></span>
</label>
<label class="aksrt-forum-compose__checkbox mt6">
<input type="checkbox" name="topic_coupon_s" value="1" <?php checked(!empty($draft_data['topic_coupon_s'])); ?>>
<span><?php esc_html_e('允许优惠码', 'aksrt'); ?></span>
</label>
</div>
<div class="aksrt-forum-compose__visibility-extra" id="compose-role-field" style="display:none;">
+8 -2
View File
@@ -69,8 +69,14 @@ $is_can_new = !empty($ctx['is_can_new']);
<?php if (!empty($ctx['can_hide']) || !empty($ctx['can_pay'])) : ?>
<div class="aksrt-submit-shortcode-tools">
<?php if (!empty($ctx['can_hide'])) : ?>
<button type="button" class="but" data-insert-shortcode="hide" title="<?php esc_attr_e('插入隐藏内容', 'aksrt'); ?>">
<i class="fas fa-eye-slash"></i> <?php esc_html_e('隐藏内容', 'aksrt'); ?>
<button type="button" class="but" data-insert-shortcode="hide" title="<?php esc_attr_e('插入登录后可见', 'aksrt'); ?>">
<i class="fas fa-eye-slash"></i> <?php esc_html_e('登录可见', 'aksrt'); ?>
</button>
<button type="button" class="but" data-insert-shortcode="reply" title="<?php esc_attr_e('插入回复后可见', 'aksrt'); ?>">
<i class="fas fa-comment-dots"></i> <?php esc_html_e('回复可见', 'aksrt'); ?>
</button>
<button type="button" class="but" data-insert-shortcode="vip" title="<?php esc_attr_e('插入 VIP 可见', 'aksrt'); ?>">
<i class="fas fa-crown"></i> <?php esc_html_e('VIP 可见', 'aksrt'); ?>
</button>
<?php endif; ?>
<?php if (!empty($ctx['can_pay'])) : ?>