Converting from IPB 3.4

Converting from other board software? Good decision! Need help? Have a question about a convertor? Wish to offer a convertor package? Post here.
LookedPath
Registered User
Posts: 10
Joined: Mon Jan 22, 2018 2:00 pm

Re: Converting from IPB 3.4

Post by LookedPath »

JoshyPHP wrote: Tue Jan 23, 2018 8:02 pm If you didn't run the reparser in command line, it takes a while to convert everything in the background. It works in reverse chronological order so the most recent posts should get reparsed first.
I ran the reparser from the CLI so I know for sure that it completed its work.
User avatar
JoshyPHP
Code Contributor
Posts: 1288
Joined: Mon Jul 11, 2011 12:28 am

Re: Converting from IPB 3.4

Post by JoshyPHP »

If you're using the reparser from CLI, you may try applying this change to your install before reparsing.
I wrote the library that handles markup in phpBB 3.2+.
LookedPath
Registered User
Posts: 10
Joined: Mon Jan 22, 2018 2:00 pm

Re: Converting from IPB 3.4

Post by LookedPath »

JoshyPHP wrote: Tue Jan 23, 2018 9:18 pm If you're using the reparser from CLI, you may try applying this change to your install before reparsing.
This seems to have resolved my problem :o
Thank you very much to bot you and Ger for helping me on resolving the problem but can you explain me the logic behind those modifications please?
User avatar
aeolustw
Registered User
Posts: 15
Joined: Thu Apr 05, 2012 6:04 am
Location: Taiwan
Contact:

Re: Converting from IPB 3.4

Post by aeolustw »

Hi,Ger
Thanks for your sharing code.
I download the ZIP file.

My phpbb forum's environment:
OS: Debian 7.x (Linux 3.2.0-4-amd64)
MySQL: 5.5.44
PHP:PHP 5.4.41

phpBB: 3.2.2
IPB: 3.4.6

After fresh installed phpBB 3.2.2 and your convertor to convert IPB 3.4.6, I got two error during the process.

1.
: 28932 Message parser error:
You may only use fonts up to size 200.
In /var/www/phpbb322a/install/convertors/functions_ipb34.php on line 1046
Step 14 of 26

2.
Error while processing INSERT query.
In /var/www/phpbb322a/install/convert/convertor.php on line 778
SQL: INSERT IGNORE INTO phpbb_users (user_id,...etc)
...
...
etc

