Simple Machines Community Forum

SMF Support => Converting to SMF => Topic started by: kas5986 on September 26, 2013, 11:42:14 AM

Title: converter bbpress 2 to smf ?
Post by: kas5986 on September 26, 2013, 11:42:14 AM
hello I am trying to convert bbpress 2 forum to smf i only have database backup of my old forum can someone help me how i can convert my forum to smf ?
Title: Re: converter bbpress 2 to smf ?
Post by: margarett on September 26, 2013, 12:13:46 PM
There is a very old converter
http://www.simplemachines.org/community/index.php?topic=227796.0

Not sure it was updated to the newest versions, please take a look at that topic ;)
If you search this board for "bbpress" you will find other topics also.
Title: Re: converter bbpress 2 to smf ?
Post by: kas5986 on September 26, 2013, 12:47:26 PM
yap i have searched for it before it is not working with bbpress 2 :/ anyone can help ?
Title: Re: converter bbpress 2 to smf ?
Post by: margarett on September 26, 2013, 01:40:09 PM
Like I said here
http://www.simplemachines.org/community/index.php?topic=511748.msg3613826#msg3613826

A converter is not easy to develop. I'm trying to develop one for another software and it's quite a load of work...
Title: Re: converter bbpress 2 to smf ?
Post by: wouterm on October 01, 2013, 07:23:43 AM
Hi,
I  succeeded to migrate from Wordpress BBpress2 plugin to SMF2.05.
These are the steps I made:

- Install SMF2.05
- Copy these 4  tables from the wordpress database to the SMF database: wp_posts, wp_postmeta, wp_users, wp_usermeta . (you can use mysql dumper)
- Run the mySQL commands (see attachment).

These commands will copy only the basic data (Usersnames + passwords, forum, topics and posts).

For me it worked. I hope this  can be useful for others

Title: Re: converter bbpress 2 to smf ?
Post by: margarett on October 01, 2013, 07:31:54 AM
Just to confirm: you need to restore your password after conversion, right?

Nicely done. Welcome to SMF, by the way ;)
Title: Re: converter bbpress 2 to smf ?
Post by: wouterm on October 01, 2013, 07:51:22 AM
Users will remain their passwords, but they are asked to re-confirm their password the first time they log-in.
Title: Re: converter bbpress 2 to smf ?
Post by: Guido13 on December 20, 2013, 01:11:35 PM
I know virtually nothing about SQL, when I run the first command this is what I get, a syntax error possibly due to the version of SQL I'm using, any ideas?

Error
SQL query: Documentation

`smf_members` (

`id_member` ,  `member_name` ,  `real_name` ,  `passwd` ,  `email_address` ,  `website_title` ,  `website_url` ,  `date_registered` ,  `posts` ,  `hide_email` ,  `avatar`
) SELECT ID AS id_member, SUBSTRING( m.user_login, 1, 80 ) AS member_name, SUBSTRING( m.user_login, 1, 255 ) AS real_name, m.user_pass AS passwd, m.user_email AS email_address, SUBSTRING( m.user_url, 1, 255 ) AS website_title, SUBSTRING( m.user_url, 1, 255 ) AS website_url, UNIX_TIMESTAMP( m.user_registered ) AS date_registered, 0 AS posts, 1 AS hide_email,  '' AS avatar
FROM wp_users AS m
LIMIT 0 , 30
MySQL said: Documentation

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '`smf_members` ( `id_member` , `member_name` , `real_name` , `passwd` , `email_ad' at line 1
Title: Re: converter bbpress 2 to smf ?
Post by: wouterm on December 21, 2013, 05:09:20 AM
Did you introduce the whole sentence?
INSERT INTO `smf_members` ( `id_member` ....
It seems you did not type INSERT INTO
Also you need to have the table called smf_members
Title: Re: converter bbpress 2 to smf ?
Post by: Sono on December 27, 2013, 08:47:58 PM
Quote from: wouterm on October 01, 2013, 07:23:43 AM
Hi,
I  succeeded to migrate from Wordpress BBpress2 plugin to SMF2.05.
These are the steps I made:

- Install SMF2.05
- Copy these 4  tables from the wordpress database to the SMF database: wp_posts, wp_postmeta, wp_users, wp_usermeta . (you can use mysql dumper)
- Run the mySQL commands (see attachment).

These commands will copy only the basic data (Usersnames + passwords, forum, topics and posts).

For me it worked. I hope this  can be useful for others

Execuse me for the naive question, but where do you have to run the command? In sqldumper? Or in myphpadmin?
Title: Re: converter bbpress 2 to smf ?
Post by: wouterm on December 28, 2013, 04:46:10 AM
You can run the queries in PHPMyAdmin, in the SQL tab.
Title: Re: converter bbpress 2 to smf ?
Post by: Sono on January 05, 2014, 09:09:24 PM
I tried to copy the tables in my BBPress forum that wouterm talked about to the SMF forum. I tested it with the posts table. I exported in using the Export menu in MyPHPadmin. But when I import it to the SMF forum using the Import menu in MyPHPadmin there, too, I get error messages. What is the problem? I am unable to copy the tables this way to the SMF forum, what am I doing wrong?

If I want to import it is sql format, I get this error message:
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi933.photobucket.com%2Falbums%2Fad175%2FBencuri%2FScreenshot2014-01-06024737_zps4b19fcfe.png&hash=ae3344103865fec90f77c46a14d448979064c27a)

