sfFeedBurnerPlugin /

Filename Size Date modified Message
47 B
1.0 KB
1.8 KB
1.8 KB
2.4 KB
# sfFeedBurnerPlugin

This plugin allows you to redirect a feed to a "burned" feed on FeedBurner if
certain conditions are met (user-agent, IP).

You need at least to exclude FeedBurner to avoid creating an infinite loop.

## Installing the plugin

    php symfony plugin:install sfFeedBurnerPlugin
    php symfony cc

## Using the plugin

There are actually two ways of using this plugin.

### The Filter method

The filter method works nice with the cache because it will be executed before the cache filter.
However, it will be called for every action, thus a small performance overhead.

Put this in the filters.yml of your target module
or globally if you don't want to manage multiple filters.yml):
      class: sfFeedBurnerFilter
          - { module: mymodule, action: myaction, url: "" }
          - { module: myothermodule, action: myotheraction, url: "http://myotherurl" }

### The Action method

Add this to the top of the action:


The cache must be disabled on this particular action! However it's fast and it's a single line (if you don't count the usage of an app.yml entry by using sfConfig, which is optional).

## Customization

You can change the conditions by setting the ``feedburner_exlude_ua``
and ``feedburner_exlude_ip`` parameters in your app.yml.
Both are perl-compatible regular expressions.

By default, no IPs are excluded, and the user-agents of FeedBurner, FeedValidator, Yahoo! Slurp and Googlebot (Googlebot, not Google Reader) are excluded.
The rationale for the last two is that you might want to add them as sitemaps and they don't play nice with FeedBurner special tracking URLs (if you enable the feature).