Topic: Help me to start new moduile development

Hi friends, I am a developer using FA.

First thanks for all developers who are involved in FA. The architecture and functionality of the software is very good. I love it.

I wanted to participate with you people by providing my effort. I have a set of module that can work with FA and are not still developed. I am on my first step in developing them. My bad lack there is no any Developer documentation for this as far as I searched. I had to learn the API from other modules developed by other developers. I got the path. I am getting some confusion with some code set. Please anyone try to solve it for me.

In Report Generator module I can see this line
define('SS_REPORT_GENERATOR',    130<<8);

and in Asset Register module I can see it as
define('SS_ASSETREGISTER', 101<<8);

I could understan this is some unique identifier for the module. My question is, are they have any rule to design or just the programmers set code? Specially the number set '130<<8' and '101<<8' what is the logic behind it?

2 (edited by apmuthu 11/21/2012 02:42:45 pm)

Re: Help me to start new moduile development

Binary Shift values -  php operator

The last 8 bits (LSB) are reserved for System / Later use and hence the <<8 in almost if not all permissions.

Re: Help me to start new moduile development

Go it.
and my question is, can any one add any number and identification there? is there are procedure to follow to add it?

Re: Help me to start new moduile development

You are free to use any numbers in range  <100<<8; 155<<8> as section id, and any number from <101; 255> as security area id. You should only keep them unique inside module where they are defined.

In fact both section (tab), and area (mainly menu options) identifiers are rewritten in run time to keep them unique on your FA installation. If you assign the numbers according to above rules you should never encounter problems here.

Janusz

5 (edited by bluebird 11/22/2012 05:24:10 am)

Re: Help me to start new moduile development

itronics wrote:

You are free to use any numbers in range  <100<<8; 155<<8> as section id, and any number from <101; 255> as security area id. You should only keep them unique inside module where they are defined.

In fact both section (tab), and area (mainly menu options) identifiers are rewritten in run time to keep them unique on your FA installation. If you assign the numbers according to above rules you should never encounter problems here.

Janusz

Thank you Janusz, I understood. cool