• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

SMF to XenForo Import

Skylined

Active member
#1
Some posts (and I guess conversations) contain hotlinked images, some of them are showing fine and others don't because the img bb code specifies the image's width and height.
I don't really know if this is because of SMF or a mod that I have installed.

Is there any way to run a SQL query to get rid of the whole width and height part?
Have in mind that the numbers (720 and 431) change depending on the size of the original image, and that it might have more or less digits, so I guess that some kind of wildcard should be used.


Now
Code:
[img width=720 height=431]http://ilinktoimage.jpg[/img]

How it should look like
Code:
[img]http://ilinktoimage.jpg[/img]
 

Jake Bunce

XenForo moderator
Staff member
#3
With that addon, use the following settings:

Quick Find: [img width

Regular Expression: #\[img width=[0-9]+ height=[0-9]+\]([^\[]+)\[/img\]#siU

Replacement String: [img]\1[/img]

That should do it.
 

dknife

Active member
#7
Ah these will come in handy, thanks! One other I noticed when I did my test migration was [iurl] since that won't be understood.

Code:
[iurl=http://www.somewebsite.com/forums/index.php?topic=100.0]
That search/replace will be very helpful.