New Action for testing: ReadFeed 0.1

This Item-Action allows you to re-publish a remote RSS feed as HTML within your Freeway page. Requires PHP on your server (might be 5-only, don’t have 4 here to test anymore). I have only tested the Action in Freeway Pro 5, but it should work in Freeway Pro 4 as well.

http://freewaypro.com/actions/downloads/ReadFeed.fwactionb.zip

  1. Change your page file name to end in .php
  2. Draw an HTML box where you want the feed to appear
  3. Apply the ReadFeed Action to the box, and set the controls:
    • The complete (http://) URL of your feed
    • The template showing how each item will display
    • The names and order of the variables as you have used them in your template
    • The number of seconds to cache the RSS
    • The number of items to display from the feed
  4. Upload to your server
  5. Use an FTP/SFTP application to create a cache folder in the same folder as the page where the feed appears. Name it ‘_cache’, and use the FTP application to set its permissions to 777. (This is the tweakiest, and most critical part of the whole thing.)
  6. Visit it in a browser!

To fine-tune the display of the feed, you can edit the template (say, to make it only show headlines, not the description), or you can use CSS to style the list and its children. Each RSS feed is displayed in a UL with the classname ‘feedlist’, so you could make a set of styles based on that class to control the look-n-feel.

Known limitation: Doesn’t handle Atom feeds at all. Anyone who wants to help me figure that out, I would appreciate it.

Feedback welcome!

Walter


actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Updated to 0.2. Major fixes inside (say, did you know you can put Freeway in an infinite loop from within an Action?). Also fixed a messy problem if you have more than one of these on the page. So if you already downloaded, delete it and download again!

Walter


actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Cool, thanks Walter. I’ll try it out and see how it goes.


actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Works fine with my Wordpress blog feed and my Twitter feed, despite my
not creating an FTP directory. Server is running PHP 4.3.9. I didn’t
try to make it pretty, just did a rough test. This is going to be a
very useful action though.

http://www.halmueller.com/readfeedtest.php

Hal


actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Yes, it will work (fail silently) if you don’t make the cache directory. But each time that your page loads, there will be another request to your RSS server, which is wasteful and makes your page take longer to load. You should definitely do that part.

Glad you like it!

Walter


actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

I created the _cache folder and can now see the feeds’ caches. I am a
little uncomfortable about leaving a 777 folder in web page space, so
i did a “chown _cache apache.apache” as root and made the mode 744
(apache is the username that my Apache installation runs under).

Re the Atom issue: a workaround could be to run the Atom feed through
Feedburner, and then use Feedburner’s version in the ReadFeed action
instead of the original Atom version. I know from talking to RSS
folks around here that the “standard” is not always correctly
implemented and that some hackery is needed to get all feeds to work
right.

Hal


actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Thanks for the suggestions. You could put the cache file elsewhere, perhaps I should add an “expert” control for an alternate location.

Walter


actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options