Hi, my name is Shawn Kwon from Korea.

I'd like to request help and support from drupal lovers worldwide.
I've been managing KLDP, one of Korea's biggest/oldest Free and Open Software community focusing on documentation, project hosting, forum...etc since 1996. As the site grows we had to adopt different software platform for different services but time for migration has finally come and we chose drupal for our next service platform.

The issue is how we can migrate all the data and especially the phpbb conversion is the most important/hardest part of this job. So we did fundraising for this migration job and assigned 400000 Won(about $400) on bounty for GPL'd phpbb->drupal converter.

Here are the specification for the converter.

  • This converter should be licensed under GPL
  • phpbb: phpbb 2.0.18 + attachment mod / drupal: 4.6.5
  • phpbb should be converted to drupal forum functionality
  • Using/Adding drupal module is okay (when necessary) but modifying the drupal 4.6.5 core is not welcomed.
  • The phpbb database is UTF-8 so the converter does not have to care for the encoding. (Changing encoding is quite easy and straightforward. So I set this to ease the job of converter)
  • The attached files in the starting thread and attached files at the comments should be preserved (drupal does not support attaching file in comment. Using/developing mod for adding file attachment support to comment is welcomed / encouraged)
  • The user information should be preserved(id/pw/email, avatar, signature, messenger address, join date, location...etc)
  • File attachment should be optional so that it can be used for normal phpbb conversion also.
  • BBCode should be preserved (using existing drupal bbcode module is welcomed and encouraged)

Here the condition for this bounty

  • Payment(USD400) will be done by paypal so the receiver should have paypal account.
  • Even though multiple converter is developed or the converter is developed by many people, the money will go to one people who developed the converter which was actually used for migration for my site
  • Registering this converter to here as new project or adding patch to existing phpbb module project is welcomed and encouraged.

If you are Korean, you can read this announcement including other bounty items (theme...etc) from: http://bbs.kldp.org/viewtopic.php?t=68407

I know http://drupal.org/node/24639 exists but not much luck so far and there is no handy converter yet. I hope this can solve the problem of many people who are trying to convert their phpbb to drupal.

Thank you very much and I hope many bounty hunters be interested to this so that drupal adoption can be easier!

Comments

Toe’s picture

Ooh, I wish I had time to work on this right now. I'm planning to convert a phpBB board I run over to Drupal, and figgured I'd probably have to do at least some coverter updating. But alas, it won't happen for at least a few months due to lack of time on my part...

John Hwang’s picture

I'm working on the PHPBB->Drupal converter... Just letting people know as somebody in #drupal suggested. Let me know if you might be insterested in working on this.

hadishon’s picture

I would very much appreciate a converter for phpbb to drupal also. I'm looking for one to convert to drupal 4.7 though. If someone makes one for the above bounty, I would really appreciate it if they could make it work for 4.7 versions also.

Michael

2 of my Drupal sites:
Small Farm Resource Center
Israel Travel Center

bdude’s picture

you could just install it on 4.6 and then run the upgrader

myriad’s picture

Wow! Thank you Mr. Shawn Kwon, I think fund raising for money and donations to support your needs is a great way to a community working harder! Although I'm suprised there aren't a hundred comments saying they are very close to being finished or at the very least started.

I had already started some of what you asked for, and will be happy to convert it into a module. I have the same needs as you, however my community is very small and specific.

As for my project, I have successfully transfered all users from phpbb to drupal. This was pretty simple to do. I'm now testing and fine tuning moving all messages. When this is finished, it will be possible to convert a phpbb forum to an existing drupal system, which does not have to be a fresh install with an empty database. If a user from phpbb matches a user in drupal, some options will be presented. Attachments will need some work!

I'm new to drupal, so I'm not so fast yet. I'll keep you updated.

eaton’s picture

...File attachments in comments isn't really doable without some hacks to the core comment.module. It's an inherent limitation that exists in Drupal 4.6.

Drupal 4.7's new forms API makes it possible without any changes to the core, though.

--
Jeff Eaton | I heart Drupal.

