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
| // tmp open site when it's closed in config | |
| Bitrix\Main\EventManager::getInstance()->addEventHandler("main", "OnBeforeProlog", static function () { | |
| if (\Bitrix\Main\Application::getInstance()?->getContext()?->getRequest()->get('site_closed') == 'N') { | |
| \Bitrix\Main\Application::getInstance()->getKernelSession()['SESS_OPERATIONS']['edit_other_settings'] = 'Y'; | |
| } | |
| }); |
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
| // Выводит список доступных иконок для меню | |
| $arr = [ | |
| 'fav_menu_icon', | |
| 'iblock_menu_icon_iblocks', | |
| 'fileman_menu_icon', | |
| 'clouds_menu_icon', | |
| 'iblock_menu_icon_types', | |
| 'smile_menu_icon', | |
| 'rating_menu_icon', | |
| 'support_menu_icon', |
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
| // log 404 in content part | |
| $lastStatus = \CHTTP::GetLastStatus(); | |
| if ((constant('ERROR_404') == 'Y' || strpos($lastStatus, '404') !== false) | |
| && $APPLICATION->GetCurPage() != '/404.php' | |
| ) { | |
| /* | |
| CREATE TABLE `hi_seo_error404log` ( | |
| `ID` int(11) unsigned NOT NULL AUTO_INCREMENT, | |
| `UF_DATETIME` datetime DEFAULT NULL, | |
| `UF_URL` text, |
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
| // some addons cache config | |
| define('CACHED_b_iblock_type', 3600 * 24); | |
| define("CACHED_b_iblock", 3600 * 24); | |
| define("CACHED_b_iblock_bucket_size", 40); | |
| define('CACHED_b_iblock_property_enum', 3600 * 24); | |
| define('CACHED_b_iblock_property_enum_bucket_size', 100); | |
| define('CACHED_b_user_access_check', 3600); | |
| define('CACHED_b_sec_redirect_url', 3600 * 24 * 30); | |
| define('CACHED_b_user_counter', 3600 * 3); |
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
| CJSCore::Init(["jquery"]); | |
| $arJqueryExt = CJSCore::getExtInfo("jquery"); | |
| CJSCore::markExtensionLoaded('jquery'); | |
| CJSCore::markExtensionLoaded('jquery2'); | |
| CJSCore::Init(['jquery3']); | |
| /* | |
| * Для popup надо вызывать | |
| */ |
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
| // restore agents (cron) | |
| COption::SetOptionString("main", "agents_use_crontab", "Y"); | |
| echo COption::GetOptionString("main", "agents_use_crontab", "N"); | |
| COption::SetOptionString("main", "check_agents", "Y"); | |
| echo COption::GetOptionString("main", "check_agents", "N"); | |
| COption::SetOptionString("main", "mail_event_bulk", "20"); | |
| echo COption::GetOptionString("main", "mail_event_bulk", "5"); |
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
| <? | |
| $APPLICATION->SetTitle("title h1"); | |
| $APPLICATION->SetPageProperty('title', "title browser"); // optional to change title browser or will be used value from SetTitle() | |
| // <title><?$APPLICATION->ShowTitle()?></title> | |
| // <h1 id="pagetitle"><?$APPLICATION->ShowTitle(false)?></h1> | |
| ?> |
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
| /** | |
| * Multisite mails | |
| * /home/bitrix/.msmtprc | |
| * | |
| * # smtp account configuration for domain1.com | |
| * account domain2.com | |
| * ... etc | |
| */ | |
| function custom_mail($to, $subject, $message, $additional_headers = '', $additional_parameters = '') | |
| { |