跳转到内容

“发布者 - 基本配置”

为您的 XOOPS 安装配置 Publisher 模区块设置、首选项和常规选项。


XOOPS Admin Panel
└── Modules
└── Publisher
├── Preferences
├── Settings
└── Configuration
  1. 管理员身份登录
  2. 进入管理面板→模区块 3.找到Publisher模区块
  3. 单击 首选项管理 链接

Admin Panel → Modules → Publisher

单击 齿轮图标设置 以获取以下选项:

设置选项默认描述
每页项目5-501010列表中显示的文章
显示面包屑Yes/No是的导航轨迹显示
使用分页Yes/No是的对长列表进行分页
显示日期Yes/No是的显示文章日期
显示类别Yes/No是的显示文章类别
显示作者Yes/No是的显示文章作者
显示视图Yes/No是的显示文章浏览次数

配置示例:

Items Per Page: 15
Show Breadcrumb: Yes
Use Paging: Yes
Show Date: Yes
Show Category: Yes
Show Author: Yes
Show Views: Yes
设置默认描述
显示作者姓名是的显示真实姓名或用户名
使用用户名没有显示用户名而不是姓名
显示作者电子邮件没有显示作者联系电子邮件
显示作者头像是的显示用户头像

Publisher 支持多个编辑器:

graph LR
A[Editor Selection] -->|CKEditor| B[Modern, feature-rich]
A -->|FCKeditor| C[Legacy, compatible]
A -->|TinyMCE| D[Lightweight, simple]
A -->|DHTML Editor| E[Very basic, minimal]

最适合: 大多数用户、现代浏览器、完整功能

  1. 转到首选项 2.设置编辑器:CKEditor
  2. 配置选项:
Editor: CKEditor 4.x
Toolbar: Full
Height: 400px
Width: 100%
Remove plugins: []
Add plugins: [mathjax, codesnippet]

最适合: 兼容性、旧系统

Editor: FCKeditor
Toolbar: Default
Custom config: (optional)

最适合: 占用空间最小,基本编辑

Editor: TinyMCE
Plugins: [paste, table, link, image]
Toolbar: minimal

Admin → Publisher → Preferences → Upload Settings
Allowed File Types:
Images:
- jpg
- jpeg
- gif
- png
- webp
Documents:
- pdf
- doc
- docx
- xls
- xlsx
- ppt
- pptx
Archives:
- zip
- rar
- 7z
Media:
- mp3
- mp4
- webm
- mov
文件类型最大尺寸笔记
图像5 MB每个图像文件
文件10 MBPDF, Office 文件
媒体50 MBVideo/audio 文件
所有文件100 MB每次上传总计

配置:

Max Image Upload Size: 5 MB
Max Document Upload Size: 10 MB
Max Media Upload Size: 50 MB
Total Upload Size: 100 MB
Max Files per Article: 5

发布商自动-resizes图像以保持一致性:

Thumbnail Size:
Width: 150
Height: 150
Mode: Crop/Resize
Category Image Size:
Width: 300
Height: 200
Mode: Resize
Article Featured Image:
Width: 600
Height: 400
Mode: Resize

Preferences → Comments Section
Allow Comments:
- Enabled: Yes/No
- Default: Yes
- Per-article override: Yes
Comment Moderation:
- Moderate comments: Yes/No
- Moderate guest comments only: Yes/No
- Spam filter: Enabled
- Max comments per day: (unlimited)
Comment Display:
- Display format: Threaded/Flat
- Comments per page: 10
- Date format: Full date/Time ago
- Show comment count: Yes/No
Allow Ratings:
- Enabled: Yes/No
- Default: Yes
- Per-article override: Yes
Rating Options:
- Rating scale: 5 stars (default)
- Allow user to rate own: No
- Show average rating: Yes
- Show rating count: Yes

Preferences → SEO Settings
SEO URLs:
- Enabled: No (set to Yes for SEO URLs)
- URL rewriting: None/Apache mod_rewrite/IIS rewrite
URL Format:
- Category: /category/news
- Article: /article/welcome-to-site
- Archive: /archive/2024/01
Meta Description:
- Auto-generate: Yes
- Max length: 160 characters
Meta Keywords:
- Auto-generate: Yes
- From: Article tags, title

先决条件:

  • Apache 启用了mod_rewrite
  • .htaccess支持已启用

配置步骤:

  1. 转到 首选项 → SEO 设置
  2. 设置SEO URL:是 3.设置URL重写:Apache mod_rewrite
  3. 验证 Publisher 文件夹中是否存在 .htaccess 文件

.htaccess 配置:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /modules/publisher/
# Category rewrites
RewriteRule ^category/([0-9]+)-(.*)\.html$ index.php?op=showcategory&categoryid=$1 [L,QSA]
# Article rewrites
RewriteRule ^article/([0-9]+)-(.*)\.html$ index.php?op=showitem&itemid=$1 [L,QSA]
# Archive rewrites
RewriteRule ^archive/([0-9]+)/([0-9]+)/$ index.php?op=archive&year=$1&month=$2 [L,QSA]
</IfModule>

