• I’m looking for an easy way to allow something like many of the major news services have…a quick copy/paste RSS display mechanism for websites. I believe it’s usually done in Javascript that the non-programmer can just plunk into their HTML (or php or asp or whatever) and have the feed display on their website. I need this capability to add to the administration areas of our clients websites which are built in various scripting languages. I’ve searched a lot and come up blank. Can anyone point me in the right direction?

    Thanks!
    bloom

Viewing 15 replies - 1 through 15 (of 15 total)
  • You can try zFeeder.

    Edit: Sorry, forget that. That’s not the thing you want.

    https://www.chait.net/index.php?p=238
    The above wp plugin pack includes a feed reader, called CG-FeedRead

    CG-FeedRead is a good approach if you have control over the backend and can use PHP. It’s ultra lightweight in code, approach, and functionality… ??

    MagpieRSS is a popular system, that I didn’t use because it seemed to bloated for my needs.

    If you can’t use PHP, I think feedburner or something will let you javascript-insert feeds off of them, so no script/platform dependencies.

    -d

    This is something I also need. I was using Feedroll (www.feedroll.com) originally but it no longer allows you to create custom feeds. You can now only select from a preset list of RSS feeds.

    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

    RSSlib from https://www.2rss.com/software.php works pretty well. The output is a little different from CG-Feedread. Not better or worse; I use them both more or less out of the box for different applications.

    I should note that I can make it so YOU parse the output — I build up a formatted/parsed array of the XML, and parse the structure out myself, but could easily open it up for people to handle themselves.

    I’ve also pondered many times some simplified ‘output formatting’ scheme, usable for both feedread and amazon data… might throw something together.

    -d

    David, I am unable to get the details to show in my output. I tested your Yahoo snippet and it worked fine showing the details, but I can’t see details using this code:

    ‘<?php if (function_exists(‘getSomeFeed’)) { ?>
    <?php
    $feed = getSomeFeed(“https://theloo.org/wp-commentsrss2.php&#8221;, 6, true, “cache_comments”, ”, -1, 100);
    if (!empty($feed))
    {
    echo ‘

    • ‘;
      echo $feed;
      echo ‘

    ‘;
    }
    ?>

    <?php } ?>’

    See it at ‘theloo.org/recent-activity

    Otherwise, it’s a great, easy to install Feed Reader! ??

    I don’t know what’s embedded in your code above but if it’s screwing up this site, I can’t imagine what it’s doing to yours! ??

    I just copied your getSomeFeed call into my test wp15 site’s sidebar, with the rest of my sample code as is, and it worked fine. Not sure what you are seeing.

    -d

    I got the entry details to show, thanks for your input.

    David, is there a getSomeFeed option that will turn on/off links created in the the source detail (e.g, the posting includes a link to external website), such that the same link persists when displayed in the feed?

    If so, could you provide an example?

    I use this PHP RSS reader myself: https://test.viper007bond.com/rss_reader.phps

    Example with HTML output: https://test.viper007bond.com/rss_reader.php

    Whoops, never mind. I figured it out. The eighth variable listed by David in his early posting did the job. I had inadvertently left out one of the other options and that threw things off. My bad.

    Heh. Yeah, and the newer releases will continue to have better docs and examples of usage. I’ll eventually get to more customization of output, but the ‘average user’ doesn’t need much (or want much) from what I’ve seen.

    Let me know if you have any Qs. Actually, start a new thread — this one is hard to read now! ??

    -d

    I am definitely looking forward to better documentation, The script is very nice, but I get lost a lot , I am rather illiterate in php, due to a lack of clear documentation.

    Especially how to change parameters, how to make sure you can only get titles and not full feeds that break the lay out etc, etc, so David, if you can spare the time, i think you would make a lot of people happy with this.

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘Easy RSS solution?’ is closed to new replies.