http://www.joelonsoftware.com/articles/NotJustUsability.html

I'm in the process of migrating from phpBB2 to drupal. I'll post my migration script soon. (If I had a nickel for everytime I've seen that sentence on the drupal.org website).

I worked up a theme to make phpBB2 work more like the joelonsoftware discussion pages. I'm thinking that somewhere between the graphical clutter of the basic phpBB install and the stripped down joelonsoftware forums is a good middle ground.

I even gave up 'edit' and 'preview', however, I miss those features terrible. I'll probably keep that enabled in drupal.

Comments

Terry Lorber’s picture

This could be added to the installation instructions under "Migrating from other forum packages".

select @uid := if(max(uid),max(uid),0) from drupal.users;

select @tid := if(max(tid),max(tid),0) from drupal.term_data;

select @nid := if(max(nid),max(nid),0) from drupal.node;

select @cid := if(max(cid),max(cid),0) from drupal.comments;

select @vid := if(max(vid),max(vid),0) from drupal.vocabulary;

select @rid := rid from drupal.role where name = 'authenticated user';

-- insert users

insert into drupal.users
(uid, name, pass, mail, signature, timestamp, status, timezone, init, rid)
select @uid+user_id, username, user_password, user_email, user_sig,
user_regdate, 1, 0, user_email, @rid
from phpbb.phpbb_users where user_id > -1;

-- make a forum node

insert into drupal.vocabulary
(vid, name, hierarchy, nodes)
values
(@vid+1, 'forums', 0, 'forum');

-- make terms for each forum
-- TODO: group by phpBB categories

insert into drupal.term_data
(tid, vid, name, description)
select @tid+forum_id+@tid, @vid+1, forum_name, forum_desc
from phpbb.phpbb_forums;

-- make everything a child of the 'forum' vocab

insert into drupal.term_hierarchy
(tid, parent)
select tid, 0 from drupal.term_data;

-- add topic posts as nodes

insert into drupal.node
(nid, type, title, uid, status, comment, promote,
users, revisions,
created, teaser, body)
select @nid+topic_id, if(phpbb_topics.topic_vote, 'poll', 'forum' ) end,
topic_title, @uid+topic_poster, 1, 2, 0,
'', '',
topic_time, post_text, post_text
from phpbb.phpbb_topics, phpbb.phpbb_posts_text
where phpbb.phpbb_topics.topic_first_post_id =
    phpbb.phpbb_posts_text.post_id;

-- put some poll data up
-- TODO: figure out the voters field

insert into drupal.poll
(nid, runtime, voters, active)
select @nid+topic_id, vote_start, '', 1
from phpbb.phpbb_vote_desc;

insert into drupal.poll_choices
(nid, chtext, chvotes, chorder)
select @nid+topic_id, vote_option_text, vote_result, vote_option_id
from phpbb.phpbb_vote_results, phpbb.phpbb_vote_desc
where phpbb.phpbb_vote_results.vote_id = phpbb.phpbb_vote_desc.vote_id;

-- link up nodes to terms

insert into drupal.forum
(nid, tid, shadow)
select @nid+topic_id, @tid+forum_id, 0
from phpbb.phpbb_topics;

-- and again?

insert into drupal.term_node
(nid, tid)
select @nid+topic_id, @tid+forum_id
from phpbb.phpbb_topics;

-- add other posts as comments
-- TODO: figure out that threading thing

insert into drupal.comments
(cid, nid, uid, subject, comment, hostname, timestamp, thread, users)
select @cid+phpbb_posts.post_id, @nid+topic_id, @uid+poster_id,
post_subject, post_text,
poster_ip, post_time, '1/', 'a:1:{i:0;i:0}'
from phpbb.phpbb_posts, phpbb.phpbb_posts_text
where phpbb.phpbb_posts.post_id = phpbb.phpbb_posts_text.post_id
and phpbb.phpbb_posts.post_id;

-- remove those comments that were used for the starting node

delete from drupal.comments USING phpbb.phpbb_topics, drupal.comments
where drupal.comments.cid = phpbb.phpbb_topics.topic_first_post_id;

-- drupal declares these table primary keys as auto_increment, but
-- in fact actually assigns them explicitly. Update drupal's idea
-- of what id to assign next for each table.

delete from drupal.sequences where name='users_uid';
insert into drupal.sequences (name, id)
select 'users_uid', max(uid) from drupal.users;


delete from drupal.sequences where name='term_data_tid';
insert into drupal.sequences (name, id)
select 'term_data_tid', max(tid) from drupal.term_data;

delete from drupal.sequences where name='node_nid';
insert into drupal.sequences (name, id)
select 'node_nid', max(nid) from drupal.node;

delete from drupal.sequences where name='comments_cid';
insert into drupal.sequences (name, id)
select 'comments_cid', max(cid) from drupal.comments;

delete from drupal.sequences where name='poll_choices_chid';
insert into drupal.sequences (name, id)
select 'poll_choices_chid', max(chid) from drupal.poll_choices;

peekj’s picture

This doesn't work right... it imports the forum posts and users, yes, but it messes up other existing nodes, some forum posts don't work (Page not found), users cannot actually login properly (lots of You are not authorized errors) and the forum posts do not actually show up on the forums page.