Preferences → Cache Settings
Enable Caching:
- Enabled: Yes
- Cache type: File (or Memcache)
Cache Lifetime:
- Category lists: 3600 seconds (1 hour)
- Article lists: 1800 seconds (30 minutes)
- Single article: 7200 seconds (2 hours)
- Recent articles block: 900 seconds (15 minutes)
Cache Clear:
- Manual clear: Available in admin
- Auto-clear on article save: Yes
- Clear on category change: Yes

手动缓存清除:

  1. 转到管理→发布者→工具
  2. 单击清除缓存
  3. 选择要清除的缓存类型:
    • 类别缓存
    • 文章缓存
    • 区块缓存
    • 所有缓存
  4. 单击清除所选

命令行:

Terminal window
# Clear all Publisher cache
php /path/to/xoops/admin/cache_manage.php publisher
# Or directly delete cache files
rm -rf /path/to/xoops/var/cache/publisher/*

Preferences → Notifications
Notify Admin on New Article:
- Enabled: Yes
- Recipient: Admin email
- Include summary: Yes
Notify Moderators:
- Enabled: Yes
- On new submission: Yes
- On pending articles: Yes
Notify Author:
- On approval: Yes
- On rejection: Yes
- On comment: No (optional)
Require Approval:
- Enabled: Yes
- Editor approval: Yes
- Admin approval: No
Draft Save:
- Auto-save interval: 60 seconds
- Save local versions: Yes
- Revision history: Last 5 versions

Preferences → Content Settings
Default Article Status:
- Draft/Published: Draft
- Featured by default: No
- Auto-publish time: None
Default Visibility:
- Public/Private: Public
- Show on front page: Yes
- Show in categories: Yes
Scheduled Publishing:
- Enabled: Yes
- Allow per-article: Yes
Content Expiration:
- Enabled: No
- Auto-archive old: No
- Archive after days: (unlimited)
Allow HTML:
- In articles: Yes
- In comments: No
Allow Embedded Media:
- Videos (iframe): Yes
- Images: Yes
- Plugins: No
Content Filtering:
- Strip tags: No
- XSS filter: Yes (recommended)

Preferences → Search Settings
Enable Article Indexing:
- Include in site search: Yes
- Index type: Full text/Title only
Search Options:
- Search in titles: Yes
- Search in content: Yes
- Search in comments: Yes
Meta Tags:
- Auto generate: Yes
- OG tags (social): Yes
- Twitter cards: Yes

Preferences → Advanced
Debug Mode:
- Enabled: No (only for development!)
Development Features:
- Show SQL queries: No
- Log errors: Yes
- Error email: admin@example.com
Admin → Tools → Optimize Database
Terminal window
# Manual optimization
mysql> OPTIMIZE TABLE publisher_items;
mysql> OPTIMIZE TABLE publisher_categories;
mysql> OPTIMIZE TABLE publisher_comments;

Preferences → Display → Templates

选择模板集:

  • 默认
  • 经典
  • 现代
  • 黑暗
  • 定制

每个模板控制:

  • 文章布局
  • 类别列表
  • 档案展示
  • 评论显示

graph TD
A[Configuration Strategy] -->|Start| B[Enable basic features]
B -->|Test| C[Verify functionality]
C -->|Scale| D[Enable advanced features]
D -->|Optimize| E[Performance tune]
E -->|Secure| F[Apply security settings]
  1. 从简单开始 - 首先启用核心功能
  2. 测试每个更改 - 在继续之前进行验证
  3. 启用缓存 - 提高性能
  4. 首先备份 - 在进行重大更改之前导出设置
  5. 监控日志 - 定期检查错误日志
For Better Performance:
- Enable caching: Yes
- Cache lifetime: 3600 seconds
- Limit items per page: 10-15
- Compress images: Yes
- Minify CSS/JS: Yes (if available)
For Better Security:
- Moderate comments: Yes
- Disable HTML in comments: Yes
- XSS filtering: Yes
- File type whitelist: Strict
- Max upload size: Reasonable limit

Admin → Tools → Export Settings

备份当前配置:

  1. 单击导出配置
  2. 保存下载的.cfg文件
  3. 存放在安全的地方

恢复:

  1. 单击导入配置
  2. 选择.cfg文件
  3. 单击“恢复

  • 品类管理
  • 文章创作
  • 权限配置
  • 安装指南

解决方案: 1.检查/var/config/的目录权限 2. 验证PHP写入权限 3. 检查 PHP 错误日志中的问题 4.清除浏览器缓存并重试

解决方案: 1.验证编辑器插件是否安装 2.检查XOOPS编辑器配置 3.尝试不同的编辑器选项 4. 检查浏览器控制台是否有 JavaScript 错误

解决方案: 1.启用缓存 2. 减少每页的项目 3. 压缩图像 4.检查数据库优化 5.查看慢查询日志


  • 配置组权限
  • 创建您的第一篇文章
  • 设置类别
  • 查看自定义模板

#publisher #configuration #preferences #settings #XOOPS