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

XF 1.5 Search and replace ?

Discussion in 'XenForo Questions and Support' started by click here, Nov 4, 2015.

  1. click here

    click here Active Member

    Code:
    What is the best way to replace all of my old VB3.8 youtube code in post's, like:
    
    [YOUTUBE]blablabla[/YOUTUBE]
    and replace with
    [MEDIA=youtube]blablabla[/MEDIA]
    
    I guess I would have to search for [YOUTUBE] and replace with [MEDIA=youtube] and then search for [/YOUTUBE] and replace with [/MEDIA]
    
    Is there a way to do this in XF or do I need to do it some how in MYPHP?
    
    Thanks!
     
  2. Chris D

    Chris D XenForo Developer Staff Member

  3. AndyB

    AndyB Well-Known Member

    In addition to what Chris wrote, I suggest using this in phpMyAdmin, it's nicer to use the same case XenForo does.

    Code:
    UPDATE xf_post SET message = REPLACE(message, '[youtube]', '[MEDIA=youtube]');
    UPDATE xf_post SET message = REPLACE(message, '[/youtube]', '[/MEDIA]');
    
     
    OperaManiac likes this.
  4. click here

    click here Active Member

    Thank's, that worked.
     

Share This Page