Advertisement:

Author Topic: Manually Converting a Forum?  (Read 13133 times)

Offline dcr7

  • Semi-Newbie
  • *
  • Posts: 27
Manually Converting a Forum?
« on: March 16, 2021, 02:55:08 PM »
I have been testing phpBB and SMF and have decided to go with SMF.

The phpBB forum I have has been around for ages with a handful of users.  It was upgraded a couple weeks ago to phpBB 3.3.3 when I started my current round of testing.

I have an install of SMF 2.1 RC3 that's almost setup where I want it.

I would like to move the users and posts from phpBB to SMF.  Since it's already established, it's looking to me like the easiest way is to do this manually.

From what I can tell, I could set up the users from phpBB in SMF and then edit the database directly to change their registration dates to match.  They'll have to reset their passwords but I can let them know ahead of time.

Likewise, I can copy posts over.  There are under 30 posts so it's not a major undertaking.  Is all that is needed to match up users and their posts is to have their member name and eMail in the post entry in the database?

Next, phpBB stores IP addresses in xxx.xxx.xxx.xxx format whereas SMF has them encoded.  What's the encoding method?  I'll probably have to write a simple script to convert those.

Thanks!

Offline vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 23,557
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Manually Converting a Forum?
« Reply #1 on: March 16, 2021, 03:06:58 PM »
I would try the phpBB Convertor to SMF 2.0.x. Then upgrade the 2.0.x forum to SMF 2.1.
You can also look at the convertor to see how changes are done if you wish to do it manually.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Offline dcr7

  • Semi-Newbie
  • *
  • Posts: 27
Re: Manually Converting a Forum?
« Reply #2 on: March 17, 2021, 02:31:49 PM »
I would try the phpBB Convertor to SMF 2.0.x. Then upgrade the 2.0.x forum to SMF 2.1.

That didn't work.  Did a fresh install of SMF 2.0.18.  Then used the phpBB3.2 convertor to convert to SMF2 and no-go.

Quote
Converting members...
Unsuccessful!
This query:

    SELECT
    u.user_id AS id_member, SUBSTRING(u.username, 1, 80) AS member_name,
    SUBSTRING(u.username, 1, 255) AS real_name,
    SUBSTRING(u.user_password, 1, 64) AS passwd, u.user_lastvisit AS last_login,
    u.user_regdate AS date_registered,
    u.user_posts AS posts, IF(u.user_rank = 1, 1, IFNULL(mg.id_group, 0)) AS id_group,
    u.user_new_privmsg AS instant_messages,
    SUBSTRING(u.user_email, 1, 255) AS email_address,
    u.user_unread_privmsg AS unread_messages,
    u.user_allow_viewonline AS show_online, u.user_timezone AS time_offset,
    IF(u.user_allow_viewemail = 1, 0, 1) AS hide_email, u.user_avatar AS avatar,
    REPLACE(u.user_sig, '\n', '<br />') AS signature,
    u.user_sig_bbcode_uid AS signature_uid, u.user_avatar_type,
    u.user_notify_pm AS pm_email_notify,
    CASE u.user_inactive_reason WHEN 0 THEN 1 ELSE 0 END AS is_activated,
    '' AS lngfile, '' AS buddy_list, '' AS pm_ignore_list, '' AS message_labels,
    '' AS personal_text, '' AS time_format, '' AS usertitle, u.user_ip AS member_ip,
    '' AS secret_question, '' AS secret_answer, '' AS validation_code,
    '' AS additional_groups, '' AS smiley_set, '' AS password_salt, '' as openid_uri, '' AS ignore_boards,
    u.user_ip AS member_ip2
    FROM `[DBNAME]`.[PREFIX]users AS u
    LEFT JOIN `[DBNAME]`.[PREFIX]ranks AS r ON (r.rank_id = u.user_rank AND r.rank_special = 1)
    LEFT JOIN `[DBNAME]`[SMFPREFIX]membergroups AS mg ON (mg.group_name = CONCAT('phpBB ', r.rank_title))
    WHERE u.group_id NOT IN (1, 6)
    GROUP BY u.user_id
    LIMIT 0, 500;

