February 17, 2004

Displaying an RSS Newsfeed on Your Site

One of the great things about RSS is that you can display, or "feed" in, headlines and content from other people's websites directly onto your own website. In another article, we've already covered what "syndication" is, and RSS, and how you can use a newsfeed reader to efficiently read and browse through the latest content from your favorite weblogs and news sites. The focus of this article will be on the other main use of RSS - feeding external content into your site. An example of this can be found here on my recipe website. Clicking on a sidebar link opens a new page with several feeds from various food and cooking websites. Check the page at a later time, and if there has been any new entries to any of those sites, those new entries will be reflected on the page.

How do you incorporate RSS feeds into your Movable Type website?

I have found four ways so far of accomplishing this without having to pay a lot of money or write your own code:

1. Timothy Appel's MT-RSS Feed Plugin - The main downside to this plugin is is that the news only refreshes when you do a rebuild of the page on which the feed is located. Although many people seem very happy with this plugin, I was not able to get it to work on my site. After several hours of hair pulling, I moved on to other methods. Here are the MT forum discussions concerning the MT-RSS Feed plugin. Update: Tim has a new plugin - MT-Feeds which is in public beta.

2. Open source PHP solution like zFeeder or Feedsplitter. - This solution requires that the page of your site on which the feeds will reside has a "php" rather than an "html" extension. So if you plan to place the feeds onto a sidebar of your main index page, that page needs to end with ".php". The benefit is that the software works, the output is customizable, and the page updates content everytime you view the page and it has new information. So it really is automatic, works in the background, and you don't have to rebuild the page in your MT editing window in order for the content to refresh.

I used zFeeder for some of the cooking site feeds and found it fairly straightforward to implement with a couple of caveats. Editing the default output layouts took a lot of tinkering. I was trying to get a layout of simple lines of text for a sidebar and was not able to do it. Not to say that it can't be done. But I couldn't figure out how to do it. I was however able to adjust one of their layouts to my satisfaction for a wide center column of feed output which is where the zfeeder feed is on the site today. Also, after initially getting the feeds to work, I checked a day later to find the feed page with all sorts of error messages. After getting help from the MT-forums and doing a Google search for the PHP error codes I was getting, I found the answer to my problem. In the cache folder that holds the feeds, the folder needs its permissions set to 777 and the individual feed files need to be set to 666. After properly setting the permissions, everything worked fine.

I downloaded Feedsplitter as well. But after the instructions called for the user to read the installation guide and there was no installation guide (not written yet), I went back to zFeeder. I need all the help I can get with these things.

I also found that by going this PHP route with one page I really needed to transfer the whole weblog to PHP. I was using server side includes on my pages that were conflicting with the PHP. Once everything was in PHP and the server side includes were changed into PHP includes, the site worked fine. MTWiki's section on Converting to PHP was a big help here.

3. FeedRoll is another option. You don't have as much display flexibility, and the feed comes with a "powered by feedroll" tagline, and they host it you don't. But, out of all the options, this one is the easiest to set up. All you have to do is choose the feed you want, choose some simple display attributes, and cut and paste the javascript into your MT template. Although when I first tested Feedroll it worked fine, I can't seem to get it to work recently. I recommend testing this option to see it it works on your site.

4. Javascript - There is Javascript code available at this site that does pretty much the same thing as Feedroll, but you don't have the feedroll tagline. It's really easy to set up and use. The downside is that the feeds only refresh once every several days, whereas Feedroll can refresh every hour.

Using this method, here is an example of the code you would add to your index page if you wanted to add a newsfeed from Learning Movable Type:

If you would like to customize the look of your feed, you can use CSS and adjust the following class style attributes:

.ch_table -- the table for the whole channel
.ch_table tr td -- for feeds on just the items
.ch_head -- the table cell used for the header information
.ch_titl -- the title text
.ch_titleLink -- the title text when linked
.ch_mod -- last modified date and time
.ch_image -- the channel's image tag (new)
.ch_body -- all the stories
.ch_item -- each individual story
.ch_item_link -- each individual story's link(s)
.ch_item_description -- each individual story's descriptive text (if there)
.ch_description -- the description of the channel at the very end

