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

Jay C
Minted
Posted on Jan 31, '07 at 10:17 pm

Ok so I have done the above, finally it all works, and I get this when I check my feed now…

WordPress database error: [Table ‘jcontonio_com_mint.wp_users’ doesn’t exist] SELECT * FROM wp_users WHERE ID = ‘1’ LIMIT 1

Then the body of the article shows up under that.

Whats the dedeal here?

Chris Boulton
Third-Party Pepper Developer
Posted on Feb 02, '07 at 08:48 pm

Firstly, are you guys using the same database user but different databases?

My guess is the following: http://au2.php.net/mysql_connect

mysql_connect() takes a 4th parameter which tells MySQL to create a new connection even if the script has a connection with the same hostname, username and password.

Because you’re sharing the same MySQL username and password and Wordpress does not make use of this parameter, the WordPress MySQL connection isn’t being created.

See if this fixes it:

Open up includes/wp-db.php from your WordPress installation and find:

$this->dbh = @mysql_connect($dbhost, $dbuser, $dbpassword);

Replace it with:

$this->dbh = @mysql_connect($dbhost, $dbuser, $dbpassword, true);

See if it makes a difference then.

Alternatively you can create a different MySQL username and password and use it for Mint instead.

Ronald Heft
Third-Party Pepper Developer
Posted on Feb 03, '07 at 01:04 am

I just tried your suggestion Chris, and it did not fix the problem.

misu
Minted
Posted on Feb 03, '07 at 01:53 pm

anybody using bird feeder with expressionengine and can post the way here?

Low
Minted
Posted on Feb 05, '07 at 04:45 am

Mis: check out the instructions I posted earlier in this thread.

Ronald Heft
Third-Party Pepper Developer
Posted on Feb 07, '07 at 09:22 pm

Shaun with all the updates you’ve been doing lately, is an updated Bird Feeder in the works? I don’t need an ETA, just curious.

jaredb
Third-Party Pepper Developer
Posted on Feb 07, '07 at 10:47 pm

Here’s my WordPress plugin that ads the required stuff to the WordPress feed files for you, so that you don’t have to edit the core distributed files.

Hope it can help some of you WordPress users. I should not that I’m not using any other feed-modifying plugins, so your mileage may vary.

Ronald Heft
Third-Party Pepper Developer
Posted on Feb 07, '07 at 11:26 pm

jaredb, I’m checking out your plugin compared to what I have in the works. I notice you don’t support seed tracking. You planning on adding that? That’s the main part I’m having issues with. It’s a scope issue, getting WordPress to recognize the $BirdFeeder property.

jaredb
Third-Party Pepper Developer
Posted on Feb 08, '07 at 03:18 am

It does now (after your comment); for posts at least. Comments is another story, since it doesn’t seem to use the same filter for those links. I’m still working on it for the comments feed, but seed tracking should work for the main feed pages now.

jaredb
Third-Party Pepper Developer
Posted on Feb 08, '07 at 04:58 am

OK - got it up and running for seed tracking now (as of version 0.7).

I’d appreciate any more feedback if you find something else that’s missing.

Shaun Inman
Mint/Pepper Developer
Posted on Feb 08, '07 at 03:16 pm

Guys, try adding the following at the top of your Wordpress feed files (this is slightly different than the code in the README.txt):

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

I think what’s happening is that Mint is connecting to its own database and Wordpress loses track of its database. Reselecting the database resolved the problem for me in Wordpress 2.08 (I’m not running MySQL 4 so I can’t test in WP 2.1).

Ronald Heft
Third-Party Pepper Developer
Posted on Feb 08, '07 at 03:53 pm

That nailed is Shaun. Working perfectly now.

jaredb, keep an eye in your inbox. I’m working on improving your plugin instead of doing my own. It will cause less confusion.

Ronald Heft
Third-Party Pepper Developer
Posted on Feb 08, '07 at 04:13 pm

jaredb, actually I can’t find your email address. Send me one at ron /// cavemonkey50 /// com. Fill the /// with what they should be. I’ll then tell you what I did and you can decide if you want it.

jaredb
Third-Party Pepper Developer
Posted on Feb 08, '07 at 04:48 pm

Cool. Thanks for the help.

Shaun Inman
Mint/Pepper Developer
Posted on Feb 08, '07 at 05:05 pm