Caused the error:

    1055

Offline vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 23,557
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Offline dcr7

  • Semi-Newbie
  • *
  • Posts: 27
Re: Manually Converting a Forum?
« Reply #4 on: March 17, 2021, 04:12:31 PM »
Thanks, but it looks like it's back to my original plan of doing a manual conversion.  With my host, I have no options to change the MySQL settings and after an hour or so of trying to modify the conversion script, I have learned my PHP/MySQL skills are clearly not up to the task of fixing the queries.

Offline vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 23,557
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Manually Converting a Forum?
« Reply #5 on: March 17, 2021, 04:16:54 PM »
You can try adding this before that query
Code: [Select]
SET sql_mode=(SELECT REPLACE(@@sql_mode, 'ONLY_FULL_GROUP_BY', ''))
That's what I do in my scripts to fix this issue.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Offline dcr7

  • Semi-Newbie
  • *
  • Posts: 27
Re: Manually Converting a Forum?
« Reply #6 on: March 17, 2021, 04:25:43 PM »
You can try adding this before that query
Code: [Select]
SET sql_mode=(SELECT REPLACE(@@sql_mode, 'ONLY_FULL_GROUP_BY', ''))
That's what I do in my scripts to fix this issue.

Thanks.  I tried the code mentioned in the link you gave:
Code: [Select]
SET  sql_mode = 'STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'
But that didn't work.  I'll try yours and see what happens.

Offline dcr7

  • Semi-Newbie
  • *
  • Posts: 27
Re: Manually Converting a Forum?
« Reply #7 on: March 17, 2021, 04:47:54 PM »
Now I get a 1064 error.  But I know I have permissions to the database because, before, it converted ranks and groups before stopping at members.  I'm guessing maybe it's because I don't have permissions to change the SQL mode.  I even tried:

Code: [Select]
SET SESSION sql_mode=(SELECT REPLACE(@@sql_mode, 'ONLY_FULL_GROUP_BY', ''))
But that made no difference.  Still get the 1064.

Offline vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 23,557
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Manually Converting a Forum?
« Reply #8 on: March 17, 2021, 05:52:18 PM »
1064 googled is a syntax error make sure you have a ; at the end of the statement.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Offline dcr7

  • Semi-Newbie
  • *
  • Posts: 27
Re: Manually Converting a Forum?
« Reply #9 on: March 17, 2021, 06:25:28 PM »
1064 googled is a syntax error make sure you have a ; at the end of the statement.

I did.  I also tried it without because, at that point, why not?

Offline vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 23,557
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Manually Converting a Forum?
« Reply #10 on: March 17, 2021, 07:44:33 PM »
Maybe try
SET SESSION sql_mode='';
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Offline dcr7

  • Semi-Newbie
  • *
  • Posts: 27
Re: Manually Converting a Forum?
« Reply #11 on: March 18, 2021, 12:34:17 PM »
Maybe try
SET SESSION sql_mode='';

No luck with that either.  Still get the 1064.

At this point, I'm thinking the 30 posts aren't that important.

Offline vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 23,557
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Manually Converting a Forum?
« Reply #12 on: March 18, 2021, 12:41:41 PM »
30 posts would be easier maybe to just copy and paste.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Offline shadav

  • Support Specialist
  • SMF Hero
  • *
  • Posts: 1,449
  • Gender: Female
    • shadav on Facebook
    • leashadav on GitHub
    • Foamy Fanatics :: For All Your Foamy The Squirrel Needs
Re: Manually Converting a Forum?
« Reply #13 on: April 18, 2021, 12:17:28 PM »
I have been performing on converting the info from my PHPBB forum to the EE forum because I don't want to attend for the script. This thread is going to be for informational purposes.
um....ok....
you do realize that this is a support forum for smf not ee