Topic: 2.3 - Extensions. How ?
Old system plugin removed ? How to write new extension ?
It's much more fun, when you can discuss your problems with others...
You are not logged in. Please login or register.
FrontAccounting forum → Modules Add-on's → 2.3 - Extensions. How ?
Old system plugin removed ? How to write new extension ?
Extension manual for FA 2.3 is not written yet. In mean time you should look into includes/hook.inc file to find how the extension is integrated with core sources.
In short words:
. create unique folder under /modules and place here all the extension scripts,
. create /modules/xxxx/hooks.php connector file containing extension hook class definition which extends hooks class found in hooks.inc;
. write all hooks_xxx class methods you need to be used in core FA code (especially install_options);
. install and activate extension under Setup - Install/Activate Extensions.
Janusz
Thanks. I will try.
i make new file
PHP Fatal error: Cannot redeclare install_hooks() in D:\webserver\htdocs\web\2.3-original-aimaks\modules\APworks\hooks.php on line 187
PHP Fatal error: Cannot redeclare class hooks in D:\webserver\htdocs\web\2.3-original-aimaks\modules\APworks\hooks.php on line 21
but some wrong because hook.inc exist class and funcion like this. Do you have a little examlpe , new extension.
You should create your own hook class named hooks_APworks which extends hooks class. Also please look inot comments in hook class definition in hooks.inc - here you will find which methods are appropriate for your extension and how to implement them.
Do not include 'includes/hooks.inc- it is always included in session.inc file.
Janusz
One more question?
Add new TAB it work now?
Yes it does. You have to implement install_tab() method in your hooks class. The example_class mentioned in hooks.inc comments should be defined as is e.g. customers_app class in application/customers.php.
Janusz
How about access level where put acc_file?
I mena custom access level for extension.
How add new extension in 2.3 i got it and work for me. Now a can add custome TAB's, menu it cool.
Yes, you can now provide access levels via extension hook class method intall_access(). I was missing in previous hooks.inc file, so please upload te newest version form CVS or wait for 2.2.2 to be released.
Sorry for the delay with the info.
Janusz
Yes it work I am add like this in hook.php in module directory
function install_access()
{
$security_sections[SS_APWORKS] = _(
In the old extension system you can replace a report by creating the reporting folder and the report number, like "report/rep107.php"
In 2.3, is there any way to do it ?
Answer to my question:
Yes, you have to create the report an place it into modules/xxx/reporting
The function find_custom_file in main.inc search in this order:
1) report in the company folder
2) report in one extension (the first found is the first used)
3) standar file
hi
i try to add payroll extension
i take clone files and put it at modules folder with name "payroll"
then , i go to installed extension and add this code
//======
6 =>
array (
'name' => 'payroll',
'package' => 'payroll',
'version' => '2.3.0-5',
'type' => 'extension',
'active' => true,
'path' => 'modules/payroll',
),
//======
first is this right step
second error appear
Fatal error: Class 'references' not found in C:\xampp\htdocs\ac\includes\session.inc on line 428
thanks
There is no official payroll extension in FA as yet. Where did you get the clone? If it is made for an older version of FA, you will have to adjust it for FA 2.3.x
FrontAccounting forum → Modules Add-on's → 2.3 - Extensions. How ?
Powered by PunBB, supported by Informer Technologies, Inc.
Currently installed 4 official extensions. Copyright © 2003–2009 PunBB.