installing plug-ins
Post on 18-Nov-2014
1.520 Views
Preview:
DESCRIPTION
TRANSCRIPT
Installing A Plugin
OverviewObjective
Learn how to file structure of a plug-in and how to install a plug-in into the database.
Requirements
Installed version of ProdigyView with a database
Understanding of the DEFINES
Estimated Time
10 minutes
www.prodigyview.com
Follow Along With Code Example
1. 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 be installed in the database first. This tutorial will break down the fields required for installation.
Plugin Unique Name
The plugin_unique_name is the unique identifier for the plugin. Each plug-in is required to have a unique one on creation.
The identifier is used when both installing and updating the plugin.
Plugin Name
The plugin_name is the name given to the plug-in by the developer. It is a cosmetic element for the other developers. If your plug-in is going to be placed in a CMS or a plug-in management system, a name should be give.
Plug-in Language
ProdigyView was originally designed to be multi-language framework. Therefore the plug-ins language has to be specified.
Plugin Enabled
Plug-ins can be turned on/off by enabling and disabling them. When the plugin_enabled is set to 0, it is considered off and will not be loaded. When it is set to 1, the plug-in is considered enabled and will be included at bootstrap.
Frontend/Backend Plugin
These options are examples of ProdigyView separating the front end from the backend. Having the is_frontend_plugin set to true will enabled the plug-in to used in the frontend. If it’s set to false, it will not. Same for the admin_plugin.
Frontend vs Backend is set by the PV_ADMIN define.
Plugin Hook
Occasionally plug-ins have hooks. Hooks are points in the code in which a certain plugin function will be called. This is not necessary and can only be used if there is a hook set.
Plugin Directory
The plug-in directory is the directory inside the location in the PV_PLUGIN define. Our plug-in directory for this example should look like this.
Plugin File
The plug-in file is the entry point for the plugin. If other files are required for the plug-in being loaded, they should be required or included in this file.
Installing The Plug-inOur last step is installing the plug-in. Once installed it will be automatically included every time the bootstrap is used.
API ReferenceFor a better understanding of plug-ins, visit the api by clicking on the link below.
PVPlugins
www.prodigyview.com
More Tutorials
For more tutorials, please visit:
http://www.prodigyview.com/tutorials
top related