Advertisement:

Author Topic: [WIP - Converter] IPB 3.2/3.3/3.4  (Read 144158 times)

Offline emanuele

  • SMF Super Hero
  • *******
  • Posts: 14,156
  • Gender: Male
  • THERE'S JUST ME
Re: [WIP - Converter] IPB 3.2
« Reply #80 on: July 01, 2012, 07:17:09 AM »
Try the attached file, you need convert.php to run it (it works like a converter) and it should only fix the smiley.
« Last Edit: July 02, 2012, 07:36:44 AM by emanuele »


Take a peek at what I'm doing! ;D



Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

Offline phantomm

  • Sophist Member
  • *****
  • Posts: 1,063
  • Gender: Male
    • pages/smfpl/171860759503032 on Facebook
    • Polish ElkArte community
Re: [WIP - Converter] IPB 3.2
« Reply #81 on: July 01, 2012, 01:40:15 PM »
thanks for fix, now I have another error...
Quote
Converting members... Successful.
Converting categories... Successful.
Converting boards... Successful.
Converting topics...Duplicate entry '644' for key 'PRIMARY'

I changed:
Code: [Select]
---* {$to_prefix}topics 20to
Code: [Select]
---* {$to_prefix}topics 1
but no difference :|
Polskie wsparcie SMF na simplemachines.org

My mods

Offline phantomm

  • Sophist Member
  • *****
  • Posts: 1,063
  • Gender: Male
    • pages/smfpl/171860759503032 on Facebook
    • Polish ElkArte community
Re: [WIP - Converter] IPB 3.2
« Reply #82 on: July 01, 2012, 02:32:25 PM »
There must be some error in IPB db, now works perfectly :D
Polskie wsparcie SMF na simplemachines.org

My mods

Offline emanuele

  • SMF Super Hero
  • *******
  • Posts: 14,156
  • Gender: Male
  • THERE'S JUST ME
Re: [WIP - Converter] IPB 3.2
« Reply #83 on: July 01, 2012, 02:51:46 PM »
Ohh...well I've seen some random things with the converted...lol

Regarding the chars encoding I can't do much because the backup you sent me last time doesn't have the chars properly encoded, for example:
Code: [Select]
'You''re almost there!', 'Już prawie!',so it wouldn't be a meaningful test.
If you can obtain a properly encoded backup I'd be happy to test it. ;D


Take a peek at what I'm doing! ;D



Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

Offline phantomm

  • Sophist Member
  • *****
  • Posts: 1,063
  • Gender: Male
    • pages/smfpl/171860759503032 on Facebook
    • Polish ElkArte community
Re: [WIP - Converter] IPB 3.2
« Reply #84 on: July 01, 2012, 02:53:46 PM »
This is how IPB works :) I cant get proper characters in any format... :|
to fix it I have to run this:

Code: [Select]
UPDATE `smf_messages` SET body = replace(`body`, 'Ä…','ą');
UPDATE `smf_messages` SET body = replace(`body`, 'ć','ć');
UPDATE `smf_messages` SET body = replace(`body`, 'Ä™','ę');
UPDATE `smf_messages` SET body = replace(`body`, 'ó','ó');
UPDATE `smf_messages` SET body = replace(`body`, 'Å‚','ł');
UPDATE `smf_messages` SET body = replace(`body`, 'Å„','ń');
UPDATE `smf_messages` SET body = replace(`body`, 'Å›','ś');
UPDATE `smf_messages` SET body = replace(`body`, 'ź','ź');
UPDATE `smf_messages` SET body = replace(`body`, 'ż','ż');

UPDATE `smf_messages` SET body = replace(`body`, 'Ä„','Ą');
UPDATE `smf_messages` SET body = replace(`body`, 'Ć','Ć');
UPDATE `smf_messages` SET body = replace(`body`, 'A‚','Ę');
UPDATE `smf_messages` SET body = replace(`body`, 'Ó','Ó');
UPDATE `smf_messages` SET body = replace(`body`, 'Ł','Ł');
UPDATE `smf_messages` SET body = replace(`body`, 'Ń','Ń');
UPDATE `smf_messages` SET body = replace(`body`, 'Åš','Ś');
UPDATE `smf_messages` SET body = replace(`body`, 'Ź','Ź');
UPDATE `smf_messages` SET body = replace(`body`, 'Å»','Ż');
Polskie wsparcie SMF na simplemachines.org

My mods

Offline Luc-i

  • Newbie
  • *
  • Posts: 5
Re: [WIP - Converter] IPB 3.2
« Reply #85 on: July 02, 2012, 07:11:00 AM »
Hi,

i got IPB 3.2.3
and tried the converter.

