Файловый менеджер - Редактировать - /home/wuectly/www/03cbe/imagelist.tar
Назад
params/imagelist.xml 0000604 00000002011 15245530505 0010521 0 ustar 00 <?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> imagelist.xml 0000604 00000003436 15245530505 0007252 0 ustar 00 <?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>(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_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> imagelist.php 0000604 00000002165 15245530505 0007237 0 ustar 00 <?php /** * @package Joomla.Plugin * @subpackage Fields.Imagelist * * @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 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; } } tmpl/imagelist.php 0000604 00000001711 15245530505 0010207 0 ustar 00 <?php /** * @package Joomla.Plugin * @subpackage Fields.Imagelist * * @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; 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;
| ver. 1.4 |
Github
|
.
| PHP 8.1.34 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка