The Joomla! Extensions Directory ™

larrykalef

Reviews(1)
 
bylarrykalef, August 29, 2010
YouTube Embedder
Hi! Thank you so much for this plugin, i read a review about embeding youtube videos with "trash code" like youtube.com/v=dad&ds=fsdf&feature=.... So i have i client that copies links with no care about this, so i wrote a small fix to your code using regular expressions:

/*the new video regular expresion*/
$reg_video_link_expr = '(http://www.youtube.com/watch\?v=([a-zA-Z0-9_-]+)(&[a-zA-Z]+=[a-zA-Z0-9_-]+)*)';

$article->text = preg_replace('|'.$reg_video_link_expr.'|e', '$this->youtubeCodeEmbed("\2")', $article->text);

With this piece of code i answer the comment made by FabZ on May 26, 2010.

That's all and thank you again!