Файловый менеджер - Редактировать - /home/wuectly/www/03cbe/jce.php.tar
Назад
home/wuectly/www/plugins/system/jce/jce.php 0000604 00000003621 15245536005 0015037 0 ustar 00 <?php /** * @copyright Copyright (C) 2015 - 2023 Ryan Demmer. All rights reserved * @copyright Copyright (C) 2005 - 2014 Open Source Matters, Inc. All rights reserved * @license GNU General Public License version 2 or later */ defined('JPATH_BASE') or die; JLoader::registerNamespace('Joomla\\Plugin\\Editors\\Jce', JPATH_PLUGINS . '/editors/jce/src', false, false, 'psr4'); JLoader::register('WfBrowserHelper', JPATH_ADMINISTRATOR . '/components/com_jce/helpers/browser.php'); use Joomla\CMS\Factory; use Joomla\CMS\Form\Form; use Joomla\CMS\Plugin\CMSPlugin; /** * JCE. * * @since 2.5.5 */ class PlgSystemJce extends CMSPlugin { public function onAfterDispatch() { $app = Factory::getApplication(); // only in "site" if ($app->getClientId() !== 0) { return; } $document = Factory::getDocument(); // must be an html doctype if ($document->getType() !== 'html') { return true; } $app->triggerEvent('onWfPluginAfterDispatch'); } /** * adds additional fields to the user editing form. * * @param Form $form The form to be altered * @param mixed $data The associated data for the form * * @return bool * * @since 2.6.64 */ public function onContentPrepareForm(Form $form, $data = []) { $app = Factory::getApplication(); // Only for admin if (!$app->isClient('administrator')) { return true; } $formName = $form->getName(); // profile form data if ($form->getName() == 'com_config.component') { // only for JCE component if ($app->input->getCmd('component') !== 'com_jce') { return true; } Form::addFormPath(__DIR__ . '/forms'); $form->loadFile('updates', false, '/config'); } } } home/wuectly/www/plugins/quickicon/jce/jce.php 0000604 00000003430 15245536007 0015500 0 ustar 00 <?php /** * @copyright Copyright (c) 2009 - 2023 Ryan Demmer. All rights reserved * @license GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html * JCE is free software. This version may have been modified pursuant * to the GNU General Public License, and as distributed it includes or * is derivative of works licensed under the GNU General Public License or * other free or open source software licenses */ defined('_JEXEC') or die; use Joomla\CMS\Factory; use Joomla\CMS\Component\ComponentHelper; use Joomla\CMS\Plugin\CMSPlugin; use Joomla\CMS\Language\Text; /** * JCE File Browser Quick Icon plugin. * * @since 2.1 */ class plgQuickiconJce extends CMSPlugin { public function __construct(&$subject, $config) { parent::__construct($subject, $config); $app = Factory::getApplication(); // only in Admin and only if the component is enabled if ($app->getClientId() !== 1 || ComponentHelper::getComponent('com_jce', true)->enabled === false) { return; } $this->loadLanguage(); } public function onGetIcons($context) { if ($context != $this->params->get('context', 'mod_quickicon')) { return; } $user = Factory::getUser(); if (!$user->authorise('jce.browser', 'com_jce')) { return; } $language = Factory::getLanguage(); $language->load('com_jce', JPATH_ADMINISTRATOR); return array(array( 'link' => 'index.php?option=com_jce&view=browser', 'image' => 'picture fa fa-image', 'access' => array('jce.browser', 'com_jce'), 'text' => Text::_('PLG_QUICKICON_JCE_TITLE'), 'id' => 'plg_quickicon_jce', )); } } home/wuectly/www/plugins/installer/jce/jce.php 0000604 00000002434 15245557212 0015514 0 ustar 00 <?php /** * @package JCE * @subpackage Installer.Jce * * @copyright Copyright (C) 2005 - 2023 Open Source Matters, Inc. All rights reserved * @copyright Copyright (C) 2023 - 2024 Ryan Demmer. All rights reserved * @license GNU General Public License version 2 or later; see LICENSE.txt */ \defined('_JEXEC') or die; JLoader::registerNamespace('Joomla\\Plugin\\Installer\\Jce', JPATH_PLUGINS . '/installer/jce/src', false, false, 'psr4'); use Joomla\CMS\Component\ComponentHelper; use Joomla\CMS\Plugin\CMSPlugin; use Joomla\Plugin\Installer\Jce\PluginTraits\EventsTrait; /** * Handle commercial extension update authorization. * * @since 2.6 */ class plgInstallerJce extends CMSPlugin { use EventsTrait; /** * Affects constructor behavior. If true, language files will be loaded automatically. * * @var boolean */ protected $autoloadLanguage = true; /** * Get the download key from the component params or the dlid field. * * @return string The download key */ public function getDownloadKey() { $component = ComponentHelper::getComponent('com_jce'); // get key from component params in Joomla 3.x $key = $component->params->get('updates_key', ''); return $key; } } home/wuectly/www/plugins/editors/jce/jce.php 0000604 00000003634 15245570220 0015165 0 ustar 00 <?php /** * @package JCE * @subpackage Editors.Jce * * @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 */ // Do not allow direct access \defined('_JEXEC') or die; use Joomla\CMS\Editor\Editor; use Joomla\CMS\Plugin\CMSPlugin; use Joomla\Plugin\Editors\Jce\PluginTraits\XTDButtonsTrait; use Joomla\Plugin\Editors\Jce\PluginTraits\DisplayTrait; /** * JCE WYSIWYG Editor Plugin. * * @since 1.5 */ class plgEditorJCE extends CMSPlugin { use DisplayTrait; use XTDButtonsTrait; /** * Affects constructor behavior. If true, language files will be loaded automatically. * * @var boolean */ protected $autoloadLanguage = true; /** * Constructor. * * @param object $subject The object to observe * @param array $config An array that holds the plugin configuration * * @since 1.5 */ public function __construct(&$subject, $config) { parent::__construct($subject, $config); } /** * JCE WYSIWYG Editor - get the editor content. * * @vars string The name of the editor */ public function onGetContent($editor) { return $this->onSave($editor); } /** * JCE WYSIWYG Editor - set the editor content. * * @vars string The name of the editor */ public function onSetContent($editor, $html) { return "WFEditor.setContent('" . $editor . "','" . $html . "');"; } /** * JCE WYSIWYG Editor - copy editor content to form field. * * @vars string The name of the editor */ public function onSave($editor) { return "WFEditor.getContent('" . $editor . "');"; } public function onGetInsertMethod($name) { } } home/wuectly/www/plugins/extension/jce/jce.php 0000604 00000013337 15245572100 0015530 0 ustar 00 <?php /** * @copyright Copyright (C) 2005 - 2023 Open Source Matters, Inc. All rights reserved * @copyright Copyright (C) 2023 - 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\Installer\Installer; use Joomla\CMS\Plugin\CMSPlugin; use Joomla\CMS\Table\Table; use Joomla\Filesystem\File; use Joomla\Filesystem\Folder; /** * JCE extension plugin. * * @since 2.6 */ class PlgExtensionJce extends CMSPlugin { /** * Check the installer is for a valid plugin group. * * @param Joomla\CMS\Installer\Installer $installer Installer object * * @return bool * * @since 2.6 */ private function isValidPlugin($installer) { if (empty($installer->manifest)) { return false; } foreach (array('type', 'group') as $var) { $$var = (string) $installer->manifest->attributes()->{$var}; } return $type === 'plugin' && $group === 'jce'; } public function onExtensionBeforeInstall($method, $type, $manifest, $extension = 0) { if ((string) $type === "file") { // get a reference to the current installer $manifestPath = Installer::getInstance()->getPath('manifest'); if (empty($manifestPath)) { return true; } // get the filename of the manifest file, eg: pkg_jce_de-DE $element = basename($manifestPath, '.xml'); // if this matches the current install... if (strpos($element, 'pkg_jce_') !== false) { // find an existing legacy language install, eg: jce-de-DE $element = str_replace('pkg_jce_', 'jce-', $element); $table = Table::getInstance('extension'); $id = $table->find(array('type' => 'file', 'element' => $element)); if ($id) { $installer = new Installer(); // try unisntall, if this fails, delete database entry if (!$installer->uninstall('file', $id)) { $table->delete($id); } } } } } /** * Handle post extension install update sites. * * @param JInstaller $installer Installer object * @param int $eid Extension Identifier * * @since 2.6 */ public function onExtensionAfterInstall($installer, $eid) { if ($eid) { if (!$this->isValidPlugin($installer)) { return false; } $basename = basename($installer->getPath('extension_root')); // must be a valid plugin if (!preg_match('/^(editor|filesystem|links|popups)[-_]/', $basename)) { return false; } require_once JPATH_ADMINISTRATOR . '/components/com_jce/helpers/plugins.php'; // enable plugin $plugin = Table::getInstance('extension'); $plugin->load($eid); $plugin->publish(); [$type, $name] = preg_split('/[-_]/', $basename, 2); $plugin = new StdClass(); $plugin->name = $name; if ($type == 'editor') { $plugin->icon = (string) $installer->manifest->icon; $plugin->row = (int) (string) $installer->manifest->attributes()->row; $plugin->type = 'plugin'; } else { $plugin->type = 'extension'; } $plugin->path = $installer->getPath('extension_root'); JcePluginsHelper::postInstall('install', $plugin, $installer); // clean up legacy extensions if ($plugin->type == 'extension') { $path = JPATH_SITE . '/components/com_jce/editor/extensions/' . $type; // delete manifest if (is_file($path . '/' . $plugin->name . '.xml')) { File::delete($path . '/' . $plugin->name . '.xml'); } // delete file if (is_file($path . '/' . $plugin->name . '.php')) { File::delete($path . '/' . $plugin->name . '.php'); } // delete folder if (is_dir($path . '/' . $plugin->name)) { Folder::delete($path . '/' . $plugin->name); } } } } /** * Handle extension uninstall. * * @param JInstaller $installer Installer instance * @param int $eid Extension id * @param int $result Installation result * * @since 1.6 */ public function onExtensionAfterUninstall($installer, $eid, $result) { if ($eid) { if (!$this->isValidPlugin($installer)) { return false; } $basename = basename($installer->getPath('extension_root')); if (strpos($basename, '-') === false) { return false; } require_once JPATH_ADMINISTRATOR . '/components/com_jce/helpers/plugins.php'; $parts = explode('-', $basename); $type = $parts[0]; $name = $parts[1]; $plugin = new StdClass(); $plugin->name = $name; if ($type === 'editor') { $plugin->icon = (string) $installer->manifest->icon; $plugin->row = (int) (string) $installer->manifest->attributes()->row; $plugin->type = 'plugin'; } $plugin->path = $installer->getPath('extension_root'); JcePluginsHelper::postInstall('uninstall', $plugin, $installer); } } } home/wuectly/www/components/com_jce/jce.php 0000604 00000000613 15245613475 0015062 0 ustar 00 <?php /** * @package JCE * @subpackage Editor * * @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; require_once JPATH_ADMINISTRATOR . '/components/com_jce/jce.php'; home/wuectly/www/plugins/editors/jce/layouts/editor/jce.php 0000604 00000001565 15245654220 0020157 0 ustar 00 <?php /** * @package JCE * @subpackage Editors.Jce * * @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('JPATH_BASE') or die; extract($displayData); $classes = version_compare(JVERSION, '4', 'lt') ? 'joomla3' : 'mb-2'; ?> <div class="editor wf-editor-container <?php echo $classes; ?>"> <div class="wf-editor-header"></div> <textarea spellcheck="false" autocomplete="off" name="<?php echo $name; ?>" id="<?php echo $id; ?>" cols="<?php echo $cols; ?>" rows="<?php echo $rows; ?>" style="width: <?php echo $width; ?>; height: <?php echo $height; ?>;" class="<?php echo $class; ?>" ><?php echo $content; ?></textarea> </div> <?php echo $buttons ?? ''; ?>