%PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY
Server IP : 49.231.201.246 / Your IP : 216.73.216.149 Web Server : Apache/2.4.18 (Ubuntu) System : User : root ( 0) PHP Version : 7.0.33-0ubuntu0.16.04.16 Disable Function : exec,passthru,mail,shell_exec,system,proc_open,popen,ini_alter,dl,proc_close,curl_exec,curl_multi_exec,readfile,parse_ini_file,escapeshellarg,escapeshellcmd,show_source,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,mail,php_uname,phpinfo MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/html/old/plugins/system/jce/ |
Upload File : |
<?php /** * @package JCE * @subpackage System.jce * * @copyright Copyright (C) 2015 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; /** * JCE * * @package JCE * @subpackage System.jce * @since 2.5.5 */ class PlgSystemJce extends JPlugin { /** * 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); } protected function getLink($filter = 'images') { require_once(JPATH_ADMINISTRATOR . '/components/com_jce/helpers/browser.php'); $link = WFBrowserHelper::getMediaFieldLink('', $filter); return $link; } /** * adds additional fields to the user editing form * * @param JForm $form The form to be altered. * @param mixed $data The associated data for the form. * * @return boolean * * @since 1.6 */ public function onContentPrepareForm($form, $data) { $version = new JVersion; if (!$version->isCompatible('3.4')) { return true; } if (!($form instanceof JForm)) { $this->_subject->setError('JERROR_NOT_A_FORM'); return false; } $params = JComponentHelper::getParams('com_jce'); if ((bool) $params->get('replace_media_manager', 1) === false) { return; } // get form name. $name = $form->getName(); $valid = array( 'com_content.article', 'com_categories.categorycom_content', 'com_templates.style', 'com_tags.tag', 'com_banners.banner', 'com_contact.contact', 'com_newsfeeds.newsfeed' ); // only allow some forms, see - https://github.com/joomla/joomla-cms/pull/8657 if (!in_array($name, $valid)) { return true; } $config = JFactory::getConfig(); $user = JFactory::getUser(); if ($user->getParam('editor', $config->get('editor')) !== "jce") { return true; } if (!JPluginHelper::getPlugin('editors', 'jce')) { return true; } $hasMedia = false; $fields = $form->getFieldset(); foreach ($fields as $field) { $type = $field->getAttribute('type'); if (strtolower($type) === "media") { // get filter value for field, eg: images, media, files $filter = $field->getAttribute('filter', 'images'); // get file browser link $link = $this->getLink($filter); // link not available for environment if (empty($link)) { continue; } $name = $field->getAttribute('name'); $group = (string) $field->group; $form->setFieldAttribute($name, 'link', $link, $group); $form->setFieldAttribute($name, 'class', 'input-large wf-media-input', $group); $hasMedia = true; } } if ($hasMedia) { // Include jQuery JHtml::_('jquery.framework'); $document = JFactory::getDocument(); $document->addScriptDeclaration('jQuery(document).ready(function($){$(".wf-media-input").removeAttr("readonly");});'); } return true; } }