Feed Expirations in MonkeyChow

In the latest SVN update (36) I’ve added the ability to expire feeds after a certain period. By default a feed remains in your feeds list until it is manually deleted. However, this is not always the ideal way to manage feeds that have a certain lifetime. Blogs now offer comment feeds and online stores like Buy.com offer feeds to product sales. Or Expedia flight info feeds. All of these may only interest you for a limited time.

Now, when you edit a feed, you can specify a certain amount of time for a feed subscription. After that time has passed, the feed will automatically be deleted. This can also be applied to feeds that you just want to try out for a week. Set it to 7 days and forget it. Say you like that feed – just edit the properties of the feed and set the 7 to a 0 and you can keep it as long as you like!

I still don’t have a way to automatically update the database in newer SVN versions, so to enable this, add the following column to your feeds table:

`expir` int(11) NOT NULL default ‘0’,

If anything in the database seems out of place, check the install.php file for the proper format. If you have any ideas about how this can be automated, please let me know. This is the type of thing you get for free in frameworks like Ruby on Rails (migrations), so I figure I’ll have to simulate something like that in PHP.


2 thoughts on “Feed Expirations in MonkeyChow

  1. I hate to post this here, but the but on the sourceforge page, you said we could: but I have had problems geting MonkeyChow to install on my test machine:

    I got the latest version, Im using localhost, i have config.php setup properly and renamed it to config.php, I created a database, and when i goto inst.php I just get a blank page with no errors or messages. I tried to goto install.php and index.php just incase it might have worked. I’m not sure what is wrong:

    here is EXACTLY what i have:

    define(‘FOF_DB_HOST’, “localhost”);
    define(‘FOF_DB_USER’, “root”);
    define(‘FOF_DB_PASS’, “”);
    define(‘FOF_DB_DBNAME’, “monkeychowdb”);
    define(‘RECHANNELURL’, “http://www.example.com/news/rss.php”);
    define(‘RECHANNELTITLE’, “Recycled RSS items”);
    define(‘RECHANNELDESC’, “Blah”);
    define(‘REPUBLISHCHANNELURL’, “http://www.example.com/news/rss.php”);
    define(‘REPUBLISHCHANNELTITLE’, “Blogroll”);
    define(‘REPUBLISHCHANNELDESC’, “Something for people to read.”);

    Again this is just a test setup on vmware machine I have, because I test webapps on it before I decide to use them online.

    Glad to know someone revived FeedonFeeds, I found out about F0F-redux but they dont have 1/10th the features you have put into it. 🙂

  2. That’s exactly what this comments section is for, and your use of a VM for testing is wise. Thanks for letting me know about FOF-redux… this is the first I’ve heard of it.

    Let me know if there are any other features you want to see. And always keep the bug reports coming in so I can make this a decent product. Feel free to email me directly, too.

    Your config.php looks fine. Please check that your database is set up as follows. Also, if you can grab the latest from SVN that is actually the most up to date version. In that version inst.php is gone, replaced by install.php. If you can’t deal with SVN, I’ve placed tarball of the distro here for you.

    CREATE TABLE `feeds` (
      `id` int(11) NOT NULL auto_increment,
      `url` varchar(250) NOT NULL default '',
      `title` varchar(250) NOT NULL default '',
      `link` varchar(250) default NULL,
      `description` varchar(250) default NULL,
      `date_added` timestamp NOT NULL default CURRENT_TIMESTAMP,
      `tags` varchar(250) default NULL,
      `aging` int(11) NOT NULL default '30',
      `expir` int(11) NOT NULL default '0',
      PRIMARY KEY  (`id`)
    ) TYPE=MyISAM;
    CREATE TABLE `items` (
      `id` int(11) NOT NULL auto_increment,
      `feed_id` int(11) NOT NULL default '0',
      `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
      `link` text,
      `title` varchar(250) default NULL,
      `content` text,
      `dcdate` text,
      `dccreator` text,
      `dcsubject` text,
      `read` tinyint(4) default NULL,
      `publish` tinyint(1) default '0',
      `star` tinyint(1) default '0',
      PRIMARY KEY  (`id`),
      KEY `feed_id_idx` (`feed_id`),
      KEY `read_idx` (`read`)
    ) TYPE=MyISAM;

    also make sure that your config.php has this at the bottom…

    define('FOF_HOWMANY', 50)
    define('FOF_KEEP_DAYS', 30)
    define('MAGPIE_USE_GZIP', true);
    define('MAGPIE_OUTPUT_ENCODING', 'UTF-8');
    // Don't log queries.  If turned on, they'll be appended to $fof_query_log
    define('FOF_QUERY_LOG', false);
    // Find ourselves and the cache dir
    if (!defined('DIR_SEP')) {
            define('DIR_SEP', DIRECTORY_SEPARATOR);
    if (!defined('FOF_DIR')) {
        define('FOF_DIR', dirname(__FILE__) . DIR_SEP);
    if (!defined('FOF_CACHE_DIR'))
        define('FOF_CACHE_DIR', FOF_DIR . DIR_SEP . "cache");

Comments are closed.