DESIGNED DEVELOPED DELIVERED

Mob: 07760 392284edward@ee-web.co.uk

ee-web thinks... a bit

Go on, make my day ... leave a comment

How to get a You Tube video to work in virtuemart

November 16th, 2011 by Edward

I have been having problems getting youtube video to work on VirtueMart, even though the same code works in a normal article on the same joomla site!

Turns out the filter for stripping out nasty tags for VirtueMart is a big more aggressive than the joomla one. It cuts out the <iframe> tags  and also <object> and the <embed> html tags.

In order to embed YouTube video and other Flash files in your VirtueMart product description area you should 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.

So now you can just go to the product article. I usually press the “html source” button and just paste the embed code that you tube present.

categories

Edward owns and runs ee-web design and has been building websites for over 12 years. He is passionate about... most things really

Was this post helpful or interesting? Spread the news.

Leave a comment

*


tag