First of all, that there was a possibility to use php Extensions in the program, it is necessary to copy in the necessary folder php the server and to adjust it properly. You can find the necessary information in this article: "server Installation "
Creation and start of Extensions
The first tab the manager of Extensions serves for creation, activation and expansion start. In the top part of this вкладки there is a list accessible Extensions. For management of the list use the contextual menu.
The bottom part to share on two half: options of start of expansion (entrance properties) and a conclusion of results of work of expansion.
Options of start of expansion are initial properties which are necessary for work of concrete expansion. They are created by the developer of expansion (as it becomes it is described more low), and filled with the user before expansion start.
the Result of work of expansion is a browser which shows messages on results of work of expansion. What exactly will show this browser completely depends on the developer of expansion.
Button to execute starts expansion.
Writing and work with scripts
Each expansion should have at least one carrying out file — index.php . It is created automatically and cannot be removed. At start of a script the program begins performance of this file. To add others a file in active expansion it is necessary to use the contextual menu in the list of files.
By means of the contextual menu it is possible:
- Create a new file
- Open an existing file (file contents will be displayed in the editor on the right)
- Rename a file
- Remove a file
- Keep the allocated file
- Close the allocated file without preservation
Under the list of files there are 2 buttons: to Keep and to Keep all . They are necessary for preservation of the brought changes in files. The first button keeps changes in the active file, the second — in all.
Attention : in view of that the program starts files on a disk at script performance — before its each start it is necessary to keep all changes in files to see demanded result.
Successfully to write scripts of Extensions it is necessary to know:
- PHP
- API Extensions in Zebroid
- All entrance properties remain in the variables which names are defined in the editor of properties by the developer. For example if we have a property Option1 then in a script its value can be received through a variable call $Option1
- Commands echo , print etc. deduce result in a browser window on the first вкладке, but it is visible only after the termination of work of a script
- Folder "Zebroid\php plugins\classes \" serves the general for any expansion and consequently in it conveniently to place classes or sets of functions necessary for different Extensions
Creation of properties of expansion
What is the entrance properties for expansion already was described above. Each developer defines advantage of it itself, but necessity for the entrance data is necessary for all and always therefore given tab is one of the major in this window.
Format of the data same as well as a format ini files where the group name of equally name of a variable in a script of expansion and accordingly should be unique. Parametres of each group are that:
- Caption — the name of mission of property
- Type — property type (the description of types more low)
- Value — initial value of property
- Options — property options (are necessary only for some properties)
Types of properties:
- Text — a usual text field. Value ыступает as initial value of property, in Options does not need. Returns the text.
- SpinEdit — numerical property. Value acts as initial value of property, in Options the information and maximum is filled and is minimum value of property, and as about the size of a step for switches. An example: Min=0; Max=100; Step=1 . Returns number.
- ComboBox — the dropping out list. Value bears in itself the information on the list and an initial active element. For example, at such design: «Value 1; Значение2 {!}; Value 3» in the list will be 3 values, and the second value as near to it there is a key designation in a kind {by default will be active!} . Returns number of the value chosen by the user, readout begins with zero.
- CheckBox — property in the form of a tag. Value acts as initial value of property (true — actively, false — it is not active), in Options does not need. Returns-1 if actively and 0 if it is not active.
- FilePath — the text field with the button which opens a window of a choice of a file. Value acts as initial value of property, in Options the information on a mask of admissible files for a window of a choice of files is filled. An example: «Options =*.php; *.txt». Returns value of a field in the form of the text.
- FolderPath — the text field with the button which opens a window of a choice of a folder. Value acts as initial value of property, in Options does not need. Returns value of a field in the form of the text.
- Tracker — a toddler. Value acts as initial value of property, in Options the information and maximum is filled and is minimum value of property. An example: «Min=0; Max=100». Returns a position of a toddler in the form of number.
- Radio — the list of switches. Value bears in itself the information on the list and an initial active element. For example, at such design: «Value 1; Значение2 {!}; Value 3» in the list will be 3 values, and the second value as near to it there is a key designation in a kind {by default will be active!} . Returns number of the value chosen by the user, readout begins with zero.
In the contextual menu of the editor of properties templates for each of types of properties are kept.
Additional information
- the Icon — that at your plug-in was a unique icon, it is necessary to add in a plug-in folder png a file with drawing 16х16. The name of such file should be icon_16.png . The icon very strongly facilitates visual search of the necessary point in the list
- the Starting information — for each plug-in is possibility to display in a browser window (only in case of individual start of a plug-in, not through the manager of Extensions) the information on features of work with a plug-in. This information will be displayed in a browser window, and it from a file start.html which should will be loaded is in a folder of the plug-in.