OverviewObjectiveLearn how to file structure of a plug-in and how to install aplug-in into the database.Requirements Installed version of ProdigyView with a database Understanding of the DEFINESEstimated Time10 minutes www.prodigyview.com
Follow Along With Code Example1. Download a copy of the example code at www.prodigyview.com/source.2. Install the system in an environment you feel comfortable testing in.3. Proceed to apps/front/HelloWorld/HelloWorld.php www.prodigyview.com
Plug-insPlug-ins are database driven and require the database that they beinstalled in the database first. This tutorial will break down the fieldsrequired for installation.
Plugin Unique NameThe plugin_unique_name is the unique identifier for theplugin. Each plug-in is required to have a unique one oncreation.The identifier is used when both installing and updatingthe plugin.
Plugin NameThe plugin_name is the name given to the plug-in by thedeveloper. It is a cosmetic element for the otherdevelopers. If your plug-in is going to be placed in a CMSor a plug-in management system, a name should be give.
Plug-in LanguageProdigyView was originally designed to be multi-languageframework. Therefore the plug-ins language has to bespecified.
Plugin EnabledPlug-ins can be turned on/off by enabling and disabling them.When the plugin_enabled is set to 0, it is considered off andwill not be loaded. When it is set to 1, the plug-in is consideredenabled and will be included at bootstrap.
Frontend/Backend PluginThese options are examples of ProdigyView separating thefront end from the backend. Having the is_frontend_plugin setto true will enabled the plug-in to used in the frontend. If it’s setto false, it will not. Same for the admin_plugin.Frontend vs Backend is set by the PV_ADMIN define.
Plugin HookOccasionally plug-ins have hooks. Hooks are points in thecode in which a certain plugin function will be called. This isnot necessary and can only be used if there is a hook set.
Plugin DirectoryThe plug-in directory is the directory inside the location inthe PV_PLUGIN define. Our plug-in directory for thisexample should look like this.
Plugin FileThe plug-in file is the entry point for the plugin. If otherfiles are required for the plug-in being loaded, they shouldbe required or included in this file.
Installing The Plug-inOur last step is installing the plug-in. Once installed it willbe automatically included every time the bootstrap isused.
API ReferenceFor a better understanding of plug-ins, visit the api byclicking on the link below.PVPlugins More TutorialsFor more tutorials, please visit:http://www.prodigyview.com/tutorials www.prodigyview.com