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
function getIdByCode($code, $iblock_id, $type) | |
{ | |
if(CModule::IncludeModule("iblock")) | |
{ | |
if($type == 'IBLOCK_ELEMENT') | |
{ | |
$arFilter = array("IBLOCK_ID"=>$iblock_id, "CODE" => $code); | |
$res = CIBlockElement::GetList(array(), $arFilter, false, array("nPageSize"=>1), array('ID')); | |
$element = $res->Fetch(); | |
if($res->SelectedRowsCount() != 1) return '<p style="font-weight:bold;color:#ff0000">Элемент не найден</p>'; |
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
var s = $(".catalog_filter > form"); | |
var pos = s.offset(); | |
var $catalogR = $('.catalog .catalog_right'); | |
var item = $catalogR.find('.item'); | |
$(window).scroll(function() { | |
var HCatalog = $catalogR.height(); | |
var marginItem = item.outerHeight(true) - item.height(); | |
var FilterH = $('.catalog_filter').height((HCatalog-marginItem-$catalogR.find('nav.pageNav').outerHeight(true))+'px'); |
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); |
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
<a href="file.pdf">ссылка для скачивания</a> | |
только браузеры зачастую открывают pdf файлы сами и не предлагают скачивать... | |
если именно скачать то ссылку новую страничку в новом окне с кодом PHP | |
$file = "files/archive.rar"; | |
header ("Content-Type: application/octet-stream"); | |
header ("Accept-Ranges: bytes"); | |
header ("Content-Length: ".filesize($file)); |
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
::-webkit-input-placeholder {color:#c0392b;} | |
::-moz-placeholder {color:#c0392b;}/* Firefox 19+ */ | |
:-moz-placeholder {color:#c0392b;}/* Firefox 18- */ | |
:-ms-input-placeholder {color:#c0392b;} |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<style type="text/css"> | |
html, body { | |
height:100%; | |
width:100%; | |
margin:0; | |
display:flex; | |
} |
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
file result_modifier.php | |
<? | |
// сортировку берем из параметров компонента | |
$arSort = array( | |
$arParams["SORT_BY1"]=>$arParams["SORT_ORDER1"], | |
$arParams["SORT_BY2"]=>$arParams["SORT_ORDER2"], | |
); | |
// выбрать нужно id элемента, его имя и ссылку. Можно добавить любые другие поля, например PREVIEW_PICTURE или PREVIEW_TEXT | |
$arSelect = array( |
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
background: #D3A600; | |
background: -moz-linear-gradient(top, #D3A600 0%, #F7C200 100%); | |
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#D3A600), color-stop(100%,#F7C200)); | |
background: -webkit-linear-gradient(top, #D3A600 0%,#F7C200 100%); | |
background: -o-linear-gradient(top, #D3A600 0%,#F7C200 100%); | |
background: -ms-linear-gradient(top, #D3A600 0%,#F7C200 100%); | |
background: linear-gradient(to bottom, #D3A600 0%,#F7C200 100%); | |
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#D3A600', endColorstr='#F7C200',GradientType=0 ); |
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
HTML | |
Этот шестиугольник может иметь два разных стиля. Это может быть текстовый контент или обычное изображение. Разметка HTML достаточно проста. | |
Как видим из разметки, у нас есть два блока DIV corner-1 и corner-2, которые мы будем поворачивать на 60 градусов для получения нужной формы. | |
<div class="hex hex-3"> | |
<div class="inner"> | |
<h4>CONTACT US</h4> | |
<hr /> | |
<p>We Open Everyday</p> |
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
html code | |
/*----------------------*/ | |
На картинке с белым фоном видно рамку: | |
<br><br> | |
<div class="img"> | |
<img src="https://pbs.twimg.com/profile_images/458707688243728384/-GMWcyjZ_bigger.png"> | |
</div> | |
<br> | |
На картинке с темным фоном рамку не видно: |