[SUPPORT] UBB.classic 6.x Convertor [0.3.1]

This is an archive of the phpBB 2.0.x convertors forum. Support for phpBB2 has now ended.
Forum rules
Following phpBB2's EoL, this forum is now archived for reference purposes only.
Please see the following announcement for more information: viewtopic.php?f=14&t=1385785
User avatar
AlanRT
Registered User
Posts: 41
Joined: Sun Aug 17, 2008 9:00 pm

Re: [SUPPORT] UBB.classic 6.x Convertor [0.3.1]

Post by AlanRT » Thu Sep 04, 2008 1:53 pm

OK, ran the converter with very few problems and imported my old board into PHPbb. Only major issue was that all of the old UBB image tags were stripped out of the posts and replaced with A HREF tags. For example:

Code: Select all

[IMG]http://www.sharpeiforums.com/images/members/00001978/Hawaii_Five_0.jpg[IMG]
was converted to:

Code: Select all

<img src="http://www.sharpeiforums.com/images/members/00001978/Hawaii_Five_0.jpg" alt=" - " />
I scanned all 19 pages of this topic and could not find a reference to this issue.

I'm not MySQL literate. Is there a simple way to run one or more SQL commands in phpmyadmin to convert these tags? Can someone give me the SQL syntax?

BTW, thanks so much to Graham, and everyone who worked to make this converter. Simple tool but so much work went into it to save others a lot of work converting these old boards.

User avatar
D¡cky
Former Team Member
Posts: 11812
Joined: Tue Jan 25, 2005 8:38 pm
Location: New Hampshire, USA
Name: Richard Foote
Contact:

Re: [SUPPORT] UBB.classic 6.x Convertor [0.3.1]

Post by D¡cky » Thu Sep 04, 2008 3:59 pm

Editing the database to fix codes is very dangerous. Make sure you have a backup before doing anything.

The basic command to fix is like this

Code: Select all

