Topic: 2.3 - Extensions. How ?

Old system plugin removed ? How to write new extension ?

Re: 2.3 - Extensions. How ?

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

Re: 2.3 - Extensions. How ?

Thanks. I will try.

Re: 2.3 - Extensions. How ?

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.

Re: 2.3 - Extensions. How ?

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

Re: 2.3 - Extensions. How ?

One more question?

Add new TAB it work now?

Re: 2.3 - Extensions. How ?

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

8 (edited by straga 01/08/2011 08:29:55 pm)

Re: 2.3 - Extensions. How ?

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.

Re: 2.3 - Extensions. How ?

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

Re: 2.3 - Extensions. How ?

Yes it work I am add like this in hook.php in module directory

function install_access()
    {
       
                $security_sections[SS_APWORKS] =    _(

Re: 2.3 - Extensions. How ?

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 ?

Re: 2.3 - Extensions. How ?

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

Re: 2.3 - Extensions. How ?

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

14 (edited by apmuthu 03/03/2015 01:56:57 pm)

Re: 2.3 - Extensions. How ?

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