i got following ERROR:

Fatal error: Call to undefined function getAttachmentFilename() in /www/***/convert.php(1251) : eval()'d code on line 18

Anyone know how to fix it ? thank you!

Offline phantomm

  • Sophist Member
  • *****
  • Posts: 1,063
  • Gender: Male
    • pages/smfpl/171860759503032 on Facebook
    • Polish ElkArte community
Polskie wsparcie SMF na simplemachines.org

My mods

Offline Luc-i

  • Newbie
  • *
  • Posts: 5
Re: [WIP - Converter] IPB 3.2
« Reply #87 on: July 02, 2012, 07:27:52 AM »
@Luc-i, http://www.simplemachines.org/community/index.php?topic=477019.msg3339519#msg3339519 :)

Thanks, that works.

But now i get instead of "ä,ü,ö,ß, etc" just things like "ü"

Anyone know how to fix it?

Thanks, my english isnt the best, sorry :)

Offline emanuele

  • SMF Super Hero
  • *******
  • Posts: 14,156
  • Gender: Male
  • THERE'S JUST ME
Re: [WIP - Converter] IPB 3.2
« Reply #88 on: July 02, 2012, 07:36:23 AM »
Please find attached another version of the converter.

Fixes:
1) (really) added the smiley conversion code
2) recount of members' posts

Regarding the characters: what encoding are you using for SMF? (also what languages are you using)
And what encoding do you select in the dropdown of the converter?
« Last Edit: February 15, 2013, 10:17:38 AM by emanuele »


Take a peek at what I'm doing! ;D



Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

Offline phantomm

  • Sophist Member
  • *****
  • Posts: 1,063
  • Gender: Male
    • pages/smfpl/171860759503032 on Facebook
    • Polish ElkArte community
Re: [WIP - Converter] IPB 3.2
« Reply #89 on: July 02, 2012, 07:37:12 AM »
Well,  I have the same problem with Polish characters.
Only thing that I can sugegst for you is to find out how in database is saved every character and replace it with SQL query.

If  "ä" is saved as "ü" you have to run something like this:
Code: [Select]
UPDATE `smf_messages` SET body = replace(`body`, 'ü','ä');
And the same thing for other characters. Here you have few tips http://webdesign.about.com/od/localization/l/blhtmlcodes-de.htm
Replace all characters to "Numerical Code", and if yo uwant later use in SMF UTF8 encoding, then just use Convert the database and data to UTF-8 in Administration Center » Forum Maintenance » Database

Hope you understand :E
Polskie wsparcie SMF na simplemachines.org

My mods

Offline strom73

  • Newbie
  • *
  • Posts: 1
Re: [WIP - Converter] IPB 3.2
« Reply #90 on: July 09, 2012, 03:53:02 AM »
Hey,

I ran the command in the SQL query in my PhpMyAdmin. It says it changed something, but when I look at the posts, the missing characters are still there?

I'm using the Estonian language (we have Ä-s here too) and this is the command I ran:

UPDATE `smf_messages` SET body = replace(`body`, '?¤','ä');

Offline .Vapor

  • Jr. Member
  • **
  • Posts: 205
  • Gender: Male
  • PC gamer
    • Team Isolation
Re: [WIP - Converter] IPB 3.2/3.3
« Reply #91 on: September 03, 2012, 09:48:58 PM »
I have a 3.3.4 db if you need it ?

Offline .Vapor

  • Jr. Member
  • **
  • Posts: 205
  • Gender: Male
  • PC gamer
    • Team Isolation
