uawdijnntqw1x1x1
IP : 216.73.217.102
Hostname : webm003.cluster107.gra.hosting.ovh.net
Kernel : Linux webm003.cluster107.gra.hosting.ovh.net 5.15.167-ovh-vps-grsec-zfs-classid #1 SMP Tue Sep 17 08:14:20 UTC 2024 x86_64
Disable Function : _dyuweyrj4,_dyuweyrj4r,dl
OS : Linux
PATH:
/
home
/
opticamezl
/
www
/
newok
/
tmp
/
..
/
cli
/
cli
/
..
/
..
/
cache
/
..
/
modules
/
..
/
cli
/
..
/
media.tar
/
/
media.xml000064400000003131151721420650006346 0ustar00<?xml version="1.0" encoding="UTF-8"?> <extension type="plugin" group="fields" method="upgrade"> <name>plg_fields_media</name> <author>Joomla! Project</author> <creationDate>2016-03</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_MEDIA_XML_DESCRIPTION</description> <namespace path="src">Joomla\Plugin\Fields\Media</namespace> <files> <folder>params</folder> <folder plugin="media">services</folder> <folder>src</folder> <folder>tmpl</folder> </files> <languages> <language tag="en-GB">language/en-GB/plg_fields_media.ini</language> <language tag="en-GB">language/en-GB/plg_fields_media.sys.ini</language> </languages> <config> <fields name="params"> <fieldset name="basic"> <field name="directory" type="folderlist" label="PLG_FIELDS_MEDIA_PARAMS_DIRECTORY_LABEL" directory="images" hide_none="true" recursive="true" /> <field name="preview" type="list" label="PLG_FIELDS_MEDIA_PARAMS_PREVIEW_LABEL" class="list" default="true" validate="options" > <option value="true">PLG_FIELDS_MEDIA_PARAMS_PREVIEW_INLINE</option> <option value="false">JNO</option> </field> <field name="image_class" type="textarea" label="PLG_FIELDS_MEDIA_PARAMS_IMAGE_CLASS_LABEL" validate="CssIdentifier" /> </fieldset> </fields> </config> </extension> src/Extension/Media.php000064400000004657151721420650011056 0ustar00<?php /** * @package Joomla.Plugin * @subpackage Fields.media * * @copyright (C) 2017 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\Plugin\Fields\Media\Extension; use Joomla\CMS\Form\Form; use Joomla\Component\Fields\Administrator\Plugin\FieldsPlugin; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Fields Media Plugin * * @since 3.7.0 */ final class Media 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 Form $form The form. * * @return \DOMElement * * @since 4.0.0 */ public function onCustomFieldsPrepareDom($field, \DOMElement $parent, Form $form) { $fieldNode = parent::onCustomFieldsPrepareDom($field, $parent, $form); if (!$fieldNode) { return $fieldNode; } $fieldNode->setAttribute('type', 'accessiblemedia'); if ($this->getApplication()->getIdentity()->authorise('core.create', 'com_media')) { $fieldNode->setAttribute('disabled', 'false'); } return $fieldNode; } /** * Before prepares the field value. * * @param string $context The context. * @param \stdclass $item The item. * @param \stdclass $field The field. * * @return void * * @since 4.0.0 */ public function onCustomFieldsBeforePrepareField($context, $item, $field) { // Check if the field should be processed by us if (!$this->isTypeSupported($field->type)) { return; } // Check if the field value is an old (string) value $field->value = $this->checkValue($field->value); } /** * Before prepares the field value. * * @param string $value The value to check. * * @return array The checked value * * @since 4.0.0 */ private function checkValue($value) { json_decode($value); if (json_last_error() === JSON_ERROR_NONE) { return (array) json_decode($value, true); } return ['imagefile' => $value, 'alt_text' => '']; } } services/provider.php000064400000002432151721420650010736 0ustar00<?php /** * @package Joomla.Plugin * @subpackage Fields.media * * @copyright (C) 2023 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; use Joomla\CMS\Extension\PluginInterface; use Joomla\CMS\Factory; use Joomla\CMS\Plugin\PluginHelper; use Joomla\DI\Container; use Joomla\DI\ServiceProviderInterface; use Joomla\Event\DispatcherInterface; use Joomla\Plugin\Fields\Media\Extension\Media; return new class () implements ServiceProviderInterface { /** * Registers the service provider with a DI container. * * @param Container $container The DI container. * * @return void * * @since 4.3.0 */ public function register(Container $container) { $container->set( PluginInterface::class, function (Container $container) { $dispatcher = $container->get(DispatcherInterface::class); $plugin = new Media( $dispatcher, (array) PluginHelper::getPlugin('fields', 'media') ); $plugin->setApplication(Factory::getApplication()); return $plugin; } ); } }; params/media.xml000064400000001425151721514650007641 0ustar00<?xml version="1.0" encoding="UTF-8"?> <form> <fields name="fieldparams"> <fieldset name="fieldparams"> <field name="directory" type="folderlist" label="PLG_FIELDS_MEDIA_PARAMS_DIRECTORY_LABEL" directory="images" hide_none="true" recursive="true" validate="options" /> <field name="preview" type="list" label="PLG_FIELDS_MEDIA_PARAMS_PREVIEW_LABEL" validate="options" > <option value="">COM_FIELDS_FIELD_USE_GLOBAL</option> <option value="true">PLG_FIELDS_MEDIA_PARAMS_PREVIEW_INLINE</option> <option value="false">JNO</option> </field> <field name="image_class" type="textarea" label="PLG_FIELDS_MEDIA_PARAMS_IMAGE_CLASS_LABEL" validate="CssIdentifier" /> </fieldset> </fields> </form> tmpl/media.php000064400000001303151721514650007314 0ustar00<?php /** * @package Joomla.Plugin * @subpackage Fields.Media * * @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; use Joomla\CMS\Layout\LayoutHelper; if (empty($field->value) || empty($field->value['imagefile'])) { return; } $class = $fieldParams->get('image_class'); $options = [ 'src' => $field->value['imagefile'], 'alt' => empty($field->value['alt_text']) && empty($field->value['alt_empty']) ? false : $field->value['alt_text'], ]; if ($class) { $options['class'] = $class; } echo LayoutHelper::render('joomla.html.image', $options);
/home/opticamezl/www/newok/tmp/../cli/cli/../../cache/../modules/../cli/../media.tar