Add FeedFlare to Typo

Posted by Raymond Law Fri, 13 Jul 2007 18:31:00 GMT

Set up your FeedFlare preferences, open themes/scribbish/views/articles/_article.rhtml, and add the following line:

<script src="http://feeds.feedburner.com/~s/rayvinly?i=<%= link_to_permalink(article,article.title) %>" type="text/javascript" charset="utf-8"></script>

right before the <ul class="meta"> tag.

Using FeedBurner with Typo 1

Posted by Raymond Law Thu, 12 Jul 2007 17:42:00 GMT

You want to run your Typo blog feed through FeedBurner.

First, go to your blog’s admin page and click on the DESIGN tab. Drag the XML Syndication item from Available Items to Active Sidebar items. Choose either RSS 2.0 or Atom 1.0 according to what you choose when setting up FeedBurner. I selected Articles only because that’s what I want. Remember to click on the Publish changes button.

In your Typo app, modify vendor/plugins/xml_sidebar/views/content.rhtml to the following:

  <% if articles -%>
  <li><a href="<Your FeedBurner URL>" rel="alternate" type="application/rss+xml"><img src="http://www.feedburner.com/fb/images/pub/feed-icon16x16.png" alt="" style="vertical-align:middle;border:0"/></a>&nbsp;<a href="<Your FeedBurner URL>" rel="alternate" type="application/rss+xml">Subscribe</a></li>
  <% end %>

Of course you can use whatever image you like. The one shown above is linked to FeedBurner’s standard feed icon. You can use FeedBurner’s Chicklet Chooser to get the HTML code to paste into content.rhtml.

Another way is to set up a redirect using mod_rewrite in your Apache configuration (thanks to Robby):

  # Redirect typo feeds to FeedBurner
  RewriteCond %{HTTP_USER_AGENT} !^FeedBurner.*$
  RewriteRule /xml/(atom|rss|rss20)/feed.xml$ http://feeds.feedburner.com/rayvinly [R=temp,L]

In both cases, make sure you go to your blog admin’s SETTINGS tab, scroll to the bottom and click on Empty Fragment Cache.

Now go to your blog page and click on that Subscribe link to see your FeedBurner feed.