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
Получение списка всех событий в системе | |
В файле /bitrix/js/main/core/core.js | |
находим: BX.onCustomEvent(eventObject, eventName, arEventParams, secureParams); | |
console.log(eventName, arEventParams); | |
или | |
value: function emit(eventName, event) { | |
console.log(eventName, event); //тут логируем |
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
success: function(data) { | |
if (!data.error){ | |
var result_html = ''; | |
$(result_html).insertAfter('#calc-form'); | |
} | |
else { | |
$.each(data.errorFieldNames, function(key, val) { | |
//$('input[name="'+val+'"]').parent().parent().addClass('has-error'); | |
//$('textarea[name="'+val+'"]').stop().animate({borderColor:"#E82C0C"}, 2000); | |
}); |
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
В данный момент варианта 2: | |
1. Разместить в начало компонента news.list выставление заголовка header('X-Bitrix24-Page: dynamic'); | |
2. Размещать блок на странице магазина, а не сайта (страницы магазинов не кешируются) |
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
<? | |
$partNumText = $k%10==1&&$k%100!=11?' участник':($n%10>=2&&$n%10<=4&&($n%100<10||$n%100>=20)?' участника':' участников'); | |
?> |
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
CIBlock::clearIBlockTagCache(1); |
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
$arrayOutput = Array(); | |
$arrayWords = explode(' ', $arResLead["POST"]); | |
$maxLineLength = 45; | |
$currentLength = 0; | |
$index = 0; | |
foreach ($arrayWords as $word) { | |
// +1 because the word will receive back the space in the end that it loses in explode() |
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
ALTER TABLE tablename AUTO_INCREMENT = 1 |
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 get(name){ | |
if(name=(new RegExp('[?&]'+encodeURIComponent(name)+'=([^&]*)')).exec(location.search)) | |
return decodeURIComponent(name[1]); | |
} |
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
<?require($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/prolog_before.php");?> | |
<? | |
global $USER; | |
if (!$USER->IsAuthorized() && !empty($_GET["id"])) header('Location: /login/'); | |
else{ | |
$file = CFile::GetFileArray($_GET["id"]); | |
$time = time(); | |
$file_name = $time.'_'.str_replace(" ","_", $file['ORIGINAL_NAME']); |
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 unique(list) { | |
var result = []; | |
$.each(list, function(i, e) { | |
if ($.inArray(e, result) == -1) result.push(e); | |
}); | |
return result; | |
} |
NewerOlder