[typo] Typo and feedburner

Cyril Mougel cyril.mougel at gmail.com
Sun Mar 1 09:53:38 EST 2009

Harry Seldon a écrit :
> Cyril Mougel wrote:
>> Harry Seldon a �crit :
>>> Hey (again) guys,
>>> If you have a look at this post (1) about Rails heroes RSS feeds you
>>> will see that they all use feedburners. My question is how to use
>>> feedburner with Typo?
>>> For instance how to change the feed address that appears when clicking
>>> on the RSS logo in firefox url bar (or its equivalent in Safari)?
>>> How to change the address appearing in the syndication sidebar?
>> I use a rewrite url in my nginx configuration to redirect to feedburner.
> Thx Cyril,
> Heu, never heard about nginx I am on a shared host. Isn't there a 
> solution using Typo? As it is really standard nowadays to use 
> feedburner, a simple solution would be appreciated.
> Btw the (1) was for 
> http://harryseldon.thinkosphere.com/2009/02/03/read-your-rails-heroes .

If you want redirect to feedburner, you need Hack typo code.

In your app/controller/articles_controller.rb, in block format.rss {}

You need check if user-agent is feedburner or not. If not feedburner, 
you need redirect to feedburner feed. Instead of you need render partial.

A little hack (not tested is)

        if request.env["HTTP_USER_AGENT"][/Feedburner/]           
            render :partial => 'articles/rss20_feed', :object => 
          redirect_to 'http://feeds2.feedburner.com/ProgDreamShiny'

Maybe a feature request to define that in a plugin is a good thing.

Cyril Mougel

More information about the Typo-list mailing list