Monday May 21 , 2012
Font Size
   

How to insert YouTube video in the VirtueMart product description?



Remove the object and the embed items from the following array:

var $tagBlacklist = array('applet', 'body', 'bgsound', 'base', 'basefont', 'embed', 'frame', 'frameset', 'head', 'html', 'id', 'iframe', 'ilayer', 'layer', 'link', 'meta', 'name', 'object', 'script', 'style', 'title', 'xml');

The new array will be:

var $tagBlacklist = array('applet', 'body', 'bgsound', 'base', 'basefont', 'frame', 'frameset', 'head', 'html', 'id', 'iframe', 'ilayer', 'layer', 'link', 'meta', 'name', 'script', 'style', 'title', 'xml');

The modification should be completed in the administrator/components/com_virtuemart/classes/phpInputFilter/class.inputfilter.php file.

Then you can edit the product description html code and embed the video using similar lines:

<div align="center">
<object width="445" height="364"><param name="movie" value="http://www.youtube.com/VIDEO PATH"></param><param name="allowFullScreen" value="true"></param><param name="allowScriptAccess" value="always"></param><embed src="/
http://www.youtube.com/VIDEO PATH" type="application/x-shockwave-flash" allowfullscreen="true" allowScriptAccess="always" width="445" height="364"></embed></object>
</div>

You should replace http://www.youtube.com/VIDEO PATH with your video file URL.

Comments (0)Add Comment

Write comment

busy