Topic: Release 2.3 - Creating Extensions and Modules. How to?
Instructions from Janusz
--------------------------------
If you want use the module only locally, there is no need for _init directory at all. If extension is of type theme, chart, language, or it contains only additional reports there is even no need for hooks.php file. For any more complex extension module you have to create hooks.php file containing class definition 'hooks_name_of_the_package' derived from hooks class found in includes/hooks.php. Methods of this class (if defined) are used for module integration with various FrontAccounting parts. Most important hooks are:
* install_tabs() - adds new tabs in FA menu;
* install_options() - adds option to various FA menus;
* install_access() - allow additional permission levels to be defined for module's pages;
* install_extension() - called on extension installation;
* activate_extension() - called when extension is activated for selected company.
All the available hook methods are described in includes/hooks.inc file, and the hook files bundled with extensions in FA central repo can be used as examples.
If you create extension which you want to be placed in central FrontAccounting repository, you should create only single additional _init/config file containing following information used during install/preview:
Package: single_word_package_name
Version: 2.3.4
Name: One line description of the package
Description: Longer description of the package content. Can be
continued on following lines providing the first char in line is space.
Author: name and <email of the author>
Maintenance: name and email of current maintainer (or the author)
Homepage: address of related www page
Type: extension or chart or language or theme
InstallPath: modules/folder_name
That's all. Before the package is placed in repository we make some rough code audit and create all the other needed auxiliary files, so you can don't care about them.
Janusz