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 | |
/* | |
* Управление ярлыками элементов информационной системы в отдельной вкладке | |
* | |
* В bootstrap.php: | |
* | |
// Управление ярлыками элементов информационной системы в отдельной вкладке | |
Core_Event::attach('Admin_Form_Action_Controller_Type_Edit.onBeforeExecute',array('Admin_Form_Observer_ShortcutsTab_Informationsystem', 'onBeforeExecute')); | |
Core_Event::attach('Admin_Form_Action_Controller_Type_Edit.onAfterRedeclaredPrepareForm', array('Admin_Form_Observer_ShortcutsTab_Informationsystem', 'onAfterRedeclaredPrepareForm')); |
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 | |
return array( | |
0 => 'Не отображать', | |
1 => 'Поле ввода', | |
2 => 'Список - списком', | |
3 => 'Список - переключателями', | |
4 => 'Список - флажками', | |
7 => 'Список - список с множественным выбором', | |
5 => 'Флажок', |
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 | |
/** | |
* Компонент для работы с API сервиса СмсДисконт (iqsms.ru) | |
* | |
* @author Maxim Zasorin | |
* | |
* | |
* Установка: | |
* 1. Создаем директорию /protected/extensions/iqsms |
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 | |
defined('HOSTCMS') || exit('HostCMS: access denied.'); | |
/** | |
* В bootstrap.php | |
* | |
* // Kad: Экспорт в соцсети. | |
* Core_Event::attach('Social_Observer.onAfterBuildShopData', array('Social_Observer_Observer_AddReplaces', 'onAfterBuildInformationsystemData')); | |
*/ |
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
$('#element').lightSlider({ | |
enableDrag: true, | |
onBeforeSlide: function(element) { | |
var photobox = $(element).data('_photobox'); | |
photobox.selector.off('click.photobox'); | |
}, | |
onAfterSlide: function(element) { | |
var photobox = $(element).data('_photobox'); |
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 | |
/** | |
* Обработчик доставки для пунктов выдачи интернет-магазина. | |
*/ | |
class Shop_Delivery_HandlerXXX extends Shop_Delivery_Handler | |
{ | |
/** | |
* Возврвщает список пунктов выдачи для заданных параметров доставки. | |
* |
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 | |
// Обновляем кэш фейсбука | |
// https://developers.facebook.com/docs/sharing/opengraph/using-objects#update | |
$oSite = Core_Entity::factory('Site', CURRENT_SITE); | |
$oSiteAlias = $oSite->getCurrentAlias(); | |
$offerUrl = 'http://' . $oSiteAlias->alias_name_without_mask . $oOfferItem->getUrl(); | |
$oCoreHttp = Core_Http::instance() |
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
var foobar = 'ТЕКСТ В ВЕРХНЕМ РЕГИСТРЕ ДЛЯ ЗАГОЛОВКА СО СЛОВАМИ «В КАВЫЧКАХ»'; | |
foobar = foobar.replace(/(?![«|"|'|\[|\(])(\S)(\S+?)(?=\s|$)/g, function($0, $1, $2) { | |
return $1 + $2.toLowerCase(); | |
}); | |
foobar; // "Текст В Верхнем Регистре Для Заголовка Со Словами «В Кавычках»" |
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
<xsl:template name="declension1"> | |
<xsl:param name="number" /> | |
<xsl:variable name="nominative"> | |
<xsl:text>слово</xsl:text> | |
</xsl:variable> | |
<xsl:variable name="genitive_singular"> | |
<xsl:text>слова</xsl:text> | |
</xsl:variable> |
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 | |
\DB::enableQueryLog(); | |
// code with database query | |
dd(\DB::getQueryLog()); |
NewerOlder