Replace string in posts after import

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ibaker
    Senior Member
    • Oct 2004
    • 259

    Replace string in posts after import

    I am trying to do an import from XF to vb4.2 and after using Impex with the XF addon from over at vb.org all is ok however there is some cleaning up to do. One specific need is to address videos that are inlione in a post. I need to do a string search and replace in the db and not sure what the sql woul be.

    The string in posts that needs to be changed is:
    Code:
    media=youtube][COLOR=#ff0000]rGALfBuKbWc[/COLOR][/media
    It needs to be changed to:
    Code:
    video=youtube;[COLOR=#ff0000]rGALfBuKbWc[/COLOR]]http://www.youtube.com/watch?v=[COLOR=#ff0000]rGALfBuKbWc[/COLOR][/video
    The problem is that the string rGALfBuKbWc is a variable that is different in each post (it is the YouTube videoID)

    Any ideas what the SQL would be that I could run in the database that would replace the string using the variable and thus display the video in the post?
    Best regards
    Ian
    "Everyone wants to fly, but some people just haven't realised it yet"
    www.recreationalflying.com
    NOTE: This post remains solely the property of the poster and any reference to it is done so by the acceptance of this condition. Also elements of whatever I posted were previously used by a competing site so the post is also made on the condition that it can not be used by Glenn Inwood of Cowra NSW Australia or anyone associated with him.
  • Andy
    Senior Member
    • Jan 2002
    • 5886
    • 4.1.x

    #2
    That requires a script.

    You should ask over at vbulletin.org to see if someone will provide you with one.

    Comment

    • ibaker
      Senior Member
      • Oct 2004
      • 259

      #3
      Thanks Mate!
      Best regards
      Ian
      "Everyone wants to fly, but some people just haven't realised it yet"
      www.recreationalflying.com
      NOTE: This post remains solely the property of the poster and any reference to it is done so by the acceptance of this condition. Also elements of whatever I posted were previously used by a competing site so the post is also made on the condition that it can not be used by Glenn Inwood of Cowra NSW Australia or anyone associated with him.

      Comment

      widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
      Working...