hey all - looking to convert from Vanilla to phpBB 3

Welcome -- introduce yourself!

hey all - looking to convert from Vanilla to phpBB 3

Postby irish_ayes » 25 Apr 2009, 18:27

Hey everyone,

my users are revolting against me and want me to install something that's not Vanilla (getvanilla.com). Even though I like it, they don't want to have to learn anything new, so back to phpBB it is (not that I'm complaining though).

Always liked phpBB, and php in general, so hopefully this project will get me back into my php coding days.

Can anyone direct me to a Vanilla converter to either phpBB2 or phpBB3? I found a link off the phpbb.com page, but it said I wasn't authorized to view the page yet, must be because I only have (at the time of this post) 0 posts!
irish_ayes
New member
New member
 
Years of membership
 
Posts: 2
Joined: 25 Apr 2009, 18:06
Gender: None specified

Re: hey all - looking to convert from Vanilla to phpBB 3

Postby jmcnally » 04 May 2009, 16:46

I'm also very interested in this ability. Please someone help!
jmcnally
New member
New member
 
Years of membership
 
Posts: 3
Joined: 20 Feb 2009, 18:47
Gender: None specified

Re: hey all - looking to convert from Vanilla to phpBB 3

Postby aytackoray » 04 Sep 2009, 12:52

I need this help too!

I need a converter for vanilla to phpbb!
please help
aytackoray
New member
New member
 
Years of membership
 
Posts: 1
Joined: 04 Sep 2009, 12:48
Gender: None specified

Re: hey all - looking to convert from Vanilla to phpBB 3

Postby bonelifer » 05 Sep 2009, 01:53

Currently the only known method is to convert it to phpBB2 and then convert phpBB2 to phpBB3. Only use these directions if you understand them fully.

xylogicz wrote:This was just code my friend used in the prototyping. Probably wouldn't be needed for you.

Code: Select all
delete from phpbb_topics where topic_id > 2 ;
delete from phpbb_posts where post_id > 2;
delete from phpbb_users where user_id > 2;


User Transfer



The password hashing for PHPBB2, and Vanilla is the same.

Code: Select all
    INSERT INTO `phpbb_users` (`user_id`,`username` , `user_password` , `user_lastvisit` , `user_regdate` , `user_level` , `user_posts`, `user_email`)
    select (`userid`+1) ,`Name`,`Password`,unix_timestamp(`DateLastActive`),unix_timestamp(`DateFirstVisit`),0,`CountComments`,`email`
    from `LUM_User`
    where `userid` > 1


Bring over the topics from the Vanilla Discussions table.


Storing the "Discussion ID" in the "replies" field for future reference.

Code: Select all
insert into `phpbb_topics` (`forum_id`, `topic_title`, `topic_poster`, `topic_time`, `topic_last_post_uid`,`topic_replies`)
SELECT  `CategoryID`,`Name`,(`AuthUserID`+1),unix_timestamp(`DateCreated`),(`LastUserID`+1),`DiscussionID`
FROM  `LUM_Discussion`
where `WhisperUserID` = 0
--topic replies = original post id!!!!


Convert the Categories to Forums.


Here I set the forum ID's, you will need to set these up manually.
You can see the syntax here.

It would be much easier just to bring Vanilla's categories over, but I chose to change the structure for the new forum.

Vanilla and PHPBB differ to some degree here.

Code: Select all
Update phpbb_topics set forum_id = '2' where forum_id = '3'; -- General
Update phpbb_topics set forum_id = '16' where forum_id = '24'; -- Site Info
Update phpbb_topics set forum_id = '13' where forum_id = '11'; -- Admin Archive
Update phpbb_topics set forum_id = '4' where forum_id = '23'; -- ASM Info
Update phpbb_topics set forum_id = '15' where forum_id = '17'; -- Files and Tools
Update phpbb_topics set forum_id = '3' where forum_id = '18'; -- Spam
Update phpbb_topics set forum_id = '14' where forum_id = '20'; -- Archive
Update phpbb_topics set forum_id = '9' where forum_id = '25'; -- Archive


Post Headers:


Here I connect Vanilla's comments table with the PHPBB Topics table. I join it to the phpbb Topics table
to get the new topic ID, and forum ID.

Code: Select all
    insert into `phpbb_posts` (`topic_id`,`forum_id`,`poster_id`,`post_time`,`enable_html`,`post_username`)
    select p.topic_id, p.forum_id, (l.authuserid+1),unix_timestamp(`datecreated`),'1', l.commentid
    from `LUM_Comment` l,`phpbb_topics` p
    where l.discussionid = p.topic_replies


Post Bodies



Here I have to join 3 tables to populate the posts_text table. One column from each table is used to populate the required information.

You can see the joins, LUM_Discussion->LUM_Comment->phpbb_posts .

Code: Select all
    insert into phpbb_posts_text (`post_id`,`post_subject`,`post_text` )
    select pos.post_id, dis.name, com.body
    from `LUM_Comment` com, `phpbb_posts` pos, `LUM_Discussion` dis
    where com.CommentID = pos.post_username
    and dis.DiscussionID = com.DiscussionID


Topic First Post / Last Post



Code: Select all
    update phpbb_topics t
    set topic_first_post_id = (select min(post_id) from phpbb_posts  p where p.topic_id = t.topic_id),
    topic_last_post_id = (select max(post_id) from phpbb_posts  p where p.topic_id = t.topic_id),
    topic_time = (select max(post_time) from phpbb_posts p where p.topic_id = t.topic_id)


Topic Replies


Update the topic replies, by counting posts from the phpbb_posts table.

Code: Select all
update `phpbb_topics`  t
    set `topic_replies` = (select count(*) from `phpbb_posts` where topic_id = t.topic_id);


Since we don't count the original post as a reply, we will quickly subtract 1 from each count.

Code: Select all
update `phpbb_topics`  t
set `topic_replies` = (`topic_replies`-1);
User avatar
bonelifer
Moderator Team Leader
Moderator Team Leader
 
Years of membershipYears of membershipYears of membershipYears of membership
 
Posts: 1067
Joined: 24 Jun 2006, 18:48
Location: htpc.MythBuntu
Gender: Male
Real name: William

Re: hey all - looking to convert from Vanilla to phpBB 3

Postby thegallerymusic » 19 Nov 2009, 06:35

Bring over the topics from the Vanilla Discussions table.

Storing the "Discussion ID" in the "replies" field for future reference.

CODE: SELECT ALL
insert into `phpbb_topics` (`forum_id`, `topic_title`, `topic_poster`, `topic_time`, `topic_last_post_uid`,`topic_replies`)
SELECT `CategoryID`,`Name`,(`AuthUserID`+1),unix_timestamp(`DateCreated`),(`LastUserID`+1),`DiscussionID`
FROM `LUM_Discussion`
where `WhisperUserID` = 0
--topic replies = original post id!!!!


I'm having trouble with the Discussions query. I receive a syntax error for the "--topic replies = original post id!!!!" portion, but I'm not sure how it should be written.
The Discussions are all I need to complete a full migration from Vanilla to phpBB.

Any help would be greatly appreciated, thanks in a advance.
thegallerymusic
New member
New member
 
Posts: 1
Joined: 18 Nov 2009, 23:04
Gender: None specified

Re: hey all - looking to convert from Vanilla to phpBB 3

Postby .snow » 22 Nov 2009, 06:14

Welcome to the site man.
Hope you get your stuff sorted.
.snow
New member
New member
 
Posts: 32
Joined: 22 Nov 2009, 06:05
Gender: Male

Re: hey all - looking to convert from Vanilla to phpBB 3

Postby Calebrw » 29 Jan 2010, 07:11

thegallerymusic wrote:
Bring over the topics from the Vanilla Discussions table.

Storing the "Discussion ID" in the "replies" field for future reference.

CODE: SELECT ALL
insert into `phpbb_topics` (`forum_id`, `topic_title`, `topic_poster`, `topic_time`, `topic_last_post_uid`,`topic_replies`)
SELECT `CategoryID`,`Name`,(`AuthUserID`+1),unix_timestamp(`DateCreated`),(`LastUserID`+1),`DiscussionID`
FROM `LUM_Discussion`
where `WhisperUserID` = 0
--topic replies = original post id!!!!


I'm having trouble with the Discussions query. I receive a syntax error for the "--topic replies = original post id!!!!" portion, but I'm not sure how it should be written.
The Discussions are all I need to complete a full migration from Vanilla to phpBB.

Any help would be greatly appreciated, thanks in a advance.



Try
Code: Select all
insert into `phpbb_topics` (`forum_id`, `topic_title`, `topic_poster`, `topic_time`, `topic_last_post_id`,`topic_replies`)
SELECT  `CategoryID`,`Name`,(`AuthUserID`+1),unix_timestamp(`DateCreated`),(`LastUserID`+1),`DiscussionID`
FROM  `LUM_Discussion`
where `WhisperUserID` = 0
instead.
Calebrw
New member
New member
 
Posts: 2
Joined: 29 Jan 2010, 06:07
Gender: None specified

Re: hey all - looking to convert from Vanilla to phpBB 3

Postby Calebrw » 30 Jan 2010, 04:33

I have a new guide based on the above website online. Visit https://sourceforge.net/apps/wordpress/ ... bb-2-0-23/ for more information.

Thanks to the original coder for the SQL commands.
Calebrw
New member
New member
 
Posts: 2
Joined: 29 Jan 2010, 06:07
Gender: None specified


Return to Introductions

Who is online

Users browsing this forum: No registered users and 1 guest