A Visforms Custom Plugin Template for plugin development with Visforms Events
After installing Visforms, a complete Visforms Custom Plugin Template is available.
The Visforms Custom Plugin Template is useful for several reasons:
- It implements empty event handlers for all supported Visforms events.
- In each event handler, comments provide additional important information on the use of the respective event.
- Towards the end of the Visforms Custom Plugin Template there are some ready-to-use sample functions.
- At the very end of the Visforms Custom Plugin Template are some useful help functions.
Caution: The Visforms Custom Plugin Template is constantly evolving. Any type of installation will overwrite the Visforms custom plugin. If you have made changes to the Visforms custom plugin, all changes will be lost without prior confirmation.
Note:
Work with a copy of the Visforms Custom Plugin Template in all situations where you don't want to lose your changes.
How to make a copy of the Visforms Custom Plugin Template is explained here:
Create a copy of the Visforms Custom Plugin Template
Where is the Visforms Custom Plugin Template located?
The Visforms Custom Plugin Template is located in the following directory:
- plugins/visforms/vfcustomplugin
The directory contains the following files:
- plugins/visforms/vfcustomplugin/
- plugins/visforms/vfcustomplugin/vfcustomplugin.php
- plugins/visforms/vfcustomplugin/vfcustomplugin.xml
- plugins/visforms/vfcustomplugin/index.html
How to install Visforms Custom Plugin Template?
The plugin is installed manually via the Joomla function Verify:
- Go to Administration » System » Install » Verify
- click on the ‘Check’ button there.
- install found Visforms Custom plugin
Visforms Custom Plugin Template needs to be activated
The plugin must be activated manually before you can use it:
- Go to: Administration » System » Manage » Plugins.
- Search for plugins there with the text ‘customplugin’.
- In the search result ‘Visforms - Customplugin example’ click on the green tick ‘Activate plugin’.
Make a copy of the Visforms Custom Plugin Template
Work with a copy of the Visforms Custom Plugin Template in all situations where you don’t want to lose your changes.
Create a copy of the Visforms Custom Plugin Template as follows:
- Copy the whole directory to a new sibling directory, something like
plugins/visforms/vftestplugin/ - Rename both plugin files something like
plugins/visforms/vftestplugin/vftestplugin.php
plugins/visforms/vftestplugin/vftestplugin.xml
Customize the plugin manifest file
The copied plugin manifest file plugins/visforms/vftestplugin/vftestplugin.xml must be adjusted in the following places.
<extension version="4.0.0" type="plugin" group="visforms" method="upgrade">
<name>plg_visforms_vftestplugin</name>
<loggerName>Visformsvftestplugin</loggerName>
<description>My vftest-plugin of the Visforms component</description>
<files>
<filename plugin="vftestplugin">vftestplugin.php</filename>
</files>
</ extension>
In the plugin code file, adjust the class name
The copied plugin code file plugins/visforms/vftestplugin/vftestplugin.php needs to be adjusted at the following point.
The location is at the beginning of the code file, around line 36.
class plgVisformsVftestplugin extends CMSPlugin {