From accf5bdbe8144882f463c30a8533fb4083dcca50 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 6 Jul 2026 19:00:52 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AD=97=E6=AE=B5=E5=85=A8=E9=87=8F=E6=AF=94?= =?UTF-8?q?=E5=AF=B9=E6=94=B6=E5=8F=A3=EF=BC=9A=E5=AF=B9=E9=BD=90=20Zibll?= =?UTF-8?q?=20=E9=BB=98=E8=AE=A4=E5=80=BC=E5=B9=B6=E5=90=8E=E7=A7=BB?= =?UTF-8?q?=E7=AD=89=E7=BA=A7/=E5=BE=BD=E7=AB=A0=E5=85=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 继续 Workstream C 全量字段比对,并按用户裁定处理冲突: - UsersLevel / UsersBadge 采用“保留但后移”策略,不兼容旧数据接口,继续沿用当前新型 sections/router 体系,在 users 主线中降权后移到 compat tools 分区。 - 按 Zibll 实际 options 默认值收敛一批高影响字段,打通 PHP schema + 前端 schema 两层: * global/search: search_posts / search_no_page / search_custom_key_s / search_cat -> true * forum: bbs_show_new_plate / bbs_post_pay_hide_type_s / bbs_post_pay_vip_price_s / bbs_reply_paginate_ias_s / bbs_comment_upload_img / bbs_rewrite_suffix_html_s -> true * shop: shop_s -> true, shop_breadcrumbs_shop_home -> false, shop_rewrite_suffix_html_s -> true * users: user_signup_no_repas / message_auto_clear_s / post_rewards_s / user_report_img_s -> true * post-list: cat_s -> false 验证: - php -l 检查所有改动过的 PHP schema 文件均通过 - node --check 检查所有改动过的前端 schema 文件均通过 - shim 校验确认 users-level/users-badge 已从 users 主分区移出并以 secondaryEntry=true 落入 compat tools,且全站无路由碰撞 - 注:本 worktree 下缺少可执行 vite,未能在隔离副本中复跑 npm build;此前主副本同批次 IA 修正构建通过,本次继续只改 schema/sections 常量与默认值,已用语法校验覆盖 Co-Authored-By: Claude Fable 5 --- assets/admin/src/constants/sections/index.js | 14 ++++++++++++++ assets/admin/src/schema/sections/forum/other.js | 4 ++-- .../src/schema/sections/forum/permissions.js | 12 ++++++------ assets/admin/src/schema/sections/forum/reply.js | 8 ++++---- .../admin/src/schema/sections/global/search.js | 16 ++++++++-------- .../src/schema/sections/post-list/filter.js | 2 +- assets/admin/src/schema/sections/shop/basic.js | 12 ++++++------ assets/admin/src/schema/sections/users/auth.js | 4 ++-- .../src/schema/sections/users/notifications.js | 4 ++-- assets/admin/src/schema/sections/users/report.js | 4 ++-- .../class-aksrt-admin-schema-forum-other.php | 2 +- ...lass-aksrt-admin-schema-forum-permissions.php | 6 +++--- .../class-aksrt-admin-schema-forum-reply.php | 4 ++-- .../schema/class-aksrt-admin-schema-global.php | 8 ++++---- .../class-aksrt-admin-schema-post-list.php | 2 +- .../class-aksrt-admin-schema-shop-basic.php | 6 +++--- .../schema/class-aksrt-admin-schema-users.php | 8 ++++---- 17 files changed, 65 insertions(+), 51 deletions(-) diff --git a/assets/admin/src/constants/sections/index.js b/assets/admin/src/constants/sections/index.js index 19924d1d..cc810972 100644 --- a/assets/admin/src/constants/sections/index.js +++ b/assets/admin/src/constants/sections/index.js @@ -14,6 +14,8 @@ import { toolsSection } from './tools' const DEMOTED_CHILDREN = { 'post-list': ['post-list-submit'], users: [ + 'users-level', + 'users-badge', 'users-invite-codes', 'users-sms', 'users-wechat', @@ -47,6 +49,8 @@ const COMPAT_PAGE_ORDER = [ 'theme-authorization', 'payment-paid', 'post-list-submit', + 'users-level', + 'users-badge', 'users-invite-codes', 'users-sms', 'users-wechat', @@ -85,6 +89,16 @@ const DEMOTED_PAGE_OVERRIDES = { title: '前台投稿(兼容)', desc: '兼容保留前台投稿入口,避免其继续主导内容主线配置。', }, + 'users-level': { + label: '用户等级(后移)', + title: '用户等级(后移)', + desc: '等级规则与权益映射后移至次级入口,用户主线优先呈现登录、功能与积分。', + }, + 'users-badge': { + label: '用户徽章(后移)', + title: '用户徽章(后移)', + desc: '徽章规则与授予条件后移至次级入口,用户主线优先呈现登录、功能与积分。', + }, 'users-invite-codes': { label: '邀请码运营(兼容)', title: '邀请码运营(兼容)', diff --git a/assets/admin/src/schema/sections/forum/other.js b/assets/admin/src/schema/sections/forum/other.js index a0fa154a..d0c8c20a 100644 --- a/assets/admin/src/schema/sections/forum/other.js +++ b/assets/admin/src/schema/sections/forum/other.js @@ -12,7 +12,7 @@ export const otherSchema = { bbs_post_title_strlen_limit: 30, bbs_t_placeholder: '请输入标题', bbs_c_placeholder: '请输入内容', - bbs_rewrite_suffix_html_s: false, + bbs_rewrite_suffix_html_s: true, bbs_plate_rewrite_slug: 'board', bbs_posts_rewrite_slug: 'topic', bbs_posts_edit_rewrite_slug: 'topic-edit', @@ -53,7 +53,7 @@ export const otherSchema = { title: 'URL / 别名', icon: 'fas fa-link', fields: [ - { key: 'bbs_rewrite_suffix_html_s', label: '.html 后缀', type: 'switch', default: false }, + { key: 'bbs_rewrite_suffix_html_s', label: '.html 后缀', type: 'switch', default: true }, { key: 'bbs_plate_rewrite_slug', label: '版块别名', type: 'input', default: 'board' }, { key: 'bbs_posts_rewrite_slug', label: '帖子别名', type: 'input', default: 'topic' }, { key: 'bbs_posts_edit_rewrite_slug', label: '编辑别名', type: 'input', default: 'topic-edit' }, diff --git a/assets/admin/src/schema/sections/forum/permissions.js b/assets/admin/src/schema/sections/forum/permissions.js index 96eb7713..25c227c2 100644 --- a/assets/admin/src/schema/sections/forum/permissions.js +++ b/assets/admin/src/schema/sections/forum/permissions.js @@ -6,11 +6,11 @@ export const permissionsSchema = { defaults: { bbs_posts_add_limit_opt_max: 10, bbs_plate_add_limit_opt_max: 3, - bbs_show_new_plate: false, + bbs_show_new_plate: true, bbs_show_new_topic: true, bbs_show_apply_moderator: true, - bbs_post_pay_hide_type_s: false, - bbs_post_pay_vip_price_s: false, + bbs_post_pay_hide_type_s: true, + bbs_post_pay_vip_price_s: true, bbs_post_pay_vip_1_discount: 80, bbs_post_pay_vip_2_discount: 50, bbs_post_pay_price_limit: 1000, @@ -33,7 +33,7 @@ export const permissionsSchema = { title: '按钮显示', icon: 'fas fa-eye', fields: [ - { key: 'bbs_show_new_plate', label: '始终显示建版按钮', type: 'switch', default: false }, + { key: 'bbs_show_new_plate', label: '始终显示建版按钮', type: 'switch', default: true }, { key: 'bbs_show_new_topic', label: '始终显示发帖按钮', type: 'switch', default: true }, { key: 'bbs_show_apply_moderator', label: '始终显示申请版主', type: 'switch', default: true }, ], @@ -43,8 +43,8 @@ export const permissionsSchema = { title: '帖子付费', icon: 'fas fa-money-bill-wave', fields: [ - { key: 'bbs_post_pay_hide_type_s', label: '启用付费内容', type: 'switch', default: false }, - { key: 'bbs_post_pay_vip_price_s', label: 'VIP 特价', type: 'switch', default: false, dependsOn: { key: 'bbs_post_pay_hide_type_s', value: true } }, + { key: 'bbs_post_pay_hide_type_s', label: '启用付费内容', type: 'switch', default: true }, + { key: 'bbs_post_pay_vip_price_s', label: 'VIP 特价', type: 'switch', default: true, dependsOn: { key: 'bbs_post_pay_hide_type_s', value: true } }, { key: 'bbs_post_pay_vip_1_discount', label: '一级 VIP 折扣 (%)', type: 'number', default: 80, min: 0, max: 100, dependsOn: { key: 'bbs_post_pay_vip_price_s', value: true } }, { key: 'bbs_post_pay_vip_2_discount', label: '二级 VIP 折扣 (%)', type: 'number', default: 50, min: 0, max: 100, dependsOn: { key: 'bbs_post_pay_vip_price_s', value: true } }, { key: 'bbs_post_pay_price_limit', label: '最高定价', type: 'number', default: 1000, min: 1, dependsOn: { key: 'bbs_post_pay_hide_type_s', value: true } }, diff --git a/assets/admin/src/schema/sections/forum/reply.js b/assets/admin/src/schema/sections/forum/reply.js index 1f21d00b..e9235b3d 100644 --- a/assets/admin/src/schema/sections/forum/reply.js +++ b/assets/admin/src/schema/sections/forum/reply.js @@ -5,12 +5,12 @@ export const replySchema = { description: '回复翻页、工具栏功能、表情、代码和快捷回复配置。', defaults: { bbs_reply_paginate_type: 'ajax', - bbs_reply_paginate_ias_s: false, + bbs_reply_paginate_ias_s: true, bbs_reply_paginate_ias_max: 3, bbs_comment_smilie: true, bbs_comment_code: true, bbs_comment_img: true, - bbs_comment_upload_img: false, + bbs_comment_upload_img: true, bbs_comment_quick_s: true, bbs_comment_quick_often: '不错,学习了\n感谢分享\n期待更新', bbs_comment_placeholder: '写下你的回复…', @@ -22,7 +22,7 @@ export const replySchema = { icon: 'fas fa-chevron-circle-right', fields: [ { key: 'bbs_reply_paginate_type', label: '翻页方式', type: 'select', default: 'ajax', options: [{ label: 'AJAX 加载', value: 'ajax' }, { label: '传统翻页', value: 'page' }] }, - { key: 'bbs_reply_paginate_ias_s', label: '无限滚动', type: 'switch', default: false }, + { key: 'bbs_reply_paginate_ias_s', label: '无限滚动', type: 'switch', default: true }, { key: 'bbs_reply_paginate_ias_max', label: '自动加载页数', type: 'number', default: 3, min: 0, max: 10, dependsOn: { key: 'bbs_reply_paginate_ias_s', value: true } }, ], }, @@ -34,7 +34,7 @@ export const replySchema = { { key: 'bbs_comment_smilie', label: '表情', type: 'switch', default: true }, { key: 'bbs_comment_code', label: '代码', type: 'switch', default: true }, { key: 'bbs_comment_img', label: '插图', type: 'switch', default: true }, - { key: 'bbs_comment_upload_img', label: '上传图片', type: 'switch', default: false }, + { key: 'bbs_comment_upload_img', label: '上传图片', type: 'switch', default: true }, { key: 'bbs_comment_quick_s', label: '快捷回复', type: 'switch', default: true }, { key: 'bbs_comment_quick_often', label: '预设短语', type: 'textarea', default: '不错,学习了\n感谢分享\n期待更新', help: '每行一条', dependsOn: { key: 'bbs_comment_quick_s', value: true } }, { key: 'bbs_comment_placeholder', label: '回复占位符', type: 'input', default: '写下你的回复…' }, diff --git a/assets/admin/src/schema/sections/global/search.js b/assets/admin/src/schema/sections/global/search.js index 19650c0b..3ae14cf7 100644 --- a/assets/admin/src/schema/sections/global/search.js +++ b/assets/admin/src/schema/sections/global/search.js @@ -11,13 +11,13 @@ export const searchSchema = { hot_search_keywords: '', search_placeholder: '开启精彩搜索', search_suggestions_enabled: false, - search_posts: false, - search_no_page: false, + search_posts: true, + search_no_page: true, search_exclude_cats: '', - search_cat: false, + search_cat: true, search_cat_in: '', search_more_cat_obj: true, - search_custom_key_s: false, + search_custom_key_s: true, search_custom_key: 'title,content', search_facets: false, search_facets_order: 'category\ntag', @@ -90,10 +90,10 @@ export const searchSchema = { { key: 'hot_search_enabled', label: '热门搜索', type: 'switch', default: true, help: '在搜索框下方展示热门搜索词' }, { key: 'hot_search_keywords', label: '热门搜索关键词', type: 'textarea', placeholder: '每行一个关键词', dependsOn: { key: 'hot_search_enabled', value: true }, rows: 3, help: '手动设置热门搜索关键词,留空则自动统计' }, { key: 'search_suggestions_enabled', label: '搜索建议', type: 'switch', default: false, help: '输入时显示搜索建议(需要 AJAX 搜索模式)' }, - { key: 'search_posts', label: '搜索框热门文章', type: 'switch', default: false, help: '在搜索面板中显示热门文章列表' }, - { key: 'search_no_page', label: '排除页面', type: 'switch', default: false, help: '搜索结果中排除页面(仅显示文章)' }, + { key: 'search_posts', label: '搜索框热门文章', type: 'switch', default: true, help: '在搜索面板中显示热门文章列表' }, + { key: 'search_no_page', label: '排除页面', type: 'switch', default: true, help: '搜索结果中排除页面(仅显示文章)' }, { key: 'search_exclude_cats', label: '排除分类', type: 'textarea', placeholder: '分类 ID,逗号分隔', rows: 2, default: '', help: '搜索结果中排除的分类 ID(逗号分隔)' }, - { key: 'search_custom_key_s', label: '自定义匹配范围', type: 'switch', default: false, help: '启用后可配置搜索匹配字段范围' }, + { key: 'search_custom_key_s', label: '自定义匹配范围', type: 'switch', default: true, help: '启用后可配置搜索匹配字段范围' }, { key: 'search_custom_key', label: '匹配字段', type: 'textarea', placeholder: 'title,content,excerpt,category,tag,author', rows: 2, default: 'title,content', dependsOn: { key: 'search_custom_key_s', value: true }, help: '搜索匹配字段(逗号分隔:title/content/excerpt/category/tag/author)' }, { key: 'search_facets', label: '搜索结果筛选', type: 'switch', default: false, help: '启用搜索结果 taxonomy 筛选面板' }, { key: 'search_facets_order', label: '筛选排序', type: 'textarea', rows: 3, default: 'category\ntag', dependsOn: { key: 'search_facets', value: true }, help: '筛选 fieldset 显示顺序(每行一个 taxonomy slug)' }, @@ -104,7 +104,7 @@ export const searchSchema = { title: '分类搜索', icon: 'fas fa-folder-open', fields: [ - { key: 'search_cat', label: '启用分类搜索', type: 'switch', default: false, help: '在搜索框旁显示分类选择器' }, + { key: 'search_cat', label: '启用分类搜索', type: 'switch', default: true, help: '在搜索框旁显示分类选择器' }, { key: 'search_cat_in', label: '默认分类', type: 'input', default: '', help: '默认搜索的分类 ID(留空为全部分类)' }, { key: 'search_more_cat_obj', label: '显示更多分类', type: 'switch', default: true, help: '展开显示全部分类列表' }, ], diff --git a/assets/admin/src/schema/sections/post-list/filter.js b/assets/admin/src/schema/sections/post-list/filter.js index d4606d30..428f5458 100644 --- a/assets/admin/src/schema/sections/post-list/filter.js +++ b/assets/admin/src/schema/sections/post-list/filter.js @@ -90,7 +90,7 @@ export const filterSchema = { help: '为指定分类绑定不同的筛选维度组合,实现分类级别的差异化筛选', fields: [ { key: 'cats', label: '绑定分类', type: 'taxonomy_select', taxonomy: 'category', multiple: true, default: [] }, - { key: 'cat_s', label: '显示分类筛选', type: 'switch', default: true }, + { key: 'cat_s', label: '显示分类筛选', type: 'switch', default: false }, { key: 'tag_s', label: '显示标签筛选', type: 'switch', default: false }, { key: 'topics_s', label: '显示专题筛选', type: 'switch', default: false }, { key: 'orderby_s', label: '显示排序按钮', type: 'switch', default: true }, diff --git a/assets/admin/src/schema/sections/shop/basic.js b/assets/admin/src/schema/sections/shop/basic.js index 7a004c0e..2d365640 100644 --- a/assets/admin/src/schema/sections/shop/basic.js +++ b/assets/admin/src/schema/sections/shop/basic.js @@ -4,15 +4,15 @@ export const basicSchema = { icon: 'fas fa-store', description: '商城总开关、首页链接、面包屑和 URL 别名设置。', defaults: { - shop_s: false, + shop_s: true, shop_home_url: '', shop_breadcrumbs_s: true, shop_breadcrumbs_home: true, - shop_breadcrumbs_shop_home: true, + shop_breadcrumbs_shop_home: false, shop_breadcrumbs_shop_home_name: '商城首页', shop_product_rewrite_slug: 'product', shop_cart_rewrite_slug: 'cart', - shop_rewrite_suffix_html_s: false, + shop_rewrite_suffix_html_s: true, }, groups: [ { @@ -20,7 +20,7 @@ export const basicSchema = { title: '商城开关', icon: 'fas fa-power-off', fields: [ - { key: 'shop_s', label: '启用商城', type: 'switch', default: false }, + { key: 'shop_s', label: '启用商城', type: 'switch', default: true }, { key: 'shop_home_url', label: '商城首页链接', type: 'input', default: '', help: '留空使用默认商城页面', dependsOn: { key: 'shop_s', value: true } }, ], }, @@ -31,7 +31,7 @@ export const basicSchema = { fields: [ { key: 'shop_breadcrumbs_s', label: '显示面包屑', type: 'switch', default: true, dependsOn: { key: 'shop_s', value: true } }, { key: 'shop_breadcrumbs_home', label: '显示首页链接', type: 'switch', default: true, dependsOn: { key: 'shop_breadcrumbs_s', value: true } }, - { key: 'shop_breadcrumbs_shop_home', label: '显示商城首页', type: 'switch', default: true, dependsOn: { key: 'shop_breadcrumbs_s', value: true } }, + { key: 'shop_breadcrumbs_shop_home', label: '显示商城首页', type: 'switch', default: false, dependsOn: { key: 'shop_breadcrumbs_s', value: true } }, { key: 'shop_breadcrumbs_shop_home_name', label: '商城首页名称', type: 'input', default: '商城首页', dependsOn: { key: 'shop_breadcrumbs_s', value: true } }, ], }, @@ -42,7 +42,7 @@ export const basicSchema = { fields: [ { key: 'shop_product_rewrite_slug', label: '商品 URL 别名', type: 'input', default: 'product', dependsOn: { key: 'shop_s', value: true } }, { key: 'shop_cart_rewrite_slug', label: '购物车 URL 别名', type: 'input', default: 'cart', dependsOn: { key: 'shop_s', value: true } }, - { key: 'shop_rewrite_suffix_html_s', label: '.html 伪静态后缀', type: 'switch', default: false, dependsOn: { key: 'shop_s', value: true } }, + { key: 'shop_rewrite_suffix_html_s', label: '.html 伪静态后缀', type: 'switch', default: true, dependsOn: { key: 'shop_s', value: true } }, ], }, ], diff --git a/assets/admin/src/schema/sections/users/auth.js b/assets/admin/src/schema/sections/users/auth.js index 3db38214..333d00b8 100644 --- a/assets/admin/src/schema/sections/users/auth.js +++ b/assets/admin/src/schema/sections/users/auth.js @@ -29,7 +29,7 @@ export const authSchema = { user_signin_nopas_active: 'nopas_first', user_signup_captch: true, captch_type: 'email', - user_signup_no_repas: false, + user_signup_no_repas: true, user_repas_captch_type: 'email', bind_phone: false, bind_reminder: 'close', @@ -97,7 +97,7 @@ export const authSchema = { fields: [ { key: 'user_signup_captch', label: '注册需验证', type: 'switch', default: true, help: '注册时需完成邮箱或手机验证' }, { key: 'captch_type', label: '验证方式', type: 'radio', default: 'email', options: [{ label: '邮箱', value: 'email' }, { label: '手机', value: 'phone' }, { label: '邮箱或手机', value: 'email_phone' }], dependsOn: { key: 'user_signup_captch', value: true } }, - { key: 'user_signup_no_repas', label: '无需重复密码', type: 'switch', default: false, help: '注册时不要求二次确认密码' }, + { key: 'user_signup_no_repas', label: '无需重复密码', type: 'switch', default: true, help: '注册时不要求二次确认密码' }, { key: 'user_repas_captch_type', label: '找回密码验证方式', type: 'radio', default: 'email', options: [{ label: '邮箱', value: 'email' }, { label: '手机', value: 'phone' }, { label: '邮箱或手机', value: 'email_phone' }] }, ], }, diff --git a/assets/admin/src/schema/sections/users/notifications.js b/assets/admin/src/schema/sections/users/notifications.js index 2012ecb7..61d792c6 100644 --- a/assets/admin/src/schema/sections/users/notifications.js +++ b/assets/admin/src/schema/sections/users/notifications.js @@ -10,7 +10,7 @@ export const notificationsSchema = { message_paginate_type: 'ajax_lists', message_user_set: true, message_close_msg_type: [], - message_auto_clear_s: false, + message_auto_clear_s: true, message_auto_clear_time: 365, message_auto_clear_types: ['posts', 'comment', 'favorite', 'like', 'hot', 'followed', 'system'], private_s: true, @@ -49,7 +49,7 @@ export const notificationsSchema = { title: '自动清理', icon: 'fas fa-broom', fields: [ - { key: 'message_auto_clear_s', label: '自动清理已读消息', type: 'switch', default: false }, + { key: 'message_auto_clear_s', label: '自动清理已读消息', type: 'switch', default: true }, { key: 'message_auto_clear_time', label: '过期天数', type: 'number', default: 365, min: 1, max: 3650, help: '已读消息超过此天数将被自动清理', dependsOn: { key: 'message_auto_clear_s', value: true } }, { key: 'message_auto_clear_types', label: '清理类型', type: 'checkbox', default: ['posts', 'comment', 'favorite', 'like', 'hot', 'followed', 'system'], options: [{ label: '文章通知', value: 'posts' }, { label: '评论回复', value: 'comment' }, { label: '收藏通知', value: 'favorite' }, { label: '点赞通知', value: 'like' }, { label: '热门通知', value: 'hot' }, { label: '关注通知', value: 'followed' }, { label: '系统通知', value: 'system' }, { label: '支付通知', value: 'pay' }, { label: '提现回复', value: 'withdraw_reply' }, { label: '勋章通知', value: 'medal' }, { label: '认证回复', value: 'auth_apply_reply' }, { label: '下载通知', value: 'download' }, { label: '积分变动', value: 'credits' }, { label: '私信', value: 'private' }, { label: '举报反馈', value: 'report' }], dependsOn: { key: 'message_auto_clear_s', value: true } }, ], diff --git a/assets/admin/src/schema/sections/users/report.js b/assets/admin/src/schema/sections/users/report.js index 04b3db5f..c601b28c 100644 --- a/assets/admin/src/schema/sections/users/report.js +++ b/assets/admin/src/schema/sections/users/report.js @@ -12,7 +12,7 @@ export const reportSchema = { ban_preset_reason: 'spam|垃圾信息\nabuse|人身攻击\nviolation|违规操作', ban_appeal_desc: '', ban_appeal_keys: '', - user_report_img_s: false, + user_report_img_s: true, user_report_desc: '', }, groups: [ @@ -50,7 +50,7 @@ export const reportSchema = { title: '图片举报', icon: 'fas fa-image', fields: [ - { key: 'user_report_img_s', label: '启用图片举报', type: 'switch', default: false, dependsOn: { key: 'user_report_enabled', value: true } }, + { key: 'user_report_img_s', label: '启用图片举报', type: 'switch', default: true, dependsOn: { key: 'user_report_enabled', value: true } }, { key: 'user_report_desc', label: '举报说明', type: 'textarea', default: '', dependsOn: { key: 'user_report_img_s', value: true } }, ], }, diff --git a/inc/classes/admin/schema/class-aksrt-admin-schema-forum-other.php b/inc/classes/admin/schema/class-aksrt-admin-schema-forum-other.php index 7ecfdfc0..54b0b655 100644 --- a/inc/classes/admin/schema/class-aksrt-admin-schema-forum-other.php +++ b/inc/classes/admin/schema/class-aksrt-admin-schema-forum-other.php @@ -34,7 +34,7 @@ class AKSRT_Admin_Schema_Forum_Other { ['key' => 'bbs_c_placeholder', 'label' => '内容占位符', 'type' => 'text', 'default' => '请输入内容'], ]], ['key' => 'url', 'title' => 'URL / 别名', 'fields' => [ - ['key' => 'bbs_rewrite_suffix_html_s', 'label' => '.html 后缀', 'type' => 'switch', 'default' => false], + ['key' => 'bbs_rewrite_suffix_html_s', 'label' => '.html 后缀', 'type' => 'switch', 'default' => true], ['key' => 'bbs_plate_rewrite_slug', 'label' => '版块别名', 'type' => 'text', 'default' => 'board'], ['key' => 'bbs_posts_rewrite_slug', 'label' => '帖子别名', 'type' => 'text', 'default' => 'topic'], ['key' => 'bbs_posts_edit_rewrite_slug', 'label' => '编辑别名', 'type' => 'text', 'default' => 'topic-edit'], diff --git a/inc/classes/admin/schema/class-aksrt-admin-schema-forum-permissions.php b/inc/classes/admin/schema/class-aksrt-admin-schema-forum-permissions.php index 19c3d4c0..da91d9ba 100644 --- a/inc/classes/admin/schema/class-aksrt-admin-schema-forum-permissions.php +++ b/inc/classes/admin/schema/class-aksrt-admin-schema-forum-permissions.php @@ -21,13 +21,13 @@ class AKSRT_Admin_Schema_Forum_Permissions { ['key' => 'bbs_plate_add_limit_opt_max', 'label' => '建版数量上限', 'type' => 'number', 'default' => 3, 'min' => 0], ]], ['key' => 'display_btns', 'title' => '按钮显示', 'fields' => [ - ['key' => 'bbs_show_new_plate', 'label' => '始终显示建版按钮', 'type' => 'switch', 'default' => false], + ['key' => 'bbs_show_new_plate', 'label' => '始终显示建版按钮', 'type' => 'switch', 'default' => true], ['key' => 'bbs_show_new_topic', 'label' => '始终显示发帖按钮', 'type' => 'switch', 'default' => true], ['key' => 'bbs_show_apply_moderator', 'label' => '始终显示申请版主', 'type' => 'switch', 'default' => true], ]], ['key' => 'paid_content', 'title' => '帖子付费', 'fields' => [ - ['key' => 'bbs_post_pay_hide_type_s', 'label' => '启用付费内容', 'type' => 'switch', 'default' => false], - ['key' => 'bbs_post_pay_vip_price_s', 'label' => 'VIP 特价', 'type' => 'switch', 'default' => false], + ['key' => 'bbs_post_pay_hide_type_s', 'label' => '启用付费内容', 'type' => 'switch', 'default' => true], + ['key' => 'bbs_post_pay_vip_price_s', 'label' => 'VIP 特价', 'type' => 'switch', 'default' => true], ['key' => 'bbs_post_pay_vip_1_discount', 'label' => '一级 VIP 折扣 (%)', 'type' => 'number', 'default' => 80, 'min' => 0, 'max' => 100], ['key' => 'bbs_post_pay_vip_2_discount', 'label' => '二级 VIP 折扣 (%)', 'type' => 'number', 'default' => 50, 'min' => 0, 'max' => 100], ['key' => 'bbs_post_pay_price_limit', 'label' => '最高定价', 'type' => 'number', 'default' => 1000, 'min' => 1], diff --git a/inc/classes/admin/schema/class-aksrt-admin-schema-forum-reply.php b/inc/classes/admin/schema/class-aksrt-admin-schema-forum-reply.php index 7979ddcd..94f96675 100644 --- a/inc/classes/admin/schema/class-aksrt-admin-schema-forum-reply.php +++ b/inc/classes/admin/schema/class-aksrt-admin-schema-forum-reply.php @@ -21,14 +21,14 @@ class AKSRT_Admin_Schema_Forum_Reply { ['label' => 'AJAX 加载', 'value' => 'ajax'], ['label' => '传统翻页', 'value' => 'page'], ]], - ['key' => 'bbs_reply_paginate_ias_s', 'label' => '无限滚动', 'type' => 'switch', 'default' => false], + ['key' => 'bbs_reply_paginate_ias_s', 'label' => '无限滚动', 'type' => 'switch', 'default' => true], ['key' => 'bbs_reply_paginate_ias_max', 'label' => '自动加载页数', 'type' => 'number', 'default' => 3, 'min' => 0, 'max' => 10], ]], ['key' => 'toolbar', 'title' => '回复工具栏', 'fields' => [ ['key' => 'bbs_comment_smilie', 'label' => '表情', 'type' => 'switch', 'default' => true], ['key' => 'bbs_comment_code', 'label' => '代码', 'type' => 'switch', 'default' => true], ['key' => 'bbs_comment_img', 'label' => '插图', 'type' => 'switch', 'default' => true], - ['key' => 'bbs_comment_upload_img', 'label' => '上传图片', 'type' => 'switch', 'default' => false], + ['key' => 'bbs_comment_upload_img', 'label' => '上传图片', 'type' => 'switch', 'default' => true], ['key' => 'bbs_comment_quick_s', 'label' => '快捷回复', 'type' => 'switch', 'default' => true], ['key' => 'bbs_comment_quick_often', 'label' => '预设短语', 'type' => 'textarea', 'default' => "不错,学习了\n感谢分享\n期待更新", 'help' => '每行一条'], ['key' => 'bbs_comment_placeholder', 'label' => '回复占位符', 'type' => 'text', 'default' => '写下你的回复…'], diff --git a/inc/classes/admin/schema/class-aksrt-admin-schema-global.php b/inc/classes/admin/schema/class-aksrt-admin-schema-global.php index 14f8efca..48051e5a 100644 --- a/inc/classes/admin/schema/class-aksrt-admin-schema-global.php +++ b/inc/classes/admin/schema/class-aksrt-admin-schema-global.php @@ -375,16 +375,16 @@ class AKSRT_Admin_Schema_Global { ['key' => 'hot_search_enabled', 'label' => '热门搜索', 'type' => 'switch', 'default' => true], ['key' => 'hot_search_keywords', 'label' => '热门搜索关键词', 'type' => 'textarea', 'default' => ''], ['key' => 'search_suggestions_enabled', 'label' => '搜索建议', 'type' => 'switch', 'default' => false], - ['key' => 'search_posts', 'label' => '搜索框热门文章', 'type' => 'switch', 'default' => false, 'help' => '在搜索面板中显示热门文章列表'], - ['key' => 'search_no_page', 'label' => '排除页面', 'type' => 'switch', 'default' => false, 'help' => '搜索结果中排除页面(仅显示文章)'], + ['key' => 'search_posts', 'label' => '搜索框热门文章', 'type' => 'switch', 'default' => true, 'help' => '在搜索面板中显示热门文章列表'], + ['key' => 'search_no_page', 'label' => '排除页面', 'type' => 'switch', 'default' => true, 'help' => '搜索结果中排除页面(仅显示文章)'], ['key' => 'search_exclude_cats', 'label' => '排除分类', 'type' => 'textarea', 'default' => '', 'help' => '搜索结果中排除的分类 ID(逗号分隔)'], - ['key' => 'search_custom_key_s', 'label' => '自定义匹配范围', 'type' => 'switch', 'default' => false, 'help' => '启用后可配置搜索匹配字段范围(标题/内容/分类/标签等)'], + ['key' => 'search_custom_key_s', 'label' => '自定义匹配范围', 'type' => 'switch', 'default' => true, 'help' => '启用后可配置搜索匹配字段范围(标题/内容/分类/标签等)'], ['key' => 'search_custom_key', 'label' => '匹配字段', 'type' => 'textarea', 'default' => 'title,content', 'help' => '搜索匹配的字段范围(逗号分隔:title/content/excerpt/category/tag/author)'], ['key' => 'search_facets', 'label' => '搜索结果筛选', 'type' => 'switch', 'default' => false, 'help' => '启用搜索结果 taxonomy 筛选面板'], ['key' => 'search_facets_order', 'label' => '筛选排序', 'type' => 'textarea', 'default' => "category\ntag", 'help' => '筛选 fieldset 显示顺序(每行一个 taxonomy slug)'], ]], ['key' => 'category-search', 'title' => '分类搜索', 'fields' => [ - ['key' => 'search_cat', 'label' => '启用分类搜索', 'type' => 'switch', 'default' => false, 'help' => '在搜索框旁显示分类选择器'], + ['key' => 'search_cat', 'label' => '启用分类搜索', 'type' => 'switch', 'default' => true, 'help' => '在搜索框旁显示分类选择器'], ['key' => 'search_cat_in', 'label' => '默认分类', 'type' => 'input', 'default' => '', 'help' => '默认搜索的分类 ID(留空为全部分类)'], ['key' => 'search_more_cat_obj', 'label' => '显示更多分类', 'type' => 'switch', 'default' => true, 'help' => '展开显示全部分类列表'], ]], diff --git a/inc/classes/admin/schema/class-aksrt-admin-schema-post-list.php b/inc/classes/admin/schema/class-aksrt-admin-schema-post-list.php index 9c2f01ed..0626d76c 100644 --- a/inc/classes/admin/schema/class-aksrt-admin-schema-post-list.php +++ b/inc/classes/admin/schema/class-aksrt-admin-schema-post-list.php @@ -274,7 +274,7 @@ class AKSRT_Admin_Schema_Post_List { ['key' => 'cat_custom_filter', 'title' => '按分类绑定筛选', 'fields' => [ ['key' => 'cat_custom_filter', 'label' => '分类筛选绑定', 'type' => 'repeater', 'default' => [], 'help' => '为指定分类绑定不同的筛选维度组合', 'fields' => [ ['key' => 'cats', 'label' => '绑定分类', 'type' => 'taxonomy_select', 'taxonomy' => 'category', 'multiple' => true, 'default' => []], - ['key' => 'cat_s', 'label' => '显示分类筛选', 'type' => 'switch', 'default' => true], + ['key' => 'cat_s', 'label' => '显示分类筛选', 'type' => 'switch', 'default' => false], ['key' => 'tag_s', 'label' => '显示标签筛选', 'type' => 'switch', 'default' => false], ['key' => 'topics_s', 'label' => '显示专题筛选', 'type' => 'switch', 'default' => false], ['key' => 'orderby_s', 'label' => '显示排序按钮', 'type' => 'switch', 'default' => true], diff --git a/inc/classes/admin/schema/class-aksrt-admin-schema-shop-basic.php b/inc/classes/admin/schema/class-aksrt-admin-schema-shop-basic.php index 472cae19..757800fa 100644 --- a/inc/classes/admin/schema/class-aksrt-admin-schema-shop-basic.php +++ b/inc/classes/admin/schema/class-aksrt-admin-schema-shop-basic.php @@ -17,19 +17,19 @@ class AKSRT_Admin_Schema_Shop_Basic { 'option_key' => 'aksrt_settings', 'groups' => [ ['key' => 'general', 'title' => '商城开关', 'fields' => [ - ['key' => 'shop_s', 'label' => '启用商城', 'type' => 'switch', 'default' => false], + ['key' => 'shop_s', 'label' => '启用商城', 'type' => 'switch', 'default' => true], ['key' => 'shop_home_url', 'label' => '商城首页链接', 'type' => 'input', 'default' => ''], ]], ['key' => 'breadcrumbs', 'title' => '面包屑', 'fields' => [ ['key' => 'shop_breadcrumbs_s', 'label' => '显示面包屑', 'type' => 'switch', 'default' => true], ['key' => 'shop_breadcrumbs_home', 'label' => '显示首页链接', 'type' => 'switch', 'default' => true], - ['key' => 'shop_breadcrumbs_shop_home', 'label' => '显示商城首页', 'type' => 'switch', 'default' => true], + ['key' => 'shop_breadcrumbs_shop_home', 'label' => '显示商城首页', 'type' => 'switch', 'default' => false], ['key' => 'shop_breadcrumbs_shop_home_name', 'label' => '商城首页名称', 'type' => 'input', 'default' => '商城首页'], ]], ['key' => 'rewrite', 'title' => 'URL 别名', 'fields' => [ ['key' => 'shop_product_rewrite_slug', 'label' => '商品 URL 别名', 'type' => 'input', 'default' => 'product'], ['key' => 'shop_cart_rewrite_slug', 'label' => '购物车 URL 别名', 'type' => 'input', 'default' => 'cart'], - ['key' => 'shop_rewrite_suffix_html_s', 'label' => '.html 伪静态后缀', 'type' => 'switch', 'default' => false], + ['key' => 'shop_rewrite_suffix_html_s', 'label' => '.html 伪静态后缀', 'type' => 'switch', 'default' => true], ]], ], ]; diff --git a/inc/classes/admin/schema/class-aksrt-admin-schema-users.php b/inc/classes/admin/schema/class-aksrt-admin-schema-users.php index ad3215b2..636328ea 100644 --- a/inc/classes/admin/schema/class-aksrt-admin-schema-users.php +++ b/inc/classes/admin/schema/class-aksrt-admin-schema-users.php @@ -68,7 +68,7 @@ class AKSRT_Admin_Schema_Users { ['label' => '手机', 'value' => 'phone'], ['label' => '邮箱或手机', 'value' => 'email_phone'], ]], - ['key' => 'user_signup_no_repas', 'label' => '无需重复密码', 'type' => 'switch', 'default' => false, 'desc' => '注册时不要求二次确认密码'], + ['key' => 'user_signup_no_repas', 'label' => '无需重复密码', 'type' => 'switch', 'default' => true, 'desc' => '注册时不要求二次确认密码'], ['key' => 'user_repas_captch_type', 'label' => '找回密码验证方式', 'type' => 'radio', 'default' => 'email', 'options' => [ ['label' => '邮箱', 'value' => 'email'], ['label' => '手机', 'value' => 'phone'], @@ -164,7 +164,7 @@ class AKSRT_Admin_Schema_Users { ], 'desc' => '勾选的类型将不向用户推送通知'], ]], ['key' => 'auto_clear', 'title' => '自动清理', 'fields' => [ - ['key' => 'message_auto_clear_s', 'label' => '自动清理已读消息', 'type' => 'switch', 'default' => false], + ['key' => 'message_auto_clear_s', 'label' => '自动清理已读消息', 'type' => 'switch', 'default' => true], ['key' => 'message_auto_clear_time', 'label' => '过期天数', 'type' => 'number', 'default' => 365, 'min' => 1, 'max' => 3650, 'desc' => '已读消息超过此天数将被自动清理'], ['key' => 'message_auto_clear_types', 'label' => '清理类型', 'type' => 'checkbox', 'default' => ['posts', 'comment', 'favorite', 'like', 'hot', 'followed', 'system'], 'options' => [ ['label' => '文章通知', 'value' => 'posts'], @@ -551,7 +551,7 @@ class AKSRT_Admin_Schema_Users { ['key' => 'user_privacy_location', 'label' => '隐藏位置', 'type' => 'switch', 'default' => false], ]], ['key' => 'rewards', 'title' => '打赏设置', 'fields' => [ - ['key' => 'post_rewards_s', 'label' => '启用文章打赏', 'type' => 'switch', 'default' => false], + ['key' => 'post_rewards_s', 'label' => '启用文章打赏', 'type' => 'switch', 'default' => true], ['key' => 'post_rewards_text', 'label' => '打赏文案', 'type' => 'input', 'default' => ''], ['key' => 'post_rewards_img', 'label' => '打赏二维码', 'type' => 'media', 'default' => ''], ['key' => 'post_rewards_btn_text', 'label' => '打赏按钮文案', 'type' => 'input', 'default' => '赞赏'], @@ -656,7 +656,7 @@ class AKSRT_Admin_Schema_Users { ['key' => 'ban_appeal_keys', 'label' => '申诉关键词', 'type' => 'input', 'default' => ''], ]], ['key' => 'image', 'title' => '图片举报', 'fields' => [ - ['key' => 'user_report_img_s', 'label' => '启用图片举报', 'type' => 'switch', 'default' => false], + ['key' => 'user_report_img_s', 'label' => '启用图片举报', 'type' => 'switch', 'default' => true], ['key' => 'user_report_desc', 'label' => '举报说明', 'type' => 'textarea', 'default' => ''], ]], ],