update phpbb_posts_text set post_text = replace(post_text, 'old_text', 'new_text)
For the example you have given use

Code: Select all

update phpbb_posts_text set post_text = replace(post_text, '<img src="', '[img]')
and

Code: Select all

update phpbb_posts_text set post_text = replace(post_text, " alt=" - " />', '[/img]')
The next problem is inserting the bbcode_uid to make the bbocodes work. I'll assume that you will be converting to phpBB3. If you perform the above edits on the phpBB2 database and then convert to phpBB3, the bbcode_uid's should be inserted by the convertor. If you have already converted to phpBB3, use this script to insert the bbcode_uid's, Reparse BBCodes
Have you hugged someone today?

User avatar
AlanRT
Registered User
Posts: 41
Joined: Sun Aug 17, 2008 9:00 pm

Re: [SUPPORT] UBB.classic 6.x Convertor [0.3.1]

Post by AlanRT » Thu Sep 04, 2008 6:15 pm

Hello Dicky,

Thanks so much for your answer. Very helpful. This is such an old thread, I was worried no one would even bother to read or respond to it anymore.

I want to ensure I understand. I first imported UBB 6.7.2 into PHPbb 2.x, then immediately upgraded 2.x to the current 3.02 so I did not do an interim step to convert those links before upgrading to 3.0.

With the old UBB board, we were using an image upload Mod, and I preserved about 3,000 folders with all the Members' image files hoping we could keep them in the posts ported to the new board. To test, I edited a few of these messages by hand and the images display using just the IMG] tags. Since the images in these messages are already associated with their owners by way of the posts, can I just search and replace with the IMG] - /IMG] tags and be done?

Or are you saying it's also a necessary step to convert these tags to the bbcode_uid's used in 3.0? Is this because adding the bbcode_uid's would make these legacy images available through the User's Control Panel, even though they are in a different folder than the newer images uploaded thru PHPbb since the upgrade? Is this an optional step?

Sorry for all the questions but I want to make sure I understand what I'm going to do before I do it.

Thanks again.

User avatar
D¡cky
Former Team Member
Posts: 11812
Joined: Tue Jan 25, 2005 8:38 pm
Location: New Hampshire, USA
Name: Richard Foote
Contact:

Re: [SUPPORT] UBB.classic 6.x Convertor [0.3.1]

Post by D¡cky » Thu Sep 04, 2008 8:38 pm

The bbcode_uid's are needed so when phpBB3 is parsing the message for display, it will know that that is a bbcode tag and not just some random text.

Let me be sure I understand you correctly. When you edited the posts, the [IMG] [/IMG] tags were already there and all you had to do was submit the post? If that is the case, then all you need to do is run the Reparse BBCodes script.

If that is not the case, you will need to look in the database to see exactly what is there and do the replacement so [IMG]http://www.sharpeiforums.com/images/mem ... Five_0.jpg[/IMG]is there.
Have you hugged someone today?

User avatar
AlanRT
Registered User
Posts: 41
Joined: Sun Aug 17, 2008 9:00 pm

Re: [SUPPORT] UBB.classic 6.x Convertor [0.3.1]

Post by AlanRT » Thu Sep 04, 2008 9:35 pm

Oh, OK, I'm probably not explaining this well enough. These were actually image links pasted and embedded by the user into the UBB post text itself, and not image attachments displayed inline below the post ala PHPbb. For example, in the original UBB board, after the user uploaded an image using the Mod we installed, a link would be displayed which could then be copied and pasted anywhere into the post itself. For example:

Code: Select all

My favorite Olympic sport... and one of my favorite ice skaters. "What would Brian Boitano do?"

[img]http://www.sharpeiforums.com/images/members/00001309/T040533A.jpg[/IMG]

- Janet
After running the converter to PHPbb 2.0, the image links in the posts somehow morphed into:

Code: Select all

My favorite Olympic sport... and one of my favorite ice skaters. "What would Brian Boitano do?"

<img src="http://www.sharpeiforums.com/images/members/00001309/T040533A.jpg" alt=" - " />

- Janet
and that carried forward into 3.02

I can restore the link back to its original condition by manually editing and this works:

Code: Select all

My favorite Olympic sport... and one of If the  my favorite ice skaters. "What would Brian Boitano do?"

[IMG]http://www.sharpeiforums.com/images/members/00001309/T040533A.jpg[/IMG]

- Janet
That's all I'm trying to do. The bbcode_uids might be nice but not necessary, or?

User avatar
D¡cky
Former Team Member
Posts: 11812
Joined: Tue Jan 25, 2005 8:38 pm
Location: New Hampshire, USA
Name: Richard Foote
Contact:

Re: [SUPPORT] UBB.classic 6.x Convertor [0.3.1]

Post by D¡cky » Thu Sep 04, 2008 10:07 pm

The bbcode_uid's are absolutely necessary for the bbcodes to work. They are not easily entered manually so you will need a script to enter them.

First, you will need to look at the posts_text in the database to see exactly what is stored. You will probably see

Code: Select all

<img src="http&#58;//www&#46;sharpeiforums&#46;com/images/members/00001309/T040533A&#46;jpg" alt=" - " />
You can then use the code I posted earlier using phpMyAdmin to fix the text. Make a backup of the database first.
sample:

Code: Select all

update phpbb_posts_text set post_text = replace(post_text, 'old_text', 'new_text')
First change:

Code: Select all

update phpbb_posts_text set post_text = replace(post_text, '<img src="', '[img]')
Second change:

Code: Select all

update phpbb_posts_text set post_text = replace(post_text, '" alt=" - " />', '[/img]')
Then run the Reparse BBCodes script to insert the bbcode_uid's. And don't forget to make a database backup first.
Have you hugged someone today?

User avatar
AlanRT
Registered User
Posts: 41
Joined: Sun Aug 17, 2008 9:00 pm

Re: [SUPPORT] UBB.classic 6.x Convertor [0.3.1]

Post by AlanRT » Thu Sep 04, 2008 10:13 pm

OK, thanks again.

User avatar
AlanRT
Registered User
Posts: 41
Joined: Sun Aug 17, 2008 9:00 pm

Re: [SUPPORT] UBB.classic 6.x Convertor [0.3.1]

Post by AlanRT » Fri Sep 05, 2008 2:35 am

Running:

Code: Select all

update phpbb_posts_text set post_text = replace(post_text, '<img src="', '[img]')
returns: #1146 - Table 'alanrt_phpbb3.phpbb_posts_text' doesn't exist. Do I need to put something before phpbb_posts_text, since phpbb_posts_text lives inside phpbb_posts?

User avatar
D¡cky
Former Team Member
Posts: 11812
Joined: Tue Jan 25, 2005 8:38 pm
Location: New Hampshire, USA
Name: Richard Foote
Contact:

Re: [SUPPORT] UBB.classic 6.x Convertor [0.3.1]

Post by D¡cky » Fri Sep 05, 2008 3:54 am

My mistake. It is not the posts_text table. It is the posts table. If your table prefix is not phpbb_, you will need to adjust that also.

New query:

Code: Select all

update phpbb_posts set post_text = replace(post_text, '<img src="', '[img]')
and

Code: Select all

update phpbb_posts set post_text = replace(post_text, '" alt=" - " />', '[/img]')
Have you hugged someone today?

User avatar
AlanRT
Registered User
Posts: 41
Joined: Sun Aug 17, 2008 9:00 pm

Re: [SUPPORT] UBB.classic 6.x Convertor [0.3.1]

Post by AlanRT » Fri Sep 05, 2008 2:24 pm

Thanks very much. That worked.

edsager
Registered User
Posts: 13
Joined: Sun Feb 17, 2008 2:42 am

Re: [SUPPORT] UBB.classic 6.x Convertor [0.3.1]

Post by edsager » Fri Sep 19, 2008 7:02 pm

Oy. This topic might be the most resurrected topic since "which came first: the chicken or the egg?"

My conversion went well, except for the authors of the posts. All this data is dirty and unreliable. I exported the data as XML, cleaned it up in Excel, but now I cannot get the information back in the database. I am not sure what tables would need to be updated with the new user information.

Any ideas as to how to get this cleaned data back in the database?

Or is there another way to clean the data whilst converting?

Thanks,
edsager

User avatar
3rdear
Registered User
Posts: 3
Joined: Tue Oct 07, 2008 9:47 pm
Location: Cleveland, Ohio USA

Re: [SUPPORT] UBB.classic 6.x Convertor [0.3.1]

Post by 3rdear » Tue Oct 07, 2008 10:04 pm

I just downloaded version 0.3.1 of the converter and attempted to convert to phpbb2 from ubb 6.2.1.1 and it is merely redirecting me to the phpbb2 login screen and the redirected url appears as follows:

Code: Select all

http://www.mydomain.tld/phpbb2/login.php?redirect=convert/index.php&sid=5932d42fc2284ef5c382ee0c81e50591
The url of the conversion script is:

Code: Select all

http://www.mydomain.tld/phpbb2/convert/
Any help here?
There are 10 types of people in the world. Those who understand binary and those who don't.

Locked

Return to “[2.0.x] Convertors”