Migrate contents from Ning forum to Drupal forum?

Does anybody know an effective way to transfer forum conversations from Ning to Drupal? I have the .json obtained through Ning Network Archiver tool, I searched around but didn't find anything.

I am using Drupal version 7.


You can create a module in drupal 7 that will take the json data and create nodes programmatically.


// Instantiate new node 
$node = new stdClass();
$node->uid = 1;
$node->name = 'my author';
$node->language = LANGUAGE_NONE;

// Set fields
$node->title = 'my title';

// Set custom fields
$node->field_custom[$node->language][0]['value'] = 'my custom value';

// save

Take a look at the Migrate module (http://drupal.org/project/migrate/).

I'd say that's better than rolling your own module since you get a lot of stuff for free, for example automatic rollback support and such. You just need to define a mapping and a datasource (json, xml, database, etc).

The migrate module takes care of the actual node creation and keeps track of what has been imported so that you can undo it later, re-import new posts, etc.

A good example of the migrate module can be found at http://xdeb.org/node/1539. It does however deal with regular pages and the datasource is a drupal 6 database.

Need Your Help

Unity WebGL rendering

unity3d rendering shadow unity-webgl

When running WebGl app on PC browser, there is a rendering problem. Blurry image above the red line and also shadows disappearing above line

C infinite do while loop

c loops scanf do-while infinite

This is a simple program for a class that prompts the user for the length of his or her shower in minutes (as a positive integer, re-prompting as needed) and then prints the equivalent number of bo...