News:

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

Main Menu

phpBB3 3.0.0 to SMF 1.1.11 [img] tag problem

Started by darkspreader, March 14, 2010, 12:17:59 PM

Previous topic - Next topic

darkspreader

I thought I'd post this in its own topic instead of the converter thread since it seems as though I'm not the only one with the problem.

When converting from phpbb3 to SMF 1.1.x, the [img] tags are converted over in the posts, but they aren't actually parsed. What this means is, the [img] tags are in the post, with the image link being in between, but on the actual post, you can't see any of it. When you edit the post, however, you can see the tags sitting there, and when you hit save (without even making any changes), the tag starts working again, and correctly shows the image.

Sorry if this has already been discussed, but I tried the search tool, and it didn't help me at all, because it's too broad of a subject.

Here is an example:
http://elitecm.net/forums/viewtopic.php?f=4&t=1053

http://www.elitecm.net/SMF/index.php?topic=1053.0

(Another thing I just noticed is that there's a poll on the SMF post, even though there isn't actually one there, lol.)

Thanks.

Oldiesmann

Something in the converter is screwing up the URLs. When I look at the source code of that topic you linked to, I see this:

<img src="http://http&#58;//img13&#46;imageshack&#46;us/img13/4504/dsc0794t&#46;jpg" alt="" border="0" />

It should be
<img src="http://img13.imageshack.us/img13/4504/dsc0794t.jpg" alt="" border="0" />

When you edit the post, SMF parses the HTML entities and comes up with the correct URL, so that's why it works when you save it. We'll have a look at the converter and see if we can figure out what's going on.
Michael Eshom
Christian Metal Fans

darkspreader

#2
Thank you sir.

In regards to that poll thing that I noticed, you can disregard it. I found a similar case on this board, and found an SQL command to just simply remove all polls. Easy enough.

One thing though. I accidentally left the converter at the ISO charset when I first converted it. However, I've done numerous conversions after that (overwriting the previous presumably), and promptly changed it to UTF-8, because I read after the fact that phpBB3 defaults to UTF-8. Could this be my problem?

Edit: I uploaded the copies of convert.php and phpbb3_to_smf.sql that I used. Maybe that'll help.

darkspreader

I don't mean to be a bug, but is there any update on this?

Thanks.

Oldiesmann

I looked through the code last night and couldn't find anything that would do that, so the character set differences might be the problem. Try converting it using UTF-8 and see if that works.
Michael Eshom
Christian Metal Fans

darkspreader

Alright. Well, the thing is, the first time around I did the conversion using ISO, but since then I've converted like 20 times, and I used UTF8 the whole time. This probably means that the damage can't be undone?

Is there a way for me to reinstall SMF over the current installation, but still keep all settings, themes, and mods? At the very worst, I can deal with losing the mods; I'll just write down all the settings. That way, I start fresh with no converted anything, and when I do the conversion, I'll make sure to use UTF8. Hopefully that will work.

Thanks.

darkspreader

#6
Gah.

I just completely reinstalled a brand new copy of SMF, and made sure to use UTF-8. I then installed the 5 mods that I use (Tinyportal, Admin Notepad, Member Color Link, SMF Staff Page, and the phpbb3 login fix). After that I converted the phpbb forum, making sure that UTF-8 was selected, but it's yielding the same exact results.

Any ideas? My board has tons and tons of images posted, along with their signatures. Manually editing each and every post is not something I'm willing to do.

Thanks.

Edit: I even just installed SMF a second time (I deleted both the files and tables beforehand), and only installed the phpbb3 login fix mod, then converted. It's still not showing the images. This is such an annoying bug for something so simple as having an extra unneeded "http://" in front of the URLs!

darkspreader

#7
Do you think there would be a way to execute an SQL command that goes through the whole smf_messages table and fixes the problems? It looks like the punctuation in the image URLs are messed up.

Such as:

Change &#58; to :
Change &#46; to .

I have no clue how to execute SQL commands, lol.

darkspreader

I would really appreciate it if someone could give me the command to make the changes. I just need a command that alters any accounts of "&#58" in the smf_messages table to ":", and alter any accounts of "&#46" to ".".

darkspreader

#9
Figured it out.

UPDATE smf_members SET signature = replace(signature,"&#58;",":");
UPDATE smf_members SET signature = replace(signature,"&#46;",".");
UPDATE smf_messages SET body = replace(body,"&#58;",":");
UPDATE smf_messages SET body = replace(body,"&#46;",".")

Aronion

Quote from: darkspreader on March 21, 2010, 10:20:10 PM
Figured it out.

UPDATE smf_members SET signature = replace(signature,":",":")
UPDATE smf_members SET signature = replace(signature,".",".")
UPDATE smf_messages SET body = replace(body,":",":")
UPDATE smf_messages SET body = replace(body,".",".")


Thank you so much for this! I was having the same problems with both signatures and posts and now they're fine after running those 4 queries in phpmyadmin


carsch

I'm having this same issue.  I'm trying the queries mentioned and all I get is:

Quote#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'UPDATE smf_members SET signature = replace(signature,".",".") UPDATE smf_messag' at line 2

carsch

The command is actually formatted like this

UPDATE tablename SET tablefield = replace(tablefield,"findstring","replacestring");

I used it and it worked.

Heeks



demon36

Just wanted to say thanks
perfectly solves this problem which seems to be a bug in "[img]" parsing in the converter

Advertisement: