47// Use here a free id (See in Home -> System information -> Dolibarr for list of used modules id).
48 $this->numero = 50310;
49// Key text used to identify module (for permissions, menus, etc...)
50 $this->rights_class = 'dav';
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 = "interface";
55// Module position in the family on 2 digits ('01', '10', '20', ...)
56 $this->module_position = '75';
57// Gives the possibility to the module, to provide his own family info and position of this family (Overwrite $this->family and $this->module_position. Avoid this)
120// $this->tabs[] = array('data'=>'objecttype:+tabname1:Title1:mylangfile@dav:$user->rights->dav->read:/dav/mynewtab1.php?id=__ID__'); // To add a new tab identified by code tabname1
121// $this->tabs[] = array('data'=>'objecttype:+tabname2:SUBSTITUTION_Title2:mylangfile@dav:$user->rights->othermodule->read:/dav/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.
122// $this->tabs[] = array('data'=>'objecttype:-tabname:NU:conditiontoremove'); // To remove an existing tab identified by code tabname
123//
124// Where objecttype can be
125// 'categories_x' to add a tab in category view (replace 'x' by type of category (0=product, 1=supplier, 2=customer, 3=member)
126// 'contact' to add a tab in contact view
127// 'contract' to add a tab in contract view
128// 'group' to add a tab in group view
129// 'intervention' to add a tab in intervention view
130// 'invoice' to add a tab in customer invoice view
131// 'invoice_supplier' to add a tab in supplier invoice view
132// 'member' to add a tab in foundation member view
133// 'opensurveypoll' to add a tab in opensurvey poll view
134// 'order' to add a tab in sales order view
135// 'order_supplier' to add a tab in supplier order view
136// 'payment' to add a tab in payment view
137// 'payment_supplier' to add a tab in supplier payment view
138// 'product' to add a tab in product view
139// 'propal' to add a tab in propal view
140// 'project' to add a tab in project view
141// 'stock' to add a tab in stock view
142// 'thirdparty' to add a tab in third party view
143// 'user' to add a tab in user view
144
145
146// Dictionaries
147 $this->dictionaries = array();
148
149
150// Boxes/Widgets
151// Add here list of php file(s) stored in dav/core/boxes that contains class to show a widget.
152 $this->boxes = array(
153//0=>array('file'=>'davwidget1.php@dav','note'=>'Widget provided by dav','enabledbydefaulton'=>'Home'),
154//1=>array('file'=>'davwidget2.php@dav','note'=>'Widget provided by dav'),
155//2=>array('file'=>'davwidget3.php@dav','note'=>'Widget provided by dav')
156 );
157
158
159// Cronjobs (List of cron jobs entries to add when module is enabled)
160// unit_frequency must be 60 for minute, 3600 for hour, 86400 for day, 604800 for week
170 $this->rights = array(); // Permission array used by this module
171
172/*
173 $r=0;
174 $this->rights[$r][0] = $this->numero + $r; // Permission id (must not be already used)
175 $this->rights[$r][1] = 'Read myobject of dav'; // Permission label
176 $this->rights[$r][3] = 0; // Permission by default for new user (0/1)
177 $this->rights[$r][4] = 'read'; // In php code, permission will be checked by test if ($user->rights->dav->level1->level2)
178 $this->rights[$r][5] = ''; // In php code, permission will be checked by test if ($user->rights->dav->level1->level2)
179
180 $r++;
181 $this->rights[$r][0] = $this->numero + $r; // Permission id (must not be already used)
182 $this->rights[$r][1] = 'Create/Update myobject of dav'; // Permission label
183 $this->rights[$r][3] = 0; // Permission by default for new user (0/1)
184 $this->rights[$r][4] = 'write'; // In php code, permission will be checked by test if ($user->rights->dav->level1->level2)
185 $this->rights[$r][5] = ''; // In php code, permission will be checked by test if ($user->rights->dav->level1->level2)
186
187 $r++;
188 $this->rights[$r][0] = $this->numero + $r; // Permission id (must not be already used)
189 $this->rights[$r][1] = 'Delete myobject of dav'; // Permission label
190 $this->rights[$r][3] = 0; // Permission by default for new user (0/1)
191 $this->rights[$r][4] = 'delete'; // In php code, permission will be checked by test if ($user->rights->dav->level1->level2)
192 $this->rights[$r][5] = ''; // In php code, permission will be checked by test if ($user->rights->dav->level1->level2)
193 */
194
195// Main menu entries
196 $this->menu = array(); // List of menus to add
197 $r = 0;
198
199// Add here entries to declare new menus
200
201/* BEGIN MODULEBUILDER TOPMENU */
202/*$this->menu[$r++]=array('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
203 'type'=>'top', // This is a Top menu entry
204 'titre'=>'dav',
205 'mainmenu'=>'dav',
206 'leftmenu'=>'',
207 'url'=>'/dav/davindex.php',
208 'langs'=>'dav@dav', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
209 'position'=>1000+$r,
210 'enabled'=>'$conf->dav->enabled', // Define condition to show or hide menu entry. Use '$conf->dav->enabled' if entry must be visible if module is enabled.
211 'perms'=>'1', // Use 'perms'=>'$user->rights->dav->level1->level2' if you want your menu with a permission rules
212 'target'=>'',
213 'user'=>2); // 0=Menu for internal users, 1=external users, 2=both
214 */
215/* END MODULEBUILDER TOPMENU */
216
217/* BEGIN MODULEBUILDER LEFTMENU MYOBJECT
218 $this->menu[$r++]=array( 'fk_menu'=>'fk_mainmenu=dav', // '' 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
219 'type'=>'left', // This is a Left menu entry
220 'titre'=>'List MyObject',
221 'mainmenu'=>'dav',
222 'leftmenu'=>'dav_myobject_list',
223 'url'=>'/dav/myobject_list.php',
224 'langs'=>'dav@dav', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
225 'position'=>1000+$r,
226 'enabled'=>'$conf->dav->enabled', // Define condition to show or hide menu entry. Use '$conf->dav->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected.
227 'perms'=>'1', // Use 'perms'=>'$user->rights->dav->level1->level2' if you want your menu with a permission rules
228 'target'=>'',
229 'user'=>2); // 0=Menu for internal users, 1=external users, 2=both
230 $this->menu[$r++]=array( 'fk_menu'=>'fk_mainmenu=dav,fk_leftmenu=dav', // '' 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
236 'langs'=>'dav@dav', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
237 'position'=>1000+$r,
238 'enabled'=>'$conf->dav->enabled', // Define condition to show or hide menu entry. Use '$conf->dav->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected.
239 'perms'=>'1', // Use 'perms'=>'$user->rights->dav->level1->level2' if you want your menu with a permission rules
240 'target'=>'',
241 'user'=>2); // 0=Menu for internal users, 1=external users, 2=both
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.