I'm wanted to use this module with 4.7. That ended up requiring a lot of work... I made a patch that is certified WFM. Feel free to contact me for more information.

Changes and additions:

  • Ability to map phpBB admin to drupal user. This might have limited use to most people but I wanted to map my phpBB admin to a different drupal user.(I'm willing to roll this functionality out of the patch)
  • I fixed some bugs where variables wheren't initialized(1)
  • converted phpbb2drupal_user_save to use the usermodule user save
  • fixed user import to map name collisions to existing user. This might be expanded to be toggled through settings
  • took out some commented debug msgs
  • moved status reporting to drupal_set_message to work with form redirect
  • moved a lot of tab spacing to drupal coding standard(not all)
  • changed a lot of strings to single quotes where applicable
  • removed a lot of pointless $output .='';
  • other misc formapi and 4.7 updates

not implemented

  • Locale Support
  • Poll changes(Poll import will fail but say its successful)
  • Revisions aren't implemented(file import may fail I haven't tested it)

Notes:
Unfortunately, the spacing changes where everywhere and this makes it hard to review the actual changes.
This patch may not work for everyone(YMMV). It was used to convert a small phpBB forum over without any problem though.

(1)

      $forum_id = db_result(db_query('SELECT forum_id FROM %stopics WHERE topic_id = %d',$pre, $topic->topic_moved_id));
 

$topic->topic_moved_id was $topic_moved_id. This occured in 2 places. phpeclipse will show these if you want to backport to 4.6.

CommentFileSizeAuthor
#1 phpbb2drupal_47_update.patch80.06 KBneclimdul

Comments

neclimdul’s picture

StatusFileSize
new80.06 KB

the patch

beginner’s picture

That's great!
When I get some time, I'll review the patch and probably commit most of it.

Thanks :).

beginner’s picture

Status: Needs work » Active

I read through most of the patch, and your changes mostly make sense. Since it is a big patch, I have committed it as is, knowing that there are many small issues to iron out.
Beside those you mention, below there are a few notes I made while reading.
I don't have time to test the patch today, but will soon. Until then, the patch is made available to those who would like to use it.

Thanks.

- comment.module: handling different for 4.7. -> see contrib module.

Here:

  if(!$user_count) {
      drupal_set_message('There were no users found: Aborting script', 'error');
  }

the script should exit but doesn't.

I'm not sure the following will work as intended. To test.

    // If we don't want to import users who have never posted, break this while loop here.
    if ($import_spammers!=1 AND $user->user_posts == 0 ) {
      break;
    }

Why comment this out?

//      'roles' => array(0 => 2),                       # Authenticated User
neclimdul’s picture

About the abort, yeah it should return from the function right there. forgot that.
Your also right about the break and the import spammers. That should be a continue. I was trying to flatten the loop a little to make it more readable.
And as for the commenting the authenticated users. I was testing that and forgot to uncomment it.

Good eye.

As one more note, I realized one of the things I didn't take a look at was the pm import. It seem to run through ok without any changes on a bigger forum I grabbed and I have my PM's. Also, the patched script seems to have worked fine on the import of that forum as well(19000 posts).

beginner’s picture

thanks.

I have fixed issues in #3.
I still have problems with privatemessages, but I'm not sure yet if it's an issue with our module.
Also I still have to test polls.

But the rest seems to work nicely.

hadishon’s picture

I just converted my phpbb to 4.7 without any problems. The conversion went well. The problem I have now though is that after installing the viewtopic.php and story.php files I get this error when trying to view a post on the phpbb site:

Fatal error: Call to undefined function: db_result() in /httpdocs/aliyahnet/viewtopic.php on line 11

It doesn't redirect. Any suggestions?

beginner’s picture

Hi Adishon,

Thank you for reporting.
You say the migration went well. Can you tell us if you migrated the private messages, the polls and any file attachements? Those are areas that need more testing and I wondered how it went for you.

For the redirect, I am not the author of the code, and I have not tested them yet, so I don't know. I'll do so within the next few days (hopefully tomorrow) and come back to you.

beginner’s picture

hadishon, see this issue: http://drupal.org/node/60655.

hadishon’s picture

The conversion included users, containers, topics, posts, and private messages. No attachments or polls.

The only small thing that happened that I didn't like was all the registration dates for the users got updated to the time I did the conversion. I can live with that but it would have been nice if it kept the old date.

mjolley@buy-hot.com’s picture

comment.module still contains calls to form_textarea(). Should these be changed?

beginner’s picture

oops.
The comment.module is not necessary for 4.7. I'll delete the file from the final phpbb2drupal 4.7 release.
Same with upload_comment.module: use the official release of the module instead.

I'll try to clean everything up and come with a proper release by next week (well, that's the plan, anyway).

thanks.

mjolley@buy-hot.com’s picture

Ok, I simply replaced phpbb2drupal/comment.module with the regular 4.7 comment.module and everything seems to work fine. Maybe the file is no longer needed.

mjolley@buy-hot.com’s picture

Oh, nevermind :) So I can just delete these and it'll work? No missing reference problems?

beginner’s picture

http://drupal.org/cvs?commit=32243 :
removed comment.module comment_upload.module comment_upload.mysql:
With 4.7, there is no need to have a patched version of comment.module.

beginner’s picture

#9 submitted by hadishon on April 27, 2006 - 21:37
The only small thing that happened that I didn't like was all the registration dates for the users got updated to the time I did the conversion. I can live with that but it would have been nice if it kept the old date.

This was actually a bug.
It's fixed in cvs. http://drupal.org/node/64681

If you can code a little, it's still not too late to import the registration dates.

mjolley@buy-hot.com’s picture

A general question: Once I have the stuff imported and working, is there a way to get rid of phpbb2drupal entirely? I seem to lose all comments when I disable the module. I apologize in advance for asking this question here, but I'm already in the conversation :)

beginner’s picture

It's better to open another issue.
In any case, you should be able to disable phpbb2drupal after the import. The comments are imported into the drupal system and phpbb2drupal doesn't do anything to them after. If you really have a problem with comments, open another issue and describe in details what is happening.

beginner’s picture

Version: master » 4.7.x-1.0
Assigned: Unassigned » beginner
Status: Active » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)