• Welcome to Simple Machines Community Forum. Please login or sign up.
September 26, 2021, 03:33:57 AM

News:

Join the Facebook Fan Page.


[SMF Converter] IPB 4.4

Started by vbgamer45, August 31, 2019, 11:09:23 AM

Previous topic - Next topic

vbgamer45

August 31, 2019, 11:09:23 AM Last Edit: September 01, 2019, 02:54:48 PM by vbgamer45
IPB 4.4 Beta Convertor to SMF 2.0.x

Notes: Tested on cloud database backup from IPB Cloud.
Did not have files to access you may have adjust the .sql configuration lines


---~ settings: "/conf_global.php"
---~ from_prefix: "`$INFO[sql_database]`.$INFO[sql_tbl_prefix]"
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

Loshmi

I'm getting this error at the 1st stage of converting (members):
    SELECT
    m.member_id AS id_member, SUBSTRING(m.name, 1, 80) AS member_name,
    SUBSTRING(m.name, 1, 255) AS real_name, m.email AS email_address,
    SUBSTRING(m.members_pass_hash, 1, 64) AS passwd, SUBSTRING(m.members_pass_salt, 1, 8) AS password_salt,
    m.member_title AS usertitle, m.last_visit AS last_login,
    m.joined AS date_registered, SUBSTRING(pc.field_3, 1, 255) AS website_url,
    SUBSTRING(pc.field_3, 1, 255) AS website_title,
    SUBSTRING(m.signature, 1, 65534) AS signature, m.ip_address AS member_ip, m.ip_address AS member_ip2, '0' AS total_time_logged_in,
    IF (m.bday_year IS NULL, '0001-01-01', IF (m.bday_year = 0 AND m.bday_month != 0 AND m.bday_day != 0, CONCAT('0004-', m.bday_month, '-', m.bday_day), CONCAT_WS('-', IF(m.bday_year <= 4, '0001', m.bday_year), IF(m.bday_month = 0, '01', IF(m.bday_month < 10, CONCAT('0', m.bday_month), m.bday_month)), IF(m.bday_day = 0, '01', IF(m.bday_day < 10, CONCAT('0', m.bday_day), m.bday_day))))) AS birthdate,
    CASE
    WHEN (m.member_group_id = '4') THEN 1
    WHEN (m.member_group_id = '2') THEN -1
    WHEN (m.member_group_id = '6') THEN 2
    ELSE 0
    END AS id_group,
    CASE
    WHEN (pc.field_5 = 'm') THEN 1
    WHEN (pc.field_5 = 'f') THEN 2
    ELSE 0
    END AS gender
    FROM `milosbts_novatest2`.core_members AS m
    LEFT JOIN `milosbts_novatest2`.core_pfields_content AS pc ON (pc.member_id = m.member_id)

    LIMIT 0, 500;

Caused the error:

    Unknown column 'pc.field_3' in 'field list'


Can you please help me with this one?
PS: I am converting IPB 4.4.6 to SMF 2.0.15.

vbgamer45

Can you run this msyql statemetn
show create table `milosbts_novatest2`.core_pfields_content;
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

Loshmi


vbgamer45

Almost. There should be an option to view the result of the whole query.
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

Loshmi


vbgamer45

Ok that's a new one. that table doesn't seem to have a lot of custom profile fields.... So not much to convert. I would need your .sql file to modify... from the convertor basiclly have to remove things that is trys to convert like gender, website url won't be carried over.
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

Loshmi

I don't mind losing gender, websites and about me section. Just want to keep members, their posts and maybe their birthday and registration date. Should I send you core_members.sql? May I send you somehow through private message cause I don't want to get public with all those emails inside that sql?

vbgamer45

I mean just send the SMF ipb4.sql convert file in the root of your SMF file and that should work.
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

Loshmi

Sorry about the confusion, this is the 1st time I'm doing this. If I understood correctly this is the file that you have asked for...

Loshmi

