WordPress.org

Ready to get started?Download WordPress

Forums

How to import ColdFusion content into WordPress? (5 posts)

  1. btvbill
    Member
    Posted 2 years ago #

    We have a ColdFusion website containing a huge amount of product info and photos that automatically pulls from a SQL 2005 database. Does anyone have any ideas about how we could pull that data into WordPress' MySQL database to auto-generate page content from the SQL 2005 database/ColdFusion application? Any help would be greatly appreciated.

  2. photocurio
    Member
    Posted 2 years ago #

    I'd like to know the answer to this also

  3. shastaw
    Member
    Posted 2 years ago #

    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!

  4. shastaw
    Member
    Posted 2 years ago #

    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!)

  5. martypaz
    Member
    Posted 1 year ago #

    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

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags