Is possible to include custom boxes within an external module?
It has to be within /core/boxes within dolibarr or can also be within the module folder?
Thanks
Is possible to include custom boxes within an external module?
It has to be within /core/boxes within dolibarr or can also be within the module folder?
Thanks
How can i make Boxes?
// Example:
//$this->boxes=array(array(0=>array(‘file’=>‘box_mybox.php’,‘note’=>‘My box 0’,‘enabledbydefaulton’=>‘Home’),1=>array(‘file’=>‘myboxb.php’,‘note’=>’’),2=>array(‘file’=>‘myboxc.php’,‘note’=>’’)));
$this->boxes[0][‘file’] = ‘box_mybox.php@mymodule’;
$this->boxes[0][‘note’] = ‘My box 0’;
But it is not working! The Box is not show in Boxes Menü Page!
box_mybox.php is in \mymodule\core\boxes\box_mybox.php!
Put your “box php file” here (I attached this file of my module Purchases, in case it’s useful for you):
/htdocs/mymodule/core/boxes/box_mymodule.php
And into the file modMymodule.class.php, put this:
$this->boxes = array(
0 => array('file'=>'box_mymodule.php@mymodule','note'=>'', 'enabledbydefaulton'=>'Home'),
);
This function for me on Doli 5.X - 6.X
Pièces jointes :
- box_purchases.php.zip (2.16 KB)
By the way, after do that changes you must deactivate and activate again the module on the Settings / Modules section of your Dolibarr website !!!
Further, once did it, then it will appear a SELECT control on the Dashboard offering you to add this BOX to the Dashboard. Sincerely, i have not very well how does it run: it appeared for me only one time, i think. But, maybe you should check it. This SELECT control appears on the right-top corner of the Dashboard at “Homepage”.
Cheers!