With the CSV there is page error:
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi933.photobucket.com%2Falbums%2Fad175%2FBencuri%2FScreenshot2014-01-06024816_zps180cdfb6.png&hash=6a7ce219c41d2ed174414671a64df90c11d388e0)

With XML I got this error message:
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi933.photobucket.com%2Falbums%2Fad175%2FBencuri%2FScreenshot2014-01-06024850_zps84c50edf.png&hash=2d2eb71304af0f9cd61699591914f14f1fdd2063)
Title: Re: converter bbpress 2 to smf ?
Post by: wouterm on January 06, 2014, 04:48:39 AM
The error message says "no databse selected". So  you should first select the database (congovibes_com ?)in PHPMyAdmin.
You can also first select a table within this database base and than click on the  SQL tab.
Title: Re: converter bbpress 2 to smf ?
Post by: Sono on January 06, 2014, 05:59:12 AM
Actually these two are on different servers and domain. The congovibes.com with the BBpress is on one server, and the SMF forum is on another with a different domain. Can I select the congovibes database in the MyPHPadmin of the SMF forum, or I should install SMF to the server where congovibes with BBpress is, and  select the same database for it where the tables of the BBpress forum are?
Title: Re: converter bbpress 2 to smf ?
Post by: margarett on January 06, 2014, 06:08:33 AM
No, just export the tables in the first server and import them in the second one. Always use SQL format.
In the second server you need to make sure you select a database (SMF one) before you choose to import
Title: Re: converter bbpress 2 to smf ?
Post by: Sono on January 06, 2014, 07:42:09 PM
Thank you!

It works, indeed! I managed to import all the tables, and could run most of the commands successfully. But I have problem with the last few lines. I get error messages for these:

UPDATE smf_messages SET `poster_email` = (
SELECT email_address
FROM smf_members
WHERE smf_members.id_member= smf_messages.id_member
)

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi933.photobucket.com%2Falbums%2Fad175%2FBencuri%2FScreenshot2014-01-07013530_zps4c765bdf.png&hash=4f32ac493cb1faa7d9d746ba97a7bc780115059e)



UPDATE smf_members SET posts = ( SELECT count( * )
FROM smf_messages
WHERE smf_messages.id_member = smf_members.id_member
GROUP BY id_member )

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi933.photobucket.com%2Falbums%2Fad175%2FBencuri%2FScreenshot2014-01-07013451_zpscf413231.png&hash=2ce45a8126d35fa9cda24587dd29f0bf78001404)
Title: Re: converter bbpress 2 to smf ?
Post by: margarett on January 06, 2014, 07:56:29 PM
That should be an issue with empty values in the original tables and / or users with no posts

Not on the computer right now, sorry
Title: Re: converter bbpress 2 to smf ?
Post by: Sono on January 07, 2014, 07:01:32 AM
When I ran the commands for th last section (messages, passwords, etc.) I made an error, because I copied all commands, and didn't know if you copy it all it will result in syntax error. So I emptied the target tables, and ran the commands one by one in that section. Maybe the emptying resulted in this error?
Title: Re: converter bbpress 2 to smf ?
Post by: margarett on January 07, 2014, 07:13:30 AM
No, that should be an issue with the contents of the original tables (having not-filled-in values, eg: a member without email)

Can you check, in your current smf_members table (after you get those errors), if you have any member with a blank "email_address" field? You can easily order your table by field by clicking in the column name, so the empty fields should come up first ;)
Title: Re: converter bbpress 2 to smf ?
Post by: Sono on January 07, 2014, 06:03:19 PM
I checked it, and indeed, several rows are missing the e-mail. What should I do now?

This smf_ messages contains what? The PM messages? Those are not very important anyway.
Title: Re: converter bbpress 2 to smf ?
Post by: margarett on January 07, 2014, 06:26:03 PM
Actually those are your forum posts. So they do matter :P

Try this (again, backup):
UPDATE smf_messages
SET poster_email = '[email protected]'
WHERE poster_email = '';


This should add a "dummy" email address to any post missing.
Then try again to run the 2 queries that are returning errors (it should fix one of them)
Title: Re: converter bbpress 2 to smf ?
Post by: margarett on January 07, 2014, 06:45:10 PM
For the other error "posts cannot be null" run this:

UPDATE smf_members SET posts = IFNULL( (
SELECT count(*)
FROM smf_messages
WHERE (
smf_messages.id_member = smf_members.id_member
)
GROUP BY id_member ) , 0
)

instead of the query you were given (and that is also returning an error)
Title: Re: converter bbpress 2 to smf ?
Post by: Sono on January 08, 2014, 07:26:11 AM
When I add this, it runs successfully.

UPDATE smf_messages
SET poster_email = '[email protected]'
WHERE poster_email = '';


But even so when I try to run the following query, it gives the error: "#1048 - Column 'poster_email' cannot be null"

UPDATE smf_messages SET `poster_email` = (
SELECT email_address
FROM smf_members
WHERE smf_members.id_member= smf_messages.id_member
)


The interesting is that I checked the smf_messages table, and I can see the fake e-mail added to the posts.... Strange.

This query works, however:

UPDATE smf_members SET posts = IFNULL( (
SELECT count(*)
FROM smf_messages
WHERE (
smf_messages.id_member = smf_members.id_member
)
GROUP BY id_member ) , 0
)


Title: Re: converter bbpress 2 to smf ?
Post by: margarett on January 08, 2014, 09:01:15 AM
I'm sorry, I made a mistake in the first query, I should be adding the dummy email to the members table, not messages.
Nevertheless, it served it's purpose :P

Do you have, in smf_members, some rows with empty "email_address"?
Title: Re: converter bbpress 2 to smf ?
Post by: Sono on January 08, 2014, 09:58:55 AM
The interesting is that when I click to reverse the order of e-mail addresses in smf_members, there isnt any row with empty e-mail.

So the answer is no.

I click this button:

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi933.photobucket.com%2Falbums%2Fad175%2FBencuri%2Femail_zps9987d784.jpg&hash=2c587aae93de93476c8fea9d780900c49230e076)
Title: Re: converter bbpress 2 to smf ?
Post by: margarett on January 08, 2014, 10:03:15 AM
Then I have no idea why that error happens :P

Anyway, all information should be converted. Welcome to SMF :D

I'd advise you to run the maintenance tasks, take care of membergroups, boards and permissions an then maybe use Spuds mod "Admin Toolbox" to recount your members totals.

Good luck ;)
Title: Re: converter bbpress 2 to smf ?
Post by: Sono on January 08, 2014, 10:13:22 AM
Actuallyx it seems to me all members are transferred. a Lot of posts are there. So maybe it is not that big an error.

But let me ask you to confirm in what order shall I run these queries:

1.
UPDATE smf_messages
SET poster_email = '[email protected]'
WHERE poster_email = '';


2.
UPDATE smf_messages SET `poster_email` = (
SELECT email_address
FROM smf_members
WHERE smf_members.id_member= smf_messages.id_member
)


3.
UPDATE smf_members SET posts = IFNULL( (
SELECT count(*)
FROM smf_messages
WHERE (
smf_messages.id_member = smf_members.id_member
)
GROUP BY id_member ) , 0
)


Is this all I have to run at the end, or I should also run this?:


UPDATE smf_members SET posts = ( SELECT count( * )
FROM smf_messages
WHERE smf_messages.id_member = smf_members.id_member
GROUP BY id_member )


Or the query nr. 3 that you recommended can replace this last one?
Title: Re: converter bbpress 2 to smf ?
Post by: margarett on January 08, 2014, 10:18:02 AM
1 replaces 2 (because you have no members without email)

3 replaces the other one.

So, if you didn't clear any data between having those errors and running those now, everything should be fine ;)

Title: Re: converter bbpress 2 to smf ?
Post by: Sono on January 08, 2014, 10:26:02 AM
Thank you very much.

It seems all members were transferred, there seems to be many posts, so I guess the essence is there :D

Thank you!