--
Eaton — Partner at Autogram

ksoonson’s picture

John Hwang who replied to this thread second already did quite much of the work and he is now working on optimization and adding poll migration functionality.

As he is now quite busy with his personal stuff, I am waiting for his comeback but I am confident that he will be back shortly.

Once he is done, he or I will announce the good news again.

Thanks very much for your interest.

Linulo’s picture

Thank you, Mr. Kwon, for giving drupal a big impulse for everyone who is stuck with phpbb because of migration issues.

And thank you, Mr. Hwang, for coding a converter that will surely draw many more users to drupal.

I myself can't wait to try it on two small phpbb-infested community sites I run. :-)

hadishon’s picture

Any update on the progress of the migration tool?

2 of my Drupal sites:
Small Farm Resource Center
Israel Travel Center

myriad’s picture

my code is almost complete for a basic phpbb and drupal conversion. I'm still becoming familiar with drupal, but I know phpbb pretty well, so my program is a phpbb script that copies everything into the drupal database directly, including watchdogs. now I'm mostlying varifying the data and making sure drupal can still handle the data the same as it's own. It's a long and tedious process, but I'll release the basic version as soon it's ready. then I'll work on the file attachments and any requests.

hadishon’s picture

Thanks for the update Myriad!

Let me know if you need a tester...

2 of my Drupal sites:
Small Farm Resource Center
Israel Travel Center

Tresler’s picture

This is a script I altered from Feodor's original for phpbb to drupal 4.7 (no polls) . If it helps anyone, thats wonderful. It includes a part to change the table names to have a prefix of "drupal_" and back, and you'll want to change that if you have a prefix of any sort.

I'd love to help, or work for this bounty, but am just too busy. This worked for my conversion and I hope it helps someone else.

And if anyone had any thoughts on commenting about my coding practices, this got the job done, it was a one time deal so no, it ain't always pretty.

RENAME TABLE

access TO drupal_access,
accesslog TO drupal_accesslog,
blocks TO drupal_blocks,
boxes TO drupal_boxes,
comments TO drupal_comments,
forum TO drupal_forum,
history TO drupal_history,
node TO drupal_node,
node_access TO drupal_node_access,
node_comment_statistics TO drupal_node_comment_statistics,
node_counter TO drupal_node_counter,
node_revisions TO drupal_node_revisions,
privatemsg TO drupal_privatemsg,
privatemsg_archive TO drupal_privatemsg_archive,
privatemsg_folder TO drupal_privatemsg_folder,
profile_fields TO drupal_profile_fields,
profile_values TO drupal_profile_values,
role TO drupal_role,
sequences TO drupal_sequences,
term_data TO drupal_term_data,
term_hierarchy TO drupal_term_hierarchy,
term_node TO drupal_term_node,
term_relation TO drupal_term_relation,
term_synonym TO drupal_term_synonym,
users TO drupal_users,
users_roles TO drupal_users_roles,
variable TO drupal_variable,
vocabulary TO drupal_vocabulary,
vocabulary_node_types TO drupal_vocabulary_node_types,
watchdog TO drupal_watchdog;

#
# Written by Feodor (feodor [at] mundo.ru)
#
# Modified for drupal 4.5.2 and phpbb 2.0.11-2.0.13
# by Alexander Mikhailian <mikhailian@altern.org>
#
# This script makes an assumption that phpbb and drupal tables are kept in
# one and the same database. Phpbb tables are expected to have the prefix
# phpbb_ and drupal tables are expected to have the prefix drupal_
#
# If phpBB forum use CP1251 (or another) encoding, the tables must be converted
# into UTF8. If version of MySQL less then 4.1 "iconv" command can be used for
# convertion of exported tables into UTF8.
#
# Example:
# iconv -fcp1251 -tutf8 < phpbb2.sql > phpbb2_utf-8.sql
#
# Here is a list of phpbb tables used by script for import into Drupal:
#
# <*> phpbb_categories
# <*> phpbb_forums
# <*> phpbb_posts
# <*> phpbb_posts_text
# <*> phpbb_users
# <*> phpbb_vote_desc
# <*> phpbb_vote_results
#
# You should probably edit the two variables below to match your result:

#
# The name of the forums taxanomy as it appears on the site
#
SELECT @forum_title:='Forums';

#
# Start importing users from this id. Do not forget that uid 1 is always 
# the Administrator in Drupal. Depending on whether you already created
# the Administrator user in Drupal or not, you may want to change this
# variable into 2.
#
SELECT @first_phpbb_user_id:=12; # uid 1 is always an administrator in Drupal

#
# Drupal variables for node counts
#
SELECT @phpbb_terms:=MAX(forum_id) FROM phpbb_forums;
SELECT @phpbb_cat:=MAX(cat_id) FROM phpbb_categories;
SELECT @drupal_term_data_tid:=id FROM drupal_sequences WHERE name = 'term_data_tid';
  SELECT IF( @drupal_term_data_tid>0,  @drupal_term_data_tid, @drupal_term_data_tid:=0);
SELECT @drupal_comments_cid:=id FROM drupal_sequences WHERE name = 'comments_cid';
  SELECT IF( @drupal_comments_cid>0,  @drupal_comments_cid, @drupal_comments_cid:=0);
SELECT @drupal_vocabulary_vid:=id FROM drupal_sequences WHERE name = 'vocabulary_vid';
  SELECT IF( @drupal_vocabulary_vid>0,  @drupal_vocabulary_vid, @drupal_vocabulary_vid:=0);
SELECT @drupal_node_nid:=id FROM drupal_sequences WHERE name = 'node_nid';
  SELECT IF( @drupal_node_nid>0,  @drupal_node_nid, @drupal_node_nid:=0);
SELECT @drupal_node_revisions_vid:=id FROM drupal_sequences WHERE name = 'node_revisions_vid';
  SELECT IF( @drupal_node_revisions_vid>0,  @drupal_node_revisions_vid,  @drupal_node_revisions_vid:=1);

  
#Transfer Users

INSERT INTO drupal_users (uid,name,pass,mail,mode,sort,threshold,theme,signature,created,status,timezone,language,picture,init,data)
  SELECT  user_id,username,user_password,user_email,0,0,0,'',user_sig,user_regdate,1,0,'',user_avatar,user_email,'a:1:{s:5:"roles";a:1:{i:0;s:1:"2";}}'
  FROM phpbb_users
  WHERE user_id>=@first_phpbb_user_id;

#
# Create a vocabulary (called "Forums")
#

DELETE FROM drupal_vocabulary WHERE module='forum';
INSERT INTO drupal_vocabulary (vid,name,description,help,relations,hierarchy,multiple,required,module,weight)
  SELECT @drupal_vocabulary_vid+1,@forum_title,'This is the forum vocabulary','This is the forum vocabulary','0','2','0','1','forum','0';
  
#
# Set up the vocabulary "Forum" as the forum vocabulary
#


DELETE FROM drupal_variable WHERE name = 'forum_nav_vocabulary';
INSERT INTO drupal_variable (name, value) VALUES ('forum_nav_vocabulary', CONCAT('s:1:\"',@drupal_vocabulary_vid+1,'\";'));


/**
#
# The default comment order in phpbb2 is "oldest first"
#
DELETE FROM drupal_variable WHERE name = 'comment_default_order';
INSERT INTO drupal_variable (name, value) VALUES ('comment_default_order', 's:1:\"2\";');
**/

#
# Import categories from phpbb_categories as terms
#

INSERT INTO drupal_term_data (tid,vid,name,weight)
  SELECT @drupal_term_data_tid+cat_id,@drupal_vocabulary_vid+1,cat_title,cat_order
  FROM phpbb_categories;


 #
# Import terms from phpbb_forums
#  
INSERT INTO drupal_term_data (tid,vid,name,description,weight)
  SELECT @drupal_term_data_tid+@phpbb_cat+forum_id,@drupal_vocabulary_vid+1, forum_name,forum_desc,forum_order
  FROM phpbb_forums;