Once you guys are done with that, would you mind contributing it to the Peppermill? Mint-related plug-ins for CMSes is what the “Other” section is for. You don’t have have to of course but it would make it easier for others in need to find it.

I had to place my db connection after the initial birdfeeder script as well otherwise it wouldn’t connect to my database. You might want to include that in the readme in future versions for those of us who are trying to impliment it on custom blogs, etc.

It works great now though and a great pepper!

jaredb
Third-Party Pepper Developer
Posted on Feb 09, '07 at 01:51 am

OK, got it wrapped up. Thanks Ronald and Shaun.

I will head over to the Peppermill and post it now.

Im getting

“Fatal error: Call to a member function on a non-object in /usr/home/somefool/public_html/wp2/wp-content/plugins/MintBirdFeeder.php on line 33”

whilst using the mint/wordpress/birdfeed plugin http://freepressblog.org

Ive tried all these global $Mint;

PHP4, WordPress 2.05

Ronald Heft
Third-Party Pepper Developer
Posted on Feb 12, '07 at 07:58 am

Do you have the /feeder directory working? Is Bird Feeder installed correctly in Mint?

yes, from what I can tell.

/feeder is just a blank page it seems

full feed source is -

{?xml version=”1.0” encoding=”utf-8”?} {!— generator=”wordpress/2.0.5” —} {rss version=”2.0” xmlns:content=”http://purl.org/rss/1.0/modules/content/” xmlns:wfw=”http://wellformedweb.org/CommentAPI/” xmlns:dc=”http://purl.org/dc/elements/1.1/” }

{channel} {title}somefoolwitha.com{/title} {link}http://www.somefoolwitha.com{/link} {description}stale{/description} {pubDate}Fri, 09 Feb 2007 09:42:20 +0000{/pubDate}

{generator}http://wordpress.org/?v=2.0.5{/generator}
{language}en{/language}
        {item}
    {title}RATTLEWRECKed{/title}
    {link}{br /}

{b}Fatal error{/b}: Call to a member function on a non-object in {b}/usr/home/somefool/public_html/wp2/wp-content/plugins/MintBirdFeeder.php{/b} on line {b}33{/b}{br /}

Ronald Heft
Third-Party Pepper Developer
Posted on Feb 12, '07 at 09:14 pm

You are using the latest version of the plugin, correct? If not, download the latest version from the Peppermill. I’m assuming this is the problem since the older version could have an issue on this line.

If that’s not the case, try removing the last line in the plugin file. It should just be a blank line.

If that’s still not the case, can you copy line 33 from the plugin and paste it here?

Hello, I just purchased Mint and I am trying to get the Bird Feeder working on ExpressionEngine 1.5.2. I had a few questions about the install ReadMe.

Under Preparing non-PHP feeds for Bird Feeder 1a. it states to edit .htaccess file in ‘your feed directory’. Is this the ‘Feeder’ folder I uploaded?

Same section, under 1b. it states “…The following line should take care of it: php_value auto_prepend_file none”. Where exactly does this go? In the same .htaccess file?

Next question, I am following the advice from ‘Low’ and added the php he referenced at the top of the page. My question is within my Atom template (have not gotten to RSS2 yet) there are three link elements on the page:

<link rel="alternate" type="text/html" href="{weblog_url}" /> <link rel="self" type="application/atom+xml" href="{path={atom_feed_location}}" />
<link rel="alternate" type="text/html" href="{url_title_path=site/index}" />

Is it just the first I am replacing with:
<link rel="alternate" type="text/html" href="<?php $BirdFeeder->seed('{title}', '{url_title_path=weblog/entry}'); ?>" />

I apologize if these questions are covered elsewhere (or if I am just being dense), I did search but may have overlooked something.

Thanks in advance for any help or suggestions.

John

Shaun Inman
Mint/Pepper Developer
Posted on Mar 07, '07 at 02:30 pm

Is this the ‘Feeder’ folder I uploaded?

No, “your feed directory” referrers to the directory where your feeds or feed templates are stored.

Where exactly does this go? In the same .htaccess file?

Yes, in the same .htaccess file.

As for the placement of the Bird Feeder calls, I am unfamiliar with the Atom format and Expression Engine but each item in a feed should have it’s own link element. That’s the only link you need to worry about. This link should appear in some sort of loop structure.

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