Author Topic: Add youtube video in product description  (Read 541 times)

cvrak

  • Jr. Member
  • **
  • Posts: 116
  • A beginner
Add youtube video in product description
« 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

hotrod

  • Jr. Member
  • **
  • Posts: 200
  • VirtueMart Version: VirtueMart 4.2.4 10922
Re: Add youtube video in product description
« Reply #1 on: August 09, 2023, 13:49:08 PM »
All videos.. Joomla Plug in..
Bronze Member
VirtueMart 4.2.4 10922
Joomla!  ‎4.3.4
PHP 8.0

cvrak

  • Jr. Member
  • **
  • Posts: 116
  • A beginner
Re: Add youtube video in product description
« Reply #2 on: August 09, 2023, 15:36:11 PM »
Ok, I know about this plugin, but how can I use it with VM?

Thanks

hotrod

  • Jr. Member
  • **
  • Posts: 200
  • VirtueMart Version: VirtueMart 4.2.4 10922
Re: Add youtube video in product description
« Reply #3 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
Bronze Member
VirtueMart 4.2.4 10922
Joomla!  ‎4.3.4
PHP 8.0

cvrak

  • Jr. Member
  • **
  • Posts: 116
  • A beginner
Re: Add youtube video in product description
« Reply #4 on: August 10, 2023, 08:13:23 AM »
Thanks a lot, it worked!!

hotrod

  • Jr. Member
  • **
  • Posts: 200
  • VirtueMart Version: VirtueMart 4.2.4 10922
Re: Add youtube video in product description
« Reply #5 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
Bronze Member
VirtueMart 4.2.4 10922
Joomla!  ‎4.3.4
PHP 8.0