Changeset 226645
- Timestamp:
- 04/08/2010 08:14:42 PM (16 years ago)
- Location:
- feedlist/trunk/feedList
- Files:
-
- 3 added
- 2 edited
-
feedlist.php (modified) (5 diffs)
-
handler_image.php (added)
-
readme.txt (modified) (3 diffs)
-
simplepie.inc (added)
-
simplepie.php (added)
Legend:
- Unmodified
- Added
- Removed
-
feedlist/trunk/feedList/feedlist.php
r195375 r226645 6 6 Author: Bill Rawlinson 7 7 Author URI: http://blog.rawlinson.us/ 8 Version: 2. 518 Version: 2.6 9 9 */ 10 10 11 11 // setup error level 12 error_reporting(E_ERROR); 12 error_reporting(0); 13 14 15 // use Magpie? or SimplePie? 16 $useMagPie = true; 13 17 14 18 … … 17 21 $relroot = ABSPATH . '/'; 18 22 require_once('feedListExtensions.php'); 19 // get the magpie libary20 if (file_exists($relroot . 'wp-includes/rss.php')) {21 require_once($relroot . 'wp-includes/rss.php');22 } else if(file_exists($relroot . 'wp-includes/rss-functions.php')){23 require_once($relroot . 'wp-includes/rss-functions.php');24 } else {25 function FeedListInitError(){26 ?>27 23 28 <div id="message" style="margin-top: 15px; padding: 10px;" class="updated fade">There was a problem initializing the feedlist plugin. Make sure the file feedlist.php is in the feedList directory under your <strong>wp-content/plugins</strong> directory.</div> 29 <? 30 } 24 25 26 27 if($useMagPie){ 28 // get the magpie libary 29 if (file_exists($relroot . 'wp-includes/rss.php')) { 30 require_once($relroot . 'wp-includes/rss.php'); 31 } else if(file_exists($relroot . 'wp-includes/rss-functions.php')){ 32 require_once($relroot . 'wp-includes/rss-functions.php'); 33 } else { 34 function FeedListInitError(){ 35 ?> 36 <div id="message" style="margin-top: 15px; padding: 10px;" class="updated fade">There was a problem initializing the feedlist plugin. Make sure the file feedlist.php is in the feedList directory under your <strong>wp-content/plugins</strong> directory.</div> 37 <? 38 } 39 } 40 } else{ 41 require_once('simplepie.php'); 31 42 } 32 43 // end … … 97 108 $this->rs = $this->GetFeed($feedUrl); 98 109 99 if($this->rs){ 100 $this->items = $this->rs->items; 101 110 if($this->items){ 102 111 if($this->args['random']){ 103 112 shuffle($this->items); … … 240 249 241 250 $this->output = ''; 242 if($this->rs){ 243 $this->items = $this->rs->items; 251 if($this->items){ 244 252 if($this->args['random']){ 245 253 shuffle($this->items); … … 550 558 if(function_exists('fetch_rss')){ 551 559 $this->feed = fetch_rss($feedUrl); 552 } 560 if($this->feed){ 561 $this->items = $this->feed->items; 562 } 563 }elseif(function_exists('simplepie_fetch_rss')) { 564 $this->feed = simplepie_fetch_rss($feedUrl,!$this->args['ignore_cache'],$settings["cacheTimeout"]); 565 if($this->feed){ 566 $this->items = $this->feed["items"]; 567 } 568 }else { 569 print ('rss functionality not available'); 570 } 553 571 return $this->feed; 554 572 -
feedlist/trunk/feedList/readme.txt
r195375 r226645 4 4 Tags: rss, atom, feeds, listings 5 5 Requires at least: 1.5 6 Tested up to: 2.8.47 Stable tag: 2. 516 Tested up to: 3.0 7 Stable tag: 2.6 8 8 9 9 Allows you to display lists of links from an rss or atom feed on your blog. … … 97 97 98 98 19 Jan 2010 Added new option of to display rel="nofollow" on the links. Option is called "no_follow_on" and by default is set to false. 99 100 08 Apr 2010 Added support for SimplePIE feed parsing as an alternative to the default magpie choice. 99 101 ------------------------------------------------------------------------------------------------------- 100 102 … … 252 254 253 255 256 ------------------- 257 SIMPLE PIE 258 ------------------- 259 If your feeds don't show up properly OR you just want to use a more modern feed parsing engine go into feedList.php and change $useMagPie = false; instead of true. 260 Eventually this will be the only way I pull back feeds but to insure backward compatability at the moment magpie is remaining the default parser. 254 261 255 262
Note: See TracChangeset
for help on using the changeset viewer.