YouTube BBCode

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jmurrayhead
    Senior Member
    • Sep 2006
    • 1642

    YouTube BBCode

    I used the following to allow users to use BBCode to display YouTube videos:

    Tag: yt

    Replacement:
    HTML Code:
    <object width="425" height="350"><param name="movie" value="http://www.youtube.com/v/{param}"></param><embed src="http://www.youtube.com/v/{param}" type="application/x-shockwave-flash" width="425" height="350"></embed></object>
    This didn't work, displaying only a white space where the video should be. I checked the page source and this is what it gave me:

    HTML Code:
    <object width="425" height="350"><param name="movie" value="http://www.youtube.com/v/ <br />
    Mz5ds5hV2HU<br />
    "></param><embed src="http://www.youtube.com/v/ <br />
    Mz5ds5hV2HU<br />
    " type="application/x-shockwave-flash" width="425" height="350"></embed></object></div>
    Notice the <br />'s that were inserted? Not sure why it would do this. It displays properly in the Admin CP, however. Any ideas?
    No...No...Meester vBulletin, he no work right.
  • jmurrayhead
    Senior Member
    • Sep 2006
    • 1642

    #2
    Wow...I just found out what the problem was.

    When I click the button for this BBCode, the code was placed like this:

    [yt]
    HFMASFLF123
    [/yt]

    This generates the <br />'s. However, if I change it to this:

    [yt]HFMASFLF123[/yt]

    It works. Darn text formatting threw me off there

    Thanks anyway!
    Last edited by jmurrayhead; Thu 18 Oct '07, 5:11am. Reason: spelling
    No...No...Meester vBulletin, he no work right.

    Comment

    widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
    Working...