So I have removed few lines in ipb44_to_smf.sql and now I got this:
    SELECT
    m.member_id AS id_member, SUBSTRING(m.name, 1, 80) AS member_name,
    SUBSTRING(m.name, 1, 255) AS real_name, m.email AS email_address,
    SUBSTRING(m.members_pass_hash, 1, 64) AS passwd, SUBSTRING(m.members_pass_salt, 1, 8) AS password_salt,
    m.member_title AS usertitle, m.last_visit AS last_login,
    m.joined AS date_registered,
    SUBSTRING(m.signature, 1, 65534) AS signature, m.ip_address AS member_ip, m.ip_address AS member_ip2, '0' AS total_time_logged_in,
    IF (m.bday_year IS NULL, '0001-01-01', IF (m.bday_year = 0 AND m.bday_month != 0 AND m.bday_day != 0, CONCAT('0004-', m.bday_month, '-', m.bday_day), CONCAT_WS('-', IF(m.bday_year <= 4, '0001', m.bday_year), IF(m.bday_month = 0, '01', IF(m.bday_month < 10, CONCAT('0', m.bday_month), m.bday_month)), IF(m.bday_day = 0, '01', IF(m.bday_day < 10, CONCAT('0', m.bday_day), m.bday_day))))) AS birthdate,
    CASE
    WHEN (m.member_group_id = '4') THEN 1
    WHEN (m.member_group_id = '2') THEN -1
    WHEN (m.member_group_id = '6') THEN 2
    ELSE 0
    END AS id_group,

    LIMIT 0, 500;

Caused the error:

    You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'LIMIT 0, 500' at line 16

Thank you for helping me!

vbgamer45

Remove comma after  END AS id_group,
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

Loshmi

Here's next stop:
    SELECT
    m.member_id AS id_member, SUBSTRING(m.name, 1, 80) AS member_name,
    SUBSTRING(m.name, 1, 255) AS real_name, m.email AS email_address,
    SUBSTRING(m.members_pass_hash, 1, 64) AS passwd, SUBSTRING(m.members_pass_salt, 1, 8) AS password_salt,
    m.member_title AS usertitle, m.last_visit AS last_login,
    m.joined AS date_registered,
    SUBSTRING(m.signature, 1, 65534) AS signature, m.ip_address AS member_ip, m.ip_address AS member_ip2, '0' AS total_time_logged_in,
    IF (m.bday_year IS NULL, '0001-01-01', IF (m.bday_year = 0 AND m.bday_month != 0 AND m.bday_day != 0, CONCAT('0004-', m.bday_month, '-', m.bday_day), CONCAT_WS('-', IF(m.bday_year <= 4, '0001', m.bday_year), IF(m.bday_month = 0, '01', IF(m.bday_month < 10, CONCAT('0', m.bday_month), m.bday_month)), IF(m.bday_day = 0, '01', IF(m.bday_day < 10, CONCAT('0', m.bday_day), m.bday_day))))) AS birthdate,
    CASE
    WHEN (m.member_group_id = '4') THEN 1
    WHEN (m.member_group_id = '2') THEN -1
    WHEN (m.member_group_id = '6') THEN 2
    ELSE 0
    END AS id_group

    LIMIT 0, 500;

Caused the error:

    Unknown table 'm' in field list

vbgamer45

You cut off part of the query try this

SELECT
m.member_id AS id_member, SUBSTRING(m.name, 1, 80) AS member_name,
SUBSTRING(m.name, 1, 255) AS real_name, m.email AS email_address,
SUBSTRING(m.members_pass_hash, 1, 64) AS passwd, SUBSTRING(m.members_pass_salt, 1, 8) AS password_salt,
        m.member_title AS usertitle, m.last_visit AS last_login,
        m.joined AS date_registered,]
