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
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
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
// https://maxfarseer.gitbooks.io/react-course-ru/content/zhiznennii_tsikl_komponenta.html | |
// https://maxfarseer.gitbooks.io/react-course-ru/content/prodvinutoe_ispolzovanie.html | |
// https://reactjs.org/docs/faq-ajax.html | |
import React, { Component } from 'react'; | |
import { Link } from "react-router-dom"; | |
import { promisifyAll } from 'bluebird' | |
//import ReactDOM from 'react-dom'; | |
import { getWeb3Async } from '../util/web3' |
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 | |
/* | |
* WP Import, Ver 2015.01.04 | |
* (C) 2015 by ZoRg Soft | |
* MODx Notes - WP Import модуь для импорта записей из Wordpress | |
* http://agarkov.org/modx-x/evo-wpimport | |
*/ | |
$theme = $modx->config['manager_theme']; | |
$basePath = $modx->config['base_path']; |
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 | |
$q = $modx->newQuery('modResource'); | |
$q->innerJoin('ShopmodxProduct', 'Product'); | |
$q->leftJoin('modTemplateVarResource', 'tv', 'tv.contentid=modResource.id and tv.tmplvarid=29'); | |
$q->where(array( | |
"tv.id" => null, | |
)); | |
print $modx->getCount('modResource', $q); |
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 | |
$manager = $modx->getManager(); | |
// Создаем таблицы | |
$objects = array( | |
'Order', | |
'OrderProduct', | |
'OrderStatus', |
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 | |
$properties = $modx->resource->getOne('Template')->getProperties(); | |
if(!empty($properties['tpl'])){ | |
$tpl = $properties['tpl']; | |
} | |
else{ | |
$tpl = 'index.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 | |
/** | |
* Smarty plugin | |
* | |
* @package Smarty | |
* @subpackage PluginsFunction | |
*/ | |
function smarty_function_processor($params, & $smarty) |
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 | |
abstract class ShopmodxObjectGetListProcessor extends modObjectGetListProcessor{ | |
function prepareQueryBeforeCount(xPDOQuery $c) { | |
$this->addDerivativeCriteria($c); | |
return parent::prepareQueryBeforeCount($c); | |
} | |
protected function addDerivativeCriteria(xPDOQuery $c){ | |
$this->modx->addDerivativeCriteria($this->classKey, $c); |
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 | |
$memory = round(memory_get_usage()/1024/1024, 4).' Mb'; | |
print "<div>Memory: {$memory}</div>"; | |
$totalTime= ($modx->getMicroTime() - $modx->startTime); | |
$queryTime= $modx->queryTime; | |
$queryTime= sprintf("%2.4f s", $queryTime); | |
$queries= isset ($modx->executedQueries) ? $modx->executedQueries : 0; | |
$totalTime= sprintf("%2.4f s", $totalTime); |
NewerOlder