2006-07-20 15:01:44 +02:00
< ? php
/* Copyright ( C ) 2004 Rodolphe Quiedeville < rodolphe @ quiedeville . org >
2007-05-04 21:21:19 +02:00
* Copyright ( C ) 2004 - 2007 Laurent Destailleur < eldy @ users . sourceforge . net >
2018-10-27 14:43:12 +02:00
* Copyright ( C ) 2005 - 2011 Regis Houssin < regis . houssin @ inodbox . com >
2006-07-20 15:01:44 +02:00
*
* 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
2006-07-20 15:01:44 +02: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 />.
2006-07-20 15:01:44 +02:00
*/
2007-05-04 21:21:19 +02:00
/**
2011-01-30 11:00:10 +01:00
* \defgroup fckeditor Module fckeditor
* \brief Module pour mettre en page les zones de saisie de texte
2011-10-24 14:11:49 +02:00
* \file htdocs / core / modules / modFckeditor . class . php
2011-01-30 11:00:10 +01:00
* \ingroup fckeditor
2021-03-20 13:55:43 +01:00
* \brief Description and activation file for the module Fckeditor
2008-10-01 21:10:17 +02:00
*/
2006-07-20 15:01:44 +02:00
2020-04-10 10:59:32 +02:00
include_once DOL_DOCUMENT_ROOT . '/core/modules/DolibarrModules.class.php' ;
2007-10-10 01:15:25 +02:00
2006-07-20 15:01:44 +02:00
2011-08-31 12:27:17 +02:00
/**
2015-09-07 15:55:26 +02:00
* Class to describe and enable module Fckeditor
2008-10-01 21:10:17 +02:00
*/
2006-07-20 15:01:44 +02:00
class modFckeditor extends DolibarrModules
{
2008-10-01 21:10:17 +02:00
/**
2011-09-26 16:22:35 +02:00
* Constructor . Define names , constants , directories , boxes , permissions
*
2012-01-04 21:23:50 +01:00
* @ param DoliDB $db Database handler
2008-10-01 21:10:17 +02:00
*/
2019-02-25 20:35:59 +01:00
public function __construct ( $db )
2008-10-01 21:10:17 +02:00
{
2012-01-04 21:23:50 +01:00
$this -> db = $db ;
$this -> numero = 2000 ;
2008-10-01 21:10:17 +02:00
$this -> family = " technic " ;
2018-10-06 11:57:53 +02:00
$this -> module_position = '20' ;
2008-10-01 21:10:17 +02: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 ));
2008-10-01 21:10:17 +02:00
$this -> description = " Editeur WYSIWYG " ;
2017-08-22 18:34:58 +02:00
// Possible values for version are: 'development', 'experimental', 'dolibarr' or version
$this -> version = 'dolibarr' ;
2008-10-06 09:39:52 +02:00
$this -> const_name = 'MAIN_MODULE_' . strtoupper ( $this -> name );
2010-06-02 21:56:14 +02:00
// Name of png file (without png) used for this module.
// Png file must be in theme/yourtheme/img directory under name object_pictovalue.png.
2020-04-12 14:58:50 +02:00
$this -> picto = 'paragraph' ;
2008-10-01 21:10:17 +02:00
2009-04-28 22:35:01 +02:00
// Data directories to create when module is enabled
2020-04-10 10:59:32 +02:00
$this -> dirs = array ( " /medias/temp " , " /medias/image " );
2008-10-01 21:10:17 +02:00
// Config pages
$this -> config_page_url = array ( " fckeditor.php " );
2015-09-07 15:29:51 +02:00
// Dependencies
2020-04-10 10:59:32 +02:00
$this -> disabled = ( in_array ( constant ( 'JS_CKEDITOR' ), array ( 'disabled' , 'disabled/' )) ? 1 : 0 ); // A condition to disable module (used for native debian packages)
2008-10-01 21:10:17 +02:00
$this -> depends = array ();
2016-05-01 16:34:50 +02:00
$this -> requiredby = array ( 'modWebsites' );
2008-10-01 21:10:17 +02:00
2015-09-07 15:40:55 +02:00
// Constants
2008-10-01 21:10:17 +02:00
$this -> const = array ();
2020-10-31 14:32:18 +01:00
$this -> const [ 0 ] = array ( " FCKEDITOR_ENABLE_SOCIETE " , " yesno " , " 1 " , " WYSIWIG for description and note (except products/services) " );
$this -> const [ 1 ] = array ( " FCKEDITOR_ENABLE_PRODUCTDESC " , " yesno " , " 1 " , " WYSIWIG for products/services description and note " );
$this -> const [ 2 ] = array ( " FCKEDITOR_ENABLE_MAILING " , " yesno " , " 1 " , " WYSIWIG for mass emailings " );
$this -> const [ 3 ] = array ( " FCKEDITOR_ENABLE_DETAILS " , " yesno " , " 1 " , " WYSIWIG for products details lines for all entities " );
$this -> const [ 4 ] = array ( " FCKEDITOR_ENABLE_USERSIGN " , " yesno " , " 1 " , " WYSIWIG for user signature " );
$this -> const [ 5 ] = array ( " FCKEDITOR_ENABLE_MAIL " , " yesno " , " 1 " , " WYSIWIG for products details lines for all entities " );
2020-04-10 10:59:32 +02:00
$this -> const [ 6 ] = array ( " FCKEDITOR_SKIN " , " string " , " moono-lisa " , " Skin by default for fckeditor " );
2008-10-01 21:10:17 +02:00
2015-09-07 15:46:57 +02:00
// Boxes
2008-10-01 21:10:17 +02:00
$this -> boxes = array ();
// Permissions
$this -> rights = array ();
$this -> rights_class = 'fckeditor' ;
}
2006-07-20 15:01:44 +02:00
}