46// Use here a free id (See in Home -> System information -> Dolibarr for list of used modules id).
47 $this->numero = 11000; // TODO Go on page https://wiki.dolibarr.org/index.php/List_of_modules_id to reserve an id number for your module
48
49// Key text used to identify module (for permissions, menus, etc...)
50 $this->rights_class = 'webportal';
51
52// Family can be 'base' (core modules),'crm','financial','hr','projects','products','ecm','technic' (transverse modules),'interface' (link with external tools),'other','...'
53// It is used to group modules by family in module setup page
54 $this->family = "portal";
55
56// Module position in the family on 2 digits ('01', '10', '20', ...)
57 $this->module_position = '47';
58
59// 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)
73// Possible values for version are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated', 'experimental_deprecated' or a version string like 'x.y.z'
113// 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'
114'hooks' => array(
115// 'data' => array(
116// 'hookcontext1',
117// 'hookcontext2',
118// ),
119// 'entity' => '0',
120 ),
121// Set this to 1 if features of module are opened to external users
122'moduleforexternal' => 0,
123 );
124
125// Data directories to create when module is enabled.
135// List of module class names that must be enabled if this module is enabled. Example: array('always'=>array('modModuleToEnable1','modModuleToEnable2'), 'FR'=>array('modModuleToEnableFR')...)
136 $this->depends = array();
137// List of module class names to disable if this one is disabled. Example: array('modModuleToDisable1', ...)
138 $this->requiredby = array();
139// List of module class names this module is in conflict with. Example: array('modModuleToDisable1', ...)
140 $this->conflictwith = array();
141
142// The language file dedicated to your module
143 $this->langfiles = array("website");
144
145// Prerequisites
146 $this->phpmin = array(7, 0); // Minimum version of PHP required by module
147//$this->need_dolibarr_version = array(11, -3); // Minimum version of Dolibarr required by module
177// $this->tabs[] = array('data'=>'objecttype:+tabname1:Title1:mylangfile@webportal:$user->rights->webportal->read:/webportal/mynewtab1.php?id=__ID__'); // To add a new tab identified by code tabname1
178// $this->tabs[] = array('data'=>'objecttype:+tabname2:SUBSTITUTION_Title2:mylangfile@webportal:$user->rights->othermodule->read:/webportal/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.
179// $this->tabs[] = array('data'=>'objecttype:-tabname:NU:conditiontoremove'); // To remove an existing tab identified by code tabname
180//
181// Where objecttype can be
182// 'categories_x' to add a tab in category view (replace 'x' by type of category (0=product, 1=supplier, 2=customer, 3=member)
183// 'contact' to add a tab in contact view
184// 'contract' to add a tab in contract view
185// 'group' to add a tab in group view
186// 'intervention' to add a tab in intervention view
187// 'invoice' to add a tab in customer invoice view
188// 'invoice_supplier' to add a tab in supplier invoice view
189// 'member' to add a tab in foundation member view
190// 'opensurveypoll' to add a tab in opensurvey poll view
191// 'order' to add a tab in sale order view
192// 'order_supplier' to add a tab in supplier order view
193// 'payment' to add a tab in payment view
194// 'payment_supplier' to add a tab in supplier payment view
195// 'product' to add a tab in product view
196// 'propal' to add a tab in propal view
197// 'project' to add a tab in project view
198// 'stock' to add a tab in stock view
199// 'thirdparty' to add a tab in third party view
200// 'user' to add a tab in user view
201
202// Dictionaries
203 $this->dictionaries = array();
204/* Example:
205 $this->dictionaries=array(
206 'langs'=>'website',
207 // List of tables we want to see into dictionary editor
212 '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'),
268 $this->rights[$r][0] = $this->numero . sprintf("%02d", $r + 1); // Permission id (must not be already used)
269 $this->rights[$r][1] = 'Administer users of the customer/partner webportal module'; // Permission label
270 $this->rights[$r][3] = 0;
271 $this->rights[$r][4] = 'write';
272//$r++;
273//$this->rights[$r][0] = $this->numero . sprintf("%02d", $r + 1); // Permission id (must not be already used)
274//$this->rights[$r][1] = 'Delete objects of WebPortal'; // Permission label
275//$this->rights[$r][3] = 0;
276//$this->rights[$r][4] = 'delete';
277//$r++;
278
279// Main menu entries to add
280 $this->menu = array();
281 $r = 0;
282// Add here entries to declare new menus
283/*
284 $this->menu[$r++] = array(
285 'fk_menu' => '', // '' if this is a top menu. For left menu, use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode
292 'langs' => 'website', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
293 'position' => 1000 + $r,
294 'enabled' => 'isModEnabled("webportal")', // Define condition to show or hide menu entry. Use 'isModEnabled("webportal")' if entry must be visible if module is enabled.
295 'perms' => '1', // Use 'perms'=>'$user->hasRight("webportal", "webportalpropal", "read")' if you want your menu with a permission rules
301 'fk_menu'=>'fk_mainmenu=webportal', // '' if this is a top menu. For left menu, use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode
308 'langs'=>'website', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
309 'position'=>1000+$r,
310 'enabled'=>'isModEnabled("webportal")', // Define condition to show or hide menu entry. Use 'isModEnabled("webportal")' if entry must be visible if module is enabled.
313 'user'=>2, // 0=Menu for internal users, 1=external users, 2=both
314 );
315 $this->menu[$r++]=array(
316 'fk_menu'=>'fk_mainmenu=webportal,fk_leftmenu=webportalpropal', // '' if this is a top menu. For left menu, use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode
317 'type'=>'left', // This is a Left menu entry
318 'titre'=>'List_WebPortalPropal',
319 'mainmenu'=>'webportal',
320 'leftmenu'=>'webportal_webportalpropal_list',
321 'url'=>'/webportal/webportalpropal_list.php',
322 'langs'=>'website', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
323 'position'=>1000+$r,
324 'enabled'=>'isModEnabled("webportal")', // Define condition to show or hide menu entry. Use 'isModEnabled("webportal")' if entry must be visible if module is enabled.
327 'user'=>2, // 0=Menu for internal users, 1=external users, 2=both
328 );
329 $this->menu[$r++]=array(
330 'fk_menu'=>'fk_mainmenu=webportal,fk_leftmenu=webportalpropal', // '' if this is a top menu. For left menu, use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode
336 'langs'=>'website', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
337 'position'=>1000+$r,
338 'enabled'=>'isModEnabled("webportal")', // Define condition to show or hide menu entry. Use 'isModEnabled("webportal")' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected.
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.