1) Find b2edit.php under the wp-admin folder and find
switch ($action) { (around line 56)
Add the following right after that:
//---Added by LaughingLizard(http://dinki.mine.nu/weblog/)
case 'postbyfeeddemon':
$standalone = 1;
require_once('b2header.php');
$post_pingback = intval($post_pingback);
$content = $content . "
...excerpt from: ".$post_link."";
$content = balanceTags($content);
$content = format_to_post($content);
$excerpt = balanceTags($excerpt);
$excerpt = format_to_post($excerpt);
$post_title = addslashes($post_title);
$post_category = intval($post_category);
if(get_settings('use_geo_positions')) {
$latstr = $HTTP_POST_VARS['post_latf'];
$lonstr = $HTTP_POST_VARS['post_lonf'];
if((strlen($latstr) > 2) && (strlen($lonstr) > 2 ) ) {
$post_latf = floatval($HTTP_POST_VARS['post_latf']);
$post_lonf = floatval($HTTP_POST_VARS['post_lonf']);
}
}
if ($user_level == 0)
die ('Cheatin’ uh?');
if (($user_level > 4) && (!empty($HTTP_POST_VARS['edit_date']))) {
$aa = $HTTP_POST_VARS['aa'];
$mm = $HTTP_POST_VARS['mm'];
$jj = $HTTP_POST_VARS['jj'];
$hh = $HTTP_POST_VARS['hh'];
$mn = $HTTP_POST_VARS['mn'];
$ss = $HTTP_POST_VARS['ss'];
$jj = ($jj > 31) ? 31 : $jj;
$hh = ($hh > 23) ? $hh - 24 : $hh;
$mn = ($mn > 59) ? $mn - 60 : $mn;
$ss = ($ss > 59) ? $ss - 60 : $ss;
$now = "$aa-$mm-$jj $hh:$mn:$ss";
} else {
$now = date('Y-m-d H:i:s', (time() + ($time_difference * 3600)));
}
if((get_settings('use_geo_positions')) && (strlen($latstr) > 2) && (strlen($lonstr) > 2) ) {
$postquery ="INSERT INTO $tableposts
(ID, post_author, post_date, post_content, post_title, post_category, post_lat, post_lon, post_excerpt, post_status, comment_status, ping_status, post_password)
VALUES
('0','$user_ID','$now','$content','$post_title','$post_category',$post_latf,$post_lonf,'$excerpt', '$post_status', '$comment_status', '$ping_status', '$post_password')
";
} else {
$postquery ="INSERT INTO $tableposts
(ID, post_author, post_date, post_content, post_title, post_category, post_excerpt, post_status, comment_status, ping_status, post_password)
VALUES
('0','$user_ID','$now','$content','$post_title','$post_category','$excerpt', '$post_status', '$comment_status', '$ping_status', '$post_password')
";
}
$postquery =
$result = $wpdb->query($postquery);
$post_ID = $wpdb->get_var("SELECT ID FROM $tableposts ORDER BY ID DESC LIMIT 1");
if (isset($sleep_after_edit) && $sleep_after_edit > 0) {
sleep($sleep_after_edit);
}
if ($post_status == 'publish') {
if((get_settings('use_geo_positions')) && ($post_latf != null) && ($post_lonf != null)) {
pingGeoUrl($post_ID);
}
pingWeblogs($blog_ID);
pingCafelog($cafelogID, $post_title, $post_ID);
pingBlogs($blog_ID);
if ($post_pingback) {
pingback($content, $post_ID);
}
if (!empty($HTTP_POST_VARS['trackback_url'])) {
if (strlen($excerpt) > 0) {
$the_excerpt = (strlen(strip_tags($excerpt)) > 255) ? substr(strip_tags($excerpt), 0, 252) . '...' : strip_tags($excerpt) ;
} else {
$the_excerpt = (strlen(strip_tags($content)) > 255) ? substr(strip_tags($content), 0, 252) . '...' : strip_tags($content);
}
$excerpt = stripslashes($the_excerpt);
$trackback_urls = explode(',', $trackback_url);
foreach($trackback_urls as $tb_url) {
$tb_url = trim($tb_url);
trackback($tb_url, stripslashes($post_title), $excerpt, $post_ID);
}
}
} // end if publish
if (!empty($HTTP_POST_VARS['mode'])) {
switch($HTTP_POST_VARS['mode']) {
case 'bookmarklet':
$location = 'b2bookmarklet.php?a=b';
break;
case 'sidebar':
$location = 'b2sidebar.php?a=b';
break;
default:
$location = 'b2edit.php';
break;
}
} else {
$location = 'b2edit.php';
}
header("Location: $location");
exit();
break;
//---
2) Now in FeedDemon, go to Tools > Blog this News Item > Configure Blog Publishing Tools, then click Add. Put WordPress as the Name and enter the following into the Command Line:
http://my.domain.name/wordpress.folder/wp-admin/b2edit.php?action=postbyfeeddemon&user_id=1&post_status=publish&comment_status=open&standalone=1&post_category=1&content=$ITEM_DESCRIPTION$&post_title=$ITEM_TITLE$&post_link=$ITEM_LINK$
Make sure you change the domain name and wordpress folders above before saving it...Voila!
Peace.