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

Cannot add a [video] BBCode

Discussion in 'Troubleshooting and Problems' started by PatPeter, Jul 5, 2015.

Tags:
  1. PatPeter

    PatPeter Member

    I'm trying to add a simple [video] BBCode:

    Code:
    <video width="100%" height="100%" autoplay>
    <source src="{text}" type="video/ogg" />
    HTML5 video not supported.
    </video>
    But when I add it to a page with the format:

    Code:
    [video]http://123.123.123.123:8080[/video]
    I get this resulting mess of HTML:

    Code:
    <video autoplay="">
    <source class="externalLink" target="_blank" 123.123.123.123:8080"="" http:="" src="&lt;a href="></source>http://123.123.123.123:8080" type="video/ogg" /&gt;
    HTML5 video not supported.
    </video>
    The reason it does this is because it will always save the BBCode as:

    Code:
    [video][URL]http://123.123.123.123:8080[/URL][/video]
    The best way to fix this is to place the URL in the option. I also allowed customization of the error message:

    Code:
    <video width="100%" height="100%" autoplay>
    <source src="{option}" type="video/ogg" />
    {text}
    </video>
    Usage:

    Code:
    [video=http://123.123.123.123:8080]HTML5 video not supported.[/video]
     
    Last edited: Jul 5, 2015
  2. Mike

    Mike XenForo Developer Staff Member

    You need to disable autolinking within your BB code. It is an option for custom BB codes.
     
    Brad L likes this.

Share This Page