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 | |
$installPackages = array( | |
'sdStore' | |
, 'translit' | |
, 'SanitizeUpload' | |
, 'TinyMCE' | |
, 'FormIt' | |
, 'Analytics' | |
, 'Big Brother' |
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 | |
/** @var modX $modx */ | |
/** @var array $scriptProperties */ | |
/** @var miniShop2 $miniShop2 */ | |
$miniShop2 = $modx->getService('miniShop2'); | |
$miniShop2->initialize($modx->context->key); | |
/** @var pdoFetch $pdoFetch */ | |
if (!$modx->loadClass('pdofetch', MODX_CORE_PATH . 'components/pdotools/model/pdotools/', false, true)) { | |
return false; | |
} |
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 | |
/** @var modX $modx */ | |
/** @var array $scriptProperties */ | |
/** @var miniShop2 $miniShop2 */ | |
$miniShop2 = $modx->getService('miniShop2'); | |
$miniShop2->initialize($modx->context->key); | |
/** @var pdoFetch $pdoFetch */ | |
if (!$modx->loadClass('pdofetch', MODX_CORE_PATH . 'components/pdotools/model/pdotools/', false, true)) { | |
return false; | |
} |
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
{'!pdoResources' | snippet: [ | |
'parents' => 53, | |
'limit' => 10, | |
'includeTVs' => 'eventDate, eventImage, eventPrice', | |
'depth' => 5, | |
'sortby' => 'eventDate', | |
'sortdir' => 'ASC', | |
'tvPrefix' => '', | |
'tpl' => '@FILE tpl/latestEvent.tpl', | |
'showLog' => 0, |
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
function preloader(show) { | |
var template = '<div class="preloader" style="position: fixed;width: 100%;height: 100%;background: rgba(255,255,255,0.45);top: 0;left: 0;z-index: 99999;display: flex;justify-content: center;align-items: center;"><img src="preloader.svg"><div>'; | |
if (show) { | |
$(template).appendTo('body'); | |
return; | |
} | |
$(document).find('.preloader').remove(); | |
} |
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
{'!pdoResources' | snippet: [ | |
'class' => 'RvgVideos', | |
'sortby' => 'rank', | |
'limit' => 0, | |
'tpl' => '@FILE pdo/videoItem.tpl' | |
]} |
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 | |
$arr = explode(' ', $input); | |
$month = $arr[1]; | |
$trans = array("January" => "января", | |
"February" => "февраля", | |
"March" => "марта", | |
"April" => "апреля", | |
"May" => "мая", | |
"June" => "июня", |
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 | |
$trans = array("Monday" => "Понедельник", | |
"Tuesday" => "Вторник", | |
"Wednesday" => "Среда", | |
"Thursday" => "Четверг", | |
"Friday" => "Пятница", | |
"Saturday" => "Суббота", | |
"Sunday" => "Воскресенье" | |
); |
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 | |
use \Psr\Http\Message\ServerRequestInterface as Request; | |
use \Psr\Http\Message\ResponseInterface as Response; | |
require '........../autoload.php'; // путь к композеру | |
define('MODX_API_MODE', true); | |
require $_SERVER["DOCUMENT_ROOT"].'/index.php'; |
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 | |
$eventName = $modx->event->name; | |
switch($eventName) { | |
case 'OnDocFormPrerender': | |
// Для ресурсов с индетификатором шаблона 2 | |
// а также для всех новых ресурсов ( $resource == null ) | |
if( $resource && $resource->get('template') == 2 || !$resource){ | |
$modx->regClientStartupHTMLBlock('<script> | |
Ext.onReady(function() { | |
OlderNewer