News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

[WIP - Converter] IPB 3.2/3.3/3.4

Started by emanuele, May 17, 2012, 03:44:15 PM

Previous topic - Next topic

emanuele

mmm that would require a lot of work to fix...in fact the converter should parse each and every message to fix the smiley...I don't even know if the result would work.


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.

Elizabeth II

Quote from: emanuele on May 23, 2012, 01:06:59 PM
mmm that would require a lot of work to fix...in fact the converter should parse each and every message to fix the smiley...I don't even know if the result would work.

So I guess it didnt :( So how do I fix it or remove all this??

emanuele

Let me play a bit more with the converter, and let's see...


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.

Elizabeth II

is there anyway without re-converting? I've reorganized my board and all and I really dont wanna do it all again :(

Sefket

#24
I got this:

    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 `dbhidden`.members AS m
    LEFT JOIN `dbhidden`.pfields_content AS pc ON (pc.member_id = m.member_id)
    LEFT JOIN `dbhidden`.profile_portal AS pp ON (pp.pp_member_id = m.member_id)
    LIMIT 0, 500;

Caused the error:

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

emanuele

Quote from: Mod Mark on May 23, 2012, 02:52:18 PM
is there anyway without re-converting? I've reorganized my board and all and I really dont wanna do it all again :(
Well...yes, I think a script can be created to handle this.

@Sefket
The only think I can suggest you is to open the .sql file, find:
SUBSTRING(pc.field_4, 1, 255) AS icq, SUBSTRING(pc.field_1, 1, 16) AS aim,
and replace it with:
SUBSTRING(pc.field_1, 1, 16) AS aim,
or remove it entirely.


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.

Sefket

Removed it. Got this now:

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_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 `dbhhiden`.members AS m
    LEFT JOIN `dbhhiden`.pfields_content AS pc ON (pc.member_id = m.member_id)
    LEFT JOIN `dbhhiden`.profile_portal AS pp ON (pp.pp_member_id = m.member_id)
    LIMIT 0, 500;

Caused the error:

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

emanuele

Remove also
   SUBSTRING(pc.field_4, 1, 255) AS icq,


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.

Sefket

Yup. Now I got this:

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_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 `dbhidden`.members AS m
     LEFT JOIN `dbhhiden`.pfields_content AS pc ON (pc.member_id = m.member_id)
    LEFT JOIN `dbhhiden`.profile_portal AS pp ON (pp.pp_member_id = m.member_id)
    LIMIT 0, 500;

Caused the error:

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

Sefket

Okay, I removed that. Now here is what I get:

Converting...
Converting members...
Incomplete.
Not quite done yet!
This conversion has paused to avoid overloading your server, and hence not working properly.
Don't worry though, nothing's wrong - simply click the continue button below to start the converter from where it left off.

Edit: Seems to be going good so far.

emanuele

It's possible you don't have some instant messaging fields, remove:
SUBSTRING(pc.field_8, 1, 32) AS yim,
should do the trick.


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.

emanuele

#31
And here it is another try.

Things fixed:
1) the smiley are now converted from links to only the code (I hope this wont break any other image...)
2) the quotes are now properly converted to SMF format.

@Mod Mark now that this version is up, I'm working on a way to fix your smiley! ;)


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.

Sefket

@eman - if I provide you a database for IPB 3.3, would you able to make a converter from it?

Adrek

@Sefket, did you try current version? I converted my IPB 3.3.2 to SMF 2.0.2 few days ago :)
Polskie wsparcie SMF na simplemachines.org

the simplest solution is most likely the right one

emanuele

I have one from phantomm, but since he confirmed it was working I didn't touch it.

It seems you have indeed something different...if you want to give me the db feel free, I'll check at the differences.


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.

Sefket

Quote from: phantomm on May 26, 2012, 08:41:55 AM
@Sefket, did you try current version? I converted my IPB 3.3.2 to SMF 2.0.2 few days ago :)

Oh really? Interesting. It worked with this converter?

Sefket

I got this from 3.3.1:

Converting...

Notice: Undefined index: convert_script in /home/pitbull/public_html/smf/convert.php on line 969

Warning: Invalid argument supplied for foreach() in /home/hidden/public_html/smf/convert.php on line 972

Notice: Undefined index: convert_script in /home/hidden/public_html/smf/convert.php on line 984
Successful.
Recalculating forum statistics...
Notice: Undefined variable: result in /home/hidden/public_html/smf/convert.php on line 2491

Notice: Undefined variable: result in /home/hidden/public_html/smf/convert.php on line 2492

Notice: Undefined index: db_fetch_assoc in /home/hidden/public_html/smf/convert.php on line 1383

Fatal error: Function name must be a string in /home/hidden/public_html/smf/convert.php on line 1383

Sefket

That part got fixed as I just restarted the convert.

After a day, I got this:

Fatal error: Wrong value type sent to the database. Integer expected. (id_pm)(convert.php-2636) in /home/hidden/public_html/smf/Sources/Subs-Db-mysql.php on line 684

Sefket

Okay, I managed to fix it by raising the number at the end of the URL.

Now I get this:

Converting...
Converting personal messages (step 1)...
Successful.
Converting personal messages (step 2)...Duplicate entry '555-4' for key 1

emanuele

From time to time I encountered similar errors, to mitigate the problem I lowered the number of records elaborated at each step, in that last case, for example you could open ipb3_to_smf.sql, find:
Code (find) Select
/******************************************************************************/
--- Converting personal messages (step 2)...
/******************************************************************************/

TRUNCATE {$to_prefix}pm_recipients;

---* {$to_prefix}pm_recipients
---{
$no_add = true;


and replace it with:
/******************************************************************************/
--- Converting personal messages (step 2)...
/******************************************************************************/

TRUNCATE {$to_prefix}pm_recipients;

---* {$to_prefix}pm_recipients 20
---{
$no_add = true;


See the 20 after ---* {$to_prefix}pm_recipients?
If you encounter again the problem try with a lower number...


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.

Advertisement: