News:

Looking for documentation? Take a look on our wiki

Main Menu

Add youtube video in product description

Started by cvrak, August 09, 2023, 12:47:23 PM

Previous topic - Next topic

cvrak

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

hotrod

Bronze Member
VirtueMart 4.2.4 10922
Joomla!  ‎4.3.4
PHP 8.0

cvrak

Ok, I know about this plugin, but how can I use it with VM?

Thanks

hotrod

#3
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
Bronze Member
VirtueMart 4.2.4 10922
Joomla!  ‎4.3.4
PHP 8.0

cvrak


hotrod

Great.. Also..   I Use the JCE Pro Editor on my sites..  they have a built in video plug-in.

https://www.joomlacontenteditor.net/purchase
Bronze Member
VirtueMart 4.2.4 10922
Joomla!  ‎4.3.4
PHP 8.0