“系统设置”
#XOOPS系统设置
本指南涵盖了 XOOPS 管理面板中提供的完整系统设置(按类别组织)。
系统设置架构
Section titled “系统设置架构”graph TD A[System Settings] --> B[General Settings] A --> C[User Settings] A --> D[Module Settings] A --> E[Meta Tags & Footer] A --> F[Email Settings] A --> G[Cache Settings] A --> H[URL Settings] A --> I[Security Settings] B --> B1[Site Name] B --> B2[Timezone] B --> B3[Language] C --> C1[Registration] C --> C2[Profiles] C --> C3[Permissions] F --> F1[SMTP Config] F --> F2[Notification Rules]访问系统设置
Section titled “访问系统设置”管理面板 > 系统 > 首选项
或者直接导航:
http://your-domain.com/xoops/admin/index.php?fct=preferences- 只有管理员(网站管理员)可以访问系统设置
- 更改会影响整个网站
- 大多数更改立即生效
XOOPS 安装的基本配置。
Site Name: [Your Site Name]Default Description: [Brief description of your site]Site Slogan: [Catchy slogan]Admin Email: admin@your-domain.comWebmaster Name: Administrator NameWebmaster Email: admin@your-domain.comDefault Theme: [Select theme]Default Language: English (or preferred language)Items Per Page: 15 (typically 10-25)Words in Snippet: 25 (for search results)Theme Upload Permission: Disabled (security)Default Timezone: [Your timezone]Date Format: %Y-%m-%d (YYYY-MM-DD format)Time Format: %H:%M:%S (HH:MM:SS format)Daylight Saving Time: [Auto/Manual/None]时区格式表:
| 地区 | 时区 | UTC偏移 |
|---|---|---|
| 美国东部航空 | America/New_York | -5 / -4 |
| 美国中部 | America/Chicago | -6 / -5 |
| 美国山 | America/Denver | -7 / -6 |
| 美国太平洋 | America/Los_Angeles | -8 / -7 |
| UK/London | Europe/London | 0 / +1 |
| France/Germany | Europe/Paris | +1 / +2 |
| 日本 | Asia/Tokyo | +9 |
| 中国 | Asia/Shanghai | +8 |
| Australia/Sydney | Australia/Sydney | +10 / +11 |
Enable Search: YesSearch Admin Pages: Yes/NoSearch Archives: YesDefault Search Type: All / Pages onlyWords Excluded from Search: [Comma-separated list]常见排除词: the、a、an、and、or、but、in、on、at、by、to、from
控制用户帐户行为和注册过程。
Allow User Registration: Yes/NoRegistration Type: ☐ Auto-activate (Instant access) ☐ Admin approval (Admin must approve) ☐ Email verification (User must verify email)
Notification to Users: Yes/NoUser Email Verification: Required/OptionalAuto-login New Users: Yes/NoAssign Default User Group: YesDefault User Group: [Select group]Create User Avatar: Yes/NoInitial User Avatar: [Select default]用户配置文件设置
Section titled “用户配置文件设置”Allow User Profiles: YesShow Member List: YesShow User Statistics: YesShow Last Online Time: YesAllow User Avatar: YesAvatar Max File Size: 100KBAvatar Dimensions: 100x100 pixels用户电子邮件设置
Section titled “用户电子邮件设置”Allow Users to Hide Email: YesShow Email on Profile: YesNotification Email Interval: Immediately/Daily/Weekly/Never用户活动跟踪
Section titled “用户活动跟踪”Track User Activity: YesLog User Logins: YesLog Failed Logins: YesTrack IP Address: YesClear Activity Logs Older Than: 90 daysAllow Duplicate Email: NoMinimum Username Length: 3 charactersMaximum Username Length: 15 charactersMinimum Password Length: 6 charactersRequire Special Characters: YesRequire Numbers: YesPassword Expiration: 90 days (or Never)Accounts Inactive Days to Delete: 365 days配置各个模区块的行为。
通用模区块选项
Section titled “通用模区块选项”对于每个已安装的模区块,您可以设置:
Module Status: Active/InactiveDisplay in Menu: Yes/NoModule Weight: [1-999] (higher = lower in display)Homepage Default: This module shows when visiting /Admin Access: [Allowed user groups]User Access: [Allowed user groups]系统模区块设置
Section titled “系统模区块设置”Show Homepage as: Portal / Module / Static PageDefault Homepage Module: [Select module]Show Footer Menu: YesFooter Color: [Color selector]Show System Stats: YesShow Memory Usage: Yes每个模区块的配置
Section titled “每个模区块的配置”每个模区块可以有模区块-specific设置:
示例 - 页面模区块:
Enable Comments: Yes/NoModerate Comments: Yes/NoComments Per Page: 10Enable Ratings: YesAllow Anonymous Ratings: Yes示例 - 用户模区块:
Avatar Upload Folder: ./uploads/Maximum Upload Size: 100KBAllow File Upload: YesAllowed File Types: jpg, gif, png访问模区块-specific设置:
- 管理 > 模区块 > [模区块名称] > 首选项
元标签和SEO设置
Section titled “元标签和SEO设置”配置元标记以进行搜索引擎优化。
Meta Keywords: xoops, cms, content management systemMeta Description: A powerful content management system for building dynamic websitesMeta Author: Your NameMeta Copyright: Copyright 2025, Your CompanyMeta Robots: index, followMeta Revisit: 30 days元标记最佳实践
Section titled “元标记最佳实践”| 标签 | 目的 | 推荐 |
|---|---|---|
| 关键词 | 搜索词 | 5-10 个相关关键字,逗号-separated |
| 描述 | 搜索列表 | 150-160 个字符 |
| 作者 | 页面创建者 | 您的姓名或公司 |
| 版权所有 | 法律 | 您的版权声明 |
| 机器人 | 爬虫使用说明 | 索引,跟随(允许索引) |
Show Footer: YesFooter Color: Dark/LightFooter Background: [Color code]Footer Text: [HTML allowed]Additional Footer Links: [URL and text pairs]页脚示例 HTML:
<p>Copyright © 2025 Your Company. All rights reserved.</p><p><a href="/privacy">Privacy Policy</a> | <a href="/terms">Terms of Use</a></p>社交元标签(开放图谱)
Section titled “社交元标签(开放图谱)”Enable Open Graph: YesFacebook App ID: [App ID]Twitter Card Type: summary / summary_large_image / playerDefault Share Image: [Image URL]电子邮件设置
Section titled “电子邮件设置”配置电子邮件发送和通知系统。
电子邮件发送方式
Section titled “电子邮件发送方式”Use SMTP: Yes/No
If SMTP: SMTP Host: smtp.gmail.com SMTP Port: 587 (TLS) or 465 (SSL) SMTP Security: TLS / SSL / None SMTP Username: [email@example.com] SMTP Password: [password] SMTP Authentication: Yes/No SMTP Timeout: 10 seconds
If PHP mail(): Sendmail Path: /usr/sbin/sendmail -t -i电子邮件配置
Section titled “电子邮件配置”From Address: noreply@your-domain.comFrom Name: Your Site NameReply-To Address: support@your-domain.comBCC Admin Emails: Yes/NoSend Welcome Email: Yes/NoWelcome Email Subject: Welcome to [Site Name]Welcome Email Body: [Custom message]
Send Password Reset Email: Yes/NoInclude Random Password: Yes/NoToken Expiration: 24 hoursNotify Admin on Registration: YesNotify Admin on Comments: YesNotify Admin on Submissions: YesNotify Admin on Errors: YesNotify User on Registration: YesNotify User on Comments: YesNotify User on Private Messages: YesAllow Users to Disable Notifications: YesDefault Notification Frequency: Immediately电子邮件模板
Section titled “电子邮件模板”在管理面板中自定义通知电子邮件:
**路径:**系统 > 电子邮件模板
可用模板:
- 用户注册
- 密码重置
- 评论通知
- 私人讯息
- 系统警报
- 模区块-specific电子邮件
通过缓存优化性能。
Enable Caching: Yes/NoCache Type: ☐ File Cache ☐ APCu (Alternative PHP Cache) ☐ Memcache (Distributed caching) ☐ Redis (Advanced caching)
Cache Lifetime: 3600 seconds (1 hour)按类型划分的缓存选项
Section titled “按类型划分的缓存选项”文件缓存:
Cache Directory: /var/www/html/xoops/cache/Clear Interval: DailyMaximum Cache Files: 1000APCu 缓存:
Memory Allocation: 128MBFragmentation Level: LowMemcache/Redis:
Server Host: localhostServer Port: 11211 (Memcache) / 6379 (Redis)Persistent Connection: YesCache Module Lists: YesCache Configuration Data: YesCache Template Data: YesCache User Session Data: YesCache Search Results: YesCache Database Queries: YesCache RSS Feeds: YesCache Images: YesURL 设置
Section titled “URL 设置”配置URL重写和格式化。
友好URL设置
Section titled “友好URL设置”Enable Friendly URLs: Yes/NoFriendly URL Type: ☐ Path Info: /page/about ☐ Query String: /index.php?p=about
Trailing Slash: Include / OmitURL Case: Lower case / Case sensitiveURL重写规则
Section titled “URL重写规则”.htaccess Rules: [Display current]Nginx Rules: [Display current if Nginx]IIS Rules: [Display current if IIS]控制安全-related配置。
Password Policy: ☐ Require uppercase letters ☐ Require lowercase letters ☐ Require numbers ☐ Require special characters
Minimum Password Length: 8 charactersPassword Expiration: 90 daysPassword History: Remember last 5 passwordsForce Password Change: On next loginLock Account After Failed Attempts: 5 attemptsLock Duration: 15 minutesLog All Login Attempts: YesLog Failed Logins: YesAdmin Login Alert: Send email on admin loginTwo-Factor Authentication: Disabled/Enabled文件上传安全
Section titled “文件上传安全”Allow File Uploads: Yes/NoMaximum File Size: 128MBAllowed File Types: jpg, gif, png, pdf, zip, doc, docxScan Uploads for Malware: Yes (if available)Quarantine Suspicious Files: YesSession Management: Database/FilesSession Timeout: 1800 seconds (30 min)Session Cookie Lifetime: 0 (until browser closes)Secure Cookie: Yes (HTTPS only)HTTP Only Cookie: Yes (prevent JavaScript access)CORS 设置
Section titled “CORS 设置”Allow Cross-Origin Requests: NoAllowed Origins: [List domains]Allow Credentials: NoAllowed Methods: GET, POST高级用户的附加配置选项。### 调试模式
Debug Mode: Disabled/EnabledLog Level: Error / Warning / Info / DebugDebug Log File: /var/log/xoops_debug.logDisplay Errors: Disabled (production)Optimize Database Queries: YesUse Query Cache: YesCompress Output: YesMinify CSS/JavaScript: YesLazy Load Images: YesAllow HTML in Posts: Yes/NoAllowed HTML Tags: [Configure]Strip Harmful Code: YesAllow Embed: Yes/NoContent Moderation: Automatic/ManualSpam Detection: Yes设置Export/Import
Section titled “设置Export/Import”导出当前设置:
管理面板 > 系统 > 工具 > 导出设置
# Settings exported as JSON file# Download and store securely导入之前导出的设置:
管理面板 > 系统 > 工具 > 导入设置
# Upload JSON file# Verify changes before confirming配置层次结构
Section titled “配置层次结构”XOOPS设置层次结构(从上到下 - 第一场比赛获胜):
1. mainfile.php (Constants)2. Module-specific config3. Admin System Settings4. Theme configuration5. User preferences (for user-specific settings)设置备份脚本
Section titled “设置备份脚本”创建当前设置的备份:
<?phprequire_once __DIR__ . '/mainfile.php';
$config_handler = xoops_getHandler('config');$configs = $config_handler->getConfigs();
$backup = [ 'exported_date' => date('Y-m-d H:i:s'), 'xoops_version' => XOOPS_VERSION, 'php_version' => PHP_VERSION, 'settings' => []];
foreach ($configs as $config) { $backup['settings'][$config->getVar('conf_name')] = [ 'value' => $config->getVar('conf_value'), 'description' => $config->getVar('conf_desc'), 'type' => $config->getVar('conf_type'), ];}
// Save to JSON filefile_put_contents( '/backups/xoops_settings_' . date('YmdHis') . '.json', json_encode($backup, JSON_PRETTY_PRINT));
echo "Settings backed up successfully!";?>常见设置更改
Section titled “常见设置更改”更改站点名称
Section titled “更改站点名称”- 管理 > 系统 > 首选项 > 常规设置 2.修改“站点名称”
- 点击“保存”
Enable/Disable 注册
Section titled “Enable/Disable 注册”- 管理 > 系统 > 首选项 > 用户设置
- 切换“允许用户注册” 3.选择注册类型
- 点击“保存”
更改默认主题
Section titled “更改默认主题”- 管理 > 系统 > 首选项 > 常规设置 2.选择“默认主题”
- 点击“保存”
- 清除缓存以使更改生效
更新联系电子邮件
Section titled “更新联系电子邮件”- 管理 > 系统 > 首选项 > 常规设置 2.修改“管理员邮箱” 3.修改“站长邮箱”
- 点击“保存”
配置系统设置后,验证:
- 站点名称正确显示
- 时区显示正确时间
- 电子邮件通知正确发送
- 用户注册按配置进行
- 主页显示选定的默认值
- 搜索功能有效
- 缓存提高了页面加载时间
- 友好 URL 有效(如果启用)
- 元标记出现在页面源代码中
- 收到管理员通知
- 强制执行安全设置
故障排除设置
Section titled “故障排除设置”解决方案:
# Check file permissions on config directorychmod 755 /var/www/html/xoops/var/
# Verify database writable# Try saving again in admin panel解决方案:
# Clear cacherm -rf /var/www/html/xoops/cache/*rm -rf /var/www/html/xoops/templates_c/*
# If still not working, restart web serversystemctl restart apache2电子邮件未发送
Section titled “电子邮件未发送”解决方案:
- 验证电子邮件设置中的 SMTP 凭据
- 使用“发送测试电子邮件”按钮进行测试 3.检查错误日志
- 尝试使用 PHP mail() 代替 SMTP
系统设置配置后:
- 配置安全设置 2、优化性能 3.探索管理面板功能
- 设置用户管理
标签: #system-settings #configuration #preferences #admin-panel
相关文章:
- ../../06-Publisher-Module/User-Guide/Basic-Configuration
- 安全-Configuration
- 性能-Optimization
- ../First-Steps/Admin-Panel-Overview