Ahhh, feedroll was what I was thinking about.
I just helped someone else migrating to WP, and set up CG-Feedread. It’s really easy. Install the powerpack, CHMOD the cache directory(s) as the install doc notes, activate the FeedRead plugin, and while the FR docs are a bit out of date (in terms of some whiz-bang new features), displaying a feed, ‘safely’, is as easy as adding something like the following to your sidebar.php code:
<?php if (function_exists('getSomeFeed')) { ?>
<li id="newsfeed">
<?php
$feed = getSomeFeed("https://rss.news.yahoo.com/rss/tech", 6, true, "feed-yahootech", '', -1, 100);
if (!empty($feed))
{
echo '<ul><li>';
echo $feed;
echo '</li></ul>';
}
?>
</li>
<?php } ?>
Just to explain the code (I’m finding it helps some people after I post a snippet to explain it a little):
– the first (function_exists) thing is my ‘safety’ code. by checking that my FeedRead function exists, if you turn OFF the plugin, your site won’t start spitting out errors. It’s a few extra lines of code, for cleanliness… ??
– the outer <li id=”newsfeed”> properly inserts it in the sidebar ‘style’, at least for the default themes. Note that if you want different feeds in completely different sections, each must have a UNIQUE id= naming…
– getSomeFeed does the heavy lifting (and may get renamed at some point…). It has a TON of possible options, but the ones shown here are already beyond even just the quick default ‘test’ usage:
1 > the feed/rss URL
2 > the total number of items to show from the feed
3 > true to show details, false to just show item titles.
4 > unique filename to cache the feed on disk for speed.
5 > optional (leave as ”) filter on feed items for a category string
6 > character limit for Titles (-1 == none)
7 > character limit for Descriptions (-1 == none)
8 > don’t show HTML (true), or show embedded HTML (false)
There’s another NINE parameters beyond that, but this is a starting point! ??
– if the $feed comes back empty, we don’t need to output wrappering ul/li as there’s nothing to style.
I’ll also note that FR has no WP dependency other than the plugin file, so if you want to use it in non-wp PHP pages, just include(path-to-cg-plugins-dir/cg-feedread.php) somewhere up on your page, and then call as above.
-d