So this method works indeed. I can confirm now. This 2 last query is problematic, but the forum was transferred more or less. It is good because I am waiting for a solution to show up since last summer :D
Title: Re: converter bbpress 2 to smf ?
Post by: scorbit on June 24, 2014, 01:04:30 AM
Quote from: wouterm on October 01, 2013, 07:23:43 AM
Hi,
I  succeeded to migrate from Wordpress BBpress2 plugin to SMF2.05.
These are the steps I made:

- Install SMF2.05
- Copy these 4  tables from the wordpress database to the SMF database: wp_posts, wp_postmeta, wp_users, wp_usermeta . (you can use mysql dumper)
- Run the mySQL commands (see attachment).

These commands will copy only the basic data (Usersnames + passwords, forum, topics and posts).

For me it worked. I hope this  can be useful for others

Hi all, I'm stuck on this same issue right now and could use some help...
I got through all steps, but when I run the mySQL command I get the following... any ideas?
Thanks!

Error
SQL query: Documentation

BBPRESS2_TO_SMF * * * COPY MEMBERS * * * INSERT INTO  `smf_members` (  `id_member` ,  `member_name` ,  `real_name` ,  `passwd` ,  `email_address` ,  `website_title` ,  `website_url` ,  `date_registered` ,  `posts` ,  `hide_email` ,  `avatar` )
SELECT ID AS id_member, SUBSTRING( m.user_login, 1, 80 ) AS member_name, SUBSTRING( m.user_login, 1, 255 ) AS real_name, m.user_pass AS passwd, m.user_email AS email_address, SUBSTRING( m.user_url, 1, 255 ) AS website_title, SUBSTRING( m.user_url, 1, 255 ) AS website_url, UNIX_TIMESTAMP( m.user_registered ) AS date_registered, 0 AS posts, 1 AS hide_email,  '' AS avatar
FROM wp_users AS m * * * COPY
AND UPDATE BOARDS / FORUM * * * INSERT INTO  `smf_boards` (  `id_board` ,  `board_order` ,  `name` ,  `description` )
SELECT ID, menu_order, post_title, post_content
FROM  `wp_posts`
WHERE  `wp_posts`.`post_type` =  'forum';


MySQL said: Documentation

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'BBPRESS2_TO_SMF

*** COPY MEMBERS ***

INSERT INTO `smf_members` ( `id_membe' at line 1
Title: Re: converter bbpress 2 to smf ?
Post by: margarett on June 24, 2014, 04:02:10 AM
That's wrong...

What you need to run is just after INSERT INTO... Look at the file, it's quite explicit...

BBPRESS2_TO_SMF

*** COPY MEMBERS ***

INSERT INTO `smf_members` ( `id_member` , `member_name` , `real_name` , `passwd` , `email_address` , `website_title` , `website_url` , `date_registered` , `posts` , `hide_email` , `avatar` )
SELECT ID AS id_member, SUBSTRING( m.user_login, 1, 80 ) AS member_name, SUBSTRING( m.user_login, 1, 255 ) AS real_name, m.user_pass AS passwd, m.user_email AS email_address, SUBSTRING( m.user_url, 1, 255 ) AS website_title, SUBSTRING( m.user_url, 1, 255 ) AS website_url, UNIX_TIMESTAMP( m.user_registered ) AS date_registered, 0 AS posts, 1 AS hide_email, '' AS avatar
FROM wp_users AS m

*** COPY AND UPDATE BOARDS / FORUM ***

INSERT INTO `smf_boards`(`id_board`, `board_order`,  `name`, `description`)
SELECT ID, menu_order, post_title, post_content
FROM `wp_posts`
WHERE `wp_posts`.`post_type` = 'forum';


First line:
BBPRESS2_TO_SMF
Just a remark on what's inside the file
*** COPY MEMBERS ***
What the next operation(s) will perform
INSERT INTO `smf_members` ( `id_member` , `member_name` , `real_name` , `passwd` , `email_address` , `website_title` , `website_url` , `date_registered` , `posts` , `hide_email` , `avatar` )
SELECT ID AS id_member, SUBSTRING( m.user_login, 1, 80 ) AS member_name, SUBSTRING( m.user_login, 1, 255 ) AS real_name, m.user_pass AS passwd, m.user_email AS email_address, SUBSTRING( m.user_url, 1, 255 ) AS website_title, SUBSTRING( m.user_url, 1, 255 ) AS website_url, UNIX_TIMESTAMP( m.user_registered ) AS date_registered, 0 AS posts, 1 AS hide_email, '' AS avatar
FROM wp_users AS m

The actual SQL query that you need to run.

And so on, throughout the file ;)