Skip to content

Instantly share code, notes, and snippets.

View ezersky's full-sized avatar

Stan Ezersky ezersky

View GitHub Profile
@ezersky
ezersky / minifyHTML.php
Created September 10, 2017 12:16 — forked from Drabush/minifyHTML.php
HTML minifier plugin for MODX Revolution. Add to onWebPagePreRender event
<?php
//Минификация кода HTML. Включение плагина по событию onWebPagePreRender
$output = &$modx->resource->_output;
$output = preg_replace('|\s+|', ' ', $output);
$modx->resource->set('content', $output);
/*jQuery UI autocomplete for bootstrap*/
.ui-autocomplete {
position: absolute;
top: 100%;
left: 0;
z-index: 1000;
float: left;
display: none;
min-width: 160px;
@ezersky
ezersky / QuickOrder.php
Created November 19, 2015 18:20 — forked from grachov/QuickOrder.php
Покупка товара в один клик для miniShop2
<?php
$context = $modx->context->get('key');
if ($context == 'mgr' || empty($_POST['quick_order']) || empty($_POST['id']) || empty($_POST['customer'])) {
return;
}
/**
* @var miniShop2 $miniShop2
*/
$miniShop2 = $modx->getService('minishop2');
$miniShop2->initialize($context, array(
@ezersky
ezersky / block-grid.less
Last active September 16, 2015 19:38 — forked from ChrisTM/block-grid.less
[class*="block-grid-"] {
display: block;
margin: -(@grid-gutter-width/2);
padding: 0;
.clearfix();
}
.block-grid-item {
display: inline;
margin: 0;