Re: [WIP - Converter] IPB 3.2/3.3
« Reply #92 on: September 03, 2012, 09:53:55 PM »
Error -
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,
    m.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(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,
    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 `versa33_fodipb334`.ipb_members AS m
    LEFT JOIN `xxxxxxxxx`.ipb_pfields_content AS pc ON (pc.member_id = m.member_id)
    LEFT JOIN `xxxxxxxxx`.ipb_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'
[\code]

Offline emanuele

  • SMF Super Hero
  • *******
  • Posts: 14,156
  • Gender: Male
  • THERE'S JUST ME


Take a peek at what I'm doing! ;D



Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

Offline .Vapor

  • Jr. Member
  • **
  • Posts: 205
  • Gender: Male
  • PC gamer
    • Team Isolation
Re: [WIP - Converter] IPB 3.2/3.3
« Reply #94 on: September 05, 2012, 12:01:37 AM »
Thanks

Offline pzoido

  • Newbie
  • *
  • Posts: 1
Re: [WIP - Converter] IPB 3.2/3.3
« Reply #95 on: September 10, 2012, 01:01:14 PM »
Code: [Select]
Converting members... Successful.
Converting categories... Successful.
Converting boards... Successful.
Converting topics... Successful.
Converting posts (this may take some time)... Successful.
Recounting post counts...

And i tried this:

Okay, I think I forgot to update the original package...
Can you try the instructions present in this post:
http://www.simplemachines.org/community/index.php?topic=477019.msg3349839#msg3349839
and see if it works?

If so I'll update the script.

No success =/

My ipb-Version ist 3.2.3

Offline emanuele

  • SMF Super Hero
  • *******
  • Posts: 14,156
  • Gender: Male
  • THERE'S JUST ME
Re: [WIP - Converter] IPB 3.2/3.3
« Reply #96 on: September 10, 2012, 05:22:20 PM »
That's a really weird error, I can't understand where it comes from... :(

I just repeated a conversion of an old database I found around and it went all good, no errors.
It could be a problem with a query, but no idea which problem. ::)


Take a peek at what I'm doing! ;D



Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

Offline Miigli

  • Newbie
  • *
  • Posts: 1
Re: [WIP - Converter] IPB 3.2/3.3
« Reply #97 on: September 22, 2012, 09:20:32 AM »
Code: [Select]
Converting posts (this may take some time)...
Successful.
Recounting post counts... Successful.
Converting polls... Successful.
Converting poll options... Successful.
Converting poll votes... Successful.
Converting personal messages (step 1)...
Fatal error: Wrong value type sent to the database. Integer expected. (id_pm)(convert.php-2636) in /home/u9747/public_html/c/Sources/Subs-Db-mysql.php on line 684

How can i pass this one ?

Offline Ventic

  • Full Member
  • ***
  • Posts: 635
  • Gender: Male
    • vasilis.koukoutis on Facebook
    • @joyspotorg on Twitter
    • JoySpot
Re: [WIP - Converter] IPB 3.2/3.3
« Reply #98 on: September 22, 2012, 11:14:58 AM »
Code: [Select]
Notice: Undefined index: convert_script in C:\xampp\htdocs\forum\convert.php on line 969

Warning: Invalid argument supplied for foreach() in C:\xampp\htdocs\forum\convert.php on line 972

Notice: Undefined index: convert_script in C:\xampp\htdocs\forum\convert.php on line 984

Warning: file(C:\xampp\htdocs\forum/) [function.file]: failed to open stream: No such file or directory in C:\xampp\htdocs\forum\convert.php on line 984

Warning: Invalid argument supplied for foreach() in C:\xampp\htdocs\forum\convert.php on line 996
Successful.
Recalculating forum statistics...
Notice: Undefined variable: result in C:\xampp\htdocs\forum\convert.php on line 2491

Notice: Undefined variable: result in C:\xampp\htdocs\forum\convert.php on line 2492

Notice: Undefined index: db_fetch_assoc in C:\xampp\htdocs\forum\convert.php on line 1383

Fatal error: Function name must be a string in C:\xampp\htdocs\forum\convert.php on line 1383

error -.-

Offline emanuele

  • SMF Super Hero
  • *******
  • Posts: 14,156
  • Gender: Male
  • THERE'S JUST ME
Re: [WIP - Converter] IPB 3.2/3.3
« Reply #99 on: September 22, 2012, 11:46:44 AM »
Hello Miigli and welcome to sm.org! :)

Code: [Select]
Converting posts (this may take some time)...
Successful.
Recounting post counts... Successful.
Converting polls... Successful.
Converting poll options... Successful.
Converting poll votes... Successful.
Converting personal messages (step 1)...
Fatal error: Wrong value type sent to the database. Integer expected. (id_pm)(convert.php-2636) in /home/u9747/public_html/c/Sources/Subs-Db-mysql.php on line 684

How can i pass this one ?
mmm...good question.
Some issue with the id of the PMs...though I'm not sure what the issue is, let's try a workaround, in ipb3_to_smf.sql, find this:
Code: (find) [Select]
WHERE mt.mt_is_draft = 0;and replace it with:
Code: (replace with) [Select]
WHERE mt.mt_is_draft = 0
AND pm.msg_id REGEXP '^[0-9]+$'
AND pm.msg_id > 0;
then, find:
Code: (find) [Select]
WHERE mt.mt_is_draft != 1;and replace with:
Code: (replace with) [Select]
WHERE mt.mt_is_draft = 0
AND pm.msg_id REGEXP '^[0-9]+$'
AND pm.msg_id > 0;
not sure if it will work, but worth a try...

@Ventic: are you sure you put both the convert.php and the ipb3_to_smf.sql files in the same directory?


Take a peek at what I'm doing! ;D



Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.