Login to download the latest version of Mint and your favorite Pepper, purchase additional licenses, or post in the Forum. Don't have an account? Create one!

In Partnership with Media Temple

Mint Forum

Implementing Bird Feeder

I am currently in the process of implemented Bird Feeder into my own custom CMS and I’m running into problem after problem. Here are a couple of things I’ve come across so far:

  • The definition of MINT_ROOT does not work on Windows-based servers due to the use of backslashes
  • After getting the watcher.php to execute: “Fatal error: Call to a member function on a non-object in mint\app\lib\pepper.php on line 56”
Low
Minted
Posted on Jan 29, '07 at 07:50 am

I got the Fatal Error on line 56 as well. The error occurs as soon as I add include($_SERVER['DOCUMENT_ROOT'].'/feeder/index.php'); to the template.

nybble
Minted
Posted on Jan 29, '07 at 08:42 am

Insert a global $Mint; line into your config/db.php file. Worked for me.

Low
Minted
Posted on Jan 29, '07 at 09:15 am

Got it working now, thanks to nybble’s hint. I’m using ExpressionEngine as CMS and my Mint uses a separate database. For those who run into the same problems:

Set your rss template to Allow PHP on Output.

First thing in the template should be:

<?php
global $Mint, $DB;
define('BIRDFEED', 'My Feed Title');
include($_SERVER['DOCUMENT_ROOT'].'/feeder/index.php');
$DB->select_db('my_ee_database_name');
?>

Then use something like the following code in your tags:

<?php $BirdFeeder->seed('{title}', '{url_title_path=weblog/entry}'); ?>

…that should do it.

The problem I was getting was also fixed with:

global $Mint;

Although I actually added it into the “feeder/index.php” file.

So I’m having a problem with Bird Feeder.

I’m running Wordpress, which keeps the wp-rss.php, wp-rss2.php, wp-rdf.php, and wp-atom.php files in the root directory.

Per the readme file, I installed the Bird Feeder pepper in Mint preferences, unzipped and uploaded the feeder directory with no errors, and skipped the non-PHP section, since my feeds are already serving up as PHP.

At the top of wp-rss.php, wp-rss2.php, wp-rdf.php, and wp-atom.php, I added:

<?php
define('BIRDFEED', 'Feed Name');
include($_SERVER['DOCUMENT_ROOT'].'/feeder/index.php');
?>

So far so good. Feeds still working, no problem. Then I change the contents of <link> to:

<?php $BirdFeeder->seed(get_the_title_rss(), get_permalink()); ?>

Per the readme, and everything breaks. The feed error is:

The following tags were not closed: rss, channel, item, link. Error processing resource ‘wp-rss2.php’.

But the real problem is that when serving the php file, the file breaks right at the beginning of that BirdFeeder command, thus the rest of the file never gets served, and the error message comes up instead.

Any suggestions?

Ronald Heft
Third-Party Pepper Developer
Posted on Jan 29, '07 at 03:21 pm

I’ve tried adding the global Mint thing, but I get an error that I can’t redefine the class Mint.

Ronald Heft
Third-Party Pepper Developer
Posted on Jan 29, '07 at 03:24 pm

I decided to check out what’s actually going on. The line of question is this:

$this->Mint->logErrorNote(‘Mint has detected the unlicensed use of the Mint 2 Pepper class on a ‘.$this->Mint->getFormattedVersion().’ installation. Mint 2 is a paid upgrade. Please login into the Mint Account Center and upgrade the license for this domain.’);

I have no clue how that can affect Bird Feeder.

I have some similar problems with Bird Feeder. I have wp2.1 on a subdomain and tried to install bird feeder but it breaks my feed.

I get this if I want to see my feed: Fatal error: Call to a member function on a non-object in /home/*******/public_html/mint/app/lib/pepper.php on line 56 -

Can anybody help?

I fixed the fatal error by adding the global mint line to feeder/index.php.

I still have the following warning though:

Warning: Cannot modify header information - headers already sent by (output started at ////sean/wp-rss2.php:6) in ////sean/wp-rss2.php on line 13

JCFP
Minted
Posted on Jan 29, '07 at 11:13 pm

hi, low,

is it possible for you to post a working link of a RSS feed (from ExpressionEngine) from your site which you have it working with bird feeder. i am interested in implementing such similar pepper, but i like to see how the URL is changed by the pepper so that it may be tracked by mint.

thanks.

imijltd
Minted
Posted on Jan 30, '07 at 06:41 am

sannixtudio,

Don’t put the BIRDFEED php right at the top of the wp-rss2.php file, put it after the bit of php that includes a call to “header”, and before the bit of php that includes “xml version=”1.0”…”.

Also, don’t leave any blank lines after the ?> that closes the php block that includes the header line, start straight after, and make sure the xml php block starts straight after the BIRDFEED block’s ?>.

It’s similar for the other wp-*.php feed files.

Ian

Low
Minted
Posted on Jan 30, '07 at 09:23 am

JCFP: although slightly off topic, here’s a link to one of my rss feeds: http://loweblog.com/feed/devblog

I too was facing the same problem, but I found the solution was the following:

Simply add ‘global $Mint;’ directly above the BIRDFEED define. I got no more errors, and that is the only place where I added in ‘global $Mint’

ramanan
Minted
Posted on Jan 30, '07 at 11:53 am

I have Birdfeeder working in Textpattern right now. I’ll either post instructions here, or try and roll up the changes you need to make into a plugin.

Ronald Heft
Third-Party Pepper Developer
Posted on Jan 30, '07 at 11:53 am

I tried everything in this thread and it’s still not working for me.

I followed Lazaryn’s lead and added

global $Mint;

to /feeder/index.php, first line. All seems to work now.

JCFP
Minted
Posted on Jan 30, '07 at 04:46 pm

Low,

thanks for the link. it helps a lot.

an example of a link on your site is: http://anexample.com/feeder/?FeederActi … l+variable

the url is very complex and not very user and search engine friendly.

all these extra stuff “/feeder/?….”; are these all generated by bird feeders?

is there anyway to keep the url simple (from an expressionengine install point of view), like mysite.com/index.php/site/rss/?

Ronald Heft
Third-Party Pepper Developer
Posted on Jan 30, '07 at 11:09 pm

I have figured out my problem. Adding a global db variable to feeder/index.php is causing WordPress plugins to attempt to use Mint’s db information. Disabling those WordPress plugins let’s the feed work, however, this shouldn’t be considered a solution. At the moment I’m leaving Bird Feeder disabled and continuing to use my WP plugins.

Shaun Inman
Mint/Pepper Developer
Posted on Jan 30, '07 at 11:37 pm

Hmm, that’s a good call. I didn’t have any plugins installed in my test Wordpress installation. Which plugins are you using (so that I can help diagnose this problem for others in the future)?

ramanan
Minted
Posted on Jan 30, '07 at 11:37 pm

JCFP, I think you are mixing up the links in your feed with the one link to your feed.

Ronald Heft
Third-Party Pepper Developer
Posted on Jan 31, '07 at 01:34 am

The two plugins which were giving me trouble were Popularity Content and Ultimate Tag Warrior. I’m using WP2.1 and the latest version of the plugins.

PC: http://alexking.org/projects/wordpress UTW: neato.co.nz/ultimate-tag-warrior

I removed the global mint from the feeder/index.php and I’m picking up seeds now. I too, am using WP 2.1 and UTW.

Jay C
Minted
Posted on Jan 31, '07 at 02:21 pm

I am not using any plugins, have dont all of this, have added the global mint to /feeder/index.php, still not working.

Getting the same error…line 56.

You must be logged in to reply. Login above or create an account

Hey there, I have officially suspended sales and support of Mint. The Create Account, Add License, Transfer License, and Contact forms have been disabled. Existing customers may continue to login and download Mint.

More info Continue