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

XF 1.3 Media site BB code assistance

Discussion in 'XenForo Questions and Support' started by Wobble, Jul 20, 2014.

  1. Wobble

    Wobble Member

    So I'm in the process of creating a custom BB Code Media Site and the site is a little weird with their links.

    This would be an example of a URL from the video site

    http://www.jpopsuki.tv/video/Hatsune-Miku---Strobo-Nights-%2528DJ-Emergency-911-Remix%2529/f44579c51983d0d66101292222015bf9

    The bolded part is completely irrelevant to the embed code which is

    Code:
    <iframe src="http://www.jpopsuki.tv/media/embed?key=f44579c51983d0d66101292222015bf9&width=720&height=400&autoplay=false&autolightsoff=false&loop=false" width="720" height="400" frameborder="0" allowfullscreen="allowfullscreen" allowtransparency="true" scrolling="no"></iframe>
    I tried using the wildcard asterisk to no avail and I am at a loss now with how to make sure that part of the URL is ignored but still accounted for if you know what I mean.
     
  2. EQnoble

    EQnoble Well-Known Member

    Use regex



    Basic Info
    Match URLs:
    Code:
    #jpopsuki.tv/video/[^/]+/(?<id>[a-z0-9]+)#siu
    Embed HTML:
    Code:
    <iframe src="http://www.jpopsuki.tv/media/embed?key={$id}&width=720&height=400&autoplay=false&autolightsoff=false&loop=false" width="720" height="400" frameborder="0" allowfullscreen="allowfullscreen" allowtransparency="true" scrolling="no"></iframe>

    Advanced Options

    ggffg.png
     

Share This Page