Файловый менеджер - Редактировать - /home/wuectly/www/03cbe/preview.zip
Назад
PK K�!]k�� view.html.phpnu &1i� <?php /** * @package Joomla.Administrator * @subpackage com_modules * * @copyright (C) 2005 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ // @deprecated 4.0 not used for a long time defined('_JEXEC') or die; /** * HTML View class for the Modules component * * @since 1.6 */ class ModulesViewPreview extends JViewLegacy { /** * Display the view * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * * @return void */ public function display($tpl = null) { $editor = JFactory::getConfig()->get('editor'); $this->editor = JEditor::getInstance($editor); parent::display($tpl); } } PK K�!]��\ \ tmpl/default.phpnu &1i� <?php /** * @package Joomla.Administrator * @subpackage com_modules * * @copyright (C) 2008 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ // @deprecated 4.0 not used for a long time defined('_JEXEC') or die; JFactory::getDocument()->addScriptDeclaration( ' var form = window.top.document.adminForm var title = form.title.value; var alltext = window.top.' . $this->editor->getContent('text') . '; jQuery(document).ready(function() { document.getElementById("td-title").innerHTML = title; document.getElementById("td-text").innerHTML = alltext; });' ); ?> <table class="center" width="90%"> <tr> <td class="contentheading" colspan="2" id="td-title"></td> </tr> <tr> <td valign="top" height="90%" colspan="2" id="td-text"></td> </tr> </table> PK 0"]ؘ�� � config.phpnu &1i� <?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(); } } PK 0"]�#o, , index.htmlnu &1i� <html><body bgcolor="#FFFFFF"></body></html>PK 0"]�Ir�@ @ preview.phpnu &1i� <?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\Factory; use Joomla\CMS\Language\Text; use Joomla\CMS\Plugin\PluginHelper; use Joomla\CMS\Table\Table; use Joomla\CMS\Uri\Uri; use Joomla\Registry\Registry; class WFPreviewPlugin extends WFEditorPlugin { /** * Constructor activating the default information of the class. */ public function __construct() { parent::__construct(); $request = WFRequest::getInstance(); // Setup plugin XHR callback functions $request->setRequest(array($this, 'showPreview')); } /** * Display Preview content. */ public function showPreview() { $app = Factory::getApplication(); $user = Factory::getUser(); // reset document type $document = Factory::getDocument(); $document->setType('html'); // register autoload for ContentHelperRoute JLoader::register('ContentHelperRoute', JPATH_SITE . '/components/com_content/helpers/route.php'); // get post data $data = $app->input->post->get('data', '', 'RAW'); // cleanup data $data = preg_replace(array('#<!DOCTYPE([^>]+)>#i', '#<(head|title|meta)([^>]*)>([\w\W]+)<\/1>#i', '#<\/?(html|body)([^>]*)>#i'), '', rawurldecode($data)); // prevent processing by responsify $data = '{responsive=off}' . $data; // create params registry object $params = new Registry(); $params->loadString(""); // create context $context = ""; $extension_id = $app->input->getInt('extension_id'); $extension = Table::getInstance('extension'); if ($extension->load($extension_id)) { $option = $extension->element; // set a default value if (empty($extension->params)) { $extension->params = '{}'; } // process attribs (com_content etc.) $params->loadString($extension->params); // create context $context = $option . '.article'; } $article = Table::getInstance('content'); $article->id = 0; $article->created_by = $user->get('id'); $article->parameters = new Registry(); $article->text = $data; // load system plugins PluginHelper::importPlugin('system'); // allow this to be skipped as some plugins can cause FATAL errors. if ((bool) $this->getParam('process_content', 1)) { $page = 0; // load content plugins PluginHelper::importPlugin('content'); // set error reporting off to produce empty string on Fatal error error_reporting(0); // set params flag for responsify $params->set('wf_responsify', 0); $app->triggerEvent('onContentPrepare', array($context, &$article, &$params, $page)); } $this->processURLS($article); // remove {responsive=off} from the beginning of the text $article->text = preg_replace('#^\{responsive=off\}#', '', $article->text); $app->triggerEvent('onWfContentPreview', array($context, &$article, &$params, 0)); return $article->text; } /** * Convert URLs. * * @param object $article Article object */ private function processURLS(&$article) { $base = Uri::root(true) . '/'; $buffer = $article->text; $protocols = '[a-zA-Z0-9]+:'; //To check for all unknown protocals (a protocol must contain at least one alpahnumeric fillowed by : $regex = '#(src|href|poster)="(?!/|' . $protocols . '|\#|\')([^"]*)"#m'; $buffer = preg_replace($regex, "$1=\"$base\$2\"", $buffer); $regex = '#(onclick="window.open\(\')(?!/|' . $protocols . '|\#)([^/]+[^\']*?\')#m'; $buffer = preg_replace($regex, '$1' . $base . '$2', $buffer); // ONMOUSEOVER / ONMOUSEOUT $regex = '#(onmouseover|onmouseout)="this.src=([\']+)(?!/|' . $protocols . '|\#|\')([^"]+)"#m'; $buffer = preg_replace($regex, '$1="this.src=$2' . $base . '$3$4"', $buffer); // Background image $regex = '#style\s*=\s*[\'\"](.*):\s*url\s*\([\'\"]?(?!/|' . $protocols . '|\#)([^\)\'\"]+)[\'\"]?\)#m'; $buffer = preg_replace($regex, 'style="$1: url(\'' . $base . '$2$3\')', $buffer); // OBJECT <field name="xx", value="yy"> -- fix it only inside the <param> tag $regex = '#(<param\s+)name\s*=\s*"(movie|src|url)"[^>]\s*value\s*=\s*"(?!/|' . $protocols . '|\#|\')([^"]*)"#m'; $buffer = preg_replace($regex, '$1name="$2" value="' . $base . '$3"', $buffer); // OBJECT <field value="xx", name="yy"> -- fix it only inside the <param> tag $regex = '#(<param\s+[^>]*)value\s*=\s*"(?!/|' . $protocols . '|\#|\')([^"]*)"\s*name\s*=\s*"(movie|src|url)"#m'; $buffer = preg_replace($regex, '<field value="' . $base . '$2" name="$3"', $buffer); // OBJECT data="xx" attribute -- fix it only in the object tag $regex = '#(<object\s+[^>]*)data\s*=\s*"(?!/|' . $protocols . '|\#|\')([^"]*)"#m'; $buffer = preg_replace($regex, '$1data="' . $base . '$2"$3', $buffer); $article->text = $buffer; } } PK 0"]թw� � preview.xmlnu &1i� <?xml version="1.0" ?> <extension version="3.4" type="plugin" group="jce" method="upgrade"> <name>WF_PREVIEW_TITLE</name> <version>2.9.99.2</version> <creationDate>22-04-2026</creationDate> <author>Ryan Demmer</author> <authorEmail>info@joomlacontenteditor.net</authorEmail> <authorUrl>https://www.joomlacontenteditor.net/</authorUrl> <copyright>Ryan Demmer</copyright> <license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license> <description>WF_PREVIEW_DESC</description> <icon></icon> <fields name="preview"> <fieldset name="config"> <field name="process_content" type="yesno" default="1" label="WF_PREVIEW_PARAM_PROCESS_CONTENT" description="WF_PREVIEW_PARAM_PROCESS_CONTENT_DESC"> <option value="1">JYES</option> <option value="0">JNO</option> </field> </fieldset> </fields> <help> <topic key="preview.about" title="WF_PREVIEW_HELP_ABOUT" /> </help> <languages></languages> </extension> PK K�!]k�� view.html.phpnu &1i� PK K�!]��\ \ E tmpl/default.phpnu &1i� PK 0"]ؘ�� � � config.phpnu &1i� PK 0"]�#o, , � index.htmlnu &1i� PK 0"]�Ir�@ @ 2 preview.phpnu &1i� PK 0"]թw� � � preview.xmlnu &1i� PK � �"