Simple Machines Community Forum

SMF Support => Converting to SMF => Topic started by: TechJeeper on March 30, 2012, 09:09:03 AM

Title: http://http// - Pictures broken after migrations (phpBB3 -> SMF 2.0.2)
Post by: TechJeeper on March 30, 2012, 09:09:03 AM
Good Morning,
I have been battling an issue since I migrated my phpBB3 forum to SMF... There was one kink I can not seem to figure out and thought i'd ask the SMF gurus here!

All of the existing images that were on the phpBB3 forum seem to be broken, and the issue seems to be the fact that the  on the images were somehow converted to the string  (See Attachment).  I am hoping there is a way to do a global search in the database for that strong and change it to the correct format or something similar. When I look at the actual text of the post, it displays normally, wrapped inthe [img] tag.


Thanks,
TechJeeper
Title: Re: http://http// - Pictures broken after migrations (phpBB3 -> SMF 2.0.2)
Post by: LiroyvH on March 30, 2012, 09:13:42 AM
Looks to me like the http://http:// is the issue, have a look at repair_settings.php and check the paths for your Themes settings.

The %20 indicated a space, nothing has to be wrong with that really.
Title: Re: http://http// - Pictures broken after migrations (phpBB3 -> SMF 2.0.2)
Post by: TechJeeper on March 30, 2012, 09:27:40 AM
Quote from: CoreISP on March 30, 2012, 09:13:42 AM
Looks to me like the http://http:// is the issue, have a look at repair_settings.php and check the paths for your Themes settings.

The %20 indicated a space, nothing has to be wrong with that really.

I concluded that the http://http// is the issue, but the forum wouldnt let me post a "link" lol.  the lack of a colon ":" in the second http seems odd to me...  None of the other links I have came across (i.e. physical image locations such as buttons) do not have the extra http.
Title: Re: http://http// - Pictures broken after migrations (phpBB3 -> SMF 2.0.2)
Post by: TechJeeper on March 30, 2012, 09:29:37 AM
Also, I dont see a "repair_settings.php", maybe I am overlooking it in a sub directory?
Title: Re: http://http// - Pictures broken after migrations (phpBB3 -> SMF 2.0.2)
Post by: LiroyvH on March 30, 2012, 09:34:38 AM
Ahh i'm sorry, you didn't mean Pictures hosted on your forum but when you link to them.
The hxxp:// is a short anti-spam measure to prevent linking and indexing.

Not sure how to disable that, hold on for someone else to help you :)
Title: Re: http://http// - Pictures broken after migrations (phpBB3 -> SMF 2.0.2)
Post by: TechJeeper on March 30, 2012, 02:50:01 PM
I just did some testing, It is only doing it for previously posted images.  I can literally take a post, modify it, copy the code into a new topic and the pictures work fine...  I am stumped.
Title: Re: http://http// - Pictures broken after migrations (phpBB3 -> SMF 2.0.2)
Post by: TechJeeper on March 30, 2012, 02:51:50 PM
And if I take and Modify a post with broken images, not touch a single thing in the topic then hit post, the images work... hmmmmm  Is there any way to "rebuild" my posts?
Title: Re: http://http// - Pictures broken after migrations (phpBB3 -> SMF 2.0.2)
Post by: Chron-O-John on April 03, 2012, 09:16:15 AM
Hi,

I've had the same error.

I found out that the conversion-tool did not save html-Entities in plain text but in the corresponding html-enitity (like +).

I don't know how much you are into PHP and MySql. As a quick tryout I made a script correcting this for all fields an a Table which seems to work.

I'll upload a more user-friendly and save version of the script as soon as I have time to write it.
Title: Re: http://http// - Pictures broken after migrations (phpBB3 -> SMF 2.0.2)
Post by: Chron-O-John on April 04, 2012, 07:31:27 AM
Hi,
im done with my script.

Please keep in mind that you use it at your own risk!
Always make a backup.

This script converts all the Html-Entities for posts, pms and signatures stored in the Database to thier corresponding chars.

This is a rather quick-and-dirty approach, not much error checking is done. Oh and its only compatibe to MySql.

Just copy the attached script to the root folder of your SMF-installation and call it in your browser (e.g. www.yourSmfForum.com/econvert.php). The script reads the settings from the Settings.php file.

If everything is completed it should state: "Everything done!"
Delete it afterwards.

Have fun!

Ps: @admins maybe i would make sense to move this somewhere where other users can find it too.

Edit: whoops I forgot the SQL-Update query - Should be fine now
Title: Re: http://http// - Pictures broken after migrations (phpBB3 -> SMF 2.0.2)
Post by: John Sahl on January 14, 2016, 04:38:04 AM
I know this is an old thread, but I just want to thank Chron-O-John for his script, as it fixed my problem today.