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 >
2012-12-30 15:13:49 +01:00
* Copyright ( C ) 2005 - 2011 Regis Houssin < regis . houssin @ capnetworks . 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
2011-08-01 01:24:38 +02:00
* along with this program . If not , see < http :// 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
* \brief Fichier de description et activation du module Fckeditor
2008-10-01 21:10:17 +02:00
*/
2006-07-20 15:01:44 +02:00
2012-08-23 02:04:35 +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
*/
2012-07-30 17:17:33 +02:00
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 " ;
// Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module)
2009-10-21 15:09:42 +02:00
$this -> name = preg_replace ( '/^mod/i' , '' , get_class ( $this ));
2008-10-01 21:10:17 +02:00
$this -> description = " Editeur WYSIWYG " ;
$this -> version = 'dolibarr' ; // 'experimental' or 'dolibarr' or version
2008-10-06 09:39:52 +02:00
$this -> const_name = 'MAIN_MODULE_' . strtoupper ( $this -> name );
2008-10-01 21:10:17 +02:00
$this -> special = 2 ;
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.
$this -> picto = 'list' ;
2008-10-01 21:10:17 +02:00
2009-04-28 22:35:01 +02:00
// Data directories to create when module is enabled
2011-03-23 18:22:11 +01:00
$this -> dirs = array ( " /fckeditor/temp " , " /fckeditor/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
2014-05-03 02:15:33 +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 ();
$this -> requiredby = array ();
2015-09-07 15:40:55 +02:00
// Constants
2008-10-01 21:10:17 +02:00
$this -> const = array ();
2013-03-16 09:23:34 +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 " );
2014-03-02 16:44:31 +01:00
$this -> const [ 4 ] = array ( " FCKEDITOR_ENABLE_USERSIGN " , " yesno " , " 1 " , " WYSIWIG for user signature " );
2013-03-16 09:23:34 +01:00
$this -> const [ 5 ] = array ( " FCKEDITOR_ENABLE_MAIL " , " yesno " , " 1 " , " WYSIWIG for products details lines for all entities " );
2015-08-23 15:39:55 +02:00
$this -> const [ 6 ] = array ( " FCKEDITOR_SKIN " , " string " , " moono " , " 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
}