matl14/rssfeed 问题修复 & 功能扩展

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

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

matl14/rssfeed

Composer 安装命令:

composer require matl14/rssfeed

包简介

Simple Pie rss wrapper

关键字:

README 文档

README

Scrutinizer Code Quality Code Coverage Build Status

RSS wrapper

This repository is an RSS-wrapper around SimplePie, which is used to display RSS-feeds. The main focus of this repo is using the module with Anax-MVC, https://github.com/mosbth/Anax-MVC.

How to install

You can install it using composer as such:

"require": {
    "matl14/rssfeed": "dev-master"
},

How to use

If you are using this feed with Anax-MVC you can use it as following with your index.php:

$app->router->add('rss', function() use ($app) {

    require '../vendor/matl14/rss/src/library/CRSS.php';
    $feed = new \matl14\library\CRSS([
            'http://feeds.reuters.com/news/reutersmedia'
            'http://www.irishtimes.com/cmlink/news-1.1319192',
            'http://www.smhi.se/weatherSMHI2/varningar/smhi_alla_varningar.xml',
            'http://www.independent.ie/breaking-news/irish-news/'
    ]);
    
    $app->theme->setTitle("RSS");    
    $app->views->add('default/page', [
        'title' => 'RSS',        
        'content' => $feed->printFeed(),
    ]);

});

This will result in tapping into a feed from reuters.com and displaying the feed.

How to style

If you want to style the rss-feed you can for example style it like this:

div.rss {
	width: 700px;
}
.smaller{
	font-size: smaller;
}

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-12-11