2012-01-11 18:43:38 +01:00
< ? php
/* Copyright ( C ) 2005 Rodolphe Quiedeville < rodolphe @ quiedeville . org >
* Copyright ( C ) 2005 - 2012 Laurent Destailleur < eldy @ users . sourceforge . org >
*
* This program is free software ; you can redistribute it and / or modify
* it under the terms of the GNU General Public License as published by
2013-01-16 15:36:08 +01:00
* the Free Software Foundation ; either version 3 of the License , or
2012-01-11 18:43:38 +01:00
* ( at your option ) any later version .
*
* This program is distributed in the hope that it will be useful ,
* but WITHOUT ANY WARRANTY ; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the
* GNU General Public License for more details .
*
* You should have received a copy of the GNU General Public License
2019-09-23 21:55:30 +02:00
* along with this program . If not , see < https :// www . gnu . org / licenses />.
2012-01-11 18:43:38 +01:00
*/
/**
2012-04-28 16:37:58 +02:00
* \defgroup mailmanspip Module mailmanspip
* \brief Module to manage mailman and spip
* \file htdocs / core / modules / modMailmanSpip . class . php
* \ingroup mailmanspip
2021-03-20 13:55:43 +01:00
* \brief Description and activation file for the module mailmanspip
2012-01-11 18:43:38 +01:00
*/
2020-04-10 10:59:32 +02:00
include_once DOL_DOCUMENT_ROOT . '/core/modules/DolibarrModules.class.php' ;
2012-01-11 18:43:38 +01:00
/**
2015-09-07 15:55:26 +02:00
* Class to describe and enable module Click to Dial
2012-01-11 18:43:38 +01:00
*/
class modMailmanSpip extends DolibarrModules
{
/**
* Constructor . Define names , constants , directories , boxes , permissions
*
* @ param DoliDB $db Database handler
*/
2019-02-25 20:35:59 +01:00
public function __construct ( $db )
2012-01-11 18:43:38 +01:00
{
$this -> db = $db ;
$this -> numero = 105 ;
2018-11-07 16:33:06 +01:00
// Family can be 'crm','financial','hr','projects','products','ecm','technic','other'
// It is used to group modules in module setup page
2018-02-25 10:55:02 +01:00
$this -> family = " interface " ;
2018-11-07 16:33:06 +01:00
// Module position in the family on 2 digits ('01', '10', '20', ...)
$this -> module_position = '70' ;
2012-01-11 18:43:38 +01:00
// Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module)
2019-01-27 11:55:16 +01:00
$this -> name = preg_replace ( '/^mod/i' , '' , get_class ( $this ));
2012-01-11 18:43:38 +01:00
$this -> description = " Mailman or Spip interface for member module " ;
2017-08-22 18:34:58 +02:00
// Possible values for version are: 'development', 'experimental', 'dolibarr' or 'dolibarr_deprecated' or version
$this -> version = 'dolibarr' ;
2012-01-11 18:43:38 +01:00
$this -> const_name = 'MAIN_MODULE_' . strtoupper ( $this -> name );
2020-04-10 10:59:32 +02:00
$this -> picto = 'technic' ;
2012-01-11 18:43:38 +01:00
// Data directories to create when module is enabled
$this -> dirs = array ();
// Dependencies
2020-04-10 10:59:32 +02:00
$this -> hidden = false ; // A condition to hide module
$this -> depends = array ( 'modAdherent' ); // List of module class names as string that must be enabled if this module is enabled
$this -> requiredby = array (); // List of module ids to disable if this one is disabled
$this -> conflictwith = array (); // List of module class names as string this module is in conflict with
2022-09-27 20:48:47 +02:00
$this -> phpmin = array ( 7 , 0 ); // Minimum version of PHP required by module
2012-01-11 18:43:38 +01:00
// Config pages
2013-06-05 15:44:42 +02:00
$this -> config_page_url = array ( 'mailman.php' );
2012-07-31 00:53:05 +02:00
// Constants
$this -> const = array ();
2020-04-10 10:59:32 +02:00
$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 " );
$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 " );
$this -> const [ 3 ] = array ( " ADHERENT_MAILMAN_LISTS " , " chaine " , " " , " Mailing-list to subscribe new members to " );
2013-06-05 15:44:42 +02:00
2012-01-11 18:43:38 +01:00
// Boxes
$this -> boxes = array ();
// Permissions
$this -> rights = array ();
$this -> rights_class = 'clicktodial' ;
2017-08-22 18:34:58 +02:00
2016-09-30 13:02:13 +02:00
// Menus
//-------
2020-04-10 10:59:32 +02:00
$this -> menu = 1 ; // This module add menu entries. They are coded into menu manager.
2012-01-11 18:43:38 +01:00
}
}