定制 mpc/mpc-rss 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

mpc/mpc-rss

Composer 安装命令:

composer require mpc/mpc-rss

包简介

TYPO3 extension to fetch and render RSS feeds grouped by category, date or author.

README 文档

README

TYPO3 extension for displaying RSS/Atom feeds with grouping, pagination, and background updates.

Requirements

  • TYPO3 13.x or 14.x
  • PHP 8.2+

Installation

composer require mpc/mpc-rss

Activate in the Extension Manager, then run Maintenance > Analyze Database Structure.

Quick Start

  1. Add a content element: Plugin > MPC RSS Feed
  2. Click Add Feed and enter one or more RSS/Atom URLs
  3. Choose a grouping mode and save

Feeds are stored as inline records directly on the content element -- no storage page needed.

Background Updates

Feeds are cached per URL. To keep them fresh without making visitors wait:

Scheduler (recommended): System > Scheduler > Add Task > "Update RSS Feeds" -- set frequency to e.g. every 30 minutes.

CLI:

vendor/bin/typo3 mpcrss:updatefeeds
vendor/bin/typo3 mpcrss:updatefeeds --clear-cache --cache-lifetime=3600

See Automatic Feed Updates for details and troubleshooting.

Architecture

Request
  └─ FeedController::listAction()
       ├─ FeedRepository → inline feed records from tt_content
       └─ FeedService::fetchGroupedByCategory()
            ├─ fetchFeedItems()       per-URL HTTP fetch + XML parse + cache
            ├─ deduplicateItems()     link-based dedup across feeds
            ├─ groupItems()           category / source / date / none
            └─ sortAndSliceGroups()   date-desc sort + maxItems limit

Key design decisions:

  • Dedicated CType (mpcrss_feed) via PLUGIN_TYPE_CONTENT_ELEMENT, not list_type
  • IRRE inline records -- feeds belong to the content element, not a storage page
  • Isolated cache (mpc_rss) -- clearing page cache doesn't affect feed data
  • External content is sanitized at the caching layer (tags, attributes, URL schemes)
  • Service layer is language-neutral; the controller translates generated group labels via XLF
  • warmCache() skips grouping/sorting -- efficient for CLI and Scheduler

Content Security Policy

Feed items can reference remote images (entry.image) and link out to external articles. Because feed image hosts are not known in advance, the extension ships a frontend policy (Configuration/ContentSecurityPolicies.php) that extends img-src with the https: scheme. If you prefer a tighter policy, override it in your site package to allow only the specific hosts your feeds serve images from, e.g.:

use TYPO3\CMS\Core\Security\ContentSecurityPolicy\Directive;
use TYPO3\CMS\Core\Security\ContentSecurityPolicy\Mutation;
use TYPO3\CMS\Core\Security\ContentSecurityPolicy\MutationCollection;
use TYPO3\CMS\Core\Security\ContentSecurityPolicy\MutationMode;
use TYPO3\CMS\Core\Security\ContentSecurityPolicy\Scope;
use TYPO3\CMS\Core\Security\ContentSecurityPolicy\SourceScheme;
use TYPO3\CMS\Core\Type\Map;

return Map::fromEntries([
    Scope::frontend(),
    new MutationCollection(
        // Restrict to the specific feed image hosts you use rather than a wildcard.
        new Mutation(MutationMode::Extend, Directive::ImgSrc, SourceScheme::https),
    ),
]);

The extension never emits inline scripts or styles, so no script-src / style-src relaxation is required.

Documentation

License

GPL-2.0-or-later

mpc/mpc-rss 适用场景与选型建议

mpc/mpc-rss 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 74 次下载、GitHub Stars 达 2, 最近一次更新时间为 2025 年 11 月 03 日, 在 PHP 生态内属于活跃度较高的组件。

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

围绕 mpc/mpc-rss 我们能提供哪些服务?
定制开发 / 二次开发

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

  • 总下载量: 74
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 21
  • 依赖项目数: 0
  • 推荐数: 1

GitHub 信息

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

其他信息

  • 授权协议: GPL-2.0-or-later
  • 更新时间: 2025-11-03