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

SMF to XenForo Import

Discussion in 'Installation, Upgrade, and Import Support' started by Skylined, Jan 5, 2014.

  1. Skylined

    Skylined Active Member

    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]
     
  2. Brogan

    Brogan XenForo Moderator Staff Member

    Skylined likes this.
  3. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    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.
     
    Skylined likes this.
  4. Skylined

    Skylined Active Member

  5. Skylined

    Skylined Active Member

    Found one more.

    Code:
    [img alt=Album name. 29.12.2013 - 52 KM height=174 width=234]http://linktoimage.jpg[/img]
     
  6. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Quick Find: [img alt

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

    Replacement String: [img]\1[/img]
     
    Skylined likes this.
  7. dknife

    dknife Active Member

    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.
     

Share This Page