Файловый менеджер - Редактировать - /home/lmsyaran/public_html/pusher/tinymce.tar
Назад
field/skins.php 0000644 00000002740 15117026730 0007474 0 ustar 00 <?php /** * @package Joomla.Plugin * @subpackage Editors.tinymce * * @copyright (C) 2014 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; jimport('joomla.form.helper'); JFormHelper::loadFieldClass('list'); /** * Generates the list of options for available skins. * * @package Joomla.Plugin * @subpackage Editors.tinymce * @since 3.4 */ class JFormFieldSkins extends JFormFieldList { protected $type = 'skins'; /** * Method to get the skins options. * * @return array The skins option objects. * * @since 3.4 */ public function getOptions() { $options = array(); $directories = glob(JPATH_ROOT . '/media/editors/tinymce/skins' . '/*', GLOB_ONLYDIR); for ($i = 0, $iMax = count($directories); $i < $iMax; ++$i) { $dir = basename($directories[$i]); $options[] = JHtml::_('select.option', $i, $dir); } $options = array_merge(parent::getOptions(), $options); return $options; } /** * Method to get the field input markup for the list of skins. * * @return string The field input markup. * * @since 3.4 */ protected function getInput() { $html = array(); // Get the field options. $options = (array) $this->getOptions(); // Create a regular list. $html[] = JHtml::_('select.genericlist', $options, $this->name, '', 'value', 'text', $this->value, $this->id); return implode($html); } } field/tinymcebuilder.php 0000644 00000011055 15117026730 0011363 0 ustar 00 <?php /** * @package Joomla.Plugin * @subpackage Editors.tinymce * * @copyright (C) 2016 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; /** * Form Field class for the TinyMCE editor. * * @package Joomla.Plugin * @subpackage Editors.tinymce * @since 3.7.0 */ class JFormFieldTinymceBuilder extends JFormField { /** * The form field type. * * @var string * @since 3.7.0 */ protected $type = 'tinymcebuilder'; /** * Name of the layout being used to render the field * * @var string * @since 3.7.0 */ protected $layout = 'plugins.editors.tinymce.field.tinymcebuilder'; /** * The prepared layout data * * @var array * @since 3.7.0 */ protected $layoutData = array(); /** * Method to get the data to be passed to the layout for rendering. * * @return array * * @since 3.7.0 */ protected function getLayoutData() { if (!empty($this->layoutData)) { return $this->layoutData; } $data = parent::getLayoutData(); $paramsAll = (object) $this->form->getValue('params'); $setsAmount = empty($paramsAll->sets_amount) ? 3 : $paramsAll->sets_amount; if (empty($data['value'])) { $data['value'] = array(); } // Get the plugin require_once JPATH_PLUGINS . '/editors/tinymce/tinymce.php'; $menus = array( 'edit' => array('label' => 'Edit'), 'insert' => array('label' => 'Insert'), 'view' => array('label' => 'View'), 'format' => array('label' => 'Format'), 'table' => array('label' => 'Table'), 'tools' => array('label' => 'Tools'), ); $data['menus'] = $menus; $data['menubarSource'] = array_keys($menus); $data['buttons'] = PlgEditorTinymce::getKnownButtons(); $data['buttonsSource'] = array_keys($data['buttons']); $data['toolbarPreset'] = PlgEditorTinymce::getToolbarPreset(); $data['setsAmount'] = $setsAmount; // Get array of sets names for ($i = 0; $i < $setsAmount; $i++) { $data['setsNames'][$i] = JText::sprintf('PLG_TINY_SET_TITLE', $i); } // Prepare the forms for each set $setsForms = array(); $formsource = JPATH_PLUGINS . '/editors/tinymce/form/setoptions.xml'; // Preload an old params for B/C $setParams = new stdClass; if (!empty($paramsAll->html_width) && empty($paramsAll->configuration['setoptions'])) { $plugin = JPluginHelper::getPlugin('editors', 'tinymce'); JFactory::getApplication()->enqueueMessage(JText::sprintf('PLG_TINY_LEGACY_WARNING', '#'), 'warning'); if (is_object($plugin) && !empty($plugin->params)) { $setParams = (object) json_decode($plugin->params); } } // Collect already used groups $groupsInUse = array(); // Prepare the Set forms, for the set options foreach (array_keys($data['setsNames']) as $num) { $formname = 'set.form.' . $num; $control = $this->name . '[setoptions][' . $num . ']'; $setsForms[$num] = JForm::getInstance($formname, $formsource, array('control' => $control)); // Check whether we already have saved values or it first time or even old params if (empty($this->value['setoptions'][$num])) { $formValues = $setParams; /* * Predefine group: * Set 0: for Administrator, Editor, Super Users (4,7,8) * Set 1: for Registered, Manager (2,6), all else are public */ $formValues->access = !$num ? array(4,7,8) : ($num === 1 ? array(2,6) : array()); // Assign Public to the new Set, but only when it not in use already if (empty($formValues->access) && !in_array(1, $groupsInUse)) { $formValues->access = array(1); } } else { $formValues = (object) $this->value['setoptions'][$num]; } // Collect already used groups if (!empty($formValues->access)) { $groupsInUse = array_merge($groupsInUse, $formValues->access); } // Bind the values $setsForms[$num]->bind($formValues); } krsort($data['setsNames']); $data['setsForms'] = $setsForms; // Check for TinyMCE language file $language = JFactory::getLanguage(); $languageFile1 = 'media/editors/tinymce/langs/' . $language->getTag() . '.js'; $languageFile2 = 'media/editors/tinymce/langs/' . substr($language->getTag(), 0, strpos($language->getTag(), '-')) . '.js'; $data['languageFile'] = ''; if (file_exists(JPATH_ROOT . '/' . $languageFile1)) { $data['languageFile'] = $languageFile1; } elseif (file_exists(JPATH_ROOT . '/' . $languageFile2)) { $data['languageFile'] = $languageFile2; } $this->layoutData = $data; return $data; } } field/uploaddirs.php 0000644 00000004550 15117026730 0010514 0 ustar 00 <?php /** * @package Joomla.Plugin * @subpackage Editors.tinymce * * @copyright (C) 2017 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; jimport('joomla.form.helper'); JFormHelper::loadFieldClass('folderlist'); /** * Generates the list of directories available for drag and drop upload. * * @package Joomla.Plugin * @subpackage Editors.tinymce * @since 3.7.0 */ class JFormFieldUploaddirs extends JFormFieldFolderList { protected $type = 'uploaddirs'; /** * Method to attach a JForm object to the field. * * @param SimpleXMLElement $element The SimpleXMLElement object representing the `<field>` tag for the form field object. * @param mixed $value The form field value to validate. * @param string $group The field name group control value. This acts as an array container for the field. * For example if the field has name="foo" and the group value is set to "bar" then the * full field name would end up being "bar[foo]". * * @return boolean True on success. * * @see JFormField::setup() * @since 3.7.0 */ public function setup(SimpleXMLElement $element, $value, $group = null) { $return = parent::setup($element, $value, $group); // Get the path in which to search for file options. $this->directory = JComponentHelper::getParams('com_media')->get('image_path'); $this->recursive = true; $this->hideDefault = true; return $return; } /** * Method to get the directories options. * * @return array The dirs option objects. * * @since 3.7.0 */ public function getOptions() { return parent::getOptions(); } /** * Method to get the field input markup for the list of directories. * * @return string The field input markup. * * @since 3.7.0 */ protected function getInput() { $html = array(); // Get the field options. $options = (array) $this->getOptions(); // Reset the non selected value to null if ($options[0]->value === '-1') { $options[0]->value = ''; } // Create a regular list. $html[] = JHtml::_('select.genericlist', $options, $this->name, '', 'value', 'text', $this->value, $this->id); return implode($html); } } form/setoptions.xml 0000644 00000017641 15117026730 0010453 0 ustar 00 <?xml version="1.0" encoding="utf-8"?> <form> <field name="access" type="usergrouplist" label="PLG_TINY_FIELD_SETACCESS_LABEL" description="PLG_TINY_FIELD_SETACCESS_DESC" multiple="true" class="access-select" labelclass="label label-success" /> <field name="skins" type="note" label="PLG_TINY_FIELD_SKIN_INFO_LABEL" description="PLG_TINY_FIELD_SKIN_INFO_DESC" /> <field name="skin" type="skins" label="PLG_TINY_FIELD_SKIN_LABEL" description="PLG_TINY_FIELD_SKIN_DESC" /> <field name="skin_admin" type="skins" label="PLG_TINY_FIELD_SKIN_ADMIN_LABEL" description="PLG_TINY_FIELD_SKIN_ADMIN_DESC" /> <field name="mobile" type="radio" label="PLG_TINY_FIELD_MOBILE_LABEL" description="PLG_TINY_FIELD_MOBILE_DESC" class="btn-group btn-group-yesno" default="0" > <option value="1">JON</option> <option value="0">JOFF</option> </field> <field name="drag_drop" type="radio" label="PLG_TINY_FIELD_DRAG_DROP_LABEL" description="PLG_TINY_FIELD_DRAG_DROP_DESC" class="btn-group btn-group-yesno" default="1" > <option value="1">JON</option> <option value="0">JOFF</option> </field> <field name="path" type="uploaddirs" label="PLG_TINY_FIELD_CUSTOM_PATH_LABEL" description="PLG_TINY_FIELD_CUSTOM_PATH_DESC" class="input-xxlarge" showon="drag_drop:1" /> <field name="entity_encoding" type="list" label="PLG_TINY_FIELD_ENCODING_LABEL" description="PLG_TINY_FIELD_ENCODING_DESC" default="raw" > <option value="named">PLG_TINY_FIELD_VALUE_NAMED</option> <option value="numeric">PLG_TINY_FIELD_VALUE_NUMERIC</option> <option value="raw">PLG_TINY_FIELD_VALUE_RAW</option> </field> <field name="lang_mode" type="radio" label="PLG_TINY_FIELD_LANGSELECT_LABEL" description="PLG_TINY_FIELD_LANGSELECT_DESC" class="btn-group btn-group-yesno" default="1" > <option value="1">JON</option> <option value="0">JOFF</option> </field> <field name="lang_code" type="filelist" label="PLG_TINY_FIELD_LANGCODE_LABEL" description="PLG_TINY_FIELD_LANGCODE_DESC" class="inputbox" stripext="1" directory="media/editors/tinymce/langs/" hide_none="1" default="en" hide_default="1" filter="\.js$" size="10" showon="lang_mode:0" /> <field name="text_direction" type="list" label="PLG_TINY_FIELD_DIRECTION_LABEL" description="PLG_TINY_FIELD_DIRECTION_DESC" default="ltr" > <option value="ltr">PLG_TINY_FIELD_VALUE_LTR</option> <option value="rtl">PLG_TINY_FIELD_VALUE_RTL</option> </field> <field name="content_css" type="radio" label="PLG_TINY_FIELD_CSS_LABEL" description="PLG_TINY_FIELD_CSS_DESC" class="btn-group btn-group-yesno" default="1" > <option value="1">JON</option> <option value="0">JOFF</option> </field> <field name="content_css_custom" type="text" label="PLG_TINY_FIELD_CUSTOM_CSS_LABEL" description="PLG_TINY_FIELD_CUSTOM_CSS_DESC" class="input-xxlarge" /> <field name="relative_urls" type="list" label="PLG_TINY_FIELD_URLS_LABEL" description="PLG_TINY_FIELD_URLS_DESC" default="1" > <option value="0">PLG_TINY_FIELD_VALUE_ABSOLUTE</option> <option value="1">PLG_TINY_FIELD_VALUE_RELATIVE</option> </field> <field name="newlines" type="list" label="PLG_TINY_FIELD_NEWLINES_LABEL" description="PLG_TINY_FIELD_NEWLINES_DESC" default="0" > <option value="1">PLG_TINY_FIELD_VALUE_BR</option> <option value="0">PLG_TINY_FIELD_VALUE_P</option> </field> <field name="use_config_textfilters" type="radio" label="PLG_TINY_CONFIG_TEXTFILTER_ACL_LABEL" description="PLG_TINY_CONFIG_TEXTFILTER_ACL_DESC" class="btn-group btn-group-yesno" default="0" > <option value="1">JON</option> <option value="0">JOFF</option> </field> <field name="invalid_elements" type="text" label="PLG_TINY_FIELD_PROHIBITED_LABEL" description="PLG_TINY_FIELD_PROHIBITED_DESC" showon="use_config_textfilters:0" default="script,applet,iframe" class="input-xxlarge" /> <field name="valid_elements" type="text" label="PLG_TINY_FIELD_VALIDELEMENTS_LABEL" description="PLG_TINY_FIELD_VALIDELEMENTS_DESC" showon="use_config_textfilters:0" class="input-xxlarge" /> <field name="extended_elements" type="text" label="PLG_TINY_FIELD_ELEMENTS_LABEL" description="PLG_TINY_FIELD_ELEMENTS_DESC" showon="use_config_textfilters:0" class="input-xxlarge" /> <!-- Extra plugins --> <field name="resizing" type="radio" label="PLG_TINY_FIELD_RESIZING_LABEL" description="PLG_TINY_FIELD_RESIZING_DESC" class="btn-group btn-group-yesno" default="1" > <option value="1">JON</option> <option value="0">JOFF</option> </field> <field name="resize_horizontal" type="radio" label="PLG_TINY_FIELD_RESIZE_HORIZONTAL_LABEL" description="PLG_TINY_FIELD_RESIZE_HORIZONTAL_DESC" class="btn-group btn-group-yesno" default="1" showon="resizing:1" > <option value="1">JON</option> <option value="0">JOFF</option> </field> <field name="element_path" type="radio" label="PLG_TINY_FIELD_PATH_LABEL" description="PLG_TINY_FIELD_PATH_DESC" class="btn-group btn-group-yesno" default="0" > <option value="1">JON</option> <option value="0">JOFF</option> </field> <field name="wordcount" type="radio" label="PLG_TINY_FIELD_WORDCOUNT_LABEL" description="PLG_TINY_FIELD_WORDCOUNT_DESC" class="btn-group btn-group-yesno" default="1" > <option value="1">JON</option> <option value="0">JOFF</option> </field> <field name="image_advtab" type="radio" label="PLG_TINY_FIELD_ADVIMAGE_LABEL" description="PLG_TINY_FIELD_ADVIMAGE_DESC" class="btn-group btn-group-yesno" default="1" > <option value="1">JON</option> <option value="0">JOFF</option> </field> <field name="advlist" type="radio" label="PLG_TINY_FIELD_ADVLIST_LABEL" description="PLG_TINY_FIELD_ADVLIST_DESC" class="btn-group btn-group-yesno" default="1" > <option value="1">JON</option> <option value="0">JOFF</option> </field> <field name="contextmenu" type="radio" label="PLG_TINY_FIELD_CONTEXTMENU_LABEL" description="PLG_TINY_FIELD_CONTEXTMENU_DESC" class="btn-group btn-group-yesno" default="1" > <option value="1">JON</option> <option value="0">JOFF</option> </field> <field name="custom_plugin" type="text" label="PLG_TINY_FIELD_CUSTOMPLUGIN_LABEL" description="PLG_TINY_FIELD_CUSTOMPLUGIN_DESC" class="input-xxlarge" /> <field name="custom_button" type="text" label="PLG_TINY_FIELD_CUSTOMBUTTON_LABEL" description="PLG_TINY_FIELD_CUSTOMBUTTON_DESC" class="input-xxlarge" /> </form>