News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

allvideos plugin wont work

Started by kiasati, February 25, 2017, 17:44:40 PM

Previous topic - Next topic

kiasati

Hi

Im using allvideos plugin to show a video about the product in the product detail page.
when i put the allvideos code to show a particular file, in the product description, it works.
but when i put its code into a costume field, it doesn't work.

why the plugin loads when its code is in the product description, but it wont work when its in a costume field?

Studio 42

Customfields have no joomla trigger and allvideo plugin need this to display the videos.
I think it's better to write a specific customfield plugin for this because adding Joomla trigger to customfield can very slowdown your website.
You have other solution as adding a new sublayout only for your videos, and add the HTML tags needed but this need to be done in your template html overrides, so it's safe on Vm update. Of course you need to code some PHP and HTML, but it's really the fastest way to display your code and it this is only for youtube videos, it"s not very complicate.

kiasati

Quote from: Studio 42 on February 26, 2017, 10:16:46 AM
Customfields have no joomla trigger and allvideo plugin need this to display the videos.
I think it's better to write a specific customfield plugin for this because adding Joomla trigger to customfield can very slowdown your website.
You have other solution as adding a new sublayout only for your videos, and add the HTML tags needed but this need to be done in your template html overrides, so it's safe on Vm update. Of course you need to code some PHP and HTML, but it's really the fastest way to display your code and it this is only for youtube videos, it"s not very complicate.

i don't want to use YouTube videos. so i think the best way to solve this is writing a customfield plugin.
but how can i do that? can you plz give me a clue about this or give me some sources.

Studio 42

Quote from: kiasati on February 26, 2017, 14:46:55 PM

i don't want to use YouTube videos. so i think the best way to solve this is writing a custmfield plugin.
but how can i do that? can you plz give me a clue about this or give me some sources.
Check the text input plugin. Folder is JOOMLAROOT/plugins/vmcustom/textinput/
To do a new one the abse way is to rename main PHP and XML, class name and <filename plugin="textinput">textinput.php</filename>
Eg to create a plugin with folder allvideo this are the change needed
Copy
JOOMLAROOT/plugins/vmcustom/textinput/ >  JOOMLAROOT/plugins/vmcustom/allvideo/
rename
JOOMLAROOT/plugins/vmcustom/allvideo/textinput.php >  JOOMLAROOT/plugins/vmcustom/allvideo/allvideo.php
rename
JOOMLAROOT/plugins/vmcustom/allvideo/textinput.xml>  JOOMLAROOT/plugins/vmcustom/allvideo/allvideo.xml
in allvideo.xml
<filename plugin="textinput">textinput.php</filename>
to <filename plugin="allvideo">allvideo.php</filename>
Of course you have to change more but if you have do this, you can use Joomla extention "discover" to display your new plugin and add it to your Joomla site and activate it.
After you can play with it and do your changes.
When your plugin is ready. Zip the allvideo fodler and you have a ready plugin to add to any Joomla sites.