Got tired of install and upgrade problems with phpBB. Just installed miniBB. Cute interface!
I did need to convert my phpBB db to this one so I made a couple of little changes to the above sql script. I hope this works for you using a newer version of miniBB. Remember to BACKUP YOUR DB FIRST!
# phpBB 2.0 to miniBB 2.0 Converter # Copyright (C) 2005 Monte Ohrt # # Purpose: # # The script will transfer categories, forums, users, and posts # from phpBB 2.0 to miniBB 2.0. # # Prerequisites: # # - phpBB 2.0 and miniBB 2.0 dbs are installed on the same server # - miniBB 2.0 is empty, fresh install # - phpBB 2.0 tables are prefixed with "phpbb_" # - miniBB 2.0 tables are prefixed with "minibb_" # # Directions: # # mysql minibb < phpbb2minibb.sql #
# Clear out minibb tables
TRUNCATE TABLE minibb_forums; TRUNCATE TABLE minibb_posts; TRUNCATE TABLE minibb_topics;
# No categories in miniBB, skip.
# # Copy forums. #
INSERT INTO minibb_forums (forum_id, forum_name, forum_desc, forum_order, forum_icon, topics_count, posts_count) SELECT forum_id, forum_name, forum_desc, forum_order, 'default.gif', forum_topics, forum_posts FROM sitedb.phpbb_forums;
# # Copy users. #
INSERT INTO minibb_users (user_id, username, user_regdate, user_password, user_email, user_icq, user_website, user_occ, user_from, user_interest, user_viewemail, user_sorttopics, user_newpwdkey, user_newpasswd, language, activity, num_posts) SELECT user_id, username, FROM_UNIXTIME(user_regdate), user_password, user_email, user_icq, user_website, user_occ, '', user_interests, user_viewemail, 1, '', '', user_lang, 1, user_posts FROM sitedb.phpbb_users;
# No security access in minibb, skip.
# # Copy topics. #
INSERT INTO minibb_topics (topic_id, topic_title, topic_poster, topic_poster_name, topic_time, topic_views, forum_id, topic_status, topic_last_post_id, posts_count, sticky) SELECT DISTINCT topic_id, topic_title, topic_poster, '', FROM_UNIXTIME(topic_time), topic_views, forum_id, topic_status, topic_last_post_id,0,0 FROM sitedb.phpbb_topics;
# get poster name update minibb_topics, minibb_users set minibb_topics.topic_poster_name = minibb_users.username where minibb_topics.topic_poster = minibb_users.user_id;
# calculate post count for each topic
create table tmp_post_count (topic_id int, post_count int); insert into tmp_post_count select p.topic_id, count(p.post_id) from sitedb.phpbb_posts p group by p.topic_id;
update minibb_topics, tmp_post_count set minibb_topics.posts_count = tmp_post_count.post_count where minibb_topics.topic_id = tmp_post_count.topic_id;
drop table tmp_post_count;
# Copy posts.
INSERT INTO minibb_posts (post_id, forum_id, topic_id, poster_id, poster_name, post_text, post_time, poster_ip, post_status) SELECT DISTINCT p.post_id, p.forum_id, p.topic_id, p.poster_id, '', '', FROM_UNIXTIME(p.post_time), poster_ip, 0 FROM sitedb.phpbb_posts p;
# get poster name update minibb_posts, minibb_users set minibb_posts.poster_name = minibb_users.username where minibb_posts.poster_id = minibb_users.user_id;
# Copy post text.
update minibb_posts, sitedb.phpbb_posts_text set minibb_posts.post_text = sitedb.phpbb_posts_text.post_text where minibb_posts.post_id = sitedb.phpbb_posts_text.post_id;
I only added one or two fields based on a comparison between the existing minibb and phpbb tables. I just did a "desc phpbb_sometable" and add the fields that I could find a corresponding field.
It ran fine though I did hit a duplicate record of "-1" user_id that I had to delete manually before it would complete. Otherwise, went great. |