SUBSTRING(m.signature, 1, 65534) AS signature, m.ip_address AS member_ip, m.ip_address AS member_ip2, '0' AS total_time_logged_in,
IF (m.bday_year IS NULL, '0001-01-01', IF (m.bday_year = 0 AND m.bday_month != 0 AND m.bday_day != 0, CONCAT('0004-', m.bday_month, '-', m.bday_day), CONCAT_WS('-', IF(m.bday_year <= 4, '0001', m.bday_year), IF(m.bday_month = 0, '01', IF(m.bday_month < 10, CONCAT('0', m.bday_month), m.bday_month)), IF(m.bday_day = 0, '01', IF(m.bday_day < 10, CONCAT('0', m.bday_day), m.bday_day))))) AS birthdate,
        CASE
WHEN (m.member_group_id = '4') THEN 1
                WHEN (m.member_group_id = '2') THEN -1
                WHEN (m.member_group_id = '6') THEN 2
ELSE 0
END AS id_group
FROM {$from_prefix}core_members AS m
     LEFT JOIN {$from_prefix}core_pfields_content AS pc ON (pc.member_id = m.member_id)
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

Loshmi

And another one:
    SELECT
    m.member_id AS id_member, SUBSTRING(m.name, 1, 80) AS member_name,
    SUBSTRING(m.name, 1, 255) AS real_name, m.email AS email_address,
    SUBSTRING(m.members_pass_hash, 1, 64) AS passwd, SUBSTRING(m.members_pass_salt, 1, 8) AS password_salt,
    m.member_title AS usertitle, m.last_visit AS last_login,
    m.joined AS date_registered,]
    SUBSTRING(m.signature, 1, 65534) AS signature, m.ip_address AS member_ip, m.ip_address AS member_ip2, '0' AS total_time_logged_in,
    IF (m.bday_year IS NULL, '0001-01-01', IF (m.bday_year = 0 AND m.bday_month != 0 AND m.bday_day != 0, CONCAT('0004-', m.bday_month, '-', m.bday_day), CONCAT_WS('-', IF(m.bday_year <= 4, '0001', m.bday_year), IF(m.bday_month = 0, '01', IF(m.bday_month < 10, CONCAT('0', m.bday_month), m.bday_month)), IF(m.bday_day = 0, '01', IF(m.bday_day < 10, CONCAT('0', m.bday_day), m.bday_day))))) AS birthdate,
    CASE
    WHEN (m.member_group_id = '4') THEN 1
    WHEN (m.member_group_id = '2') THEN -1
    WHEN (m.member_group_id = '6') THEN 2
    ELSE 0
    END AS id_group
    FROM `milosbts_novatest2`.core_members AS m
    LEFT JOIN `milosbts_novatest2`.core_pfields_content AS pc ON (pc.member_id = m.member_id)

    LIMIT 0, 500;

Caused the error:

    You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ']
    SUBSTRING(m.signature, 1, 65534) AS signature, m.ip_address AS member_ip, m.' at line 6

vbgamer45

oops made a mistake

SELECT
m.member_id AS id_member, SUBSTRING(m.name, 1, 80) AS member_name,
SUBSTRING(m.name, 1, 255) AS real_name, m.email AS email_address,
SUBSTRING(m.members_pass_hash, 1, 64) AS passwd, SUBSTRING(m.members_pass_salt, 1, 8) AS password_salt,
        m.member_title AS usertitle, m.last_visit AS last_login,
        m.joined AS date_registered,
SUBSTRING(m.signature, 1, 65534) AS signature, m.ip_address AS member_ip, m.ip_address AS member_ip2, '0' AS total_time_logged_in,
IF (m.bday_year IS NULL, '0001-01-01', IF (m.bday_year = 0 AND m.bday_month != 0 AND m.bday_day != 0, CONCAT('0004-', m.bday_month, '-', m.bday_day), CONCAT_WS('-', IF(m.bday_year <= 4, '0001', m.bday_year), IF(m.bday_month = 0, '01', IF(m.bday_month < 10, CONCAT('0', m.bday_month), m.bday_month)), IF(m.bday_day = 0, '01', IF(m.bday_day < 10, CONCAT('0', m.bday_day), m.bday_day))))) AS birthdate,
        CASE
