seiger/sarticles 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

seiger/sarticles

Composer 安装命令:

composer require seiger/sarticles

包简介

Blog News and Articles Management Module for Evolution CMS admin panel.

README 文档

README

Latest Stable Version CMS Evolution PHP version License Issues Total Downloads

sArticles is a publications, news, and blog management module for the Evolution CMS manager.

The current manager interface is rebuilt on top of EvoUI and Livewire. It works as a responsive SPA-like manager module: tabs, filters, sorting, pagination, modal forms, inline actions, and content editing update through Livewire instead of full iframe reloads.

sArticles publications manager

Features

  • Publications with multiple configurable resource types.
  • EvoUI tables with table/list views, filters, search, sorting, pagination, selection, bulk-style actions, and session state.
  • Future publication dates keep published records hidden on the frontend until their time.
  • Large modal article editor with main fields, relations, SEO fields, multilingual tabs, and a content builder.
  • Content builder blocks: RichText, SingleImg, Image and Text, YouTube, Quote, Note, ArticlePreview, Poll, Slider, Accordion, and File.
  • Authors, tags, tag texts, topics, features, comments, polls, and TV parameter management.
  • Native optional integrations with sSeo, sLang, eTinyMCE, and dTui.editor.
  • Publication comments, rating, poll votes, view tracking, aliases, and frontend helper API.
  • Configurable module settings use package defaults and save project overrides only after changes.

Screenshots

Article editor

sArticles article editor

Module settings

sArticles module settings

Requirements

  • PHP ^8.4
  • Evolution CMS ^3.5.7
  • evolution-cms/evo-ui ^1.0.2
  • Livewire, as provided by the Evolution CMS/EvoUI runtime

Optional packages:

  • seiger/sseo for SEO fields and sitemap metadata.
  • seiger/slang for multilingual content.
  • eTinyMCE or dTui.editor for rich text fields.

Installation

Run inside the Evolution CMS core directory.

php artisan package:installrequire seiger/sarticles "*"
php artisan vendor:publish --tag=evo-ui --force
php artisan vendor:publish --provider="Seiger\\sArticles\\sArticlesServiceProvider" --tag=sarticles
php artisan migrate

evolution-cms/evo-ui owns the shared manager CSS/JS runtime. With EvoUI 1.0.2+, vendor:publish --tag=evo-ui --force publishes those files through Evolution CMS symlink-aware publish declarations, so sArticles does not expose or copy assets directly from core/vendor.

The sarticles publish tag prepares package assets and the local settings directory placeholder. It does not copy the full settings file by default. sArticles reads defaults from the package and creates the project override only after settings are changed in the manager.

In Extras-based development environments the package can also be installed with the Evolution Extras command used by the project:

php artisan extras extras "sArticles"

After changing settings in the manager, project overrides are saved to:

core/custom/config/seiger/settings/sArticles.php

Upgrading From 1.x To 2.x

sArticles 2.x keeps the public sArticles:: facade API, but the alias is now registered by Seiger\sArticles\sArticlesServiceProvider at runtime.

If an older 1.x installation has the generated alias file below, remove it after upgrading:

core/custom/config/app/aliases/sArticles.php

The package no longer needs an extra.laravel.aliases entry in composer.json, and the alias file should not be copied or published manually. Provider discovery is still handled by extra.laravel.providers; use extra.laravel.priority only when a concrete provider load-order requirement appears.

Builder Render Customization

Builder block HTML is rendered through lowercase Laravel package views such as:

sarticles::render.richtext
sarticles::render.quote

To customize markup, copy only the needed package view into the site override path:

views/vendor/sarticles/render/richtext.blade.php
views/vendor/sarticles/render/quote.blade.php

Existing articles keep materialized HTML in the content column. After changing render views, refresh stored HTML explicitly:

php artisan sarticles:rerender --dry-run
php artisan sarticles:rerender --articles=123-10000 --chunk=200

Documentation

Localized documentation lives in docs/:

Each language contains a user guide and a developer guide.

Quick Frontend Usage

@php($articles = sArticles::all(10))

@foreach($articles as $article)
    <a href="{{ $article->link }}">{{ $article->pagetitle }}</a>
@endforeach

Frontend helpers use the active-publication rule: published = 1 and published_at is empty or not later than the current site time.

Useful facade methods:

  • sArticles::all($paginate = 30)
  • sArticles::comments($paginate = 30, $articleIds = [])
  • sArticles::getArticle($id)
  • sArticles::getArticleByAlias($alias)
  • sArticles::resolveArticleByUri($segments)
  • sArticles::trackView($article)
  • sArticles::showPoll($id)
  • sArticles::ratingVotes($id)
  • sArticles::setComment($id)
  • sArticles::publishArticle()
  • sArticles::config($key, $default = null)

Native Integrations

EvoUI + Livewire

sArticles registers an EvoUI module panel and table/form presets. The manager UI is driven by Livewire components and package config files:

  • config/articles/table.php
  • config/articles/modal.php
  • config/*/table.php
  • config/settings/form.php

sSeo

sArticles exposes manager and frontend hooks for SEO packages. When sSeo is installed, it uses those hooks to render and save SEO data for resource type article.

  • Without sLang, SEO fields are shown as a standalone SEO area in the article modal.
  • With sLang, SEO fields are attached to each language flow.
  • In multisite projects, SEO data is saved under the article owner's site key instead of a shared default key.

sLang

When sLang is installed, article modal tabs are generated from the language configuration. Shared article data remains global, while translated fields and content are saved per language.

Rich Text Editors

The module setting general.editor controls which editor sArticles uses:

  • system uses EVO which_editor.
  • A registered editor name, such as eTinyMCE or dTuiEditor, forces that editor inside sArticles.

Per-field editor selectors are intentionally hidden in sArticles forms to keep the article UI compact and predictable.

Development Notes

  • The new manager UI is config-driven and uses EvoUI/Livewire.
  • Legacy manager blades, scripts, and styles are removed from the new flow.
  • Use EVO_* constants for Evolution paths; old compatibility aliases should not be used in new code.
  • Keep module-specific hooks in sArticles, not in EvoUI.
  • Keep package-specific integrations in the integrating package. sArticles provides hooks; packages like sSeo provide their own fields, defaults, render logic, and save logic.
  • Use table presets for manager lists and modal presets for edit/create flows.

License

GPL-3.0-or-later.

seiger/sarticles 适用场景与选型建议

seiger/sarticles 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 192 次下载、GitHub Stars 达 4, 最近一次更新时间为 2023 年 06 月 14 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「evocms」 「evolution-cms」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 seiger/sarticles 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 seiger/sarticles 我们能提供哪些服务?
定制开发 / 二次开发

基于 seiger/sarticles 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 192
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 4
  • 点击次数: 36
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 4
  • Watchers: 1
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-3.0
  • 更新时间: 2023-06-14