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
$('#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 | |
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
<?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()); |
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
$.validator.addMethod('emailstrict', function(value, element, param) { | |
return /^[a-zA-Z0-9_\.\-+]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9]{2,4}$/.test(value); | |
}); |
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
/** | |
Запрос выбирает все модификации товаров из базы данных и представляет в виде единой таблицы | |
Колонки: | |
site_id — идентификатор сайта | |
products_name — название товара | |
mode — артикул модификации | |
variants_name — название модификации | |
price — основная цена модификации | |
special_price — цена модификации со скидкой |
NewerOlder