50// Use here a free id (See in Home -> System information -> Dolibarr for list of used modules id).
51 $this->numero = 4560;
52
53// Key text used to identify module (for permissions, menus, etc...)
54 $this->rights_class = 'ai';
55
56// Family can be 'base' (core modules),'crm','financial','hr','projects','products','ecm','technic' (transverse modules),'interface' (link with external tools),'other','...'
57// It is used to group modules by family in module setup page
58 $this->family = "technic";
59
60// Module position in the family on 2 digits ('01', '10', '20', ...)
61 $this->module_position = '50';
62
63// 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)
80// If file is in theme/yourtheme/img directory under name object_pictovalue.png, use this->picto='pictovalue'
81// If file is in module/img directory under name object_pictovalue.png, use this->picto='pictovalue@module'
82// To use a supported fa-xxx css style of font awesome, use this->picto='xxx'
83 $this->picto = 'fa-magic';
84
85// Define some features supported by module (triggers, login, substitutions, menus, css, etc...)
86 $this->module_parts = array(
87// Set this to 1 if module has its own trigger directory (core/triggers)
88'triggers' => 0,
89// Set this to 1 if module has its own login method file (core/login)
90'login' => 0,
91// Set this to 1 if module has its own substitution function file (core/substitutions)
92'substitutions' => 0,
93// Set this to 1 if module has its own menus handler directory (core/menus)
94'menus' => 0,
95// Set this to 1 if module overwrite template dir (core/tpl)
96'tpl' => 0,
97// Set this to 1 if module has its own barcode directory (core/modules/barcode)
98'barcode' => 0,
99// Set this to 1 if module has its own models directory (core/modules/xxx)
100'models' => 0,
101// Set this to 1 if module has its own printing directory (core/modules/printing)
102'printing' => 0,
103// Set this to 1 if module has its own theme directory (theme)
104'theme' => 0,
105// Set this to relative path of css file if module has its own css file
106'css' => array(),
107// Set this to relative path of js file if module must load a js on all pages
108'js' => array(),
109// Set here all hooks context managed by module. To find available hook context, make a "grep -r '>initHooks(' *" on source code. You can also set hook context to 'all'
110'hooks' => array('all'),
111// Set this to 1 if features of module are opened to external users
112'moduleforexternal' => 0,
113 );
114
115// Data directories to create when module is enabled.
125// List of module class names as string that must be enabled if this module is enabled. Example: array('always'=>array('modModuleToEnable1','modModuleToEnable2'), 'FR'=>array('modModuleToEnableFR'...))
126 $this->depends = array();
127 $this->requiredby = array(); // List of module class names as string to disable if this one is disabled. Example: array('modModuleToDisable1', ...)
128 $this->conflictwith = array(); // List of module class names as string this module is in conflict with. Example: array('modModuleToDisable1', ...)
129
130// The language file dedicated to your module
131 $this->langfiles = array("ai");
132
133// Prerequisites
134 $this->phpmin = array(7, 0); // Minimum version of PHP required by module
149 3 => array('AI_EMAILCLEANER_MIN_CONFIDENCE', 'chaine', '0.60', 'Minimum confidence to trust AI cleaned text', 0, 'current'),
150 4 => array('AI_EMAILCLEANER_EXPOSE_OPERATION', 'yesno', '0', 'Expose AI Email Cleaner operation in EmailCollector card', 0, 'current'),
151 5 => array('AI_EMAILCLEANER_ISOLATED_MODE', 'yesno', '1', 'Force isolated cleaner runtime (no business decision / no cross-module side effects)', 0, 'current'),
152 6 => array('AI_CHAT_CONTEXT_AUTO_EXCHANGES', 'integer', '2', 'Number of recent exchanges of the AI chat sent back as context by default', 0, 'current'),
153 );
154
155// Some keys to add into the overwriting translation tables
156/*$this->overwrite_translation = array(
157 'en_US:ParentCompany'=>'Parent company or reseller',
158 'fr_FR:ParentCompany'=>'Maison mère ou revendeur'
169// $this->tabs[] = array('data'=>'objecttype:+tabname1:Title1:mylangfile@ai:$user->hasRight('ai','read'):/ai/mynewtab1.php?id=__ID__'); // To add a new tab identified by code tabname1
170// $this->tabs[] = array('data'=>'objecttype:+tabname2:SUBSTITUTION_Title2:mylangfile@ai:$user->hasRight('othermodule','read'):/ai/mynewtab2.php?id=__ID__', // To add another new tab identified by code tabname2. Label will be result of calling all substitution functions on 'Title2' key.
171// $this->tabs[] = array('data'=>'objecttype:-tabname:NU:conditiontoremove'); // To remove an existing tab identified by code tabname
172//
173// Where objecttype can be
174// 'categories_x' to add a tab in category view (replace 'x' by type of category (0=product, 1=supplier, 2=customer, 3=member)
175// 'contact' to add a tab in contact view
176// 'contract' to add a tab in contract view
177// 'group' to add a tab in group view
178// 'intervention' to add a tab in intervention view
179// 'invoice' to add a tab in customer invoice view
180// 'invoice_supplier' to add a tab in supplier invoice view
181// 'member' to add a tab in foundation member view
182// 'opensurveypoll' to add a tab in opensurvey poll view
183// 'order' to add a tab in customer order view
184// 'order_supplier' to add a tab in supplier order view
185// 'payment' to add a tab in payment view
186// 'payment_supplier' to add a tab in supplier payment view
187// 'product' to add a tab in product view
188// 'propal' to add a tab in propal view
189// 'project' to add a tab in project view
190// 'stock' to add a tab in stock view
191// 'thirdparty' to add a tab in third party view
192// 'user' to add a tab in user view
193
194// Dictionaries
195 $this->dictionaries = array();
196/* Example:
197 $this->dictionaries=array(
198 'langs'=>'ai@ai',
199 // List of tables we want to see into dictionary editor
204 'tabsql'=>array('SELECT f.rowid as rowid, f.code, f.label, f.active FROM '.MAIN_DB_PREFIX.'table1 as f', 'SELECT f.rowid as rowid, f.code, f.label, f.active FROM '.MAIN_DB_PREFIX.'table2 as f', 'SELECT f.rowid as rowid, f.code, f.label, f.active FROM '.MAIN_DB_PREFIX.'table3 as f'),
335 //$this->export_dependencies_array[$r] = array('availabilitiesline'=>array('tl.rowid','tl.ref')); // To force to activate one or several fields if we select some fields that need same (like to select a unique key if we ask a field of a child to avoid the DISTINCT to discard them, or for computed field than need several other fields)
397return -1; // Do not activate module if error 'not allowed' returned when loading module SQL queries (the _load_table run sql with run_sql with the error allowed parameter set to 'default')
print $script_file $mode $langs defaultlang(is_numeric($duration_value) ? " delay=". $duration_value :"").(is_numeric($duration_value2) ? " after cd cd cd description as description
Only used if Module[ID]Desc translation string is not found.