A painting of me

Using Bird Feeder with Textpattern

   31 January 2007, mid-morning

Install the Bird Feeder plugin, and save the feeder directory in the root directory of your web host, as per the plugin’s instructions. From then on, you can just follow what is written here.

You need to modify two files in order for Textpattern to work with Mint 2.0’s Bird Feeder. I know that sucks, but what can you do?

The first file we’ll update is rss.php, in the publish directory. We need to add the following code to the top of the rss function, line 18:

global $Mint;                           
define('BIRDFEED', 'Default (RSS)');
include($_SERVER['DOCUMENT_ROOT'].'/feeder/index.php');

We then need to replace the two code snippets that output the link tag. On line 94, replace:

tag($permlink,'link').n.

with:

tag($BirdFeeder->seed($Title, $permlink, true),'link').n.

And on line 123, replace:

tag(doSpecial($url),'link').n.

with:

tag($BirdFeeder->seed($linkname, $url, true),'link').n.

Hopefully that will get your RSS feed working with Bird Feeder.

Now, for the ATOM feed, we’ll need to update atom.php in the publish directory. As before, place the following at the top of the atom function, line 18:

global $Mint;                           
define('BIRDFEED', 'Feed (ATOM)');
include($_SERVER['DOCUMENT_ROOT'].'/feeder/index.php');

On line 114, replace:

$e['link'] = '<link'.r_relalt.t_texthtml.' href="'.$permlink.'" />';

with:

$e['link'] = '<link'.r_relalt.t_texthtml.' href="'.$BirdFeeder->seed($Title, $permlink, true).'" />';

And on line 160, replace:

$e['link'] = '<link'.r_relalt.t_texthtml.' href="'.$permlink.'" />';

with:

$e['link'] = '<link'.r_relalt.t_texthtml.' href="'.$BirdFeeder->seed($linkname, $url, true).'" />';

Once this is done you’re good to go. I am looking into making this work via a plugin, but for now this works fine.

 

Comments

  1. Are these instructions true for TextPattern 4.0.4 as well?

  2. I’m using them with Textpattern 4.0.4 right now, so yes.

  3. thanks ;)

  4. Is your hack valid for TXP 4.4.1? Because i don’t see any feeds from my site, equal per RSS or ATOM. If i remove your customizing, then everything is ok.

  5. I’m still hacking my TxP install, but i’m not sure if these instructions are now out of date. (The line numbers might be off, for starters.)

  6. Yes, the line numbers are different, but the code is the same. My effect is, that i cannot see any feeds after the customizing. If i change back to the standard/original status, then everything is running but not Bird Feeder. Thanks.

Don't be shy, you can comment too!

 
Some things to keep in mind: You can style comments using Textile. In particular, *text* will get turned into text and _text_ will get turned into text. You can post a link using the command "linktext":link, so something like "google":http://www.google.com will get turned in to google. I may erase off-topic comments, or edit poorly formatted comments; I do this very rarely.