-->
Welcome, Guest
Username: Password: Remember me

TOPIC: What Controls Module Page

What Controls Module Page 1 week 4 days ago #38423

  • da2310
  • da2310's Avatar
  • OFFLINE
  • Newcomer
  • Posts: 7
  • Thank you received: 1
  • Karma: 0
Hi,

What file created by the Module and Application Builder changes what appears on the first page of the module? I've read through many of the free modules and existing ones and it is not obvious to someone new to this software. The docs refer to:

Create a new PHP screen
You must then create your PHP pages that will show/edit data from tables using the skeleton templates provided as an example in the directory modulebuilder/myobject_page.php (For the development of a script from the command line, see Script development).

No such file exists under the modulebuilder directory in version 10.0.1?
The administrator has disabled public write access.

What Controls Module Page 1 week 3 days ago #38424

  • da2310
  • da2310's Avatar
  • OFFLINE
  • Newcomer
  • Posts: 7
  • Thank you received: 1
  • Karma: 0
I created a test module called MyTestMod2. As a test I copied the free awstats module over the index page into the directory created by the Module Builder (custom/mytestmod2) and it does not show an error message about awstats not being setup as it does when you go to the awstats module from the menu. The test module is showing the home page boxes instead. So, where does Dolibarr specify what file to use if it is not using either the index.php file or the mytestmod2index.php file?

Obviously it is setting that somewhere.

I used the same code in the same place (after the main.inc.php includes) except I changed the text manually in case it was having trouble loading the lang file for a different module.

if (empty($conf->global->AWSTATS_DATA_DIR))
{
llxHeader();
print '<div class="error"> This is a test error!</div>';
print 'TEST THIS!';
llxFooter();
exit;
}

What am I missing??
The administrator has disabled public write access.

What Controls Module Page 1 week 3 days ago #38426

  • da2310
  • da2310's Avatar
  • OFFLINE
  • Newcomer
  • Posts: 7
  • Thank you received: 1
  • Karma: 0
As an experiment I copied the entire awstats dir to mytestmod3, fixed the errors with the class name and references to awstats and it works as expected. Clearly I'm missing something with the module builder or it has a flaw in the setup. I guess I'll just manually create modules like this unless someone can tell me why the module builder isn't working as expected.
The administrator has disabled public write access.
Time to create page: 0.065 seconds