


This article will demonstrate how to embed videos from youtube to your product pages in Virtuemart. You will need FTP access and access to the Joomla administration back-end with Super Administrator privileges.
When you edit a product, you are given a text editor to add any text or images that you would like to display. However, the problem with text editors, is that they strip out lots of useful code that you may want to use on your pages.
We first need to disable the text editor, so we can paste in our code in to show the video. You need to:
Next we need to change a configuration file for Virtuemart to allow some HTML elements to be saved.
Log into your server with your FTP client and download the following file:
administrator/components/com_virtuemart/classes/phpinputfilter/class.inputfilter.php
Now find the following line:
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');
Remove the "object" and "embed" tags so your code should look like this:
var $tagBlacklist = array('applet', 'body', 'bgsound', 'base', 'basefont', 'frame', 'frameset', 'head', 'html', 'id', 'iframe', 'ilayer', 'layer', 'link', 'meta', 'name', 'script', 'style', 'title', 'xml');
Next, you should choose the youtube video you wish to put onto your product page.
Once you have found this:
Now navigate to your Joomla back-end and find the product that you wish to add the video to.
You will now notice that your "Product Description" no longer uses a text editor, and is simply a blank textarea.
Now when you look at your product page, your youtube video will display.
hi
text editor
Post new comment