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.
Are these instructions true for TextPattern 4.0.4 as well?
by Hiddentrack on March 12 2007, 1:30 am #
I’m using them with Textpattern 4.0.4 right now, so yes.
by ramanan on March 12 2007, 8:29 am #
thanks ;)
by joe on April 3 2008, 3:09 pm #
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.
by oelauge on May 25 2012, 4:17 pm #
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.)
by ramanan on May 25 2012, 5:20 pm #
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.
by oelauge on May 25 2012, 5:38 pm #