And i check the SQL Data :
phpbb_users => It had only 52 , nobody converted from IPB database.
phpbb_posts > post_text => the Chinese character shown not correctly > ––°å¹´åˆ°å“©,,,新版的論壇程式,,冬晨沉浸了將近一個月
phpbb_posts > post_subject => these [!!!...........^_^!!!...] convrt to [#33;!!...........^_^!!!...]

What can i do? Please give me a hint.
Thanks.
Don't care where the hacker came from, just what it did.
User avatar
Ger
Registered User
Posts: 2107
Joined: Wed Jan 02, 2008 7:35 pm
Location: 192.168.1.100
Contact:

Re: Converting from IPB 3.4

Post by Ger »

aeolustw wrote: Tue Oct 09, 2018 5:14 am After fresh installed phpBB 3.2.2 and your convertor to convert IPB 3.4.6
This is the first issue. The convertor I used as a base was intended for phpBB 3.0.12. So you need to install 3.0.12 and then convert and afterwards update your board to 3.2
This is the more expanded version of the steps to follow.
My extensions:
Simple CMS, Feed post bot, Avatar Resize, Modbreak, Magic OGP, Live topic update, Modern Quote, Quoted Where (GDPR) and Autoresponder.
Newest: FAQ manager for 3.2

Like my work? Buy me a coffee to keep it coming. :ugeek:

-Don't PM me for support-
User avatar
aeolustw
Registered User
Posts: 15
Joined: Thu Apr 05, 2012 6:04 am
Location: Taiwan
Contact:

Re: Converting from IPB 3.4

Post by aeolustw »

Hi,Ger:
Thanks foy your reply.
I tried what you said and this too.

After converting IPB 3.4.6 to phpBB 3.0.12 , i got one error:
Installation error
functions_ipb34.php [ 1007 ]:
Post ID: Message parser error:
You may only use fonts up to size 200.
Step 15 of 29
And the phpbb_users only have 780 converted from IPB 3.4.6 ibf_members that have 1724.

Thanks.
Don't care where the hacker came from, just what it did.
User avatar
Ger
Registered User
Posts: 2107
Joined: Wed Jan 02, 2008 7:35 pm
Location: 192.168.1.100
Contact:

Re: Converting from IPB 3.4

Post by Ger »

To fix the size error, you should add the following code after this line:

Code: Select all

$size = ($size > 200) ? 200 : $size;
About the Chinese characters: IIRC I've hardcoded the convertor to migrate from ISO-8859 to UTF-8 since that way I could skip a lot of sniffing, gaining performance for my board. You can search the convertor code to look for utf8_encode and replace that with phpbb_set_encoding, I think that would solve some issues.


Please note: I've only shared my code as an inspiration to others. It's tailored to my specific situation to convert a very big Dutch board with some specific issues. I've cut several corners to speed up the process. No one should expect it to work without proper investigation to their specific situation.
My extensions:
Simple CMS, Feed post bot, Avatar Resize, Modbreak, Magic OGP, Live topic update, Modern Quote, Quoted Where (GDPR) and Autoresponder.
Newest: FAQ manager for 3.2

Like my work? Buy me a coffee to keep it coming. :ugeek:

-Don't PM me for support-
User avatar
aeolustw
Registered User
Posts: 15
Joined: Thu Apr 05, 2012 6:04 am
Location: Taiwan
Contact:

Re: Converting from IPB 3.4

Post by aeolustw »

Ger wrote: Wed Oct 10, 2018 11:50 am To fix the size error, you should add the following code after this line:

Code: Select all

$size = ($size > 200) ? 200 : $size;
About the Chinese characters: IIRC I've hardcoded the convertor to migrate from ISO-8859 to UTF-8 since that way I could skip a lot of sniffing, gaining performance for my board. You can search the convertor code to look for utf8_encode and replace that with phpbb_set_encoding, I think that would solve some issues.


Please note: I've only shared my code as an inspiration to others. It's tailored to my specific situation to convert a very big Dutch board with some specific issues. I've cut several corners to speed up the process. No one should expect it to work without proper investigation to their specific situation.
After add the code , it fixed the size error.
I used these zip files to convert, the Chinese characters are ok now.
The codes are all phpbb_set_encoding not utf8_encode.

My remaining issue is:
The phpbb_users only have 780 converted from IPB 3.4.6 ibf_members that have 1724.
Not whole ipb members convert to phpBB users.
Thanks.
Don't care where the hacker came from, just what it did.
User avatar
Ger
Registered User
Posts: 2107
Joined: Wed Jan 02, 2008 7:35 pm
Location: 192.168.1.100
Contact:

Re: Converting from IPB 3.4

Post by Ger »

aeolustw wrote: Wed Oct 10, 2018 1:47 pm My remaining issue is:
The phpbb_users only have 780 converted from IPB 3.4.6 ibf_members that have 1724.
Not whole ipb members convert to phpBB users.
That's probably due to the function remove_invalid_users() in ./includes/functions_convert.php that's called after the users have been converted.
It basically removes any user that has an empty username_clean. That value is generated after encoding the original IPB username to UTF8, stripping any special characters, lowercasing them, etc. It might be that with Chinese characters, a problem arises.

Since I have no experience with such character and I'm also not very specialised in encoding stuff, you'd better open up a specific support topic to get the attention of more knowledgeable people on this manner. Feel free to refer to this topic and poke me if you need my insight.
My extensions:
Simple CMS, Feed post bot, Avatar Resize, Modbreak, Magic OGP, Live topic update, Modern Quote, Quoted Where (GDPR) and Autoresponder.
Newest: FAQ manager for 3.2

Like my work? Buy me a coffee to keep it coming. :ugeek:

-Don't PM me for support-
User avatar
aeolustw
Registered User
Posts: 15
Joined: Thu Apr 05, 2012 6:04 am
Location: Taiwan
Contact:

Re: Converting from IPB 3.4

Post by aeolustw »

Thanks anyway.
I post a new topic here.
Don't care where the hacker came from, just what it did.
PTRACER
Registered User
Posts: 177
Joined: Sun Dec 07, 2003 2:54 am

Re: Converting from IPB 3.4

Post by PTRACER »

Ger wrote: Mon Jan 09, 2017 12:47 pm I'm currently preparing to convert a large (± 1 million posts, ±55.000 users) from IPB 3.4 to phpBB 3.2. I've done some research, and I use the convertor from Prototech to convert from IPB 3.4 to phpBB 3.0.12. For the main part it works pretty fine after I have done some tweaking here and there. Afterwards I update to 3.1.10 and than to 3.2.latest (whichever version that will be when we're ready)

However, there is an issue with text parsing I'm trying to sort out. For some reason, many BBcodes don't seem to get parsed properly when going from IPB to phpBB 3.0.12.

It seems to me the problem resides in messages that are being changed with the function phpbb_prepare_message($message), residing in functions_ipb34.php. BBcodes created that way display unparsed. Now I thought to be the clever kid and use the reparse BBcode function from the Support Toolkit, but than I run into the Emoji SQL error.

Perhaps there is a way to either correct the BBcode parsing during the conversion or solve the emoji issue for 3.0.12? Or simply a good regex to remove the unsupported characters?

PS: I know 3.0.12 isn't supported anymore, but for me it's a just a step between IPB and phpBB since there's only a convertor available for 3.0.12.
I'm hoping to give the same script a go. IBP 3.4.4 to phpBB3. However the board is vanilla. Should I use prototech's script or yours?
User avatar
Ger
Registered User
Posts: 2107
Joined: Wed Jan 02, 2008 7:35 pm
Location: 192.168.1.100
Contact:

Re: Converting from IPB 3.4

Post by Ger »

I'm not sure either will work in 2022. 3.0.12 cannot run on PHP versions >5.6. You should check that first.
That said, I'm not sure what I've changed 5 years ago :)
My extensions:
Simple CMS, Feed post bot, Avatar Resize, Modbreak, Magic OGP, Live topic update, Modern Quote, Quoted Where (GDPR) and Autoresponder.
Newest: FAQ manager for 3.2

Like my work? Buy me a coffee to keep it coming. :ugeek:

-Don't PM me for support-
PTRACER
Registered User
Posts: 177
Joined: Sun Dec 07, 2003 2:54 am

Re: Converting from IPB 3.4

Post by PTRACER »

Ger wrote: Thu Apr 07, 2022 4:53 pm I'm not sure either will work in 2022. 3.0.12 cannot run on PHP versions >5.6. You should check that first.
That said, I'm not sure what I've changed 5 years ago :)
Luckily my host allows me to downgrade to 5.6 if I need to!

Anyway thanks Ger for the reply on such an old topic, really appreciate it :)
Post Reply

Return to “[3.2.x] Convertors”