The Joomla! Extensions Directory ™


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 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 = '(\?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!