ALTER TABLE drupal_term_data ORDER BY tid;

#
# Import forum hierarchy 
# Drupal allows topics to be created at this level while phpbb2 does not. If you want to disallow topics below
# categories, mark them as containers in the forum configuration dialog
#


INSERT INTO drupal_term_hierarchy (tid,parent)
  SELECT @drupal_term_data_tid+cat_id,'0'
  FROM phpbb_categories;
  
INSERT INTO drupal_term_hierarchy (tid,parent)
  SELECT @drupal_term_data_tid+@phpbb_cat+forum_id, @drupal_term_data_tid+cat_id
  FROM phpbb_forums;
  
ALTER TABLE drupal_term_hierarchy ORDER BY tid;

#
# Create temporary tables for sorting topics and comments.
#

DROP TABLE IF EXISTS temp_posts;
CREATE TABLE temp_posts (
   post_id mediumint(8) UNSIGNED NOT NULL auto_increment,
   topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
   forum_id smallint(5) UNSIGNED DEFAULT '0' NOT NULL,
   poster_id mediumint(8) DEFAULT '0' NOT NULL,
   post_time int(11) DEFAULT '0' NOT NULL,
   post_edit_time int(11),
   post_subject text,
   post_text text,
   PRIMARY KEY (post_id),
   KEY forum_id (forum_id),
   KEY topic_id (topic_id),
   KEY poster_id (poster_id),
   KEY post_time (post_time)
);
DROP TABLE IF EXISTS temp_node;
CREATE TABLE temp_node (
   post_id mediumint(8) UNSIGNED NOT NULL auto_increment,
   topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
   PRIMARY KEY (post_id),
   KEY topic_id (topic_id)
);
   
#
# Copy into temporary table topics without comments
#
INSERT INTO temp_node (post_id,topic_id)
  SELECT MIN(post_id), topic_id
  FROM phpbb_posts
  GROUP BY topic_id;
INSERT INTO temp_posts (post_id, topic_id,forum_id,poster_id, post_time,post_edit_time,post_subject,post_text)
  SELECT c.post_id, c.topic_id, a.forum_id, IF(a.poster_id='-1','0',a.poster_id), a.post_time, a.post_edit_time, 
  REPLACE(b.post_subject, CONCAT(':',b.bbcode_uid),''), REPLACE(b.post_text, CONCAT(':',b.bbcode_uid),'')
  FROM phpbb_posts AS a, phpbb_posts_text AS b, temp_node AS c
  WHERE c.post_id=a.post_id AND c.post_id=b.post_id;

 #
# Insert nid and tid from temp_posts into drupal_term_node
#

INSERT INTO drupal_term_node (nid,tid)
  SELECT @drupal_node_nid+topic_id,@drupal_term_data_tid+@phpbb_cat+forum_id
  FROM temp_posts;

ALTER TABLE drupal_term_node ORDER BY nid;

/**
# Insert forum topics from temp_posts into drupal_node and node_revisions with #correlating nid, and vid
**/

# node revisions table
INSERT INTO drupal_node_revisions (nid,vid,uid,title,body,timestamp)
  SELECT @drupal_node_nid+topic_id,@drupal_node_revisions_vid+post_id,poster_id,post_subject,post_text,
  IF(post_edit_time<>'NULL',post_edit_time,post_time)
  FROM temp_posts;

# node table  

INSERT INTO drupal_node (nid,vid,type,title,uid,created,comment,changed)
  SELECT @drupal_node_nid+topic_id,@drupal_node_revisions_vid+post_id,'forum',post_subject,poster_id,post_time,'2',
  IF(post_edit_time<>'NULL',post_edit_time,post_time)
  FROM temp_posts;

ALTER TABLE drupal_node ORDER BY nid;

#
# Insert nid into drupal_forum 
#

  
DELETE FROM drupal_forum;
INSERT INTO drupal_forum (nid,vid,tid)
 SELECT @drupal_node_nid+topic_id,@drupal_node_revisions_vid+post_id,@drupal_term_data_tid+@phpbb_cat+forum_id
  FROM temp_posts;

  
