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

XF 1.1 BBCode replacements

Discussion in 'Installation, Upgrade, and Import Support' started by mistypants, Aug 14, 2012.

  1. mistypants

    mistypants Well-Known Member

    Hi all, I'm trying to clean up some old BBCode using Kier's Post Replace. I'm not really familiar with the syntax used, though, so if someone could help out that would be appreciated. :)

    We have two old media codes:
    Code:
    [video=youtube_share;4cECcwNXMRM]http://youtu.be/4cECcwNXMRM[/video]
    [video=youtube;QpHtofAdsXs]http://www.youtube.com/watch?v=QpHtofAdsXs[/video]
    [youtube=ODjlMDeCFRc]ODjlMDeCFRc[/youtube]
    And we'd of course like it to work with the new Xenforo code.
     
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    For the middle one:

    http://xenforo.com/community/threads/video-code-after-import.24280/

    For the first one you would use this:

    Quick Find: [video

    Regular Expression: #\[video=youtube_share;([^\]]+)\]([^\[]+)\[/video\]#siU

    Replacement String: [media=youtube]\1[/media]

    For the last one:

    Quick Find: [youtube

    Regular Expression: #\[youtube=([^\]]+)\]([^\[]+)\[/youtube\]#siU

    Replacement String: [media=youtube]\1[/media]
     
  3. mistypants

    mistypants Well-Known Member

    First one works like a charm, thank you!

    I tried the second one and the test went through fine, but when I check the 'Save Changes' box, I get this error message:
     
  4. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Admin CP -> Home -> Options -> Messages -> Maximum Media Embeds per Message
     
  5. mistypants

    mistypants Well-Known Member

    Oh wow, I probably should have thought of that myself...
    Thanks though! Both worked great.
     
  6. Andy.N

    Andy.N Well-Known Member

  7. Andy.N

    Andy.N Well-Known Member

    Anyone knows why the youtube link above doesn't work?
    Code:
    http://www.youtube.com/watch?v=cMzbeQ3EZm0
    Chrome on Mac OS ML

    EDIT: it shows on Win machine and iPad 3.
     
  8. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Client problem I assume. Maybe flash isn't working or needs to be updated.
     
    Andy.N likes this.

Share This Page