| Current Path : /home/wuectly/www/03cbe/ |
| Current File : /home/wuectly/www/03cbe/config.php.tar |
home/wuectly/www/components/com_jce/editor/plugins/tabfocus/config.php 0000604 00000000576 15245604443 0022346 0 ustar 00 <?php
/**
* @package JCE
* @subpackage Editor
*
* @copyright Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
\defined('_JEXEC') or die;
class WFPluginTabfocusConfig
{
public static function getConfig(&$vars)
{
$vars['tabfocus_elements'] = ':prev,:next';
}
} home/wuectly/www/components/com_jce/editor/plugins/joomla/config.php 0000604 00000003423 15245605476 0022022 0 ustar 00 <?php
/**
* @package JCE
* @subpackage Editor
*
* @copyright Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
\defined('_JEXEC') or die;
use Joomla\CMS\Editor\Editor;
use Joomla\CMS\Factory;
use Joomla\CMS\Uri\Uri;
class WFJoomlaPluginConfig
{
public static function getConfig(&$settings)
{
if (empty($settings['joomla_xtd_buttons'])) {
$settings['joomla_xtd_buttons'] = array();
}
$list = array();
$editor = Editor::getInstance('jce');
$excluded = array('readmore', 'pagebreak', 'image');
$i = 0;
$buttons = $editor->getButtons('__jce__');
foreach ($buttons as $button) {
// skip buttons better implemented by editor
if (in_array($button->name, $excluded)) {
continue;
}
// create icon class
$icon = 'none icon-' . $button->get('icon', $button->get('name'));
// set href value
if ($button->get('link') !== '#') {
$href = Uri::base() . $button->get('link');
} else {
$href = '';
}
$id = $button->get('name');
$options = array(
'name' => $button->get('text'),
'id' => $id,
'title' => $button->get('text'),
'icon' => $icon,
'href' => $href,
'onclick' => $button->get('onclick', ''),
'svg' => $button->get('iconSVG'),
'options' => $button->get('options', array()),
);
$list[] = $options;
}
$settings['joomla_xtd_buttons']['__jce__'] = $list;
}
} home/wuectly/www/components/com_jce/editor/plugins/code/config.php 0000604 00000002645 15245605477 0021461 0 ustar 00 <?php
/**
* @package JCE
* @subpackage Editor
*
* @copyright Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
\defined('_JEXEC') or die;
class WFCodePluginConfig
{
public static function getConfig(&$settings)
{
$wf = WFApplication::getInstance();
if (!in_array('code', $settings['plugins'])) {
$settings['plugins'][] = 'code';
}
$settings['code_use_blocks'] = $wf->getParam('editor.code_blocks', 1, 1, 'boolean');
$settings['code_allow_php'] = $wf->getParam('editor.allow_php', 0, 0, 'boolean');
$settings['code_allow_script'] = $wf->getParam('editor.allow_javascript', 0, 0, 'boolean');
$settings['code_allow_style'] = $wf->getParam('editor.allow_css', 0, 0, 'boolean');
$settings['code_protect_shortcode'] = $wf->getParam('editor.protect_shortcode', 0, 0, 'boolean');
$settings['code_allow_custom_xml'] = $wf->getParam('editor.allow_custom_xml', 0, 0, 'boolean');
$remove = array();
// remove as Invalid Elements
if ($settings['code_allow_script']) {
$remove[] = 'script';
}
if ($settings['code_allow_style']) {
$remove[] = 'style';
$remove[] = 'link';
}
$settings['invalid_elements'] = array_diff($settings['invalid_elements'], $remove);
}
}
home/wuectly/www/components/com_config/model/config.php 0000604 00000001631 15245613355 0017370 0 ustar 00 <?php
/**
* @package Joomla.Site
* @subpackage com_config
*
* @copyright (C) 2013 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
/**
* Model for the global configuration
*
* @since 3.2
*/
class ConfigModelConfig extends ConfigModelForm
{
/**
* Method to get a form object.
*
* @param array $data Data for the form.
* @param boolean $loadData True if the form is to load its own data (default case), false if not.
*
* @return mixed A JForm object on success, false on failure
*
* @since 3.2
*/
public function getForm($data = array(), $loadData = true)
{
// Get the form.
$form = $this->loadForm('com_config.config', 'config', array('control' => 'jform', 'load_data' => $loadData));
if (empty($form))
{
return false;
}
return $form;
}
}
home/wuectly/www/components/com_jce/editor/plugins/table/config.php 0000604 00000003625 15245614011 0021615 0 ustar 00 <?php
/**
* @package JCE
* @subpackage Editor
*
* @copyright Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
\defined('_JEXEC') or die;
class WFTablePluginConfig
{
public static function getConfig(&$settings)
{
$wf = WFApplication::getInstance();
$width = $wf->getParam('table.width');
$height = $wf->getParam('table.height');
if ($width && preg_match('#^[0-9\.]$#', $width)) {
$width .= 'px';
}
if ($height && preg_match('#^[0-9\.]$#', $height)) {
$height .= 'px';
}
$settings['table_default_width'] = $width;
$settings['table_default_height'] = $height;
$settings['table_default_border'] = $wf->getParam('table.border', 0, 0);
$settings['table_default_align'] = $wf->getParam('table.align', '', '');
$settings['table_default_cellpadding'] = $wf->getParam('table.cellpadding', 0, 0);
$settings['table_default_cellspacing'] = $wf->getParam('table.cellspacing', 0, 0);
$settings['table_default_rows'] = $wf->getParam('table.rows', 2, 2);
$settings['table_default_cols'] = $wf->getParam('table.cols', 2, 2);
$settings['table_cell_limit'] = $wf->getParam('table.cell_limit', 0, 0);
$settings['table_row_limit'] = $wf->getParam('table.row_limit', 0, 0);
$settings['table_col_limit'] = $wf->getParam('table.col_limit', 0, 0);
$settings['table_pad_empty_cells'] = $wf->getParam('table.pad_empty_cells', 1, 1);
$settings['table_classes'] = $wf->getParam('table.classes', '', '');
$settings['table_classes_custom'] = $wf->getParam('table.custom_classes', [], []);
$settings['table_buttons'] = $wf->getParam('table.show_buttons', 1, 1);
$settings['table_basic_dialog'] = $wf->getParam('table.basic_dialog', 0, 0);
}
}
home/wuectly/www/components/com_jce/editor/plugins/link/config.php 0000604 00000003340 15245615154 0021466 0 ustar 00 <?php
/**
* @package JCE
* @subpackage Editor
*
* @copyright Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
\defined('_JEXEC') or die;
class WFLinkPluginConfig
{
public static function getConfig(&$settings)
{
require_once __DIR__ . '/link.php';
$plugin = new WFLinkPlugin();
$attributes = $plugin->getDefaults();
$custom_classes = (array) $plugin->getParam('custom_classes', []);
$custom_classes = array_filter($custom_classes);
$config = array(
'attributes' => $plugin->getDefaults(),
'custom_classes' => $custom_classes,
);
// expose globally for use by Autolink and Clipboard
$settings['default_link_target'] = $plugin->getParam('target', '');
// expose globally for use by Autolink and Clipboard (must be boolean)
$settings['autolink_email'] = $plugin->getParam('autolink_email', 1, 1, 'boolean');
$settings['autolink_url'] = $plugin->getParam('autolink_url', 1, 1, 'boolean');
if ($plugin->getParam('link.quicklink', 1) == 0) {
$config['quicklink'] = false;
}
if ($plugin->getParam('link.basic_dialog', 0) == 1) {
$config['basic_dialog'] = true;
$config['file_browser'] = $plugin->getParam('file_browser', 1);
$config['target_ctrl'] = $plugin->getParam('attributes_target', 1, 1, 'boolean');
$config['title_ctrl'] = $plugin->getParam('attributes_title', 1, 1, 'boolean');
$config['classes_ctrl'] = $plugin->getParam('attributes_classes', 1, 1, 'boolean');
}
$settings['link'] = $config;
}
}
home/wuectly/www/administrator/components/com_config/config.php 0000604 00000001616 15245617234 0021153 0 ustar 00 <?php
/**
* @package Joomla.Administrator
* @subpackage com_config
*
* @copyright (C) 2005 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
JHtml::_('behavior.tabstate');
// Access checks are done internally because of different requirements for the two controllers.
// Tell the browser not to cache this page.
JFactory::getApplication()->setHeader('Expires', 'Mon, 26 Jul 1997 05:00:00 GMT', true);
// Load classes
JLoader::registerPrefix('Config', JPATH_COMPONENT);
JLoader::registerPrefix('Config', JPATH_ROOT . '/components/com_config');
// Application
$app = JFactory::getApplication();
$controllerHelper = new ConfigControllerHelper;
$controller = $controllerHelper->parseController($app);
$controller->prefix = 'Config';
// Perform the Request task
$controller->execute();
home/wuectly/www/components/com_config/config.php 0000604 00000001245 15245624462 0016272 0 ustar 00 <?php
/**
* @package Joomla.Site
* @subpackage com_config
*
* @copyright (C) 2013 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
// Load classes
JLoader::registerPrefix('Config', JPATH_COMPONENT);
// Application
$app = JFactory::getApplication();
// Tell the browser not to cache this page.
$app->setHeader('Expires', 'Mon, 26 Jul 1997 05:00:00 GMT', true);
$controllerHelper = new ConfigControllerHelper;
$controller = $controllerHelper->parseController($app);
$controller->prefix = 'Config';
// Perform the Request task
$controller->execute();
home/wuectly/www/components/com_jce/editor/plugins/charmap/config.php 0000604 00000001645 15245626654 0022161 0 ustar 00 <?php
/**
* @package JCE
* @subpackage Editor
*
* @copyright Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
\defined('_JEXEC') or die;
class WFCharmapPluginConfig
{
public static function getConfig(&$settings)
{
$wf = WFApplication::getInstance();
$append = $wf->getParam('charmap.charmap_append', array());
if (!empty($append)) {
$values = array();
foreach ($append as $item) {
$item = (object) $item;
// invalid values
if (empty($item->name) || empty($item->value)) {
continue;
}
$item->name = html_entity_decode($item->name);
$values[$item->name] = $item->value;
}
$settings['charmap_append'] = $values;
}
}
}
home/wuectly/www/administrator/components/com_mailjet/config.php 0000604 00000001030 15245630151 0021312 0 ustar 00 <?php
class JMailjetConfig {
public $bak_mailer = 'mail';
public $bak_smtpauth = '0';
public $bak_smtpuser = '';
public $bak_smtppass = '';
public $bak_smtphost = 'localhost';
public $bak_smtpsecure = 'none';
public $bak_smtpport = '25';
public $enable = '1';
public $test = '1';
public $test_address = 'vincent.halle@eliosa.com';
public $username = '6363e9d3b0fbcc689c98e18a1a0ba9b5';
public $password = 'ea3818da6ef29051a081297d4e4ea6cb';
public $host = 'in.mailjet.com';
public $secure = 'ssl';
public $port = '465';
} home/wuectly/www/administrator/components/com_config/helper/config.php 0000604 00000005637 15245630434 0022436 0 ustar 00 <?php
/**
* @package Joomla.Administrator
* @subpackage com_config
*
* @copyright (C) 2012 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
/**
* Components helper for com_config
*
* @since 3.0
*/
class ConfigHelperConfig extends JHelperContent
{
/**
* Get an array of all enabled components.
*
* @return array
*
* @since 3.0
*/
public static function getAllComponents()
{
$db = JFactory::getDbo();
$query = $db->getQuery(true)
->select('element')
->from('#__extensions')
->where('type = ' . $db->quote('component'))
->where('enabled = 1');
$db->setQuery($query);
$result = $db->loadColumn();
return $result;
}
/**
* Returns true if the component has configuration options.
*
* @param string $component Component name
*
* @return boolean
*
* @since 3.0
*/
public static function hasComponentConfig($component)
{
return is_file(JPATH_ADMINISTRATOR . '/components/' . $component . '/config.xml');
}
/**
* Returns an array of all components with configuration options.
* Optionally return only those components for which the current user has 'core.manage' rights.
*
* @param boolean $authCheck True to restrict to components where current user has 'core.manage' rights.
*
* @return array
*
* @since 3.0
*/
public static function getComponentsWithConfig($authCheck = true)
{
$result = array();
$components = self::getAllComponents();
$user = JFactory::getUser();
// Remove com_config from the array as that may have weird side effects
$components = array_diff($components, array('com_config'));
foreach ($components as $component)
{
if (self::hasComponentConfig($component) && (!$authCheck || $user->authorise('core.manage', $component)))
{
self::loadLanguageForComponent($component);
$result[$component] = JApplicationHelper::stringURLSafe(JText::_($component)) . '_' . $component;
}
}
asort($result);
return array_keys($result);
}
/**
* Load the sys language for the given component.
*
* @param array $components Array of component names.
*
* @return void
*
* @since 3.0
*/
public static function loadLanguageForComponents($components)
{
foreach ($components as $component)
{
self::loadLanguageForComponent($component);
}
}
/**
* Load the sys language for the given component.
*
* @param string $component component name.
*
* @return void
*
* @since 3.5
*/
public static function loadLanguageForComponent($component)
{
if (empty($component))
{
return;
}
$lang = JFactory::getLanguage();
// Load the core file then
// Load extension-local file.
$lang->load($component . '.sys', JPATH_BASE, null, false, true)
|| $lang->load($component . '.sys', JPATH_ADMINISTRATOR . '/components/' . $component, null, false, true);
}
}
home/wuectly/www/components/com_jce/editor/plugins/core/config.php 0000604 00000002663 15245634574 0021477 0 ustar 00 <?php
/**
* @package JCE
* @subpackage Editor
*
* @copyright Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
\defined('_JEXEC') or die;
class WFCorePluginConfig
{
private static function extractContent($content)
{
$content = htmlspecialchars_decode($content);
// Remove body etc.
if (preg_match('/<body[^>]*>([\s\S]+?)<\/body>/', $content, $matches)) {
$content = trim($matches[1]);
}
return $content;
}
public static function getConfig(&$settings)
{
$wf = WFApplication::getInstance();
$startup_content_url = $wf->getParam('editor.startup_content_url', '');
$startup_content_html = $wf->getParam('editor.startup_content_html', '');
if ($startup_content_url) {
if (preg_match("#\.(htm|html|txt|md)$#", $startup_content_url) && strpos('://', $startup_content_url) === false) {
$startup_content_url = trim($startup_content_url, '/');
$file = JPATH_SITE . '/' . $startup_content_url;
if (is_file($file)) {
$startup_content_html = @file_get_contents($file);
}
}
}
if ($startup_content_html) {
$settings['startup_content_html'] = htmlspecialchars(self::extractContent($startup_content_html));
}
}
}
home/wuectly/www/components/com_jce/editor/plugins/preview/config.php 0000604 00000000661 15245634602 0022214 0 ustar 00 <?php
/**
* @package JCE
* @subpackage Editor
*
* @copyright Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
\defined('_JEXEC') or die;
class WFPreviewPluginConfig
{
public static function getConfig(&$settings)
{
$wf = WFApplication::getInstance();
$settings['extension_id'] = $wf->getContext();
}
}
home/wuectly/www/components/com_jce/editor/plugins/reference/config.php 0000604 00000000727 15245634604 0022476 0 ustar 00 <?php
/**
* @package JCE
* @subpackage Editor
*
* @copyright Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
\defined('_JEXEC') or die;
class WFReferencePluginConfig
{
public static function getConfig(&$settings)
{
$wf = WFApplication::getInstance();
$settings['reference_datetime'] = $wf->getParam('reference.datetime_format', '');
}
}
home/wuectly/www/components/com_jce/editor/plugins/emotions/config.php 0000604 00000001012 15245635337 0022365 0 ustar 00 <?php
/**
* @package JCE
* @subpackage Editor
*
* @copyright Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
\defined('_JEXEC') or die;
class WFEmotionsPluginConfig
{
public static function getConfig(&$settings)
{
$wf = WFApplication::getInstance();
$settings['emotions_smilies'] = $wf->getParam('emotions.smilies');
$settings['emotions_url'] = $wf->getParam('emotions.url');
}
}
home/wuectly/www/administrator/components/com_jce/controller/config.php 0000604 00000001442 15245654237 0022633 0 ustar 00 <?php
/**
* @package JCE
* @subpackage Admin
*
* @copyright Copyright (C) 2005 - 2023 Open Source Matters, Inc. All rights reserved.
* @copyright Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
\defined('_JEXEC') or die;
use Joomla\CMS\MVC\Controller\FormController;
class JceControllerConfig extends FormController
{
public function __construct($config = array())
{
parent::__construct($config);
// return to control panel on cancel/close
$this->view_list = 'cpanel';
// only for Joomla 3.x
if (version_compare(JVERSION, '4', 'lt')) {
require_once JPATH_COMPONENT_ADMINISTRATOR . '/includes/classmap.php';
}
}
}
home/wuectly/www/administrator/components/com_mailjet/lib/config.php 0000604 00000000630 15245662750 0022077 0 ustar 00 <?php
/**
* @author Mailjet SAS
*
* @copyright Copyright (C) 2014 Mailjet SAS.
* @license GNU General Public License version 2 or later; see LICENSE
*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
$myHookUrl = JURI::base().'components/com_mailjet/lib/hook.php';
$myExitUrl = JURI::base().'components/com_mailjet/lib/exit.php';
$resellerName = 'test'; home/wuectly/www/components/com_jce/editor/plugins/ui/config.php 0000604 00000001175 15245673620 0021154 0 ustar 00 <?php
/**
* @package JCE
* @subpackage Editor
*
* @copyright Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
\defined('_JEXEC') or die;
class WFUiPluginConfig
{
public static function getConfig(&$settings)
{
$wf = WFApplication::getInstance();
$settings['object_resizing'] = $wf->getParam('editor.object_resizing', 1);
if ((int) $settings['object_resizing'] === 0) {
$settings['object_resizing'] = false;
} else {
$settings['object_resizing'] = '';
}
}
}
home/wuectly/www/components/com_jce/editor/plugins/media/config.php 0000604 00000007077 15245673740 0021630 0 ustar 00 <?php
/**
* @package JCE
* @subpackage Editor
*
* @copyright Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
\defined('_JEXEC') or die;
class WFMediaPluginConfig
{
public static function getConfig(&$settings)
{
$wf = WFApplication::getInstance();
$tags = array();
$elements = array(
'audio' => array('audio', 'source'),
'video' => array('video', 'source'),
'embed' => array('embed'),
'object' => array('object', 'param'),
);
$allow_iframes = (int) $wf->getParam('media.iframes', 0);
$iframes_supported_media_custom = array();
if ($allow_iframes) {
$tags[] = 'iframe';
// may be overwritten by mediamanager config - ../mediamanager/config.php
if ($allow_iframes == 2) {
$settings['media_iframes_allow_local'] = true;
}
if ($allow_iframes == 3) {
$settings['media_iframes_supported_media'] = array();
$settings['media_iframes_allow_supported'] = true;
$iframes_supported_media = $wf->getParam('media.iframes_supported_media', array('youtube', 'vimeo', 'dailymotion', 'scribd', 'slideshare', 'soundcloud', 'spotify', 'ted', 'twitch', 'bandcamp', 'calendly'));
// get values only
$iframes_supported_media = array_values($iframes_supported_media);
$iframes_supported_media_custom = $wf->getParam('media.iframes_supported_media_custom', array());
// get values only
if (!empty($iframes_supported_media_custom)) {
$iframes_supported_media_custom = array_values($iframes_supported_media_custom);
}
$settings['media_iframes_supported_media'] = array_merge($iframes_supported_media, $iframes_supported_media_custom);
}
}
foreach ($elements as $name => $items) {
$default = 1;
if ($name == 'object' || $name == 'embed') {
$default = 0;
}
$allowed = (int) $wf->getParam('media.' . $name, $default);
if ($allowed) {
$tags = array_merge($tags, $items);
if ($allowed == 2) {
$settings['media_' . $name . '_allow_local'] = true;
}
}
}
$tags = array_unique(array_values($tags));
$settings['media_valid_elements'] = array_values($tags);
$settings['media_live_embed'] = $wf->getParam('media.live_embed', 1);
$sandbox = (bool) $wf->getParam('media.iframes_sandbox', 1);
if ($sandbox == false) {
$settings['media_iframes_sandbox'] = false;
} else {
$sandbox_exclusions = $wf->getParam('media.iframes_sandbox_exclusions', []);
// add custom urls to sandbox exclusions
if (!empty($iframes_supported_media_custom)) {
$sandbox_exclusions = array_merge($sandbox_exclusions, $iframes_supported_media_custom);
}
if (!empty($sandbox_exclusions)) {
$settings['media_iframes_sandbox_exclusions'] = $sandbox_exclusions;
}
}
$settings['strict_media_embeds'] = (bool) $wf->getParam('media.strict_media_embeds', 1);
// allow all elements
$settings['invalid_elements'] = array_diff($settings['invalid_elements'], array('audio', 'video', 'source', 'embed', 'object', 'param', 'iframe'));
}
}
home/wuectly/www/administrator/components/com_jce/models/config.php 0000604 00000013230 15245703530 0021720 0 ustar 00 <?php
/**
* @package JCE
* @subpackage Admin
*
* @copyright Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved.
* @copyright Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
\defined('_JEXEC') or die;
use Joomla\CMS\Factory;
use Joomla\CMS\MVC\Model\FormModel;
use Joomla\CMS\Table\Table;
use Joomla\Event\DispatcherAwareInterface;
class JceModelConfig extends FormModel
{
/**
* Returns a Table object, always creating it.
*
* @param type $type The table type to instantiate
* @param string $prefix A prefix for the table class name. Optional
* @param array $config Configuration array for model. Optional
*
* @return JTable A database object
*
* @since 1.6
*/
public function getTable($type = 'Extension', $prefix = 'JTable', $config = array())
{
return Table::getInstance($type, $prefix, $config);
}
/**
* Method to get a form object.
*
* @param array $data Data for the form
* @param bool $loadData True if the form is to load its own data (default case), false if not
*
* @return mixed A JForm object on success, false on failure
*
* @since 1.6
*/
public function getForm($data = array(), $loadData = true)
{
if ($this instanceof DispatcherAwareInterface) {
$this->setDispatcher(Factory::getApplication()->getDispatcher());
}
// Get the form.
$form = $this->loadForm('com_jce.config', 'config', array('control' => 'jform', 'load_data' => $loadData));
if (empty($form)) {
return false;
}
return $form;
}
/**
* Method to get the data that should be injected in the form.
*
* @return mixed The data for the form
*
* @since 1.6
*/
protected function loadFormData()
{
// Check the session for previously entered form data.
$data = Factory::getApplication()->getUserState('com_jce.config.data', array());
if (empty($data)) {
$data = $this->getData();
}
$this->preprocessData('com_jce.config', $data);
return $data;
}
/* Override to prevent plugins from processing form data */
protected function preprocessData($context, &$data, $group = 'system')
{
if (!isset($data->params)) {
return;
}
$config = $data->params;
if (is_string($config)) {
$config = json_decode($config, true);
}
if (empty($config)) {
return;
}
if (!empty($config['custom_config'])) {
// settings syntax, eg: key:value
if (is_string($config['custom_config']) && strpos($config['custom_config'], ':') !== false) {
if (!WFUtility::isJson($config['custom_config'])) {
$values = explode(';', $config['custom_config']);
// reset as array
$config['custom_config'] = array();
foreach ($values as $value) {
list($key, $val) = explode(':', $value);
$config['custom_config'][] = array(
'name' => $key,
'value' => trim($val, " \t\n\r\0\x0B'\""),
);
}
}
}
}
$data->params = $config;
}
/**
* Method to get the configuration data.
*
* This method will load the global configuration data straight from
* JConfig. If configuration data has been saved in the session, that
* data will be merged into the original data, overwriting it.
*
* @return array An array containg all global config data
*
* @since 1.6
*/
public function getData()
{
$table = $this->getTable();
$id = $table->find(array(
'type' => 'plugin',
'element' => 'jce',
'folder' => 'editors',
));
if (!$table->load($id)) {
$this->setError($table->getError());
return false;
}
// json_decode
$json = json_decode($table->params, true);
if (empty($json)) {
$json = array();
}
array_walk($json, function (&$value, $key) {
if (is_numeric($value)) {
$value = $value + 0;
}
});
$data = new StdClass;
$data->params = $json;
return $data;
}
/**
* Method to save the form data.
*
* @param array The form data
*
* @return bool True on success
*
* @since 2.7
*/
public function save($data)
{
$table = $this->getTable();
$id = $table->find(array(
'type' => 'plugin',
'element' => 'jce',
'folder' => 'editors',
));
if (!$id) {
$this->setError('Invalid plugin');
return false;
}
// Load the previous Data
if (!$table->load($id)) {
$this->setError($table->getError());
return false;
}
// Bind the data.
if (!$table->bind($data)) {
$this->setError($table->getError());
return false;
}
// Check the data.
if (!$table->check()) {
$this->setError($table->getError());
return false;
}
// Store the data.
if (!$table->store()) {
$this->setError($table->getError());
return false;
}
return true;
}
}
home/wuectly/www/components/com_jce/editor/plugins/browser/config.php 0000604 00000000577 15245746042 0022226 0 ustar 00 <?php
/**
* @package JCE
* @subpackage Editor
*
* @copyright Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
\defined('_JEXEC') or die;
class WFBrowserPluginConfig
{
public static function getConfig(&$settings)
{
$settings['file_browser_callback'] = '';
}
}
home/wuectly/www/components/com_jce/editor/plugins/advlist/config.php 0000604 00000003241 15245746047 0022205 0 ustar 00 <?php
/**
* @package JCE
* @subpackage Editor
*
* @copyright Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
\defined('_JEXEC') or die;
class WFAdvlistPluginConfig
{
public static function getConfig(&$settings)
{
$wf = WFApplication::getInstance();
$bullet = self::getBulletList();
$settings['advlist_bullist_styles'] = $bullet !== false ? implode(',', $bullet) : false;
$number = self::getNumberList();
$settings['advlist_number_styles'] = $number !== false ? implode(',', $number) : false;
$settings['advlist_bullist_classes'] = $wf->getParam('lists.bullet_classes', '');
$settings['advlist_numlist_classes'] = $wf->getParam('lists.numlist_classes', '');
$settings['advlist_bullist_custom_classes'] = $wf->getParam('lists.bullet_custom_classes', []);
$settings['advlist_numlist_custom_classes'] = $wf->getParam('lists.numlist_custom_classes', []);
}
private static function getNumberList()
{
$wf = WFApplication::getInstance();
$number = (array) $wf->getParam('lists.number_styles');
if (empty($number) || (count($number) === 1 && array_shift($number) === 'default')) {
return false;
}
return $number;
}
private static function getBulletList()
{
$wf = WFApplication::getInstance();
$bullet = (array) $wf->getParam('lists.bullet_styles');
if (empty($bullet) || (count($bullet) === 1 && array_shift($bullet) === 'default')) {
return false;
}
return $bullet;
}
}
home/wuectly/www/components/com_jce/editor/plugins/cleanup/config.php 0000604 00000014273 15245757433 0022176 0 ustar 00 <?php
/**
* @package JCE
* @subpackage Editor
*
* @copyright Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
\defined('_JEXEC') or die;
class WFCleanupPluginConfig
{
private static $invalid_elements = array('iframe', 'object', 'param', 'embed', 'audio', 'video', 'source', 'script', 'style', 'applet', 'body', 'bgsound', 'base', 'basefont', 'frame', 'frameset', 'head', 'html', 'id', 'ilayer', 'layer', 'link', 'meta', 'name', 'title', 'xml');
public static function getConfig(&$settings)
{
$wf = WFApplication::getInstance();
// Encoding
$settings['entity_encoding'] = $wf->getParam('editor.entity_encoding');
// keep
$nbsp = (bool) $wf->getParam('editor.keep_nbsp', 1);
$settings['keep_nbsp'] = $nbsp;
// use named encoding with limited entities set if raw/utf-8 and keep_nbsp === true
if ($settings['entity_encoding'] === 'raw' && $nbsp) {
$settings['entity_encoding'] = 'named';
$settings['entities'] = '160,nbsp,173,shy';
}
// set "plugin mode"
$settings['cleanup_pluginmode'] = $wf->getParam('editor.cleanup_pluginmode', 0, 0);
// get verify html (default is true)
$settings['verify_html'] = $wf->getParam('editor.verify_html', 1, 1, 'boolean', false);
// get sanitize html (default is true)
$settings['sanitize_html'] = $wf->getParam('editor.sanitize_html', 1, 1, 'boolean', false);
$settings['pad_empty_tags'] = $wf->getParam('editor.pad_empty_tags', 1, 1, 'boolean');
// set schema
$settings['schema'] = $wf->getParam('editor.schema', 'mixed', 'mixed');
if ($settings['schema'] === 'html5') {
$settings['schema'] = 'html5-strict';
}
$settings['validate_styles'] = $wf->getParam('editor.validate_styles', 1, 1, 'boolean', false);
// Get Extended elements
$settings['extended_valid_elements'] = self::processValue($wf->getParam('editor.extended_elements', ''));
// Configuration list of invalid elements as array
$settings['invalid_elements'] = self::processValue($wf->getParam('editor.invalid_elements', ''));
// Add elements to invalid list (removed by plugin)
$settings['invalid_elements'] = self::normalizeList(
array_merge($settings['invalid_elements'], self::$invalid_elements)
);
// process extended_valid_elements
if ($settings['extended_valid_elements']) {
$extended_elements = $settings['extended_valid_elements'];
$elements = array();
// add wildcard attributes if none specified
for ($i = 0; $i < count($extended_elements); ++$i) {
$value = $extended_elements[$i];
// clean up value
$value = preg_replace('#[^a-zA-Z0-9_\-\[\]\*@\|\/!=\:\?+\#]#', '', $value);
$pos = strpos($value, '[');
if ($pos === false) {
$elements[] = $value;
$value .= '[*]';
} else {
$elements[] = substr($value, 0, $pos);
}
$extended_elements[$i] = $value;
}
// restore settings to array
$settings['extended_valid_elements'] = $extended_elements;
if (!empty($elements)) {
$settings['invalid_elements'] = array_diff($settings['invalid_elements'], $elements);
}
}
// Final cleanup + reindex
$settings['invalid_elements'] = self::normalizeList($settings['invalid_elements']);
$settings['invalid_attributes'] = self::processValue($wf->getParam('editor.invalid_attributes', 'dynsrc,lowsrc'));
$settings['invalid_attribute_values'] = self::processValue($wf->getParam('editor.invalid_attribute_values'));
$allow_script = $wf->getParam('editor.allow_javascript', 0, 0, 'boolean');
// if scripts are allowed, then allow event attributes
if ($allow_script || (bool) $wf->getParam('editor.allow_event_attributes')) {
$settings['allow_event_attributes'] = true;
}
}
private static function normalizeList($values)
{
$values = array_map('trim', (array) $values);
$values = array_filter($values, 'strlen'); // removes '' and whitespace-only
$values = array_values(array_unique($values)); // reindex + unique
// optional, but helps stable comparisons:
// sort($values, SORT_STRING);
return $values;
}
/**
* Normalise a value or set of values into a flat array.
*
* Accepts a string, an array, or a mixed array containing delimited strings,
* and converts the input into a single, flattened array of trimmed values.
*
* Examples:
* - "one,two" -> ["one", "two"]
* - ["one", "two"] -> ["one", "two"]
* - ["one", "two,three"] -> ["one", "two", "three"]
*
* Empty values are removed and all values are trimmed.
*
* @param string|array $values A delimited string, an array of values,
* or an array containing delimited strings.
* @param string $seperator The value separator to split on.
*
* @return array A flat array of normalised values.
*/
public static function processValue($values, $seperator = ',')
{
if (is_array($values)) {
$values = array_filter($values, 'trim');
foreach ($values as $key => $value) {
$value = trim($value);
if (is_string($value) && strpos($value, $seperator) !== false) {
$values = array_merge($values, explode($seperator, $value));
unset($values[$key]);
}
}
} elseif (is_string($values)) {
$values = explode($seperator, $values);
} else {
$values = [];
}
$values = array_values(
array_filter(
array_map('trim', $values),
'strlen'
)
);
return $values;
}
}