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

XF 1.4 Replace old BBCode in Posts

Discussion in 'XenForo Questions and Support' started by xoa, Jan 29, 2015.

  1. xoa

    xoa New Member

    Hello, I need to replace some old BBCodes in my forum.

    This is what I have:

    Code:
    [iframe]www.mylinktoreplace.it/folder/page.html[/iframe]
    And this is what I'd like to have:

    Code:
    [parsehtml]<iframe width=100% height=1200px frameborder=0 scrolling=yes src="http://www.mylinktoreplace.it/folder/page.html"></iframe>
    So basically, I just have to search for
    Code:
    [iframe]
    and replace with
    Code:
    [parsehtml]<iframe width=100% height=1200px frameborder=0 scrolling=yes src="http://
    and search for
    Code:
    [/iframe]
    and replace with
    Code:
    "></iframe>[/parsehtml]
    
    Easy, but how to realize this?
    Thank you ;)
     
    Last edited: Jan 29, 2015
  2. Brogan

    Brogan XenForo Moderator Staff Member

    If the strings are identical, you can do it in phpMyAdmin.

    Code:
    UPDATE xf_post SET message = REPLACE(message,'current_content','new_content');
     
  3. xoa

    xoa New Member

    Wow, that was probably the fastest response I got in a forum. :) I tried this before already, but I was getting an error. Maybe I messed up with something. But this time it worked. Thank you a lot.

    EDIT: Oh, I also noticed that I have to update all the links since I'm coming from IPB. I don't know how to do this or if this is possible:

    The thread in Xenforo is this one:
    Code:
    http://forum.cemfactor.com/index.php?threads/svolte-di-popoli-info.1136/
    But in another post, the link is still in "IPB style", like this:
    Code:
    http://forum.cemfactor.com/topic/1136-svolte-di-popoli-info/
    I thinks this one is not that easy as the BBCode replacement :)
     
    Last edited: Jan 29, 2015
  4. Mike

    Mike XenForo Developer Staff Member

    You would really want to handle that with the IPB redirects in the resources (which would handle external links as well).
     

Share This Page