modMailmanSpip.class.php 3.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. <?php
  2. /* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
  3. * Copyright (C) 2005-2012 Laurent Destailleur <eldy@users.sourceforge.org>
  4. *
  5. * This program is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation; either version 3 of the License, or
  8. * (at your option) any later version.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License
  16. * along with this program. If not, see <https://www.gnu.org/licenses/>.
  17. */
  18. /**
  19. * \defgroup mailmanspip Module mailmanspip
  20. * \brief Module to manage mailman and spip
  21. * \file htdocs/core/modules/modMailmanSpip.class.php
  22. * \ingroup mailmanspip
  23. * \brief Description and activation file for the module mailmanspip
  24. */
  25. include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php';
  26. /**
  27. * Class to describe and enable module Click to Dial
  28. */
  29. class modMailmanSpip extends DolibarrModules
  30. {
  31. /**
  32. * Constructor. Define names, constants, directories, boxes, permissions
  33. *
  34. * @param DoliDB $db Database handler
  35. */
  36. public function __construct($db)
  37. {
  38. $this->db = $db;
  39. $this->numero = 105;
  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 = "interface";
  43. // Module position in the family on 2 digits ('01', '10', '20', ...)
  44. $this->module_position = '70';
  45. // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module)
  46. $this->name = preg_replace('/^mod/i', '', get_class($this));
  47. $this->description = "Mailman or Spip interface for member module";
  48. // Possible values for version are: 'development', 'experimental', 'dolibarr' or 'dolibarr_deprecated' or version
  49. $this->version = 'dolibarr';
  50. $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
  51. $this->picto = 'technic';
  52. // Data directories to create when module is enabled
  53. $this->dirs = array();
  54. // Dependencies
  55. $this->hidden = false; // A condition to hide module
  56. $this->depends = array('modAdherent'); // List of module class names as string that must be enabled if this module is enabled
  57. $this->requiredby = array(); // List of module ids to disable if this one is disabled
  58. $this->conflictwith = array(); // List of module class names as string this module is in conflict with
  59. $this->phpmin = array(5, 6); // Minimum version of PHP required by module
  60. // Config pages
  61. $this->config_page_url = array('mailman.php');
  62. // Constants
  63. $this->const = array();
  64. $this->const[1] = array("ADHERENT_MAILMAN_UNSUB_URL", "chaine", "http://lists.example.com/cgi-bin/mailman/admin/%LISTE%/members?adminpw=%MAILMAN_ADMINPW%&user=%EMAIL%", "Url de désinscription aux listes mailman");
  65. $this->const[2] = array("ADHERENT_MAILMAN_URL", "chaine", "http://lists.example.com/cgi-bin/mailman/admin/%LISTE%/members?adminpw=%MAILMAN_ADMINPW%&send_welcome_msg_to_this_batch=1&subscribees=%EMAIL%", "Url pour les inscriptions mailman");
  66. $this->const[3] = array("ADHERENT_MAILMAN_LISTS", "chaine", "", "Mailing-list to subscribe new members to");
  67. // Boxes
  68. $this->boxes = array();
  69. // Permissions
  70. $this->rights = array();
  71. $this->rights_class = 'clicktodial';
  72. // Menus
  73. //-------
  74. $this->menu = 1; // This module add menu entries. They are coded into menu manager.
  75. }
  76. }