52 $this->rights_class =
'bookcal';
56 $this->family =
"portal";
59 $this->module_position =
'50';
64 $this->
name = preg_replace(
'/^mod/i',
'', get_class($this));
69 $this->descriptionlong =
"BookCalDescription";
72 $this->version =
'experimental';
75 $this->const_name =
'MAIN_MODULE_'.strtoupper($this->
name);
81 $this->picto =
'bookcal';
84 $this->module_parts = array(
120 'moduleforexternal' => 0,
125 $this->dirs = array(
"/bookcal/temp");
128 $this->config_page_url = array(
"setup.php@bookcal");
132 $this->hidden =
false;
134 $this->depends = array();
135 $this->requiredby = array();
136 $this->conflictwith = array();
139 $this->langfiles = array(
"agenda");
142 $this->warnings_activation = array();
143 $this->warnings_activation_ext = array();
151 $this->
const = array();
159 if (!isset(
$conf->bookcal) || !isset(
$conf->bookcal->enabled)) {
161 $conf->bookcal->enabled = 0;
165 $this->tabs = array();
193 $this->dictionaries = array();
222 $this->boxes = array(
233 $this->cronjobs = array(
255 $this->rights = array();
259 $this->rights[$r][0] = $this->numero . sprintf(
'%02d', (0 * 10) + 1);
260 $this->rights[$r][1] =
'Read objects of BookCal';
261 $this->rights[$r][4] =
'availabilities';
262 $this->rights[$r][5] =
'read';
264 $this->rights[$r][0] = $this->numero . sprintf(
'%02d', (0 * 10) + 2);
265 $this->rights[$r][1] =
'Create/Update objects of BookCal';
266 $this->rights[$r][4] =
'availabilities';
267 $this->rights[$r][5] =
'write';
269 $this->rights[$r][0] = $this->numero . sprintf(
'%02d', (0 * 10) + 3);
270 $this->rights[$r][1] =
'Delete objects of BookCal';
271 $this->rights[$r][4] =
'availabilities';
272 $this->rights[$r][5] =
'delete';
274 $this->rights[$r][0] = $this->numero . sprintf(
'%02d', (1 * 10) + 1);
275 $this->rights[$r][1] =
'Read Calendar object of BookCal';
276 $this->rights[$r][4] =
'calendar';
277 $this->rights[$r][5] =
'read';
279 $this->rights[$r][0] = $this->numero . sprintf(
'%02d', (1 * 10) + 2);
280 $this->rights[$r][1] =
'Create/Update Calendar object of BookCal';
281 $this->rights[$r][4] =
'calendar';
282 $this->rights[$r][5] =
'write';
284 $this->rights[$r][0] = $this->numero . sprintf(
'%02d', (1 * 10) + 3);
285 $this->rights[$r][1] =
'Delete Calendar object of BookCal';
286 $this->rights[$r][4] =
'calendar';
287 $this->rights[$r][5] =
'delete';
293 $this->menu = array();
315 $this->menu[$r++] = array(
316 'fk_menu' =>
'fk_mainmenu=agenda',
318 'titre' =>
'MenuBookcalIndex',
319 'prefix' =>
img_picto(
'', $this->picto,
'class="paddingright pictofixedwidth em92"'),
320 'mainmenu' =>
'agenda',
321 'leftmenu' =>
'bookcal',
322 'url' =>
'/bookcal/bookcalindex.php',
323 'langs' =>
'bookcal',
324 'position' => 1100 + $r,
326 'perms' =>
'$user->hasRight("bookcal", "calendar", "read")',
330 $this->menu[$r++] = array(
332 'fk_menu' =>
'fk_mainmenu=agenda,fk_leftmenu=bookcal',
335 'titre' =>
'Calendar',
336 'mainmenu' =>
'agenda',
337 'leftmenu' =>
'bookcal_calendar_list',
338 'url' =>
'/bookcal/calendar_list.php',
340 'langs' =>
'bookcal',
341 'position' => 1100 + $r,
343 'enabled' =>
'isModEnabled("bookcal")',
345 'perms' =>
'$user->hasRight("bookcal", "calendar", "read")',
350 $this->menu[$r++] = array(
352 'fk_menu' =>
'fk_mainmenu=agenda,fk_leftmenu=bookcal_calendar_list',
355 'titre' =>
'NewCalendar',
356 'mainmenu' =>
'agenda',
357 'leftmenu' =>
'bookcal_new',
358 'url' =>
'/bookcal/calendar_card.php?action=create',
360 'langs' =>
'bookcal',
361 'position' => 1100 + $r,
363 'enabled' =>
'isModEnabled("bookcal")',
365 'perms' =>
'$user->hasRight("bookcal", "calendar", "read")',
374 $this->menu[$r++] = array(
376 'fk_menu' =>
'fk_mainmenu=agenda,fk_leftmenu=bookcal',
379 'titre' =>
'Availabilities',
380 'mainmenu' =>
'agenda',
381 'leftmenu' =>
'bookcal_availabilities',
382 'url' =>
'/bookcal/availabilities_list.php',
384 'langs' =>
'bookcal',
385 'position' => 1200 + $r,
387 'enabled' =>
'isModEnabled("bookcal")',
389 'perms' =>
'$user->hasRight("bookcal", "availabilities", "read")',
394 $this->menu[$r++] = array(
396 'fk_menu' =>
'fk_mainmenu=agenda,fk_leftmenu=bookcal_availabilities',
399 'titre' =>
'NewAvailabilities',
400 'mainmenu' =>
'agenda',
401 'leftmenu' =>
'bookcal_availabilities',
402 'url' =>
'/bookcal/availabilities_card.php?action=create',
404 'langs' =>
'bookcal',
405 'position' => 1200 + $r,
407 'enabled' =>
'isModEnabled("bookcal")',
409 'perms' =>
'$user->hasRight("bookcal", "availabilities", "read")',