WordPress 2.1 and Mint

I recently decided to ditch using Google Analytics for my stats tracking and installed Mint as my website stats tracking module. I'm really liking it, and it's easily worth the $30 you have to pay for it. C'mon, don't be cheap and steal everything, okay?

Mint has a really cool plugin architecture that they call Pepper, and you can grab all sorts of cool addons. I saw one called Bird Feeder Pepper, which can track what's going on with your various feeds. Now, the installation is fairly easy but there was a weird bug that was appearing, where a check to see if you are running a licensed copy of Mint kept getting triggered when I tried to access my feeds via a feed alias. The solution? An ugly hack, if you ask me. To implement Bird Feeder Pepper and use the seeds (track individual items in your feed), there's a snippet of PHP code you have to insert in the various PHP files WordPress uses: wp-rss.php, wp-rss2.php, wp-atom.php and wp-rdf.php. Place this snippet AFTER the line in the PHP file that executes a 'header' command and BEFORE the code that outputs the beginnings of the XML. Here's an example:

PHP:
  1. header('Content-type: text/xml; charset=' . get_option('blog_charset'), true);
  2. $more = 1;
  3.  
  4. // BEGIN CODE TO IMPLEMENT BIRD FEEDER PEPPER SEEDS
  5. global $Mint;
  6. define('BIRDFEED', 'Articles (RSS)');
  7. include($_SERVER['DOCUMENT_ROOT'].'/feeder/index.php');
  8. // END CODE TO IMPLEMENT BIRD FEEDER PEPPER SEEDS
  9. ?>
  10. <?php echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>'; ?>

Hope that helps anyone else who was struggling to get Bird Feeder Pepper working with WordPress 2.1.

3 Responses to this post.

  1. me's Gravatar

    Posted by me on 30.01.07 at 11:17 am

    mint looks nice. i can also recommend (because i use it) phpmyvisits.phpmyvisits is rich in features and FREE.

  2. FreePress Blog's Gravatar

    Posted by FreePress Blog on 30.01.07 at 11:17 am

    Mint Bird Feeder - WordPress Plugin...

    I finally listened to Dan and installed Mint for site stats, and I was intrigued by the “pepper” (kind of like a plugin for the stat tracking system) called “Bird Feeder”, which shows you some stats about your feeds.
    The only do...

  3. JaredB's Gravatar

    Posted by JaredB on 30.01.07 at 11:17 am

    Hey, Chris. Thanks for the tip regarding getting this working with WordPress.

    I took the code you provided above and created a WordPress plugin to accomplish the same thing, so that we don't have to modify the core files.

    It's working for me; hopefully it could be of some use to you.

Respond to this post

Want to advertise on this blog? Send email to chartjes@littlehart.net
GTcars Canadian Car Audio TurboDodge Car For Sale Sign