Advertisement:

Author Topic: [SMF Converter] IPB 3.0  (Read 104374 times)

Offline Norv

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 18,313
  • Blue Wolf
Re: [BETA] [SMF Converter] IPB 3.0
« Reply #20 on: December 13, 2010, 10:24:00 AM »
Please make a little more modification, to convert.php:
Code: (find) [Select]
require($sourcedir . '/Security.php');
Code: (add after) [Select]
require($sourcedir . '/Subs-Admin.php');
To-do lists are for deferral. The more things you write down the later they're done… until you have 100s of lists of things you don't do.
File a security report | Developers' Blog | Bug Tracker

Also known as Norv on D* | Norv N. on G+ | Norv on Github

Offline cashwed

  • Newbie
  • *
  • Posts: 1
Re: [BETA] [SMF Converter] IPB 3.0
« Reply #21 on: December 13, 2010, 04:53:15 PM »
i have a problem and i don't know what to do :(

Code: [Select]
Converting members... Unsuccessful!
This query:

    SELECT
    m.member_id AS id_member, SUBSTRING(m.name, 1, 80) AS member_name,
    SUBSTRING(m.members_display_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,
    SUBSTRING(pp.pp_bio_content, 1, 255) 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(pc.field_4, 1, 255) AS icq, SUBSTRING(pc.field_1, 1, 16) AS aim,
    SUBSTRING(pc.field_8, 1, 32) AS yim, SUBSTRING(pc.field_2, 1, 255) AS msn,
    SUBSTRING(pp.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, m.email_pm AS pm_email_notify,
    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 `fanart_azpire`.members AS m
    LEFT JOIN `fanart_azpire`.pfields_content AS pc ON (pc.member_id = m.member_id)
    LEFT JOIN `fanart_azpire`.profile_portal AS pp ON (pp.pp_member_id = m.member_id)
    LIMIT 0, 500;

Caused the error:

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

Offline hiredgunz

  • Newbie
  • *
  • Posts: 5
Re: [BETA] [SMF Converter] IPB 3.0
« Reply #22 on: December 13, 2010, 05:19:06 PM »
I made your suggested change Norv and got:

Converting...
Converting posts (this may take some time)...
Successful.
Converting polls... Successful.
Converting poll options... Successful.
Converting poll votes... Successful.
Converting personal messages (step 1)... Successful.
Converting personal messages (step 2)... Successful.
Converting topic notifications... Successful.
Converting board notifications... Successful.
Converting censored words... Successful.
Converting moderators... Successful.
Converting calendar events... Successful.
Converting smileys... Successful.
Converting attachments... Successful.
Converting user avatars... Successful.
Converting settings...
Warning: filemtime() [function.filemtime]: stat failed for /Settings.php in /****/****/****/forums/Sources/Subs-Admin.php on line 260

Warning: file_get_contents(/Settings.php) [function.file-get-contents]: failed to open stream: No such file or directory in /***/***/***/forums/Sources/Subs-Admin.php on line 263
Successful.
Recalculating forum statistics... Duplicate key name 'ip_index'

Still, the conversion got even closer to the end!

ThorstenE

  • Guest
Re: [BETA] [SMF Converter] IPB 3.0
« Reply #23 on: December 14, 2010, 02:40:49 AM »
Quote
Recalculating forum statistics... Duplicate key name 'ip_index'
please check http://www.simplemachines.org/community/index.php?topic=242961.msg2867944#msg2867944

Offline Insane33

  • Newbie
  • *
  • Posts: 4
Re: [SMF Converter] IPB 3.0
« Reply #24 on: January 01, 2011, 07:21:47 AM »
Converting moderators...Wrong value type sent to the database. Integer expected. (id_board)

How can this be solved?

ThorstenE

  • Guest
Re: [SMF Converter] IPB 3.0
« Reply #25 on: January 01, 2011, 07:41:19 AM »
in invision30_to_smf.sql find:
Code: [Select]
if (empty($row['id_member']))replace with:
Code: [Select]
if (empty($row['id_member']) || empty($row['id_board']))then restart the converter.

Offline Insane33

  • Newbie
  • *
  • Posts: 4
Re: [SMF Converter] IPB 3.0
« Reply #26 on: January 01, 2011, 08:07:47 AM »
Actually I have ipb3_to_smf.sql ..did what you said and it's the same error...

Other solutions?

ThorstenE

  • Guest
Re: [SMF Converter] IPB 3.0
« Reply #27 on: January 01, 2011, 08:12:03 AM »
ok, let's try this instead..
Code: [Select]
if (empty($row['id_member']) || !is_int($row['id_board']))

Offline Insane33

  • Newbie
  • *
  • Posts: 4
Re: [SMF Converter] IPB 3.0
« Reply #28 on: January 01, 2011, 08:17:35 AM »
Now I get this:
Code: [Select]
Notice: Undefined variable: row in /***/****/*****/smf/convert.php on line 1284

Warning: Invalid argument supplied for foreach() in /***/****/*****/smf/convert.php on line 1284

Warning: array_combine() [function.array-combine]: Both parameters should have at least 1 element in /*****/****/******/smf/Sources/Subs-Db-mysql.php on line 635
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 ')' at line 3

ThorstenE

  • Guest
Re: [SMF Converter] IPB 3.0
« Reply #29 on: January 01, 2011, 08:33:13 AM »
ok, I believe it might be better to completely remove the moderators block..
Code: [Select]
/******************************************************************************/
--- Converting moderators...
/******************************************************************************/

TRUNCATE {$to_prefix}moderators;

---* {$to_prefix}moderators
---{
$ignore = true;

if (empty($row['id_member']))
unset($row);
---}
SELECT member_id AS id_member, forum_id AS id_board
FROM {$from_prefix}moderators
WHERE member_id != -1;
---*
After removing this code the converter should finish without errors.

I'd be interested in the result of this query:
Code: [Select]
SELECT member_id AS id_member, forum_id AS id_board
FROM ipb_moderators
WHERE member_id != -1;
maybe you can execute it via phpMyAdmin and post the result.

Offline Insane33

  • Newbie
  • *
  • Posts: 4
Re: [SMF Converter] IPB 3.0
« Reply #30 on: January 01, 2011, 08:52:11 AM »
I managed to convert something,but all users have 0 posts altough the posts appear on the forums.

I also got an error while converting
Code: [Select]
Converting settings...
Warning: filemtime() [function.filemtime]: stat failed for /Settings.php in /****/****/****/smf/Sources/Subs-Admin.php on line 260

Warning: file_get_contents(/Settings.php) [function.file-get-contents]: failed to open stream: No such file or directory in /****/*****/*****/smf/Sources/Subs-Admin.php on line 263
Successful.

ThorstenE

  • Guest
Re: [SMF Converter] IPB 3.0
« Reply #31 on: January 01, 2011, 09:00:34 AM »

Offline kR105!

  • Newbie
  • *
  • Posts: 2
Re: [BETA] [SMF Converter] IPB 3.0
« Reply #32 on: January 14, 2011, 05:54:27 PM »
I had this problem too change the date structure in the SQL file provided.

mine hangs on coverting topics when it gets to topic 26546 it hangs talking about a duplicate key.
same error here: "Duplicate entry '1454' for key 1", I tried deleting the topic with that ID and re-run the converter, but the same error appeared but with different number.

Edit: Full log from the converter:
Quote
Converting members... Successful.
Converting categories... Successful.
Converting boards... Successful.
Converting topics...Duplicate entry '1454' for key 1
« Last Edit: January 14, 2011, 05:58:45 PM by kR105! »

ThorstenE

  • Guest
Re: [SMF Converter] IPB 3.0
« Reply #33 on: January 15, 2011, 01:33:54 AM »
kR105!,
in ipb3_to_smf.sql find:
Code: [Select]
---* {$to_prefix}topics 250add after
Code: [Select]
---{
$ignore = true;
---}

Offline kR105!

  • Newbie
  • *
  • Posts: 2
Re: [SMF Converter] IPB 3.0
« Reply #34 on: January 15, 2011, 07:08:49 PM »
Worked! Thank you!

The convertion ended with some warnings, but the topics and users was converted sucessfully. The problem now is that my board is mostly spanish text and in the convertion process some characters now appear weird, for example:

IPB: Preséntate
Converted SMF: Preséntate

I tried changing the charset of my new board to ISO-8859-1 but more weird characters appeared so I reverted it to UTF-8.

Can you please help me? Maybe I'm missing something..



Convertion log:
Quote
Converting posts (this may take some time)...
Successful.
Converting polls... Successful.
Converting poll options... Successful.
Converting poll votes... Successful.
Converting personal messages (step 1)... Successful.
Converting personal messages (step 2)... Successful.
Converting topic notifications... Successful.
Converting board notifications... Successful.
Converting censored words... Successful.
Converting moderators... Successful.
Converting calendar events... Successful.
Converting smileys... Successful.
Converting attachments... Successful.
Converting user avatars...
Warning: copy(/home/kr105/public_html/foro/uploads/av-1247.txt) [function.copy]: failed to open stream: No such file or directory in /home/kr105/public_html/foro2/convert.php(1263) : eval()'d code on line 59
Successful.
Converting settings...
Warning: filemtime() [function.filemtime]: stat failed for /Settings.php in /home/kr105/public_html/foro2/Sources/Subs-Admin.php on line 260

Warning: file_get_contents(/Settings.php) [function.file-get-contents]: failed to open stream: No such file or directory in /home/kr105/public_html/foro2/Sources/Subs-Admin.php on line 263
Successful.
Recalculating forum statistics... Successful.

ThorstenE

  • Guest
Re: [SMF Converter] IPB 3.0
« Reply #35 on: January 16, 2011, 02:22:35 AM »
the warning is a missing avatar file, nothing to worry about.

the charset issue: 
I believe your IPB is UTF-8? you should install SMF with UTF-8 as character set (there should be an option list in install.php) and re-convert the forum.

Offline imno007

  • Jr. Member
  • **
  • Posts: 170
Re: [SMF Converter] IPB 3.0
« Reply #36 on: January 28, 2011, 12:25:10 PM »
Has anyone tried this with IPB 3.1? I need to do a 3.1 conversion to SMF 2.0 RC4, but I'm hesitant to get into it if it's gonna turn into a major pain in the arse.

EDIT: Okay, I see that it has been attempted, though it does look like it will be a pain. ;)
« Last Edit: January 28, 2011, 12:38:21 PM by imno007 »

Offline Arrnea

  • Newbie
  • *
  • Posts: 1
Re: [SMF Converter] IPB 3.0
« Reply #37 on: February 02, 2011, 03:13:00 AM »
Can this be used to convert from IPB 3.0.x to SMF 1.1.12, or only to SMF 2.0 RC?


Offline Banksy

  • Newbie
  • *
  • Posts: 1
Re: [SMF Converter] IPB 3.0
« Reply #39 on: February 18, 2011, 01:39:48 PM »
I get this error. :(
Converting members...
Unsuccessful!
This query:
SELECT
m.member_id AS id_member, SUBSTRING(m.name, 1, 80) AS member_name,
SUBSTRING(m.members_display_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,
SUBSTRING(pp.pp_bio_content, 1, 255) 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(pc.field_4, 1, 255) AS icq, SUBSTRING(pc.field_1, 1, 16) AS aim,
SUBSTRING(pc.field_8, 1, 32) AS yim, SUBSTRING(pc.field_2, 1, 255) AS msn,
SUBSTRING(pp.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, m.email_pm AS pm_email_notify,
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 `banksy_ipb`.members AS m
LEFT JOIN `banksy_ipb`.pfields_content AS pc ON (pc.member_id = m.member_id)
LEFT JOIN `banksy_ipb`.profile_portal AS pp ON (pp.pp_member_id = m.member_id)
LIMIT 0, 500;
Caused the error:
Unknown column 'pp.pp_bio_content' in 'field list'