# Comments

# Insert comments into drupal_comments for topics from temp_posts
#
INSERT INTO drupal_comments (nid,uid,subject,comment,hostname,timestamp,users)
  SELECT @drupal_node_nid+a.topic_id,
  CASE WHEN a.poster_id='-1' THEN '0' ELSE a.poster_id END,
  REPLACE(c.post_subject, CONCAT(':',c.bbcode_uid),''),
  REPLACE(c.post_text, CONCAT(':',c.bbcode_uid),''),
  CONCAT_WS('.',CONV(SUBSTRING(a.poster_ip,1,2),16,10),
    CONV(SUBSTRING(a.poster_ip,3,2),16,10),
    CONV(SUBSTRING(a.poster_ip,5,2),16,10),
    CONV(SUBSTRING(a.poster_ip,7,2),16,10)),
  a.post_time,'a:1:{i:0;i:0;}'
  FROM phpbb_posts AS a LEFT JOIN temp_posts AS b ON a.post_id=b.post_id,phpbb_posts_text AS c
  WHERE b.post_id IS NULL AND a.post_id=c.post_id;
ALTER TABLE drupal_comments ORDER BY cid;

UPDATE drupal_comments,drupal_node
  SET drupal_comments.subject=IF(drupal_comments.subject='',
    CONCAT('Re:',drupal_node.title),drupal_comments.subject)
  WHERE drupal_comments.nid=drupal_node.nid;
  
#
# Update thread in drupal_comments
#
DROP TABLE IF EXISTS drupal_comments_tmp;
CREATE TABLE drupal_comments_tmp (
   cid int(10) NOT NULL default '0',
    nid int(10) NOT NULL default '0',
    thread int(10) NOT NULL  auto_increment,
    PRIMARY KEY  (nid,thread)
    );
    
INSERT INTO drupal_comments_tmp (cid,nid)
  SELECT cid,nid
  FROM drupal_comments
  WHERE cid>@drupal_comments_cid;

UPDATE drupal_comments,drupal_comments_tmp 
  SET drupal_comments.thread=CONCAT(CONCAT(REPEAT(9,
    LEFT(drupal_comments_tmp.thread,LENGTH(drupal_comments_tmp.thread)-1)),
    RIGHT(drupal_comments_tmp.thread,1)),'/') 
  WHERE drupal_comments.cid=drupal_comments_tmp.cid;
  
#
# update topic statistics 
#

INSERT INTO drupal_node_comment_statistics 
  (nid,last_comment_timestamp,last_comment_name,last_comment_uid,comment_count)
  SELECT @drupal_node_nid+pt.topic_id, pp.post_time, ppt.post_subject, pp.poster_id, 
    pt.topic_replies
  FROM drupal_node dn, phpbb_topics pt, phpbb_posts pp, phpbb_posts_text ppt
  WHERE dn.nid = @drupal_node_nid+pt.topic_id 
    AND pt.topic_last_post_id = pp.post_id 
    AND pp.post_id = ppt.post_id;
  
  
  
# Delete all temp tables
#
DROP TABLE IF EXISTS temp_posts;
DROP TABLE IF EXISTS drupal_comments_tmp;
DROP TABLE IF EXISTS temp_node;

#
# Update Drupal variables 
#
SELECT @drupal_term_data_tid:=MAX(tid) FROM drupal_term_data;
SELECT @drupal_comments_cid:=MAX(cid) FROM drupal_comments;
SELECT @drupal_node_nid:=MAX(nid) FROM drupal_node WHERE type = 'forum';
SELECT @drupal_users_uid:=MAX(uid) FROM drupal_users;
SELECT @drupal_node_revisions_vid:=MAX(vid) FROM drupal_

DELETE FROM drupal_sequences WHERE name="term_data_tid";
DELETE FROM drupal_sequences WHERE name="comments_cid";
DELETE FROM drupal_sequences WHERE name="node_nid";
DELETE FROM drupal_sequences WHERE name="users_uid";
DELETE FROM drupal_sequences WHERE name="node_revisions_vid";

INSERT INTO drupal_sequences (name,id) SELECT "term_data_tid", @drupal_term_data_tid;
INSERT INTO drupal_sequences (name,id) SELECT "comments_cid",@drupal_comments_cid;
INSERT INTO drupal_sequences (name,id) SELECT "node_nid",@drupal_node_nid;
INSERT INTO drupal_sequences (name,id) SELECT "users_uid",@drupal_users_uid;
INSERT INTO drupal_sequences (name,id) SELECT "node_revisions_vid",@drupal_node_revisions_vid;

#
# this is for porting personal messages to privatemsg drupal module
#
# phpbb_privmsgs.privmsgs_type has the following codes:
# written=1, seen in inbox = 5, read = 0, saved = 3
#
# attention, drupal_privatemsg limits the title to 64 chars, this is too 
# little
#

DELETE FROM drupal_privatemsg;
INSERT INTO drupal_privatemsg ( id, author, recipient,subject,message,
  timestamp,hostname,folder,author_del,recipient_del )
  SELECT p.privmsgs_id, p.privmsgs_from_userid, p.privmsgs_to_userid,
    p.privmsgs_subject,pt.privmsgs_text,p.privmsgs_date,
    p.privmsgs_ip,0,0,0
    FROM phpbb_privmsgs p
    LEFT JOIN (phpbb_privmsgs_text pt) ON p.privmsgs_id=pt.privmsgs_text_id;

RENAME TABLE

drupal_access TO access,
drupal_accesslog TO accesslog,
drupal_blocks TO blocks,
drupal_boxes TO boxes,
drupal_comments TO  comments,
drupal_forum TO forum,
drupal_history TO history,
drupal_node TO node,
drupal_node_access TO node_access,
drupal_node_comment_statistics TO node_comment_statistics,
drupal_node_counter TO node_counter,
drupal_node_revisions TO node_revisions,
drupal_privatemsg TO privatemsg,
drupal_privatemsg_archive TO privatemsg_archive,
drupal_privatemsg_folder TO privatemsg_folder,
drupal_profile_fields TO profile_fields,
drupal_profile_values TO profile_values,
drupal_role TO role,
drupal_sequences TO sequences,
drupal_term_data TO term_data,
drupal_term_hierarchy TO term_hierarchy,
drupal_term_node TO term_node,
drupal_term_relation TO term_relation,
drupal_term_synonym TO term_synonym,
drupal_users TO users,
drupal_users_roles TO users_roles,
drupal_variable TO variable,
drupal_vocabulary TO vocabulary,
drupal_vocabulary_node_types TO vocabulary_node_types,
drupal_watchdog TO watchdog;
    
ksoonson’s picture

Hi, the bounty itself is over and John Hwang got the bounty also.

As he is quite busy working on other issues now, he did not post the converter yet but he will post it soon as a contributed module.

Thanks.

myriad’s picture

good job! Hope to see it soon!

John Hwang’s picture

Sorry for the late update.

The project finally got approved and I've uploaded the latest version to the repository.

phpbb2drupal: http://drupal.org/node/45403

I used it to help KLDP (Korean Linux Documentation Project) migrate from phpbb 2.0.18 to drupal 4.6.5. KLDP has over 25000 users and 500,000 posts/topics/comments. It took a few hours to migrate the scripts but all in all, everything seems to be in order.

beginner wrote a phpbb2drupal module unlike mine which is a script. I haven't had the chance to view this code, but he tells me that mine is more feature complete. I'll update the project page with details on how to install and run the script.

hadishon’s picture

Thank you for your contribution! When do you think you'll get the module updated for 4.7?

2 of my Drupal sites:
Small Farm Resource Center
Israel Travel Center

John Hwang’s picture

In my opinion, the easiest, way to migrate to 4.7 would be to import your phpbb data to drupal 4.6.x then use Drupal's upgrade system to upgrade to 4.7.

