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.

1.0 Bug with YouTube Videos..

24

Comments

  • ithcyithcy New
    edited May 2006
    well, if it's an emergency, you can go into the raw html formatter extension and enclose all the code at the bottom (lines 22-end) with this:
    if($Context->Session->UserID == 1) // or whatever your UserID is { // code goes here }
    that should get you started. using that, (and when you enable it :) ) the Raw Html selector should only show up for you.
    there was another thread that specified how to allow embed and object tags in the HtmlFormatter but i don't know where it .s
  • Bergamot, did you ever get around to adding a [youtube] tag to the excellent BetterBBCode extension?
  • I'm trying to think of the best way to do it, if it's even possible.
  • Glad its not just me that's stumped I have spent the last 24 hours trying to figure it out :)
  • Why couldn't you just have something like [youtube]movie url[/youtube], then retrieve the movie id from it and simply create the html code from that? Eg, just using the youtube site html:
    <object width="425" height="350"><param name="movie" value="http://www.youtube.com/v/movie id"></param><embed src="http://www.youtube.com/v/movie id" type="application/x-shockwave-flash" width="425" height="350"></embed></object>
  • I tried that and failed, in fact it took the forum down :(
  • hehe, I think this might call for a specialized youTube/google video embed extension. That or a cleaver tweak to the bbcode/html extension capabilities. That last one though might be a long-shot.
  • Well the main problem is that I hate regular expressions.
  • Dito, though its more of a not understanding than hating
  • I've love to see something like this implemented it'd rock. Not sure why SirNot's [youtube] example would crash the forum though, what errors did you get?
  • The parser, as it exists now, is mainly designed to translate [tag]content[/tag] to <tag>content</tag> for approved tags. In addition, it has a preparse function that runs a bunch of regular expressions on the markup before the parser gets a hold of it. Unfortunately, we can't use preparse to change [youtube]u1kqqMXWEFs[/youtube] into [object width=425 height=350][param name=movie value=http://www.youtube.com/v/u1kqqMXWEFs][/param][embed width=425 height=350 src=http://www.youtube.com/v/u1kqqMXWEFs type=application/x-shockwave-flash][/embed][/object] without allowing [embed], [param], and [object] tags. The only solution is to post-process the string in the default.php file., changing <youtube>u1kqqMXWEFs</youtube> into <object width="425" height="350"><param name="movie" value="http://www.youtube.com/v/u1kqqMXWEFs"></param><embed src="http://www.youtube.com/v/u1kqqMXWEFs" type="application/x-shockwave-flash" width="425" height="350"></embed></object> But that would require regexes and I don't feel like writing one tonight.
  • MarkMark Vanilla Staff
    *bump*

    I wonder if anyone has done anything with this yet?
  • hmmm, should this be rolled into a [video]url of the video[/video] style tag and be that way by itself or part of another parser? I can't see it being too difficult if it's on it's own.
  • blizeHblizeH ✭✭
    This would be really cool, I know Youtube videos are often rubbish and 'spammy' but it's still a feature a lot of our members would like to see, myself included! Is there not just a way to allow object embeds for now?
  • 3stripe3stripe ✭✭
    edited June 2006
    Could Google video could be done in a sneakier way because it uses swfs?
  • 3stripe, I think as long as the URL to the embedded content is constant, which appears to be the case with both google video and youtube, it's apparently standardized enough between the two that you could just do video tags with the url and build the embed params from there.
  • blizeHblizeH ✭✭
    You can't embed flash files either :(
  • gigingergiginger New
    edited June 2006
    Crap.
  • I have a feeling Bergamot has the skillz required for this one ^^^
  • blizeHblizeH ✭✭
    Good to hear! :) <3
This discussion has been closed.