Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Help with Forced BBCode needed to solve a problem

edited February 2009 in Vanilla 1.0 Help
Hi. I'm trying to set up a simple forum with BBCode-only commands and with the option to insert YouTube video. By reading some discussions on this forum I managed to do so using Forced BBCode + JQuery + JQmedia extensions. Now it can be done just by pasting the the URL.

The problem is, I'd like to do it in a more elegant way - by entering the video's URL amongst BBCode tags:

[video]http://www.youtube.com/watch?v=dunpHC6CBYo[/video]

It already works if you enter it this way:

[url]http://www.youtube.com/watch?v=dunpHC6CBYo[/url]

So I suppose It would work if I changed the BBCode so it converts/treats the [video] tag the same way as it does the [url] tag, but I'm unable to do so. All my attempts in adding such [video] tag to the BBCodeParser.php results in not rendering the link correctly or not rendering the page at all.

I don't know PHP, but I usually manage to change its code to work the way I need. This is one of the cases in which I can't. Can you help me?

Comments

  • Please? I tried all day and still can't find out how to set up a new [video] tag in BBCode to be treated the same way as the [url] is.

    I don't know why duplicating the "url" section in BBCodeParser:

    'url' => array( 'htmlopen' => 'a',
    'htmlclose' => 'a',
    'allowed' => 'none^img',
    'attributes'=> array('url' => 'href=%2$s%1$s%2$s', 't' => 'target=%2$s%1$s%2$s'))


    and replacing the appropriate "urls" with "videos" doesn't work.

    Making this out would provide an elegant way to insert videos via BBCode for anyone.
Sign In or Register to comment.