Topic: Hello World Extension for FA

Attached in a later post is the Hello World Extension with manual install instructions in the README.md file.

It is also in my FA24Extensions Repo.

Re: Hello World Extension for FA

From your installation Readme.Md  you need to change the version no like this.

 'version' => '2.4.2', 

Which will help to activate the extension. Else it will show a warning the version incapability in it.

Subscription service based on FA
HRM CRM POS batch Themes

Re: Hello World Extension for FA

As this is a manual install and is not available from the official repo, the version number has been omitted to run without error if the fix in this post is made. This will also serve to illustrate the use and disuse of the version parameter.

Re: Hello World Extension for FA

The Hello World module is now extended to be in it's very own tab.
Screenshots too are in the attachment herein.

Must now implement ways to disable and re-enable tabs from within the user interface much like the Use Manufacturing and Use Fixed Assets settings in the Company Setup page.

The tabs are stored in $_SESSION['App']->applications array of objects where the keys will now be:

'orders'
'AP'
'stock'
'manuf'
'assets'
'proj'
'GL'
'hello' <<== newly inserted
'system'

What is the standard method of re-ordering the tabs? Some tabs will be missing in the above list if not enabled.

Why not code the Company Setup with the means to enable/disable all standard and registered tabs other than Setup?

Post's attachments

hello_world_tabbed.zip 18.6 kb, 21 downloads since 2017-10-19 

You don't have the permssions to download the attachments of this post.

Re: Hello World Extension for FA

wow, really nice. now making new module is easier and we don't need to rewrite same thing again with this template.

Re: Hello World Extension for FA

The $_SESSION['App']->applications array of objects is dumped and attached herein for further coding and ordering the tabs.

Post's attachments

FA_Applications_var_dump.txt 76.9 kb, 9 downloads since 2017-10-20 

You don't have the permssions to download the attachments of this post.

Re: Hello World Extension for FA

Placed the Hello World tab in the 4th position (configurable in the code). Requested for tab positioning method in the application class itself in this post.

Post's attachments

hello_world_specific_tab.zip 3.9 kb, 10 downloads since 2017-10-21 

You don't have the permssions to download the attachments of this post.

8 (edited by barbarian 11/11/2017 12:36:21 pm)

Re: Hello World Extension for FA

Does the latest release have any change in the module installation? The hello world module have this error:

Call to undefined method helloworld_app::application() in /var/www/html/fa243/modules/hello_world/helloworld.php on line 14

#Edit:

It should be changed into : parent::__construct("hello",_($this->help_context = "Hello world"));

Re: Hello World Extension for FA

@barbarian: Thanks.
Committed.

The following files too will need to be checked in the extensions:

./auth_ldap/hooks.php:1
./auth_ldap/lib/Ldap.php:1
./auth_ldap/lib/ldap_authenticator.php:1
./hello_world/helloworld.php:1
./hello_world/hooks.php:1
./import_items/hooks.php:1
./import_multijournalentries/hooks.php:1
./import_paypal/hooks.php:1
./import_transactions/hooks.php:1
./import_transactions/includes/import_sales_cart_class.inc:2
./osc_orders/hooks.php:1
./repgen/hooks.php:1
./repgen/includes/repgen.inc:2
./rep_tax_cash_basis/hooks.php:1
./requisitions/hooks.php:1
./sgw_sales/generate_recurring_invoices.php:1
./sgw_sales/hooks.php:1
./sgw_sales/includes/common/DataMapper.php:1
./sgw_sales/includes/controller/GenerateRecurring.php:1
./sgw_sales/includes/db/GenerateRecurringModel.php:1
./sgw_sales/includes/db/SalesRecurringModel.php:1
./sgw_sales/vendor/composer/autoload_real.php:1
./sgw_sales/vendor/composer/autoload_static.php:1
./sgw_sales/vendor/composer/ClassLoader.php:1
./zen_import/hooks.php:1

and these theme files as well:

./exclusive/xpMenu.class.php:1
./exclusive_db/xpMenu.class.php:1

The class renderer in each theme do not have any constructor presently.

Re: Hello World Extension for FA

All themes and extensions have been updated with the __construct() syntax.

$module_name property of the hooks extended class in each extension has been made the extension folder name uniformly and used in the menu path formation.

Re: Hello World Extension for FA

hey, help me for this i install this extension but i got an error after installation

Methods with the same name as their class will not be constructors in a future version of PHP; helloworld_app has a deprecated constructor in file: public_html/accounting/modules/hello_world/helloworld.php at line 9

Unhandled exception [0]: Call to undefined method helloworld_app::application(). in file: public_html/accounting/modules/hello_world/helloworld.php at line 14


kindly let me know about this error....

Re: Hello World Extension for FA

It appears that you are using an old version of the hello_world extension.

Post's attachments

hello_world.zip 3.9 kb, 10 downloads since 2018-11-25 

You don't have the permssions to download the attachments of this post.

Re: Hello World Extension for FA

getting an error of this

Undefined variable: path_to_root in file: /modules/hello_world/helloworld.php at line 21

Re: Hello World Extension for FA

Try to insert the following php code as the first code in the helloworld.php file after the php opening tag:

$path_to_root="../..";

This may be a problem with your specific version of PHP and/or platform for scope and visibility.

What versions of PHP/MySQL/Apache (or other WebServer) and platform (Linux/Windows) are you using?

PHP 5.3.1 on Windows XP SP3 running XAMPP 1.7.3 has it's output on localhost attached and working.

Post's attachments

Hello_World_Working.png 90.2 kb, file has never been downloaded. 

You don't have the permssions to download the attachments of this post.

Re: Hello World Extension for FA

hey, i am using php v7.2 and after the addition of $path_to_root its giving me white / blank page nothing is showing

and these error are displaying after setting "1" debug mode

ini_set(): A session is active. You cannot change the session module's ini settings at this time in file: /public_html/custom/includes/session.inc at line 432

include_once(../../includes/ui/main.inc): failed to open stream: No such file or directory in file: /public_html/custom/modules/hello_world/hello_world.php at line 7

include_once(): Failed opening '../../includes/ui/main.inc' for inclusion (include_path='.:/opt/alt/php72/usr/share/pear') in file: /public_html/custom/modules/hello_world/hello_world.php at line 7

so what can i do?

Re: Hello World Extension for FA

Now this is a question of your "session / php.ini / file permission" settings on your linux server that prevents overriding ini parameter values inside the php code.

Re: Hello World Extension for FA

yes, how can setup this thing or need to contact host provider?

Re: Hello World Extension for FA

Contact host provider to allow php.ini overrides in scripts.