Spade

Mini Shell

Directory:~$ /home/lmsyaran/public_html/joomla4/
Upload File

[Home] [System Details] [Kill Me]
Current File:~$ /home/lmsyaran/public_html/joomla4/editor.tar

editor.php000064400000002306151161332010006535 0ustar00<?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Fields.Editor
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */

defined('_JEXEC') or die;

JLoader::import('components.com_fields.libraries.fieldsplugin',
JPATH_ADMINISTRATOR);

/**
 * Fields Editor Plugin
 *
 * @since  3.7.0
 */
class PlgFieldsEditor extends FieldsPlugin
{
	/**
	 * Transforms the field into a DOM XML element and appends it as a child
on the given parent.
	 *
	 * @param   stdClass    $field   The field.
	 * @param   DOMElement  $parent  The field node parent.
	 * @param   JForm       $form    The form.
	 *
	 * @return  DOMElement
	 *
	 * @since   3.7.0
	 */
	public function onCustomFieldsPrepareDom($field, DOMElement $parent, JForm
$form)
	{
		$fieldNode = parent::onCustomFieldsPrepareDom($field, $parent, $form);

		if (!$fieldNode)
		{
			return $fieldNode;
		}

		$fieldNode->setAttribute('buttons',
$field->fieldparams->get('buttons',
$this->params->get('buttons', 0)) ? 'true' :
'false');
		$fieldNode->setAttribute('hide', implode(',',
$field->fieldparams->get('hide', array())));

		return $fieldNode;
	}
}
editor.xml000064400000004542151161332010006552 0ustar00<?xml
version="1.0" encoding="utf-8" ?>
<extension type="plugin" version="3.7.0"
group="fields" method="upgrade">
	<name>plg_fields_editor</name>
	<author>Joomla! Project</author>
	<creationDate>March 2016</creationDate>
	<copyright>Copyright (C) 2005 - 2020 Open Source Matters. All rights
reserved.</copyright>
	<license>GNU General Public License version 2 or later; see
LICENSE.txt</license>
	<authorEmail>admin@joomla.org</authorEmail>
	<authorUrl>www.joomla.org</authorUrl>
	<version>3.7.0</version>
	<description>PLG_FIELDS_EDITOR_XML_DESCRIPTION</description>
	<files>
		<filename plugin="editor">editor.php</filename>
		<folder>params</folder>
		<folder>tmpl</folder>
	</files>
	<languages>
		<language
tag="en-GB">en-GB.plg_fields_editor.ini</language>
		<language
tag="en-GB">en-GB.plg_fields_editor.sys.ini</language>
	</languages>
	<config>
		<fields name="params">
			<fieldset name="basic">
				<field
					name="buttons"
					type="radio"
					label="PLG_FIELDS_EDITOR_PARAMS_SHOW_BUTTONS_LABEL"
					description="PLG_FIELDS_EDITOR_PARAMS_SHOW_BUTTONS_DESC"
					class="btn-group btn-group-yesno"
					default="0"
					filter="integer"
					>
					<option value="1">JYES</option>
					<option value="0">JNO</option>
				</field>

				<field
					name="hide"
					type="plugins"
					label="PLG_FIELDS_EDITOR_PARAMS_BUTTONS_HIDE_LABEL"
					description="JGLOBAL_SELECT_SOME_OPTIONS"
					folder="editors-xtd"
					multiple="true"
				/>

				<field
					name="width"
					type="text"
					label="PLG_FIELDS_EDITOR_PARAMS_WIDTH_LABEL"
					description="PLG_FIELDS_EDITOR_PARAMS_WIDTH_DESC"
					default="100%"
					size="5"
				/>

				<field
					name="height"
					type="text"
					label="PLG_FIELDS_EDITOR_PARAMS_HEIGHT_LABEL"
					description="PLG_FIELDS_EDITOR_PARAMS_HEIGHT_DESC"
					default="250px"
					size="5"
				/>

				<field
					name="filter"
					type="list"
					label="PLG_FIELDS_EDITOR_PARAMS_FILTER_LABEL"
					description="PLG_FIELDS_EDITOR_PARAMS_FILTER_DESC"
					class="btn-group"
					default="JComponentHelper::filterText"
					validate="options"
					>
					<option value="0">JNO</option>
					<option
value="raw">JLIB_FILTER_PARAMS_RAW</option>
					<option
value="safehtml">JLIB_FILTER_PARAMS_SAFEHTML</option>
					<option
value="JComponentHelper::filterText">JLIB_FILTER_PARAMS_TEXT</option>
				</field>
			</fieldset>
		</fields>
	</config>
</extension>
params/editor.xml000064400000002746151161332010010041 0ustar00<?xml
version="1.0" encoding="utf-8"?>
<form>
	<fields name="fieldparams">
		<fieldset name="fieldparams">
			<field
				name="buttons"
				type="list"
				label="PLG_FIELDS_EDITOR_PARAMS_SHOW_BUTTONS_LABEL"
				description="PLG_FIELDS_EDITOR_PARAMS_SHOW_BUTTONS_DESC"
				filter="integer"
				>
				<option
value="">COM_FIELDS_FIELD_USE_GLOBAL</option>
				<option value="1">JYES</option>
				<option value="0">JNO</option>
			</field>

			<field
				name="hide"
				type="plugins"
				label="PLG_FIELDS_EDITOR_PARAMS_BUTTONS_HIDE_LABEL"
				description="JGLOBAL_SELECT_SOME_OPTIONS"
				folder="editors-xtd"
				multiple="true"
			/>

			<field
				name="width"
				type="text"
				label="PLG_FIELDS_EDITOR_PARAMS_WIDTH_LABEL"
				description="PLG_FIELDS_EDITOR_PARAMS_WIDTH_DESC"
				size="5"
			/>

			<field
				name="height"
				type="text"
				label="PLG_FIELDS_EDITOR_PARAMS_HEIGHT_LABEL"
				description="PLG_FIELDS_EDITOR_PARAMS_HEIGHT_DESC"
				size="5"
			/>

			<field
				name="filter"
				type="list"
				label="PLG_FIELDS_TEXT_PARAMS_FILTER_LABEL"
				description="PLG_FIELDS_TEXT_PARAMS_FILTER_DESC"
				class="btn-group"
				validate="options"
				>
				<option
value="">COM_FIELDS_FIELD_USE_GLOBAL</option>
				<option value="0">JNO</option>
				<option
value="raw">JLIB_FILTER_PARAMS_RAW</option>
				<option
value="safehtml">JLIB_FILTER_PARAMS_SAFEHTML</option>
				<option
value="JComponentHelper::filterText">JLIB_FILTER_PARAMS_TEXT</option>
			</field>
		</fieldset>
	</fields>
</form>
tmpl/editor.php000064400000000563151161332010007514 0ustar00<?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Fields.Editor
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
 * @license     GNU General Public License version 2 or later; see
LICENSE.txt
 */
defined('_JEXEC') or die;

$value = $field->value;

if ($value == '')
{
	return;
}

echo JHtml::_('content.prepare', $value);