Debug v13
This commit is contained in:
parent
28642238de
commit
5fc3a9ce7d
@ -105,7 +105,7 @@ TryToUseTheModuleBuilder=If you have knowledge of SQL and PHP, you may use the n
|
||||
SeeTopRightMenu=See <span class="fa fa-bug"></span> on the top right menu
|
||||
AddLanguageFile=Add language file
|
||||
YouCanUseTranslationKey=You can use here a key that is the translation key found into language file (see tab "Languages")
|
||||
DropTableIfEmpty=(Delete table if empty)
|
||||
DropTableIfEmpty=(Destroy table if empty)
|
||||
TableDoesNotExists=The table %s does not exists
|
||||
TableDropped=Table %s deleted
|
||||
InitStructureFromExistingTable=Build the structure array string of an existing table
|
||||
|
||||
@ -2385,7 +2385,7 @@ if ($module == 'initmodule')
|
||||
print ' ';
|
||||
if (empty($conf->global->$const_name)) // If module is not activated
|
||||
{
|
||||
print '<a href="#" target="apiexplorer" title="'.$langs->trans("ModuleMustBeEnabled", $module).'"><strike>'.$langs->trans("GoToApiExplorer").'</strike></a>';
|
||||
print '<a href="#" class="classfortooltip" target="apiexplorer" title="'.$langs->trans("ModuleMustBeEnabled", $module).'"><strike>'.$langs->trans("GoToApiExplorer").'</strike></a>';
|
||||
} else {
|
||||
print '<a href="'.DOL_URL_ROOT.'/api/index.php/explorer/" target="apiexplorer">'.$langs->trans("GoToApiExplorer").'</a>';
|
||||
}
|
||||
@ -3412,7 +3412,7 @@ if ($module == 'initmodule')
|
||||
|
||||
if ($action != 'editfile' || empty($file))
|
||||
{
|
||||
print '<span class="opacitymedium">'.$langs->trans("CronJobDefDesc", '<a href="'.DOL_URL_ROOT.'/cron/list.php">'.$langs->transnoentities('CronList').'</a>').'</span><br>';
|
||||
print '<span class="opacitymedium">'.str_replace('{s1}', '<a href="'.DOL_URL_ROOT.'/cron/list.php">'.$langs->transnoentities('CronList').'</a>', $langs->trans("CronJobDefDesc", '{s1}')).'</span><br>';
|
||||
print '<br>';
|
||||
|
||||
print '<span class="fa fa-file-o"></span> '.$langs->trans("DescriptorFile").' : <strong>'.$pathtofile.'</strong>';
|
||||
|
||||
@ -46,23 +46,31 @@ class modMyModule extends DolibarrModules
|
||||
// Id for module (must be unique).
|
||||
// Use here a free id (See in Home -> System information -> Dolibarr for list of used modules id).
|
||||
$this->numero = 500000; // TODO Go on page https://wiki.dolibarr.org/index.php/List_of_modules_id to reserve an id number for your module
|
||||
|
||||
// Key text used to identify module (for permissions, menus, etc...)
|
||||
$this->rights_class = 'mymodule';
|
||||
|
||||
// Family can be 'base' (core modules),'crm','financial','hr','projects','products','ecm','technic' (transverse modules),'interface' (link with external tools),'other','...'
|
||||
// It is used to group modules by family in module setup page
|
||||
$this->family = "other";
|
||||
|
||||
// Module position in the family on 2 digits ('01', '10', '20', ...)
|
||||
$this->module_position = '90';
|
||||
|
||||
// Gives the possibility for the module, to provide his own family info and position of this family (Overwrite $this->family and $this->module_position. Avoid this)
|
||||
//$this->familyinfo = array('myownfamily' => array('position' => '01', 'label' => $langs->trans("MyOwnFamily")));
|
||||
// Module label (no space allowed), used if translation string 'ModuleMyModuleName' not found (MyModule is name of module).
|
||||
$this->name = preg_replace('/^mod/i', '', get_class($this));
|
||||
|
||||
// Module description, used if translation string 'ModuleMyModuleDesc' not found (MyModule is name of module).
|
||||
$this->description = "MyModuleDescription";
|
||||
// Used only if file README.md and README-LL.md not found.
|
||||
$this->descriptionlong = "MyModule description (Long)";
|
||||
|
||||
// Author
|
||||
$this->editor_name = 'Editor name';
|
||||
$this->editor_url = 'https://www.example.com';
|
||||
|
||||
// Possible values for version are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'
|
||||
$this->version = '1.0';
|
||||
// Url to the file with your last numberversion of this module
|
||||
@ -70,10 +78,13 @@ class modMyModule extends DolibarrModules
|
||||
|
||||
// Key used in llx_const table to save module status enabled/disabled (where MYMODULE is value of property name of module in uppercase)
|
||||
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
|
||||
|
||||
// Name of image file used for this module.
|
||||
// If file is in theme/yourtheme/img directory under name object_pictovalue.png, use this->picto='pictovalue'
|
||||
// If file is in module/img directory under name object_pictovalue.png, use this->picto='pictovalue@module'
|
||||
// To use a supported fa-xxx css style of font awesome, use this->picto='xxx'
|
||||
$this->picto = 'generic';
|
||||
|
||||
// Define some features supported by module (triggers, login, substitutions, menus, css, etc...)
|
||||
$this->module_parts = array(
|
||||
// Set this to 1 if module has its own trigger directory (core/triggers)
|
||||
@ -113,11 +124,14 @@ class modMyModule extends DolibarrModules
|
||||
// Set this to 1 if features of module are opened to external users
|
||||
'moduleforexternal' => 0,
|
||||
);
|
||||
|
||||
// Data directories to create when module is enabled.
|
||||
// Example: this->dirs = array("/mymodule/temp","/mymodule/subdir");
|
||||
$this->dirs = array("/mymodule/temp");
|
||||
|
||||
// Config pages. Put here list of php page, stored into mymodule/admin directory, to use to setup module.
|
||||
$this->config_page_url = array("setup.php@mymodule");
|
||||
|
||||
// Dependencies
|
||||
// A condition to hide module
|
||||
$this->hidden = false;
|
||||
@ -125,9 +139,15 @@ class modMyModule extends DolibarrModules
|
||||
$this->depends = array();
|
||||
$this->requiredby = array(); // List of module class names as string to disable if this one is disabled. Example: array('modModuleToDisable1', ...)
|
||||
$this->conflictwith = array(); // List of module class names as string this module is in conflict with. Example: array('modModuleToDisable1', ...)
|
||||
|
||||
// The language file dedicated to your module
|
||||
$this->langfiles = array("mymodule@mymodule");
|
||||
|
||||
// Prerequisites
|
||||
$this->phpmin = array(5, 5); // Minimum version of PHP required by module
|
||||
$this->need_dolibarr_version = array(11, -3); // Minimum version of Dolibarr required by module
|
||||
|
||||
// Messages at activation
|
||||
$this->warnings_activation = array(); // Warning to show when we activate module. array('always'='text') or array('FR'='textfr','ES'='textes'...)
|
||||
$this->warnings_activation_ext = array(); // Warning to show when we activate an external module. array('always'='text') or array('FR'='textfr','ES'='textes'...)
|
||||
//$this->automatic_activation = array('FR'=>'MyModuleWasAutomaticallyActivatedBecauseOfYourCountryChoice');
|
||||
|
||||
Loading…
Reference in New Issue
Block a user