Back to basics - adding module

Hi, 

I am having trouble adding the energy audit module. I have followed the steps on GitHub and I cannot seem to figure how to add the menu item. I am not a professional programmer however have some understanding of it. Could someone indicate where to add the menu item (tried the system.php but not working..) and possibly do a quick " for dummies guide to install a module" so I can see what I'm doing wrong?

thank you in advance!

EnergyRnR's picture

Re: Back to basics - adding module

For me, I think it was as simple as making sure the module directory was under the emoncms directory structure. Can you confirm that the ownership and file permissions are the same as other modules you've set up? Eamonn

pb66's picture

Re: Back to basics - adding module

 

The module should work just by putting it in the Modules folder of emoncms, however it looks like the menu creation code was moved out of settings.php after the energyaudit module was written, therefore if you create the file  ..../Modules/energyaudit/energyaudit_menu.php containing the code

<?php

   $menu_left[] = array('name'=>"My Energy", 'path'=>"energyaudit/electric" , 'session'=>"write");

?>

This should be automatically found and used instead

Paul

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.