SMF Import to bbPress
Introduce Forum Importer template for use with importing from SMF v2.0.x(Tested on v2.0.4)
http://codex.bbpress.org/import-forums/ & http://codex.bbpress.org/import-forums/smf
Working: Forums, Topics & Users
Not Working Yet: Categories, Replies, User Passwords & Custom BBCode for Topic & Reply Content
Attached to bbPress Trac Ticket #2380 is the 1st pass patch for SMF importing into bbPress.
To test the importer download the latest patch from the link above and copy/ftp the file into the /includes/admin/converters/ folder of your bbPress plugin.
I hope to get the remaining outstanding items done ASAP.
(User passwords will be a little trickier and will take a bit more time)
Any feedback and/or testing that you can provide will help me out tremendously.
I am trying to run this script. I added the the SMF.php file. I am running SMF 2.0.4 on the one I am trying to import. The SMF 2.0.4 was done with simple scripts a while back don’t know if that would have anything to do with it. Maybe it is the settings I am using I am not sure about the last choice (If converting from BuddyPress Forums, use “wp_bb_” or your custom prefix)
Also with it being a simple script install I do not know the user password, so I created another user will all privg and added it to the database and used that one.
rows limit 100
delay time 1
convert users (check)
I hit start then after a little bit I get a yellow box with an error but with a link to continue. I hit continue and it takes me to the repair page I do that step and I have nothing showing that would indicate that it worked. No post topics or anything.
@Allen in the last shoice, the prefix for SMF is “smf_” try it with that and see if the error persists.
And about the user, if you created one and added the privileges it should work.
ok I will try that. but just to make sure this is how the layout is for the phpmyadmin
before all databases (dnadjser)
then the database name _smp3
I just want to make sure I put the right thing where it needs to be.
@Allen Hi, your database name and also your DB username have to be dnadjser_dbname and dnadjser_usrname
I just noticed that after doing the import from smf 1.1.8 (I made all the needed talble and field name changes, etc) that my user table now contains two versions of each imported user. One version looks right the other has a prefix of imported_ on both the usename and the email address.
Is it OK to clean out these odd ones?
Yes, have a look at each user to see which user the topic or reply is attributed to first.
The best way if you don’t have to many users is to delete each user individually in wp-admin user panel. This way when you delete the user can attribute all posts/topics/replies etc to another user, in this case you select the same username without the ‘imported_’ prefix.
You have specified this user for deletion:
ID #18521: imported_someusername
What should be done with posts owned by this user?
Delete all posts.
Attribute all posts to: someusername
Why were all the users duplicated as imported_someusername? Did I do something wrong in the conversion template?
I did not see any mention of the creation of these artificial users in the documentation that exists for the import forums function, nor did the Repair Forums clean up the artificial users.
I had pruned my user database before conversion so fortunately I only had a little over 400 to go through. All of the imported_username type users had 0 posts so I was able to delete them a page at a time.
Hopefully everything will go smoothly from here on,
I have added password support to this importer .
You can find it at Trac Ticket #2380.
@remcob00 What can I say… AWESOME, thank you, tested and working magnificently
Looks like the last thing needed now for SMF v2.x is converting any custom HTML/BBCodes for topic/reply content.
From my tests the following BBCodes are converting fine:
[left]- left aligned
[center]– centre aligned
[right]– right align
[color=colorname]– color name
[color=#FFFFFF]– color hex value
The following need to be converted by regex strings during import:
[quote author=SMF Admin link=topic=9.msg30#msg30 date=1380330453]– Quoting a post, username, post id & date support needs to be added.
[pre]– pre formatted text
[code]- partially working
[size=x]- font size
[glow=red,2,300]Glow[/glow]- What do we want to translate this to?
[shadow=red,left]shadow[/shadow]- What do we want to translate this to?
[move]marquee[/move]- What do we want to translate this to?
[tt]- teletype? should this be a monospaced font?
[td]- tables and closing tags
[list]- unordered list
[list=decimal]- ordered list
[li]- list item
[hr]- horizonal rule
SMF Smilies Working (extra space added so these render in code block)
SMF Smilies not working
What should the above be converted to with the smilies included with WordPress?
Have I missed any BBCode and/or other 'stuff' that isn't getting converted correctly during the SMF import?
You guys are AWESOME, I can’t believe that after years I’m finally this close to having a full integration of my forum with my wordpress, thank you for the hard work…
Yeah, nearly there, some suggestions for what some of those content conversions should be and testing to see if I missed any would be extremely helpful.
Well, here are some ideas.
[glow=red,2,300]Glow[/glow]– What do we want to translate this to?
This is obviously a CSS Text-shadow without offset and with a little blur so the only thing that comes to my mind would be to convert this to a SHORTCODE and add in the documentation of the converter how to add it manually to the user’s wordpress install and to the theme CSS, since I can’t think of another way for this to work.
[shadow=red,left]shadow[/shadow]– What do we want to translate this to?
Same as the above but with a little offset to the 4 sides being able to pick a side in the shortcode and without blur.
[move]marquee[/move]– What do we want to translate this to?
JUST REMOVE IT, it’s ugly and old
[tt]– teletype? should this be a monospaced font?
And as for the smileys (extra space added so these render in code block)
; - )
8 - )unless a glasses smiley is added to WP
: ? :
: )I didn’t find what this smiley is supposed to be
: - (
: - x
: - ?unless a skeptical smiley is added to WP
; - )unless a kiss smiley is added to WP
: cry :
Thanks for the awesome work, you guys!
I have tried running the importer a few times now, but it just states that there none of the forum items (users, topics, replies, etc.) to import. Any ideas why this could be happening? (My forum on SMF has many users and data)
Thanks for your help,
@ricov4 What version of SMF are you trying to import from?
Make sure you have the correct fields for ALL of the values:
- Database Name: Name of the database with your old forum data
- Database User: User for your database connection
- Database Password: Password to access the database
- Table Prefix: (Possibly could be
I originally was importing from v1.1.18 and had this problem. I then updated to 2.0.5 and down to 2.0.4, but both resulted in the same issue.
I accessed the information from the Server Settings page of the forum and believe I have the correct fields for all the values.
Could the database port have any effect?
Could the database port have any effect?
Yes, make sure that is also correct, the default is 3306 but your web host may use a different port.
You could also check what your SMF config is by checking the database values in eg.
########## Database Info ########## $db_type = 'mysql'; $db_server = 'localhost'; $db_name = 'smf_database_name'; $db_user = 'mysql_user_name'; $db_passwd = 'mysecretpassword'; $ssi_db_user = ''; $ssi_db_passwd = ''; $db_prefix = 'smf_'; $db_persist = 0; $db_error_send = 1;
For the smileys I think that it is a better idea to replace
: roll :).
@netweb I had originally taken all of my information from there for the import, and I have attempted again since then.
Where can I find my database port number? This is unique to my hosting server?
By the way, congratulations Edgar @netweb well deserved promotion…
And @ricov4 if you have SSH acces try
netstat -anp | grep -i mysql
@manuxel is there another way to find it? I don’t have SSH access, and it could be timely to get from the client.
Most likely the port will be 3306, if that doesn’t work you will have to ask your web host what port number they use (if you do confirm the other database settings with them at the same time)
I’ll see how I go and will try to get the smilies into a new version shortly.
You must be logged in to reply to this topic.