modSkype.class.php 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. <?php
  2. /* Copyright (C) 2013 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
  3. *
  4. * This program is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License as published by
  6. * the Free Software Foundation; either version 3 of the License, or
  7. * (at your option) any later version.
  8. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU General Public License
  15. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  16. */
  17. /**
  18. * \defgroup Skype Module skype
  19. * \brief Add a skype button.
  20. * \file htdocs/core/modules/modSkype.class.php
  21. * \ingroup Skype
  22. * \brief Description and activation file for module skype
  23. */
  24. include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php';
  25. /**
  26. * Class to describe a Cron module
  27. */
  28. class modSkype extends DolibarrModules
  29. {
  30. /**
  31. * Constructor. Define names, constants, directories, boxes, permissions
  32. *
  33. * @param DoliDB $db Database handler
  34. */
  35. function __construct($db)
  36. {
  37. global $langs,$conf;
  38. $this->db = $db;
  39. $this->numero = 3100;
  40. // Family can be 'crm','financial','hr','projects','products','ecm','technic','other'
  41. // It is used to group modules in module setup page
  42. $this->family = "crm";
  43. // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module)
  44. $this->name = preg_replace('/^mod/i','',get_class($this));
  45. $this->description = "Enable Skype links into contacts";
  46. $this->version = 'dolibarr'; // 'experimental' or 'dolibarr' or version
  47. // Key used in llx_const table to save module status enabled/disabled (where MYMODULE is value of property name of module in uppercase)
  48. $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
  49. // Where to store the module in setup page (0=common,1=interface,2=others,3=very specific)
  50. $this->special = 1;
  51. // Name of image file used for this module.
  52. $this->picto='skype';
  53. // Data directories to create when module is enabled
  54. $this->dirs = array();
  55. // Config pages
  56. //-------------
  57. $this->config_page_url = array();
  58. // Dependancies
  59. //-------------
  60. $this->hidden = ! empty($conf->global->SKYPE_MODULE_DISABLED); // A condition to disable module
  61. $this->depends = array('modSociete'); // List of modules id that must be enabled if this module is enabled
  62. $this->requiredby = array(); // List of modules id to disable if this one is disabled
  63. $this->conflictwith = array(); // List of modules id this module is in conflict with
  64. $this->langfiles = array();
  65. // Constants
  66. //-----------
  67. // New pages on tabs
  68. // -----------------
  69. $this->tabs = array();
  70. // Boxes
  71. //------
  72. $this->boxes = array();
  73. // Main menu entries
  74. //------------------
  75. $this->menu = array();
  76. }
  77. }