Extensions manager
This function helps each customer to manually perform the needed functions in the program. It works using one of the most popular web programming languages – php.
Server Installation
First of all, to use plugins (php extentions) in the program copy the server into the needed php folder and properly tune it. All necessary information can be found here: "Server installation"
Extensions creation and launching
First inlay of extensions manager serves to create, activate and launch the extension.
In the upper part of this folder there is a list of available extensions. Using the context menu you can:
- Create a new extension
- Activate an already existing one
- Delete an already existing extension
- or change the name /description of an existing extension
Bottom part is divided into 2 parts: settings of the extensions launching (input properties) and display of the results of the extension functioning.
Extension launching setting – these are the initial properties needed for the work of the specific extension. They are created by the extension developer (the details are described below) and are filled by the user before the extension launching.
Result of the work of the extension – a browser which displays the notifications concerning the work of extension. What will be displayed specifically depends on the extension developer.
The start key starts the extension.
Writing and work with scripts
Every extension should have at least one performing file - index.php. It is created automatically and cannot be deleted. When launching the script the program starts running this file. To add files into the active extension use the context menu if the file list.
With the help of the context menu you can:
- Create new file
- Open an already existing file (the content of the file will be displayed in the editor in the right)
- Rename file
- Delete file
- Save the selected file
- Close the selected file without saving
Below the file list there are 2 keys: Save and Save all. They are needed to save the changes in the files .The first key saves the changes in the active file, the second one – in all.
Attention: since the program runs all the files on the disk when scripting – before every launching you need to save the changes in the files in order to see the desired result.
To write the extensions scripts successfully you need to know:
- PHP
- Zebroid API. You can learn it here: http://zebroid.us/forum/viewtopic.php?f=5&t;=24
- All the input properties are being saved into the variables, the names of which are determined in the properties editor by the developer. For example, if we have a property Option1, we can receive its value/meaning in the script calling an $Option1 variable.
- Commands echo, print etc. Display the result into the browser window on the first inlay. However, the result can be seen only after the script finishes its work.
- The folder "Zebroid\php plugins\classes\" is common for every extension and that is why it is convenient to place classes and feature sets needed by different extensions.
Creation of extension properties
The input properties for the extensions already described above. Benefit from this, each developer defines itself, but the input data needed always, that is why the tab is one of the most important in that window.
The data format is the same as the format of the .ini files, where the name of group = variable name in the extensions script and thus must be unique. The parameters of each group are as follows:
- Caption – property name
- Type - property type
- Value - the initial value of the property
- Options- properties configuration (required only for some properties)
Property types:
- Text – ordinary text field. Value is the initial value of the property, Options is not required. Returns text.
- SpinEdit - numeric property. Value is the initial value of the property, in Options fill information about the maximum and minimum value of the property, as well as the size of the step for the switches. Example: Min = 0; Max = 100; Step = 1. Returns the number.
- ComboBox - drop-down list. Value carries information about the list and the initial active element. For example, here: "Value1; Value2 {!}; Value 3" in the list will be three values, and active by default will be the second value, because there is a key symbol {!}. Returns the number of user-selected value, the count starts from zero.
- CheckBox - property in the form of a check box. Value is the initial value of the property (true-active, false-not active) Options is not required. Returns -1 if the active and 0 if not active.
- FilePath - text field with a button that opens a file selection window. Value is the initial value of the property, in Options fill information about mask of valid files for the file selection window. Example: "Options=*.php;*.txt". Returns the field value as text.
- FolderPath - text field with a button that opens a folder selection window. Value is the initial value of the property, Options is not required. Returns the field value as text.
- Tracker - slider. Value is the initial value of the property, in Options fill with information about maximum and minimum value of the property. Example: "Min = 0; Max = 100". Returns the position of the slider as a number.
- Radio - list of switches. Value carries information about the list and the initial active element. For example, here: "Value1; Value2 {!}; Value 3" in the list will be three values, and active by default will be the second value, because there is a key symbol {!}. Returns the number of user-selected value, the count starts from zero.
In the context menu of property editor stored templates for each of the types of properties.
Additional information
- Icon - in order your plugin has a unique icon, you need to add the png image file 16x16 into plugin folder. The name of the file should be icon_16.png. With icon it is very easy visually to search for the item in the list
- Starting information - for each plugin is able to display in a browser window (only in the case of individual plug-run, not through the extension manager) some information on the specifics of the plugin. This information is displayed in a browser window, it will be loaded from the file start.html, which must be located in the folder of the plugin.