Hi @all,

I just found this cool module, but I'd like to know if there are any plans to upgrade this one to Drupal 5.x?

I'd appreciate your comments & cheers

hctom

Comments

NewToDruballer’s picture

I just got it work with phpbb2.0.20 and Drupal 5.1

Since I am new to Drupals Api, I used a special way ;-)

I putted a simple file in the drupal-root, called id 'phpbb2drupal_import.php' and added

<?php
include 'sites/all/modules/phpbb2drupal/phpbb2drupal_import.php';
?>

The phpbb2drupal_import.php needed just some minor fixes.
It seemes, as if the function array2object is missing in Drupal5.1 so I copied it from the 4.6-Api into the head of my file:

function array2object($array) {
  if (is_array($array)) {
    $object = new StdClass();
    foreach ($array as $key => $value) {
      $object->$key = $value;
    }
  }
  else {
    $object = $array;
  }

  return $object;
} 

After that, I replace "$edit=taxonomy_save_term($edit);" with "taxonomy_save_term($edit);", because in 5.1-version the parameter is a pointer and the return value is only a status-boolean. On another locations i had to replace
$nid=node_save($node);
with

node_save($node);
$nid = $node->nid;

because of the same reason.

Additionally I had to comment out all those form-building, because there is another API in 5.1

Lastly, there was a switch-case-block, which I totally destroyed and just lined-up the function-calls to process the migration.
Hope, I did not forget something.
Then just call youdrupalsite.org/phpbb2drupal_import.php .

This is just a workaround to get it work. Maybe the developers of this packet take my hints to develop an actual version. I would, but I am not really familiar with the API, especially the form-elements. Maybe someone who already knows the API could work on it. Seems as if it could be easy for a Drupal-Pro ;-)

beginner’s picture

Status: Active » Closed (duplicate)