I'm not sure if an upgrade to 4.7 is warranted at this point. The next major upgrade would probably be to update directly to the next major drupal revision, something like Drupal 5.0.

hadishon’s picture

John, yes that could be the case for some but, it doesn't help me and possible others.

I already have a 4.7 site on a busy live site with lots of content. That site also has a phpbb forums that has been active for several years now.

To backport my drupal site from 4.7 to 4.6 then migrate phpbb then update back to 4.7 sounds disasterous to me. It is asking for problems.

The only way I can see on migrating phpbb to drupal for me is to have a current module/script that can migrate directly to 4.7.

I hope you'll consider updating your module to work with 4.7.

Michael

John Hwang’s picture

I didn't consider your case. I will definately consider upgrading the script for 4.7, but I don't have time at the moment... :'(

myriad’s picture

Because Drupal 4.6 doesn't support attachments in comments, the comments.module had to be patched, correct? So upgrading from 4.6 to 4.7 probably wouldn't work, depending on the differences between the database structures of the patched files and the current system.

Do you think it's a lot of trouble to update the script to 4.7? Is it so much different than 4.6? I'm asking because I don't know.

Also, I have a feeling the phpbb to drupal is expecting a clean and empty database. The code I'm slowly putting together will work with a busy site by changing user id's in the posts. I'm doing it the backwards way by making a phpbb page that inserts data directly in drupal's database, since I'm a complete newb here.

John Hwang’s picture

The phpbb2drupal script doesn't expect a clean database. It simply adds the new users/content as if you were doing it by hand. It uses Drupal's API and therefore the newly migrated content are assigned the next available id for users, nodes, comments ...etc.

As for attaching files to comments... I haven't looked closely to 4.7's comment.module but the patch that I've included is what developed and later included into 4.7, developed by the same person (ethan). He tells me that it's pretty similar so the only change needed for 4.7 would be to upgrade the comment_upload.module...

As stated, this script was designed to support 4.6.5, but features and future upgrade paths were considered in the design. Upgrading to 4.7 shouldn't be difficult especially b/c I use Drupal's API's and I welcome everybody to extend/upgrade the script. It's just that I don't have time currently to update the script for 4.7. I don't think I'll have time for the next few months at least.

myriad’s picture

Thanks John, that clears it up for me. I'll take a hard look and see what I can do to make it work for 4.7. I appologize if my comments sounded negative in any way.

Take it easy!

myriad’s picture

Alrighty, I downloaded and installed Drupal 4.6.6 then ran your excellent script and had no problems. I included the attachments and installed the comment_upload.module, everything worked.
Then I deleted all the drupal 4.6.6 files, put in the 4.7.0RC2 files and upgraded as usual. It's important to physically remove all 4.6 files as you will get theme errors if you don't and nothing works.

During the upgrade process, I had one error as shown here:
user warning: Duplicate entry '' for key 2 query: ALTER TABLE users CHANGE `name` `name` varchar(60) CHARACTER SET utf8 DEFAULT '' NOT NULL, CHANGE `pass` `pass` varchar(32) CHARACTER SET utf8 DEFAULT '' NOT NULL, CHANGE `mail` `mail` varchar(64) CHARACTER SET utf8 DEFAULT '' NULL, CHANGE `theme` `theme` varchar(255) CHARACTER SET utf8 DEFAULT '' NOT NULL, CHANGE `signature` `signature` varchar(255) CHARACTER SET utf8 DEFAULT '' NOT NULL, CHANGE `timezone` `timezone` varchar(8) CHARACTER SET utf8 DEFAULT '' NULL, CHANGE `language` `language` varchar(12) CHARACTER SET utf8 DEFAULT '' NOT NULL, CHANGE `picture` `picture` varchar(255) CHARACTER SET utf8 DEFAULT '' NOT NULL, CHANGE `init` `init` varchar(64) CHARACTER SET utf8 DEFAULT '' NULL, CHANGE `data` `data` longtext CHARACTER SET utf8 DEFAULT '' NULL in /home/www/includes/database.mysql.inc on line 120.
This results in usernames not being found when trying to add or preview new comments. Logins may possibly be denied, not sure.
To fix this, I simply used phpmyadmin and manually made the changes. No errors. I can now post and everything so far seems fine.

