<?
$arResult["MORE_PHOTO"] = array();
if (isset($arResult["PROPERTIES"]["MORE_PHOTO"]["VALUE"]) && is_array($arResult["PROPERTIES"]["MORE_PHOTO"]["VALUE"]))
{
foreach ($arResult["PROPERTIES"]["MORE_PHOTO"]["VALUE"] as $FILE)
{
$FILE = CFile::GetFileArray($FILE);
if (is_array($FILE))
$arResult["MORE_PHOTO"][] = $FILE;
}
}
?>
<?
if ($arResult["MORE_PHOTO"]):
?>
<?foreach ($arResult["MORE_PHOTO"] as $PHOTO):?>
<?
$file = CFile::ResizeImageGet(
$PHOTO,
['width' => 250, 'height' => 150],
BX_RESIZE_IMAGE_EXACT,
true,
$arWaterMarkSmall
);
?>
<div class="more_photo">
<a href="<?= $PHOTO["SRC"] ?>" name="more_photo">
<img
border="0"
src="<?= $file["src"] ?>"
width="<?= $file["width"] ?>"
height="<?= $file["height"] ?>"
alt="<?= $arResult["NAME"] ?>"
title="<?= $arResult["NAME"] ?>"
/>
</a>
</div>
<?endforeach;?>
<?endif;?>
<?
$arWaterMarkSmall = [
'name' => 'watermark',
'position' => 'br', // bottom right
'type' => 'file',
'size' => 'small',
'alpha_level' => 50,
'file' => $_SERVER['DOCUMENT_ROOT'] . '/images/watermark_small.png',
];
?>
$arFilters = array(
array(
"name" => "watermark",
"position" => "bc", // tl|tc|tr|ml|mc|mr|bl|bc|br или
// topleft|topcenter|topright|centerleft|center|centerright|bottomleft|bottomcenter|bottomright
"type" => "image", // image|text
"size" => "real", // big|medium|small|real (real только для type=image)
"coefficient" => "1", // для текста: 1–7, для картинок: 0.1–1
"fill" => "exact", // exact|resize|repeat
"file" => $_SERVER["DOCUMENT_ROOT"] . "/watermark.png",
"text" => "Водяной знак!",
"color" => "ff0000", // hex формат цвета текста
"font" => $_SERVER["DOCUMENT_ROOT"] . "/arial.ttf",
"use_copyright" => "Y", // использовать знак копирайта перед текстом
)
);