CODE
<?php
$embed_player = '
<table widht="300" align="center" class="tborder" >
<tr><td class="alt1">
<object width="315" height="250">
<param name="movie" value="http://www.youtube.com/v/\\4&hl=en_US&fs=1&rel=0&version=3">
</param>
<param name="allowFullScreen" value="true">
</param>
<param name="allowscriptaccess"value="always"></param>
<embed src="http://www.youtube.com/v/\\4&hl=en_US&fs=1&rel=0&version=3"
type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="515" height="450"></embed>
</object>
</td>
</tr>
</table>
';
$text = $PowerBB->_CONF['template']['while']['LastNews_subjectList'][$this->x_loop]['text']; // متغير كود المشاركة
$text = preg_replace('#(<a href="http://www.youtube.com)?/(v/([-|~_0-9A-Za-z]+)|watch?v=([-|~_0-9A-Za-z]+)&?.*?)">(http://www.youtube.com)?/(v/([-|~_0-9A-Za-z]+)|watch?v=([-|~_0-9A-Za-z]+)&?.*?)</a>#i', $embed_player, $text);
echo $text;
?>