WP-o-Matic: wonderful plugin for Wordpress
WP-o-Matic is a wonderful plugin for Wordpress that enables you to get news from RSS feeds and get them posted in your blog.
This plugin, however, has a couple of bugs preventing it work properly: infact, even if you set up correctly your cron or webcron, news are not fetched, but if you go to the control panel and click on the “fetch” link, news are fetched correctly.
Below you’ll find two small corrections that I used with version 1.0RC3
filename: wp-content/plugin/wp-o-matic/wpomatic.php
Line: 623
Original reads:
$row = $wpdb->get_row("SELECT * FROM `{$this->db['campaign_post']}` WHERE campaign_id = {$campaign->id}, feed_id = {$feed->id}, hash = '$hash' ");
Change to:
$row = $wpdb->get_row("SELECT * FROM `{$this->db['campaign_post']}` WHERE campaign_id = {$campaign->id} AND feed_id = {$feed->id} AND hash = '$hash' ");
$where .= " AND active = 1 AND (frequency + lastactive) < ". current_time('timestamp', true) . " ";$where .= " AND active = 1 AND (frequency + UNIX_TIMESTAMP(lastactive)) < ". current_time('timestamp', true) . " ";