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
<script> | |
!function () { | |
/** | |
* @link https://webmaster.yandex.ru/site/tools/mobile-friendly/ | |
* @detect | |
* Много мелкого текста | |
* Рекомендуем использовать шрифты размером не менее 12 px. | |
*/ | |
var cb = function () { |
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 | |
$em = \Bitrix\Main\EventManager::getInstance(); | |
$em->addEventHandler("main", "OnAfterResizeImage", function ($file, $options, &$cacheImageFile, &$cacheImageFileTmp, &$arImageSize){ | |
$path = escapeshellarg($arImageSize); | |
if( !empty($path) ){ | |
try{ |
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 | |
/** Выводит / возвращает Dump SQL запроса Bitrix D7 и старого ядра */ | |
if( !function_exists('_dumpSQL') ){ | |
function _dumpSQL(callable $callback, array $params = []) | |
{ | |
$result = []; | |
if($params['user'] == 'all' || $GLOBALS['USER']-> isAdmin() ){ |
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 | |
namespace Exchanges; | |
/** | |
* Связка ФИАС (kladr-api.ru) с 1С-Битрикс местоположениями версии 2.0 (города/села) по ZIP коду | |
* | |
* https://kladr-api.ru/ | |
* https://dev.1c-bitrix.ru/learning/course/?COURSE_ID=43&LESSON_ID=3570 | |
*/ |
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 array_values_recursive($ar, $field) | |
{ | |
if( !empty($field) && array_key_exists($field, $ar) ){ | |
$arTemp = &$ar[$field]; | |
if( is_array($arTemp) ){ | |
$arTemp = array_values($arTemp); |
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 parseParams($str) | |
{ | |
if( !empty($str) ){ | |
preg_match_all('/([^>=]+)=([^>=]+)?/', $str, $arOptions); | |
return array_combine($arOptions[1], $arOptions[2]); | |
} | |
} |
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
<? | |
/** | |
* Загрузка изображение к товаров из папки | |
* | |
* PROPS: | |
* Фотографии [PHOTO] | |
* Alt-тег для фото [ALT_TAG_PHOTO] | |
* Не нужен водяной знак [NO_WATER_MARK] | |
* Индекс SORT [SORT_PHOTO] | |
*/ |
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 getSectionList($filter, $select) | |
{ | |
$dbSection = CIBlockSection::GetList( | |
Array( | |
'DEPTH_LEVEL' => 'ASC', | |
'SORT' => 'ASC' | |
), |
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 | |
define("NO_AGENT_CHECK", true); | |
require_once $_SERVER['DOCUMENT_ROOT'].'/bitrix/modules/main/include/prolog_before.php'; | |
/** | |
* API | |
* | |
* https://docs.phalconphp.com/ru/latest/api/index.html |
NewerOlder