VirtueMart Forum

VirtueMart 2 + 3 + 4 => Product creation => Topic started by: cvrak on August 09, 2023, 12:47:23 PM

Title: Add youtube video in product description
Post by: cvrak on August 09, 2023, 12:47:23 PM
Hi,
I'm trying to embed a Youtube video in product description using Sourcerer, I embed the yourube code, but when I save the product I only see {source}{/source} wher the youtube code should be positioned. The video is shown in front end, but when I edit egain tha product it is gone.
I've found a possible solution the following:


There is a filter in VirtueMart, which cuts the object and the embed html tags.

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

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');

But the problem is there is no administrator/components/com_virtuemart/classes/phpInputFilter/class.inputfilter.php file.
Can anyone tell how this can be solved?

Thanks
Chris
Title: Re: Add youtube video in product description
Post by: hotrod on August 09, 2023, 13:49:08 PM
All videos.. Joomla Plug in..
Title: Re: Add youtube video in product description
Post by: cvrak on August 09, 2023, 15:36:11 PM
Ok, I know about this plugin, but how can I use it with VM?

Thanks
Title: Re: Add youtube video in product description
Post by: hotrod on August 09, 2023, 15:41:35 PM
Your description uses the Joomla editor..  You would just input the code in the editor..    {youtube}video-id{/youtube}
https://www.joomlaworks.net/extensions/free/allvideos
Title: Re: Add youtube video in product description
Post by: cvrak on August 10, 2023, 08:13:23 AM
Thanks a lot, it worked!!
Title: Re: Add youtube video in product description
Post by: hotrod on August 10, 2023, 12:13:28 PM
Great.. Also..   I Use the JCE Pro Editor on my sites..  they have a built in video plug-in.

https://www.joomlacontenteditor.net/purchase