Skip to content

Instantly share code, notes, and snippets.

Nikolay Lanets Fi1osof

Block or report user

Report or block Fi1osof

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
Fi1osof / react
Last active Apr 17, 2018 — forked from koras/react
View react
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'
View wp_import.php
* WP Import, Ver 2015.01.04
* (C) 2015 by ZoRg Soft
* MODx Notes - WP Import модуь для импорта записей из Wordpress
$theme = $modx->config['manager_theme'];
$basePath = $modx->config['base_path'];
View breadcrumbs.class.php
class modSiteWebBreadcrumbsProcessor extends modProcessor{
public function initialize(){
'startId' => 0,
'excludeDocs' => array(),
'showHidden' => true,
'showUnpub' => false,
View gist:8827909
$q = $modx->newQuery('modResource');
$q->innerJoin('ShopmodxProduct', 'Product');
$q->leftJoin('modTemplateVarResource', 'tv', ' and tv.tmplvarid=29');
"" => null,
print $modx->getCount('modResource', $q);
Fi1osof / gist:6907324
Created Oct 9, 2013
Создаем таблицы и основные записи для пакета Billing
View gist:6907324
$manager = $modx->getManager();
// Создаем таблицы
$objects = array(
Fi1osof / gist:6023918
Last active Dec 19, 2015
Дефолтовый контроллер
View gist:6023918
$properties = $modx->resource->getOne('Template')->getProperties();
$tpl = $properties['tpl'];
$tpl = 'index.tpl';
View gist:5109345
* Smarty plugin
* @package Smarty
* @subpackage PluginsFunction
function smarty_function_processor($params, & $smarty)
Fi1osof / gist:5070120
Created Mar 2, 2013
View gist:5070120
abstract class ShopmodxObjectGetListProcessor extends modObjectGetListProcessor{
function prepareQueryBeforeCount(xPDOQuery $c) {
return parent::prepareQueryBeforeCount($c);
protected function addDerivativeCriteria(xPDOQuery $c){
$this->modx->addDerivativeCriteria($this->classKey, $c);
Fi1osof / gist:5062419
Created Mar 1, 2013
OnWebPageComplete stats plugin
View gist:5062419
$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);
Fi1osof / gist:4986826
Last active Dec 13, 2015
MODX Revolution. Плагин, позволяющий определять, какие дочерние документы показывать или нет. Просто создайте плагин на событие OnManagerPageInit и пропишите в нем свои правила resourcesRules
View gist:4986826
case 'OnManagerPageInit':
$JS = <<<JS
<script type="text/javascript">
// Получаем дерево
var tree = Ext.getCmp('modx-resource-tree');
You can’t perform that action at this time.