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..
This discussion has been closed.
Comments
The solution is to change Parse() in default.php to look like this:
function Parse($String, $Object, $FormatPurpose) { $parser = new HTML_BBCodeParser(); if ($FormatPurpose == FORMAT_STRING_FOR_DISPLAY) { $String = $this->ProtectString($String); $String = $parser->qparse($String); $String = preg_replace('/\<youtube\>([a-zA-z0-9]+?)\<\/youtube\>/', '<object width="425" height="350"><param name="movie" value="http://www.youtube.com/v/$1"></param><embed src="http://www.youtube.com/v/$1" type="application/x-shockwave-flash" width="425" height="350"></embed></object>', $String); return $String; } else return $String; }
and add this
'youtube' => array( 'htmlopen' => 'youtube', 'htmlclose' => 'youtube', 'allowed' => 'all', 'attributes'=> array()),
to the list of tags in BBCodeParser.php
I'll repackage the extension later, but if you're desperate for youtube support this will work in the meantime.
So how would I go about adding this to Quicktags then?
I'm trying to post video uqgrw5Z-aNc with the hack installed, but it doesn't parse as a video...it only shows the letters and numbers.
$String = preg_replace('/\<youtube\>([a-zA-z0-9]+?)\<\/youtube\>/', '<object width="425" height="350"><param name="movie" value="http://www.youtube.com/v/$1"></param><embed src="http://www.youtube.com/v/$1" type="application/x-shockwave-flash" width="425" height="350"></embed></object>', $String);
should be:
$String = preg_replace('/\<youtube\>(.+?)\<\/youtube\>/', '<object width="425" height="350"><param name="movie" value="http://www.youtube.com/v/$1"></param><embed src="http://www.youtube.com/v/$1" type="application/x-shockwave-flash" width="425" height="350"></embed></object>', $String);
Now I can post Daily Show/Colbert Report clips EVERYWHERE! MUAHAHAHAHAHA!
No, but seriously - thanks.
try re-uploading the folder, go to extension manager, un-click bb-code extension, then delete the folder.
with the html extension, you can allow the embedding of youtube, googlevideo by taking object and embed out of line 29 of the htmlformatter default.php so it looks like this
"/<[\/]*(link|iframe|frame|frameset|style|applet|meta)[^<]*?>/i",