This topic is locked

Embeding Youtube in a database with PHPRunner

6/25/2008 8:21:13 AM
PHPRunner General questions
N
nadimo author

Hi,
Adding the code below :
<object style="width: 113px; height: 130px"><param name="movie" value="http://www.youtube.com/v/OB03KF-jDjI";></param><embed'>http://www.youtube.com/v/OB03KF-jDjI";></param><embed src="http://www.youtube.com/v/OB03KF-jDjI"; type="application/x-shockwave-flash" width="425" height="344"></embed></object>
to a TEXT field in a database and assigning the type HTML in the "view as" settings , will yield a Youtube movie playing in the web page .
Now here is the tough question :
If you have a field that contains a list of numbers (Like the one above : OB03KF-jDjI ), and many others that point to different Youtube videos , how can you concatenate the code listed above with the field values using PHPRunner to get a list of Youtube videos to display on the web page .
Can someone help please ?

Thanks in advance .

nadimo.

J
Jane 6/25/2008

Hi,
use custom format on the "View as" settings dialog on the Visual Editor tab.

Here is a sample:

$value = "<object style=\"width: 113px; height: 130px\">

<param name=\"movie\" value=\"http://www.youtube.com/v/".$value."\";>'>http://www.youtube.com/v/".$value."\">

</param><embed src=\"
http://www.youtube.com/v/".$value."\"; type=\"application/x-shockwave-flash\"

width=\"425\" height=\"344\"></embed></object>";