2006-07-20 13:01:44 +00:00
|
|
|
<?php
|
|
|
|
|
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
2007-05-04 19:21:19 +00:00
|
|
|
* Copyright (C) 2004-2007 Laurent Destailleur <eldy@users.sourceforge.net>
|
2018-10-27 12:43:12 +00:00
|
|
|
* Copyright (C) 2005-2011 Regis Houssin <regis.houssin@inodbox.com>
|
2006-07-20 13:01:44 +00: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 14:36:08 +00:00
|
|
|
* the Free Software Foundation; either version 3 of the License, or
|
2006-07-20 13:01:44 +00: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 19:55:30 +00:00
|
|
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
2006-07-20 13:01:44 +00:00
|
|
|
*/
|
|
|
|
|
|
2007-05-04 19:21:19 +00:00
|
|
|
/**
|
2011-01-30 10:00:10 +00:00
|
|
|
* \defgroup fckeditor Module fckeditor
|
|
|
|
|
* \brief Module pour mettre en page les zones de saisie de texte
|
2011-10-24 12:11:49 +00:00
|
|
|
* \file htdocs/core/modules/modFckeditor.class.php
|
2011-01-30 10:00:10 +00:00
|
|
|
* \ingroup fckeditor
|
2021-03-20 12:55:43 +00:00
|
|
|
* \brief Description and activation file for the module Fckeditor
|
2008-10-01 19:10:17 +00:00
|
|
|
*/
|
2006-07-20 13:01:44 +00:00
|
|
|
|
2020-04-10 08:59:32 +00:00
|
|
|
include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php';
|
2007-10-09 23:15:25 +00:00
|
|
|
|
2006-07-20 13:01:44 +00:00
|
|
|
|
2011-08-31 10:27:17 +00:00
|
|
|
/**
|
2015-09-07 13:55:26 +00:00
|
|
|
* Class to describe and enable module Fckeditor
|
2008-10-01 19:10:17 +00:00
|
|
|
*/
|
2006-07-20 13:01:44 +00:00
|
|
|
|
|
|
|
|
class modFckeditor extends DolibarrModules
|
|
|
|
|
{
|
2008-10-01 19:10:17 +00:00
|
|
|
/**
|
2011-09-26 14:22:35 +00:00
|
|
|
* Constructor. Define names, constants, directories, boxes, permissions
|
|
|
|
|
*
|
2012-01-04 20:23:50 +00:00
|
|
|
* @param DoliDB $db Database handler
|
2008-10-01 19:10:17 +00:00
|
|
|
*/
|
2019-02-25 19:35:59 +00:00
|
|
|
public function __construct($db)
|
2008-10-01 19:10:17 +00:00
|
|
|
{
|
2012-01-04 20:23:50 +00:00
|
|
|
$this->db = $db;
|
|
|
|
|
$this->numero = 2000;
|
2008-10-01 19:10:17 +00:00
|
|
|
|
|
|
|
|
$this->family = "technic";
|
2018-10-06 09:57:53 +00:00
|
|
|
$this->module_position = '20';
|
2008-10-01 19:10:17 +00: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 10:55:16 +00:00
|
|
|
$this->name = preg_replace('/^mod/i', '', get_class($this));
|
2008-10-01 19:10:17 +00:00
|
|
|
$this->description = "Editeur WYSIWYG";
|
2017-08-22 16:34:58 +00:00
|
|
|
// Possible values for version are: 'development', 'experimental', 'dolibarr' or version
|
|
|
|
|
$this->version = 'dolibarr';
|
2008-10-06 07:39:52 +00:00
|
|
|
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
|
2010-06-02 19:56:14 +00: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 12:58:50 +00:00
|
|
|
$this->picto = 'paragraph';
|
2008-10-01 19:10:17 +00:00
|
|
|
|
2009-04-28 20:35:01 +00:00
|
|
|
// Data directories to create when module is enabled
|
2020-04-10 08:59:32 +00:00
|
|
|
$this->dirs = array("/medias/temp", "/medias/image");
|
2008-10-01 19:10:17 +00:00
|
|
|
|
|
|
|
|
// Config pages
|
|
|
|
|
$this->config_page_url = array("fckeditor.php");
|
|
|
|
|
|
2015-09-07 13:29:51 +00:00
|
|
|
// Dependencies
|
2023-02-08 23:47:33 +00:00
|
|
|
$this->disabled = (defined('JS_CKEDITOR') && in_array(constant('JS_CKEDITOR'), array('disabled', 'disabled/')));
|
2008-10-01 19:10:17 +00:00
|
|
|
$this->depends = array();
|
2016-05-01 14:34:50 +00:00
|
|
|
$this->requiredby = array('modWebsites');
|
2023-01-09 11:30:56 +00:00
|
|
|
$this->enabled_bydefault = true; // Will be enabled during install
|
2008-10-01 19:10:17 +00:00
|
|
|
|
2015-09-07 13:40:55 +00:00
|
|
|
// Constants
|
2008-10-01 19:10:17 +00:00
|
|
|
$this->const = array();
|
2024-05-10 10:34:08 +00:00
|
|
|
$this->const[0] = array("FCKEDITOR_ENABLE_SOCIETE", "yesno", "1", "WYSIWYG for the fields descriptions of elements (except products/services)");
|
|
|
|
|
$this->const[2] = array("FCKEDITOR_ENABLE_DETAILS", "yesno", "1", "WYSIWYG for products details lines for all entities");
|
|
|
|
|
$this->const[3] = array("FCKEDITOR_ENABLE_USERSIGN", "yesno", "1", "WYSIWYG for user signature");
|
|
|
|
|
$this->const[4] = array("FCKEDITOR_ENABLE_MAILING", "yesno", "1", "WYSIWYG for mass emailings");
|
|
|
|
|
$this->const[5] = array("FCKEDITOR_ENABLE_MAIL", "yesno", "1", "WYSIWYG for products details lines for all entities");
|
2008-10-01 19:10:17 +00:00
|
|
|
|
2015-09-07 13:46:57 +00:00
|
|
|
// Boxes
|
2008-10-01 19:10:17 +00:00
|
|
|
$this->boxes = array();
|
|
|
|
|
|
|
|
|
|
// Permissions
|
|
|
|
|
$this->rights = array();
|
|
|
|
|
$this->rights_class = 'fckeditor';
|
|
|
|
|
}
|
2006-07-20 13:01:44 +00:00
|
|
|
}
|