phpBB 3 Importer (old)

I added code to the phpbb3 importer to support attachments.

To use it, you’ll need to edit at least one constant near the top of the script: ATTACHMENTS_BASE_DIR and possibly AUTHORIZED_EXTENSIONS. In my case, I was given a big tar.gz file with all the attachments, so I extracted them somewhere, set ATTACHMENTS_BASE_DIR to that directory, and most of the attachments imported successfully.

Some attachments fail to import because of this error:

Couldn't find phpbb_attachments record for post.id = 9876, import_id = 9123, real_filename = blahblah.jpg

In those cases, the phpbb_attachments table really is missing records for those attachments, so there’s no way to import them. Maybe your phpbb databases won’t have this problem.

I used a hacky solution to this too… so, there’s room for improvement. :blush:

5 个赞