Spade
Mini Shell
| Directory:~$ /home/lmsyaran/public_html/joomla4/ |
| [Home] [System Details] [Kill Me] |
color.php000064400000002026151160513340006372 0ustar00<?php
/**
* @package Joomla.Plugin
* @subpackage Fields.Color
*
* @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 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;
}
}
color.xml000064400000001471151160513340006406 0ustar00<?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>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_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>
tmpl/color.php000064400000000640151160513340007346 0ustar00<?php
/**
* @package Joomla.Plugin
* @subpackage Fields.Color
*
* @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;
}
if (is_array($value))
{
$value = implode(', ', $value);
}
echo htmlentities($value);