Installing Plug-ins

14
Installing A Plugin

description

Learn the structure of a plug-in's and how to install them into the database in ProdigyView.

Transcript of Installing Plug-ins

Page 1: Installing Plug-ins

Installing A Plugin

Page 2: Installing Plug-ins

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

Page 3: Installing Plug-ins

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

Page 4: Installing Plug-ins

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.

Page 5: Installing Plug-ins

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.

Page 6: Installing Plug-ins

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.

Page 7: Installing Plug-ins

Plug-in Language

ProdigyView was originally designed to be multi-language framework. Therefore the plug-ins language has to be specified.

Page 8: Installing Plug-ins

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.

Page 9: Installing Plug-ins

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.

Page 10: Installing Plug-ins

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.

Page 11: Installing Plug-ins

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.

Page 12: Installing Plug-ins

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.

Page 13: Installing Plug-ins

Installing The Plug-inOur last step is installing the plug-in. Once installed it will be automatically included every time the bootstrap is used.

Page 14: Installing Plug-ins

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