dolibarr/htdocs/core/modules/modFckeditor.class.php

88 lines
3.6 KiB
PHP
Raw Normal View History

<?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>
*
* 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
* the Free Software Foundation; either version 3 of the License, or
* (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/>.
*/
2007-05-04 21:21:19 +02:00
/**
* \defgroup fckeditor Module fckeditor
* \brief Module pour mettre en page les zones de saisie de texte
* \file htdocs/core/modules/modFckeditor.class.php
* \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
*/
include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php';
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
*/
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";
$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)
$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';
$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
// Data directories to create when module is enabled
$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
$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('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();
2021-09-13 03:43:25 +02: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");
$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';
}
}