芝麻web文件管理V1.00
编辑当前文件:/home2/sdektunc/.trash/plugins.7/fields/media/tmpl/media.php
* @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; use Joomla\CMS\HTML\HTMLHelper; if ($field->value == '') { return; } $class = $fieldParams->get('image_class'); if ($class) { $class = ' class="' . htmlentities($class, ENT_COMPAT, 'UTF-8', true) . '"'; } $value = $field->value; if ($value) { $img = HTMLHelper::cleanImageURL($value['imagefile']); $imgUrl = htmlentities($img->url, ENT_COMPAT, 'UTF-8', true); $alt = empty($value['alt_text']) && empty($value['alt_empty']) ? '' : ' alt="' . htmlspecialchars($value['alt_text'], ENT_COMPAT, 'UTF-8') . '"'; if ($img->attributes['width'] > 0 && $img->attributes['height'] > 0) { $buffer = sprintf('
', $img->attributes['width'], $img->attributes['height'], $imgUrl, $class, $alt ); } else { $buffer = sprintf('
', $imgUrl, $class, $alt ); } echo $buffer; }