Created
February 3, 2016 17:27
-
-
Save MkShaman/912e1a429f6a473cc467 to your computer and use it in GitHub Desktop.
Ресайз картинок детальной и тех что приходят в свойстве.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| все в файле result_modifier.php | |
| $arResult["RESIZE_DETAIL_PICTURE_SMALL"] = CFile::ResizeImageGet($arResult["DETAIL_PICTURE"], array('width'=>700, 'height'=>442), BX_RESIZE_IMAGE_PROPORTIONAL, true); | |
| $arResult["RESIZE_DETAIL_PICTURE_BIG"] = CFile::ResizeImageGet($arResult["DETAIL_PICTURE"], array('width'=>1000, 'height'=>668), BX_RESIZE_IMAGE_PROPORTIONAL, true); | |
| $count = 0; | |
| if (count($arResult["PROPERTIES"]["PICT_OBJECT"]["VALUE"])> 1){ | |
| foreach($arResult["DISPLAY_PROPERTIES"]["PICT_OBJECT"]["FILE_VALUE"] as $arItem) { | |
| $smallImg = CFile::ResizeImageGet($arItem, array('width'=>335, 'height'=>202), BX_RESIZE_IMAGE_PROPORTIONAL, true); | |
| $bigImg = CFile::ResizeImageGet($arItem, array('width'=>1000, 'height'=>668), BX_RESIZE_IMAGE_PROPORTIONAL, true); | |
| $arResult["RSIZE_IMG_LIST"][$count]["SMALL"] = $smallImg; | |
| $arResult["RSIZE_IMG_LIST"][$count]["BIG"] = $bigImg; | |
| $arResult["RSIZE_IMG_LIST"][$count]["DESCRIPTION"] = $arItem["DESCRIPTION"]; | |
| $count++; | |
| } | |
| }else { | |
| $smallImg = CFile::ResizeImageGet($arResult["DISPLAY_PROPERTIES"]["PICT_OBJECT"]["FILE_VALUE"], array('width'=>335, 'height'=>202), BX_RESIZE_IMAGE_PROPORTIONAL, true); | |
| $bigImg = CFile::ResizeImageGet($arResult["DISPLAY_PROPERTIES"]["PICT_OBJECT"]["FILE_VALUE"], array('width'=>1000, 'height'=>668), BX_RESIZE_IMAGE_PROPORTIONAL, true); | |
| $arResult["RSIZE_IMG_LIST"][$count]["SMALL"] = $smallImg; | |
| $arResult["RSIZE_IMG_LIST"][$count]["BIG"] = $bigImg; | |
| $arResult["RSIZE_IMG_LIST"][$count]["DESCRIPTION"] = $arItem["DESCRIPTION"]; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment