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
img.new { | |
left: -7px; | |
position: absolute; | |
top: -7px; | |
width: 150px; | |
} |
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
.img-container { | |
overflow: hidden; | |
max-height: 320px; /* ограничиваем высоту контейнера */ | |
max-width: 1160px; /* ограничиваем ширину контейнера */ | |
padding: 0 0 20px 0; | |
} | |
.img-container > img { | |
height: auto; | |
float: left; |
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
<?php | |
/* OnManagerPageBeforeRender */ | |
switch ($modx->event->name) { | |
case 'OnDocFormPrerender': | |
if ($mode !== 'upd') { | |
return ''; | |
} | |
if (!$template = $resource->get('template')) { | |
return ''; |
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 | |
{$id == '1' ? '' : $url} | |
//Получение изображения через переменную с точкой ($_pls) | |
{$_pls["tv.img"] | phpthumbon : "w=300&h=200&zc=1"} | |
//Без префикса | |
{$img | phpthumbon : "w=300&h=200&zc=1"} | |
//Информация о прозводителе | |
{$_modx->makeUrl($_pls['vendor.resource'])} |
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
.flex{ | |
float: left; | |
width: 220px; | |
text-align: center; | |
margin: 0 5px 20px 5px; | |
text-transform: uppercase; | |
font-size: 18px; | |
} | |
.flex img{ | |
padding: 0 0 10px; |
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
// Получение любого поля ресурса произвольного ресурса | |
{1 | resource : 'pagetitle'} |
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
<?php | |
/* У минишопа есть callback при добавлении в корзину */ | |
miniShop2.Callbacks.Cart.add.response.success = function(response) { | |
// тут можно вызвать окно с предложением | |
}; |
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
<?php | |
if ($modx->context->key != 'mgr') { | |
$email = '[email protected]'; | |
$usermail = $user->Profile->get('email'); | |
$text1 = 'Пользователь ' . $usermail . ' зарегистрировался на сайте, не ещё не подтвердил свои контактные данные.'; | |
$text2 = 'Пользователь ' . $usermail . ' завершил процедуру регистрации.'; | |
switch ($modx->event->name) { | |
case 'OnUserFormSave': |
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
<?php | |
/* | |
define('MODX_CORE_PATH', 'c:/www/site.ru/core/'); | |
define('MODX_CONFIG_KEY', 'config'); | |
*/ | |
$rootPath = $_SERVER['DOCUMENT_ROOT']; | |
if ($rootPath[strlen($rootPath) - 1] != '/') { | |
$rootPath = $rootPath . '/'; } | |
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
<?php | |
/* | |
pluginName DisableCache | |
Вешаем этот плагин на событие OnLoadWebDocument | |
*/ | |
global $modx; | |
$modx->documentObject["cacheable"] = 0; |