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
Получаем код на сайте recaptcha | |
https://www.google.com/recaptcha/admin#list | |
//html | |
<script type="text/javascript" src="https://www.google.com/recaptcha/api.js?onload=reCaptchaLoadCallback&render=explicit" async defer></script> | |
//js | |
var reCaptchaLoadCallback = function() { | |
var sitekey = "6LeCRxIUAAAAAE10sOYS4gWW4zlRg8zp7XeSW7Za"; |
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 | |
$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
<?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
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
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
<?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
При отправке битриксовской формы модуля Веб-Формы через $.ajax, необходимо к результатам формы добавлять параметр web_form_submit | |
$.ajax({ | |
data: $Simple3Form.serialize() + '&web_form_submit=Отправить', | |
}) |
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
<? | |
// /local/templates/main | |
$arTemplate = array ( | |
'NAME' => 'main', | |
'DESCRIPTION' => '', | |
'SORT' => '', | |
'TYPE' => '', | |
'EDITOR_STYLES' => array ( | |
'/local/templates/main/css/normalize.min.css', | |
'/local/templates/main/css/bootstrap.css', |