I’d like to know the answer to this also
I just started researching this, so I haven’t actually tested this approach yet, but it looks promising:
http://www.simianenterprises.co.uk/blog/integrate-wordpress-into-your-coldfusion-app-148.html
If you get to it before I do, let me know how it went!
So far my solution seems to be to import an RSS feed generated by Cold Fusion, rather than to import the data into the MySql database. I did have to hack the RSS parsing as ColdFusion was leaving some bad entities in the RSS feed.
I did that by adding this function to class-feed.php:
function stripInvalidXml($value)
{
$ret = "";
$current;
if (empty($value))
{
return $ret;
}
$length = strlen($value);
for ($i=0; $i < $length; $i++)
{
$current = ord($value{$i});
if (($current == 0x9) ||
($current == 0xA) ||
($current == 0xD) ||
(($current >= 0x20) && ($current <= 0xD7FF)) ||
(($current >= 0xE000) && ($current <= 0xFFFD)) ||
(($current >= 0x10000) && ($current <= 0x10FFFF)))
{
$ret .= chr($current);
}
else
{
$ret .= " ";
}
}
return $ret;
}
And then calling it in WP_SimplePie_File just before parsing:
$this->body = stripInvalidXml(wp_remote_retrieve_body( $res ));
(And of course you don’t want to leave those changes in core code!)
I have just started a project called “ColdPress”. The system automatically installs and integrates with WordPress allowing ColdFusion to access the core functionality but with the flexibility of using CF to power the front end. Let the WordPress guys build the back-end and let us CF guys embrace that and write really cool front ends.. The project will be posted on GitHub or the like over the next week – Check in at http://www.coldfusion.com.au/blog to keep up to date.
Martin