For example, adding .ch_titl {background-color: #00ff00} in between the style tags in the code listed above will give you a green background to the title of the feed.

Additional Links:
RSS Specifications - "everything you need to know about RSS"
Wyethville Community College RSS feed service
MT-Feeds plugin

Many thanks to MT forum participant Cedar who gave the most helpful tips about RSS feeds.

Has this tutorial been helpful? Please consider linking to Learning Movable Type at http://learningmovabletype.com/ . Thanks!

Posted by Elise Bauer on February 17, 2004 to RSS
Comments(11) | Email to a friend | Printer-friendly version


If you would like to send a trackback
please use the following URL: http://learningmovabletype.com/cgi-bin/mt32/mt-tb.cgi/164


Dear elise. seems you talk about mt here. I made a visuall guide to Mt install. please take a look.


OK Wow, what a small world.

I just got MT up and running on Windows XP using IIS and I was searching for tricks, and this site came up. I notice the WCC RSS feed-- Oddly enough, I went to WCC a few years ago! How cool is that?

Hi Elise,

This site is a great resource. I just found out about it from a link posted at Forum4Bloggers, where bloggers on all blogging platforms (MT, LiveJournal, WordPress, etc.) can get together and talk about blogging. Please have a look at the site, and join us!


that link was posted by me! this site is exactly what I need.

Hi Elise,

Regarding Feedroll, if the Powered By Feedroll text bothers anyone, they can always resort to a little sneakiness when setting up their syndicator script. Once you've submitted the RSS feed url, Feedroll gives you the option to change the way it's displayed, including the size and color of the text. If you set the title text to white, the Feedroll advertisement disappears (though there's still an invisible link to their site - you just can't read it because the text is white.) For a demo, visit my blog at http://www.edwebproject.org/andy/blog/ and you'll see that I'm using feedroll to display posts from my photo gallery blog, photo.spotlight (http://www.edwebproject.org/spotlight) as well as two of my discussion lists, WWWEDU and DIGITALDIVIDE.


Eshan - thanks for posting your link. It could be helpful for those wanting to install MT who use C-Panel.

Travis - pretty cool to have such a useful thing coming from your alma mater.

Vik and Blinger - Thanks for the link to and from Forum4Bloggers. It looks like a useful resource.

Andy - Sweet tip on Feedroll, thanks! With Feedroll you can update the content every 60 minutes versus 24 hours for the WCC service. I may switch.

I jumped in to use Feedsplitter, which I like the best because it's probably the simplest to run, format and it can be stored locally on your own server so you are not relying on a third party.

However, I noticed that FS has no tolerance for non-valid RSS. Or at least I think that's my problem. For some reason I cannot get FS to output the RSS of a couple blogs on my host. I'm still trying to work out why. For other blogs, such as this one, Feedsplitter works well.


Feedsplitter is pretty straightforward and easy to Use.


There are heaps of options for integrating feeds now... one thing to look out for is if the parser supports Atom feeds, especially since the new Blogger provides RSS only in Atom (at least when it was in Spring 2004).

Another option for PHP parser is the Magpie RSS (which supports Atom): http://magpierss.sourceforge.net/ which if you can handle setting up some PHP files, a handy way to have much control over your feeds (e.g. set up as PHP code you can include in your MT template pages, and pass it a PHP variable with say the URL for the desired feed).

We use Magpie for another, free, RSS to JavaScript service and code, Feed2RSS:

I found out CARP works gr8! http://www.geckotribe.com/rss/carp/manual/download.php

You can easily use your current stylesheet with this script and it's easy to adjust (zFeeder is a bit to pre-configured for me)

Thanks a million for this blog, Elise!
The javascript from WCC no longer works. :(
Here are some alternatives:

Post a comment

(Before posting a comment please see the Comments and Trackbacks Policy. Do you need help troubleshooting your weblog? Please post questions and requests for support at the MT Support Forums. Thanks!)

Remember Me?

(you may use HTML tags for style)

Email to a friend

Email this article to:

Your email address:

Message (optional):