This file contains 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
<?php | |
if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die(); | |
/* Собират секции элементов в отдельный массив результатов для news.list */ | |
/* Можно использовать например для фильтрации по секциям в js */ | |
$arSectionsByID = array(); | |
foreach ($arResult['ITEMS'] as $arItem) { | |
if (!isset($arSectionsByID[$arItem['IBLOCK_SECTION_ID']]) OR !is_array($arSectionsByID[$arItem['IBLOCK_SECTION_ID']])) | |
$arSectionsByID[$arItem['IBLOCK_SECTION_ID']] = CIBlockSection::GetByID($arItem['IBLOCK_SECTION_ID'])->GetNext(); | |
} |
This file contains 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
https://camwiegert.github.io/in-view/ - Отслеживает нахождение\вхождение элемента во viewport'e | |
https://maxwellito.github.io/vivus/ - Эффект "Рисования" SVG |
This file contains 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
http://dev.1c-bitrix.ru/support/forum/forum6/topic74904/ | |
в /bitrix/modules/seo/lib/sitemapfile.php | |
в getFileUrl() поправил $this->documentRoot на $this->getSiteRoot() |
This file contains 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
<?php | |
$arOrder = array( /* Сортировка как в списке элементов. */ | |
'SORT' => 'DESC', | |
'ACTIVE_FROM' => 'DESC', | |
); | |
$arFilter = array( /* Фильтр согласно списку элементов, у меня ещё используются и секции */ | |
"IBLOCK_ID" => $arResult["IBLOCK_ID"], | |
"SECTION_ID" => $arResult["IBLOCK_SECTION_ID"], | |
"ACTIVE" => "Y", |
This file contains 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
Show hidden characters
{ | |
"auto_match_enabled": false, | |
"color_scheme": "Packages/Theme - Afterglow/Afterglow.tmTheme", | |
"draw_white_space": "all", | |
"enable_tab_scrolling": false, | |
"fallback_encoding": "Cyrillic (Windows 1251)", | |
"font_size": 10, | |
"hot_exit": false, | |
"ignored_packages": | |
[ |
This file contains 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
<?php | |
$arOrder = array("SORT"=>"ASC"); | |
$arFilter = array('IBLOCK_ID' => '2'); | |
$arGroup = false; | |
$arNav = false; | |
$arSelect = array('ID', 'IBLOCK_ID', 'NAME', 'PROPERTY_CITY_ELEMENT', 'PROPERTY_YMAP_POINT'); | |
$arResult = array('ITEMS' => array()); | |
$rsElements = CIBlockElement::GetList($arOrder, $arFilter, $arGroup, $arNav, $arSelect); |
This file contains 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
$(window).on('scroll',function() { | |
var htmlheight=$('html').height(); | |
var blocktop=$('.part-7-bg').offset()['top']; | |
var blockheight=$('.part-7-bg').height(); | |
var wscrtop=$(window).scrollTop(); | |
var wheight=$(window).height(); | |
var wscrtopend=blocktop+blockheight+wheight; | |
/*if (wscrtopend>htmlheight) { | |
wscrtopend=htmlheight; | |
}*/ |
This file contains 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
<?php | |
function custom_mail($to, $subject, $message, $additional_headers, $additional_parameters) { | |
require_once(__DIR__ . '/vendor/PHPMailer/PHPMailerAutoload.php'); | |
/* Парсинг дополнительных заголовков в письмах. */ | |
$additional_headers_array = explode("\n", $additional_headers); | |
$arHeaders = array(); | |
foreach ($additional_headers_array as $key => $value) { |
This file contains 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
<?php | |
require($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_before.php"); | |
/* Тут твой любой код */ | |
require($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/epilog_after.php"); |
This file contains 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
init.php: | |
<?php | |
function AddCacheSeed($path) { | |
$time = filemtime($_SERVER['DOCUMENT_ROOT'] . $path); | |
return $path . '?' . $time; | |
} | |
?> |