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

XF 1.3 Trying to run a SQL query for youtube links

Discussion in 'Installation, Upgrade, and Import Support' started by dawg, Jun 24, 2014.

  1. dawg

    dawg Well-Known Member

    I have already tried the find and replace and is not working for me since i have thousands and thousands of video links. I tried the example code to load 5000 at a time but it degrades over time and you are saving 20 videos at a time. I just dont have the time.

    I just want to fix youtube nothing else. I tries this SQL query but nothing. The variable is stumping me.

    UPDATE xf_post SET message = REPLACE(message,'#\[video=youtube;([^\]]+)\]([^\[]+)\[/video\]#siU','[media=youtube]');
    Any help would be appreciated.
  2. caliman

    caliman Active Member

  3. dawg

    dawg Well-Known Member

  4. caliman

    caliman Active Member

    It's probably upper case - change youtube to YOUTUBE.
  5. dawg

    dawg Well-Known Member

    But i dont see how that command will fix a link like this one.

    Doesn't work lower or upper case. I think we need some kind of variable but I'm no expert.
  6. caliman

    caliman Active Member

    That doesn't look like stock vB video code. At least 3.8. I don't recognize that format.
  7. dawg

    dawg Well-Known Member

    Yeah it's Vbulletin 4 leftover code.
  8. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

  9. dawg

    dawg Well-Known Member

    Hi jake i tried that tool for hours with no success. I found your snipet of code where you can limit the amount of instances it looks for but i have

    162132 matches in xf_post
    It would take me a month. When i try more than a couple of thousand i get a memory time out.

Share This Page