Your IP : 216.73.216.216


Current Path : /proc/thread-self/root/var/tmp/
Upload File :
Current File : //proc/thread-self/root/var/tmp/php9ltieZ

<?xml version="1.0" encoding="utf-8"?>
<form>
	<fields name="fieldparams">
		<fieldset name="fieldparams">
			<field
				name="showtime"
				type="radio"
				label="PLG_FIELDS_CALENDAR_PARAMS_SHOWTIME_LABEL"
				description="PLG_FIELDS_CALENDAR_PARAMS_SHOWTIME_DESC"
				class="btn-group btn-group-yesno"
				default="0"
				filter="integer"
				>
				<option value="1">JYES</option>
				<option value="0">JNO</option>
			</field>
		</fieldset>
	</fields>
</form>
<?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Fields.Calendar
 *
 * @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;

$value = $field->value;

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

if (is_array($value))
{
	$value = implode(', ', $value);
}

$formatString =  $field->fieldparams->get('showtime', 0) ? 'DATE_FORMAT_LC5' : 'DATE_FORMAT_LC4';

echo htmlentities(JHtml::_('date', $value, JText::_($formatString)));
<?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Fields.Calendar
 *
 * @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;

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

/**
 * Fields Calendar Plugin
 *
 * @since  3.7.0
 */
class PlgFieldsCalendar 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;
		}

		// Set filter to user UTC
		$fieldNode->setAttribute('filter', 'USER_UTC');

		// Set field to use translated formats
		$fieldNode->setAttribute('translateformat', '1');
		$fieldNode->setAttribute('showtime', $field->fieldparams->get('showtime', 0) ? 'true' : 'false');

		return $fieldNode;
	}
}
<?xml version="1.0" encoding="utf-8" ?>
<extension type="plugin" version="3.7.0" group="fields" method="upgrade">
	<name>plg_fields_calendar</name>
	<author>Joomla! Project</author>
	<creationDate>March 2016</creationDate>
	<copyright>(C) 2016 Open Source Matters, Inc.</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_CALENDAR_XML_DESCRIPTION</description>
	<files>
		<filename plugin="calendar">calendar.php</filename>
		<folder>params</folder>
		<folder>tmpl</folder>
	</files>
	<languages>
		<language tag="en-GB">en-GB.plg_fields_calendar.ini</language>
		<language tag="en-GB">en-GB.plg_fields_calendar.sys.ini</language>
	</languages>
</extension>
<?xml version="1.0" encoding="utf-8"?>
<form>
	<fields name="fieldparams">
		<fieldset name="fieldparams">
			<field
				name="options"
				type="subform"
				label="PLG_FIELDS_CHECKBOXES_PARAMS_OPTIONS_LABEL"
				description="PLG_FIELDS_CHECKBOXES_PARAMS_OPTIONS_DESC"
				layout="joomla.form.field.subform.repeatable-table"
				icon="list"
				multiple="true"
				>
				<form hidden="true" name="list_templates_modal" repeat="true">
					<field
						name="name"
						type="text"
						label="PLG_FIELDS_CHECKBOXES_PARAMS_OPTIONS_NAME_LABEL"
						size="30"
					/>

					<field
						name="value"
						type="text"
						label="PLG_FIELDS_CHECKBOXES_PARAMS_OPTIONS_VALUE_LABEL"
						size="30"
					/>
				</form>
			</field>
		</fieldset>
	</fields>
</form>
<?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Fields.Checkboxes
 *
 * @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;

$fieldValue = $field->value;

if ($fieldValue === '' || $fieldValue === null)
{
	return;
}

$fieldValue = (array) $fieldValue;
$texts      = array();
$options    = $this->getOptionsFromField($field);

foreach ($options as $value => $name)
{
	if (in_array((string) $value, $fieldValue))
	{
		$texts[] = JText::_($name);
	}
}

echo htmlentities(implode(', ', $texts));
<?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Fields.Checkboxes
 *
 * @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;

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

/**
 * Fields Checkboxes Plugin
 *
 * @since  3.7.0
 */
class PlgFieldsCheckboxes extends FieldsListPlugin
{
}
<?xml version="1.0" encoding="utf-8" ?>
<extension type="plugin" version="3.7.0" group="fields" method="upgrade">
	<name>plg_fields_checkboxes</name>
	<author>Joomla! Project</author>
	<creationDate>March 2016</creationDate>
	<copyright>(C) 2016 Open Source Matters, Inc.</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_CHECKBOXES_XML_DESCRIPTION</description>
	<files>
		<filename plugin="checkboxes">checkboxes.php</filename>
		<folder>params</folder>
		<folder>tmpl</folder>
	</files>
	<languages>
		<language tag="en-GB">en-GB.plg_fields_checkboxes.ini</language>
		<language tag="en-GB">en-GB.plg_fields_checkboxes.sys.ini</language>
	</languages>
	<config>
		<fields name="params">
			<fieldset name="basic">
				<field
					name="options"
					type="subform"
					label="PLG_FIELDS_CHECKBOXES_PARAMS_OPTIONS_LABEL"
					description="PLG_FIELDS_CHECKBOXES_PARAMS_OPTIONS_DESC"
					layout="joomla.form.field.subform.repeatable-table"
					icon="list"
					multiple="true"
					>
					<form hidden="true" name="list_templates_modal" repeat="true">
						<field
							name="name"
							type="text"
							label="PLG_FIELDS_CHECKBOXES_PARAMS_OPTIONS_NAME_LABEL"
							size="30"
						/>

						<field
							name="value"
							type="text"
							label="PLG_FIELDS_CHECKBOXES_PARAMS_OPTIONS_VALUE_LABEL"
							size="30"
						/>
					</form>
				</field>
			</fieldset>
		</fields>
	</config>
</extension>
<?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Fields.Color
 *
 * @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;

$value = $field->value;

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

if (is_array($value))
{
	$value = implode(', ', $value);
}

echo htmlentities($value);
<?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Fields.Color
 *
 * @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;

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

/**
 * Fields Color Plugin
 *
 * @since  3.7.0
 */
class PlgFieldsColor 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('validate', 'color');

		return $fieldNode;
	}
}
<?xml version="1.0" encoding="utf-8" ?>
<extension type="plugin" version="3.7.0" group="fields" method="upgrade">
	<name>plg_fields_color</name>
	<author>Joomla! Project</author>
	<creationDate>March 2016</creationDate>
	<copyright>(C) 2016 Open Source Matters, Inc.</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_COLOR_XML_DESCRIPTION</description>
	<files>
		<filename plugin="color">color.php</filename>
		<folder>tmpl</folder>
	</files>
	<languages>
		<language tag="en-GB">en-GB.plg_fields_color.ini</language>
		<language tag="en-GB">en-GB.plg_fields_color.sys.ini</language>
	</languages>
</extension>
<?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>