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

XF 1.1 vBulletin Media Tags

Discussion in 'Installation, Upgrade, and Import Support' started by ScottLott, May 20, 2012.

  1. ScottLott

    ScottLott Member

    Hey Guys,
    So I'm working importing a vBulletin 4 installation into XenForo, everything has gone well until I want to convert the youtube tags in all the posts.

    - I tried Kier's addon, Post Find & Replace, and it just refreshes the page when I try to use it. Litterally, I hit the "Proceed" button and the page just refreshes, nothing happens. No errors, nothing. I'm using the code he listed in his addon:
    Code:
    Quick Find:
    [video
     
    Regular Expression:
    #\[video=("|'|)http:.+youtube.+v=(\w+)\1\].+\[/video\]#siU
     
    Replacement String:
    [media=youtube]\2[/media]
    - I noticed that I can't use mysql replace strings since I need widlcard values.

    How would I go about turning all my youtube links from vBulletin to Xenforo:

    This:
    Code:
    [video=youtube;dnTz4tUkvwk]http://www.youtube.com/watch?v=dnTz4tUkvwk[/video]
    Into This:
    Code:
    [media=youtube]dnTz4tUkvwk[/media]
    Any ideas?
     
  2. Chris D

    Chris D XenForo Developer Staff Member

    That should definitely work and I get the same problem and I definitely still have some old vBulletin syntax in there somewhere...
     
  3. ScottLott

    ScottLott Member

    Kier's script is still working, but the regular expression was not working. I was able to throw together one that works in my situation with vBulletin:
    Code:
    Quick Find:
    [video
     
    Regular Expression:
    #\[video=youtube;([^\]]+)\]([^\]]+)\[/video\]#siU
     
    Replacement String:
    [media=youtube]\1[/media]
     
  4. Chris D

    Chris D XenForo Developer Staff Member

  5. Chris D

    Chris D XenForo Developer Staff Member

  6. ScottLott

    ScottLott Member

    Yeah, that one's better than the one I had come up with. Thanks Yorick!
     

Share This Page