定制 entidi/feedreader 二次开发

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

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

entidi/feedreader

Composer 安装命令:

composer require entidi/feedreader

包简介

A new page type that can access the data of an external feed

README 文档

README

License Build Status Code Quality Latest Stable Version

The silverstripe-feedreader module implements a new page type (FeedReaderPage) that can access the data contained in an external RSS 2.0 or ATOM 1.0 feed. The feed format is automatically deduced from its content, that is if the //channel/item XPath expression resolves to a non-emtpy list it is considered an RSS2 feed, otherwise it is considered ATOM1, and the //feed/entry expression will be used instead.

The main developement is done in dev: that is merged into master when stable enough. When this happens, an appropriate 2.* release is tagged. dev and master branches, together with any 2.* release, are compatibles with SilverStripe 4. For SilverStripe 3 you should take a look at the ss3 branch and 1.* releases.

Installation

With composer:

composer require entidi/feedreader

Without composer, download the tarball and unpack it under the base directory. This method is not really tested, so it can be possible you will need to tweak something.

Usage

The default template (templates/eNTiDi/FeedReader/Layout/FeedReaderPage.ss) is compatible with silverstrap ^4.0 but it can be easily overriden by redefining the FeedReaderPage.ss file in your own theme with higher priority.

To provide access to the latest news, you can define a function similar to the following:

public function LatestNews()
{
    $news = DataObject::get_one('eNTiDi\FeedReader\FeedReaderPage');
    return $news ? $news->Items(1)->first() : null;
}

Then you can enhance your feed page with a template snippet, e.g.:

<% with $LatestNews %>
<h2>Latest news</h2>
<section>
    <p>$Date.Date: $Summary.XML</p>
    <a href="$Link.ATT">More ...</a>
</section>
<% end_with %>

Support

This project has been developed by ntd. Its home page is shared by other SilverStripe modules and themes.

To check out the code, report issues or propose enhancements, go to the dedicated tracker. Alternatively, you can do the same things by leveraging the official github repository.

统计信息

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

GitHub 信息

  • Stars: 3
  • Watchers: 2
  • Forks: 3
  • 开发语言: PHP

其他信息

  • 授权协议: BSD-2-Clause
  • 更新时间: 2014-01-06

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固