WHEN (m.member_group_id = '4') THEN 1
                WHEN (m.member_group_id = '2') THEN -1
                WHEN (m.member_group_id = '6') THEN 2
ELSE 0
END AS id_group
FROM {$from_prefix}core_members AS m
     LEFT JOIN {$from_prefix}core_pfields_content AS pc ON (pc.member_id = m.member_id)
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

Loshmi

We are getting somewhere... :)
Converting members...Field 'buddy_list' doesn't have a default value

vbgamer45


SELECT
m.member_id AS id_member, SUBSTRING(m.name, 1, 80) AS member_name,
SUBSTRING(m.name, 1, 255) AS real_name, m.email AS email_address,
SUBSTRING(m.members_pass_hash, 1, 64) AS passwd, SUBSTRING(m.members_pass_salt, 1, 8) AS password_salt,
        m.member_title AS usertitle, m.last_visit AS last_login, "" as buddy_list,
        m.joined AS date_registered,
SUBSTRING(m.signature, 1, 65534) AS signature, m.ip_address AS member_ip, m.ip_address AS member_ip2, '0' AS total_time_logged_in,
IF (m.bday_year IS NULL, '0001-01-01', IF (m.bday_year = 0 AND m.bday_month != 0 AND m.bday_day != 0, CONCAT('0004-', m.bday_month, '-', m.bday_day), CONCAT_WS('-', IF(m.bday_year <= 4, '0001', m.bday_year), IF(m.bday_month = 0, '01', IF(m.bday_month < 10, CONCAT('0', m.bday_month), m.bday_month)), IF(m.bday_day = 0, '01', IF(m.bday_day < 10, CONCAT('0', m.bday_day), m.bday_day))))) AS birthdate,
        CASE
WHEN (m.member_group_id = '4') THEN 1
                WHEN (m.member_group_id = '2') THEN -1
                WHEN (m.member_group_id = '6') THEN 2
ELSE 0
END AS id_group
FROM {$from_prefix}core_members AS m
     LEFT JOIN {$from_prefix}core_pfields_content AS pc ON (pc.member_id = m.member_id)
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

Loshmi

Converting members...Field 'message_labels' doesn't have a default value
Thanks a million!

vbgamer45


SELECT
m.member_id AS id_member, SUBSTRING(m.name, 1, 80) AS member_name,
SUBSTRING(m.name, 1, 255) AS real_name, m.email AS email_address,
SUBSTRING(m.members_pass_hash, 1, 64) AS passwd, SUBSTRING(m.members_pass_salt, 1, 8) AS password_salt,
        m.member_title AS usertitle, m.last_visit AS last_login, "" as buddy_list, " " as message_labels,
        m.joined AS date_registered,
SUBSTRING(m.signature, 1, 65534) AS signature, m.ip_address AS member_ip, m.ip_address AS member_ip2, '0' AS total_time_logged_in,
IF (m.bday_year IS NULL, '0001-01-01', IF (m.bday_year = 0 AND m.bday_month != 0 AND m.bday_day != 0, CONCAT('0004-', m.bday_month, '-', m.bday_day), CONCAT_WS('-', IF(m.bday_year <= 4, '0001', m.bday_year), IF(m.bday_month = 0, '01', IF(m.bday_month < 10, CONCAT('0', m.bday_month), m.bday_month)), IF(m.bday_day = 0, '01', IF(m.bday_day < 10, CONCAT('0', m.bday_day), m.bday_day))))) AS birthdate,
        CASE
WHEN (m.member_group_id = '4') THEN 1
                WHEN (m.member_group_id = '2') THEN -1
                WHEN (m.member_group_id = '6') THEN 2
ELSE 0
END AS id_group
FROM {$from_prefix}core_members AS m
     LEFT JOIN {$from_prefix}core_pfields_content AS pc ON (pc.member_id = m.member_id)



If check above you can see what I am doing to fix this.
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

Advertisement: