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
if (IsModuleInstalled("im") && CModule::IncludeModule("im")) | |
{ | |
$arMessageFields = array( | |
"TO_USER_ID" => 9, | |
"FROM_USER_ID" => 8, | |
"NOTIFY_TYPE" => IM_NOTIFY_FROM, | |
"NOTIFY_MODULE" => "blog", | |
"NOTIFY_TAG" => "", | |
"NOTIFY_MESSAGE" => 'FUCK IT ALL', |
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
$dbElement = ElementTable::getList([ | |
'select' => ['ID', 'XML_ID', 'NAME', 'LINK', 'PROPERTY.ID', 'IBLOCK_ID'], | |
'filter' => [ | |
'=IBLOCK_ID' => 3, | |
'=LINK' => $elementID, | |
'=PROPERTY.CODE' => 'CML2_LINK' | |
], | |
'order' => ['ID'], | |
'runtime' => [ | |
'PROPERTY' => [ |
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
AddEventHandler("main", "OnAdminContextMenuShow", "MyOnAdminContextMenuShow"); | |
function MyOnAdminContextMenuShow(&$items) | |
{ | |
//add custom button to the index page toolbar | |
if($GLOBALS["APPLICATION"]->GetCurPage(true) == "/bitrix/admin/iblock_element_edit.php") | |
{ | |
$items[] = array("TEXT"=>"TEST", "ICON"=>"", "TITLE"=>"TEST", "LINK"=>"javascript:alert('asd');", "CLASS" =>"asdas"); | |
// init jQuery from core | |
CJSCore::Init(array("jquery")); | |
} |
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
(/.*/)\t(/.*/) | |
if ($uri ~ "^$1?.*/$"){ | |
rewrite ^(.*)$ http://test.ua$2 permanent; | |
} |
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/header.php"); | |
$APPLICATION->SetTitle("Новая страница"); | |
?> | |
<? | |
Bitrix\Main\Loader::includeModule('citrus.priceagregators'); | |
$result = \Citrus\PriceAgregators\LinkProductTable::getList([ | |
'select' => [ |
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
$price_agregator_hlblock_id = 8; | |
$link_hlblock_id = 7; | |
/** | |
* забираем инфу о сущности из БД | |
*/ | |
$price_agregator_hlblock = HL\HighloadBlockTable::getById($price_agregator_hlblock_id)->fetch(); | |
$link_hlblock = HL\HighloadBlockTable::getById($link_hlblock_id)->fetch(); | |
/** | |
* инициализация сущности | |
* @var \Bitrix\Main\Entity\Base $entity |
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/header.php"); | |
$APPLICATION->SetTitle("Новая страница"); | |
?> | |
<? | |
use \Bitrix\Main\Application; | |
use Bitrix\Highloadblock as HL; | |
use Bitrix\Main\Entity; |