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
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>
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.
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.
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.
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?
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.
Comments
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
there was another thread that specified how to allow embed and object tags in the HtmlFormatter but i don't know where it .s
<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 wonder if anyone has done anything with this yet?