Does this work with a hypen within the youtube tags? 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.
Anyone have any luck creating a more elegant solution for this? The way it destroys formatting of threads when trying to clean up youtubes doesnt seem like how the html formatter should work. My forum memebers really miss html, bbcode is crap.
Tried it. Definitely made some mistakes in the code switch because it took the whole forum down. Deleted the extension. The forum is back, but now there's lots of writing all over the place at the top of every page:
Warning: main(/home/abbylady/public_html/extensions/BetterBBCode/default.php): failed to open stream: No such file or directory in /home/abbylady/public_html/conf/extensions.php on line 16
Warning: main(/home/abbylady/public_html/extensions/BetterBBCode/default.php): failed to open stream: No such file or directory in /home/abbylady/public_html/conf/extensions.php on line 16
Warning: main(): Failed opening '/home/abbylady/public_html/extensions/BetterBBCode/default.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/abbylady/public_html/conf/extensions.php on line 16
Um HELP!
disable the extension via extension manager before deleting the folder off of the server.
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
np abby, glad it worked
yes, sirnots htmlformatter extension
http://lussumo.com/addons/?PostBackAction=AddOn&AddOnID=33
if you edit this extensions default.php as I explained above, upload and enable it, you will be able to embed flash (youtube, googlevideo, etc..)
cheers
I'm already using that extension. Copied it to the desktop and went to line 29 (using Evrsoft First Page 2006) and my line 29 doesn't look like what you're describing.
I'm wondering if this is the line I should alter:
$Html_DisallowedTags = array('link', 'iframe', 'frame', 'frameset', 'object', 'embed', 'style', 'applet', 'meta');
If I take the object and embed tags out of that line, does that work? I'm afraid to try it without asking, since making mistakes in the codes of these extensions messes things up in a way I'm not confident I can repair!
---
Wait, wait WAIT! That was the row to change. I decided to try it anyway. THANKS SO MUCH! :D
I am a happy woman!
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",