Spade

Mini Shell

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

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

PK$��[^]?0��
imagelist.phpnu�[���<?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Fields.Imagelist
 *
 * @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 Imagelist Plugin
 *
 * @since  3.7.0
 */
class PlgFieldsImagelist 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('hide_default', 'true');
		$fieldNode->setAttribute('directory', '/images/' .
$fieldNode->getAttribute('directory'));

		return $fieldNode;
	}
}
PK$��[���??
imagelist.xmlnu�[���<?xml
version="1.0" encoding="utf-8" ?>
<extension type="plugin" version="3.7.0"
group="fields" method="upgrade">
	<name>plg_fields_imagelist</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_IMAGELIST_XML_DESCRIPTION</description>
	<files>
		<filename
plugin="imagelist">imagelist.php</filename>
		<folder>params</folder>
		<folder>tmpl</folder>
	</files>
	<languages>
		<language
tag="en-GB">en-GB.plg_fields_imagelist.ini</language>
		<language
tag="en-GB">en-GB.plg_fields_imagelist.sys.ini</language>
	</languages>
	<config>
		<fields name="params">
			<fieldset name="basic">
				<field
					name="directory"
					type="folderlist"
					label="PLG_FIELDS_IMAGELIST_PARAMS_DIRECTORY_LABEL"
					description="PLG_FIELDS_IMAGELIST_PARAMS_DIRECTORY_DESC"
					directory="images"
					hide_none="true"
					hide_default="true"
					recursive="true"
					default="/"
					>
					<option value="/">/</option>
				</field>

				<field
					name="multiple"
					type="radio"
					label="PLG_FIELDS_IMAGELIST_PARAMS_MULTIPLE_LABEL"
					description="PLG_FIELDS_IMAGELIST_PARAMS_MULTIPLE_DESC"
					class="btn-group btn-group-yesno"
					default="0"
					filter="integer"
					>
					<option value="1">JYES</option>
					<option value="0">JNO</option>
				</field>

				<field
					name="image_class"
					type="textarea"
					label="PLG_FIELDS_IMAGELIST_PARAMS_IMAGE_CLASS_LABEL"
					description="PLG_FIELDS_IMAGELIST_PARAMS_IMAGE_CLASS_DESC"
					size="40"
				/>
			</fieldset>
		</fields>
	</config>
</extension>
PK$��[�hE�		params/imagelist.xmlnu�[���<?xml
version="1.0" encoding="utf-8"?>
<form>
	<fields name="fieldparams">
		<fieldset name="fieldparams">
			<field
				name="directory"
				type="folderlist"
				label="PLG_FIELDS_IMAGELIST_PARAMS_DIRECTORY_LABEL"
				description="PLG_FIELDS_IMAGELIST_PARAMS_DIRECTORY_DESC"
				directory="images"
				hide_none="true"
				hide_default="true"
				recursive="true"
				>
				<option
value="">COM_FIELDS_FIELD_USE_GLOBAL</option>
				<option value="/">/</option>
			</field>

			<field
				name="multiple"
				type="list"
				label="PLG_FIELDS_IMAGELIST_PARAMS_MULTIPLE_LABEL"
				description="PLG_FIELDS_IMAGELIST_PARAMS_MULTIPLE_DESC"
				filter="integer"
				>
				<option
value="">COM_FIELDS_FIELD_USE_GLOBAL</option>
				<option value="1">JYES</option>
				<option value="0">JNO</option>
			</field>

			<field
				name="image_class"
				type="textarea"
				label="PLG_FIELDS_IMAGELIST_PARAMS_IMAGE_CLASS_LABEL"
				description="PLG_FIELDS_IMAGELIST_PARAMS_IMAGE_CLASS_DESC"
				size="40"
			/>
		</fieldset>
	</fields>
</form>
PK$��[�F.��tmpl/imagelist.phpnu�[���<?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Fields.Imagelist
 *
 * @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;

if ($field->value == '')
{
	return;
}

$class = $fieldParams->get('image_class');

if ($class)
{
	// space before, so if no class sprintf below works
	$class = ' class="' . htmlentities($class, ENT_COMPAT,
'UTF-8', true) . '"';
}

$value  = (array) $field->value;
$buffer = '';

foreach ($value as $path)
{
	if (!$path || $path == '-1')
	{
		continue;
	}

	if ($fieldParams->get('directory', '/') !==
'/')
	{
		$buffer .= sprintf('<img
src="images/%s/%s"%s>',
			$fieldParams->get('directory'),
			htmlentities($path, ENT_COMPAT, 'UTF-8', true),
			$class
		);
	}
	else
	{
		$buffer .= sprintf('<img src="images/%s"%s>',
			htmlentities($path, ENT_COMPAT, 'UTF-8', true),
			$class
		);
	}
}

echo $buffer;
PK$��[^]?0��
imagelist.phpnu�[���PK$��[���??
�imagelist.xmlnu�[���PK$��[�hE�		;params/imagelist.xmlnu�[���PK$��[�F.���tmpl/imagelist.phpnu�[���PK@