I moved all my old phpbb/files into drupal/files so comment attachments work (as the script says).

If I have more time, I'll try other methods, but hopefully this helps others waiting for a 4.7 surething.

hadishon’s picture

What exactly did you have to manually enter through phpmyadmin?

Also, where can your modified module be found? I would suggest creating an project issue and then offering a patch: http://drupal.org/project/issues/phpbb2drupal

I'm hoping that someone will be able to find out why you are getting that error and get it fixed.

Thanks for working on this!

2 of my Drupal sites:
Small Farm Resource Center
Israel Travel Center

hadishon’s picture

How is the converter script/module going for 4.7? Is there a place I can download it to try it?

Thanks,
Michael

myriad’s picture

In the CVS module page, http://drupal.org/project/phpbb2drupal the phpbb2drupal says it's almost working with 4.7.
If you follow my vague instructions above then you might get it to work.
If you can use Drupal 4.6 and upgrade to 4.7 then you're in luck. I did get an error but easily fixed it with phpmyadmin.
I don't understand why the error happens, but if you load up the table and look at the error above, you can see the structure has different properties.
Change the old 4.6 "user" table properties to the new 4.7 propterties as follows:

CHANGE `name` TO varchar(60) CHARACTER SET utf8 DEFAULT '' NOT NULL
CHANGE  `pass` TO varchar(32) CHARACTER SET utf8 DEFAULT '' NOT NULL
CHANGE `mail` TO varchar(64) CHARACTER SET utf8 DEFAULT '' NULL
CHANGE `theme` TO varchar(255) CHARACTER SET utf8 DEFAULT '' NOT NULL
CHANGE `signature` TO varchar(255) CHARACTER SET utf8 DEFAULT '' NOT NULL
CHANGE `timezone` TO varchar(8) CHARACTER SET utf8 DEFAULT '' NULL
CHANGE `language` TO varchar(12) CHARACTER SET utf8 DEFAULT '' NOT NULL
CHANGE `picture` TO varchar(255) CHARACTER SET utf8 DEFAULT '' NOT NULL
CHANGE `init` TO varchar(64) CHARACTER SET utf8 DEFAULT '' NULL
CHANGE `data` TO longtext CHARACTER SET utf8 DEFAULT '' NULL

You should notice that there are no 'bin' types anymore. now everything is varchar or longtext.

Another note, is you should install any node_access utilities BEFORE installing phpBB forums. I didn't and none of my permissions were being honored; none of my users could actually see any forums or posts after installing TAC_LITE. To solve that problem, I wrote a script to correctly add the nodes info where needed and everything works fine now.

Sorry, I'm at work every day and don't get to leave early, so this is the most I can do for now. Hopefully I can do more during "Golden Week" - the week where every family in Japan rides the train at the same time. The guy who received the bounty did a great job thus far. I will post the TAC_LITE fix as soon as I'm on my computer at home and remember!

myriad’s picture

I also hope to see the 4.7 version. Thanks for the hard work!

deekayen’s picture

I didn't see a link to this, so here's the phpbb2drupal script that's in drupal CVS. I have no idea how well/if it works: http://cvs.drupal.org/viewcvs/drupal/contributions/tricks/phpbb2drupal/

feodorp’s picture

I hope that my script it's useful for converting from phpbb to drupal forum. If I could help to improve the script, please send me a message (feodorp@yahoo.com). Thanks a lot.

bkno’s picture

Has anyone converted phpbb to Drupal 5.1?

SteveK’s picture

I'd also like to know this as well. I'm looking for a phpbb -> drupal 5.1, thanks in advance!

bcn’s picture

I was able to successfully migrate a 30,000+ post phpbb forum to drupal 5.1x using the updated version of the phpbb2drupal module that is discussed in this issue (http://drupal.org/node/112032)..