Git Product home page Git Product logo

counters's Introduction

counters's People

Contributors

boshnik avatar

Stargazers

 avatar

Watchers

 avatar  avatar

counters's Issues

Revolution 3.0.0-alpha1: не работает

Привет)

К сожелению не запустился твой замечательный пакет на Revolution 3.0.0-alpha1 решил тебе сообщить.

Вот что он отдает на Front

px9JFEN

И не большая фриза с кнопками навигации ExtJS

bChnQkQ

Лог ошибок при установке

Консоль запущена...
Пробуем установить пакет с подписью: counters-1.0.2-pl
Пакет найден... сейчас идёт подготовка к его установке.
Загрузка рабочего пространства пакета...
Рабочее пространство загружено, сейчас устанавливаем пакет...
modx.modNamespace is deprecated since version 3.0. Replace references to class modx.modNamespace with MODX\Revolution\modNamespace to take advantage of PSR-4 autoloading.
modNamespace is deprecated since version 3.0. Replace references to class modNamespace with MODX\Revolution\modNamespace to take advantage of PSR-4 autoloading.
modNamespace is deprecated since version 3.0. Replace references to class modNamespace with MODX\Revolution\modNamespace to take advantage of PSR-4 autoloading.
modx.modMenu is deprecated since version 3.0. Replace references to class modx.modMenu with MODX\Revolution\modMenu to take advantage of PSR-4 autoloading.
modMenu is deprecated since version 3.0. Replace references to class modMenu with MODX\Revolution\modMenu to take advantage of PSR-4 autoloading.
modMenu is deprecated since version 3.0. Replace references to class modMenu with MODX\Revolution\modMenu to take advantage of PSR-4 autoloading.
modx.modCategory is deprecated since version 3.0. Replace references to class modx.modCategory with MODX\Revolution\modCategory to take advantage of PSR-4 autoloading.
modCategory is deprecated since version 3.0. Replace references to class modCategory with MODX\Revolution\modCategory to take advantage of PSR-4 autoloading.
modCategory is deprecated since version 3.0. Replace references to class modCategory with MODX\Revolution\modCategory to take advantage of PSR-4 autoloading.
modPlugin is deprecated since version 3.0. Replace references to class modPlugin with MODX\Revolution\modPlugin to take advantage of PSR-4 autoloading.
modPlugin is deprecated since version 3.0. Replace references to class modPlugin with MODX\Revolution\modPlugin to take advantage of PSR-4 autoloading.
modPlugin is deprecated since version 3.0. Replace references to class modPlugin with MODX\Revolution\modPlugin to take advantage of PSR-4 autoloading.
modPluginEvent is deprecated since version 3.0. Replace references to class modPluginEvent with MODX\Revolution\modPluginEvent to take advantage of PSR-4 autoloading.
modPluginEvent is deprecated since version 3.0. Replace references to class modPluginEvent with MODX\Revolution\modPluginEvent to take advantage of PSR-4 autoloading.
modPluginEvent is deprecated since version 3.0. Replace references to class modPluginEvent with MODX\Revolution\modPluginEvent to take advantage of PSR-4 autoloading.
Could not find legacy class CountersItem after converting to MODX\Revolution\CountersItem
Could not find legacy class CountersItem after converting to MODX\Revolution\CountersItem
Could not find legacy class CountersItem after converting to MODX\Revolution\CountersItem
Could not find legacy class CountersItem after converting to MODX\Revolution\CountersItem
Could not find legacy class CountersItem after converting to MODX\Revolution\CountersItem
Could not find legacy class CountersItem after converting to MODX\Revolution\CountersItem
Could not find legacy class CountersItem after converting to MODX\Revolution\CountersItem
Could not find legacy class CountersItem after converting to MODX\Revolution\CountersItem
Could not find legacy class CountersItem after converting to MODX\Revolution\CountersItem
Could not find legacy class CountersItem after converting to MODX\Revolution\CountersItem
Could not find legacy class CountersItem after converting to MODX\Revolution\CountersItem
Could not find legacy class CountersItem after converting to MODX\Revolution\CountersItem
Could not find legacy class CountersItem after converting to MODX\Revolution\CountersItem
Could not find legacy class CountersItem after converting to MODX\Revolution\CountersItem
Could not find legacy class CountersItem after converting to MODX\Revolution\CountersItem
Could not find legacy class CountersItem after converting to MODX\Revolution\CountersItem
Could not find legacy class CountersItem after converting to MODX\Revolution\CountersItem
Could not find legacy class CountersItem after converting to MODX\Revolution\CountersItem
Could not find legacy class CountersItem after converting to MODX\Revolution\CountersItem
Could not find legacy class CountersItem after converting to MODX\Revolution\CountersItem
Could not find legacy class CountersItem after converting to MODX\Revolution\CountersItem
Could not find legacy class CountersItem after converting to MODX\Revolution\CountersItem
Could not find legacy class CountersItem after converting to MODX\Revolution\CountersItem
Could not find legacy class CountersItem after converting to MODX\Revolution\CountersItem
Could not find legacy class CountersItem after converting to MODX\Revolution\CountersItem
Could not find legacy class CountersItem after converting to MODX\Revolution\CountersItem
Could not find legacy class CountersItem after converting to MODX\Revolution\CountersItem
Could not find legacy class CountersItem after converting to MODX\Revolution\CountersItem
Could not find legacy class CountersItem after converting to MODX\Revolution\CountersItem
Could not find legacy class CountersItem after converting to MODX\Revolution\CountersItem
Could not find legacy class CountersItem after converting to MODX\Revolution\CountersItem
Could not find legacy class CountersItem after converting to MODX\Revolution\CountersItem
Could not find legacy class CountersItem after converting to MODX\Revolution\CountersItem
Could not find legacy class CountersItem after converting to MODX\Revolution\CountersItem
Could not find legacy class CountersItem after converting to MODX\Revolution\CountersItem
Could not find legacy class CountersItem after converting to MODX\Revolution\CountersItem
Could not find legacy class CountersItem after converting to MODX\Revolution\CountersItem
Could not find legacy class CountersItem after converting to MODX\Revolution\CountersItem
Could not find legacy class CountersItem after converting to MODX\Revolution\CountersItem
Could not find legacy class CountersItem after converting to MODX\Revolution\CountersItem
Could not find legacy class CountersItem after converting to MODX\Revolution\CountersItem
Could not find legacy class CountersItem after converting to MODX\Revolution\CountersItem
Could not find legacy class CountersItem after converting to MODX\Revolution\CountersItem
Could not find legacy class CountersItem after converting to MODX\Revolution\CountersItem
Could not find legacy class CountersItem after converting to MODX\Revolution\CountersItem
Could not find legacy class CountersItem after converting to MODX\Revolution\CountersItem
Could not find legacy class CountersItem after converting to MODX\Revolution\CountersItem
Could not find legacy class CountersItem after converting to MODX\Revolution\CountersItem
Could not find legacy class CountersItem after converting to MODX\Revolution\CountersItem
Could not find legacy class CountersItem after converting to MODX\Revolution\CountersItem
Could not find legacy class CountersItem after converting to MODX\Revolution\CountersItem
Could not find legacy class CountersItem after converting to MODX\Revolution\CountersItem
Could not find legacy class CountersItem after converting to MODX\Revolution\CountersItem
Could not find legacy class CountersItem after converting to MODX\Revolution\CountersItem
Could not find legacy class CountersItem after converting to MODX\Revolution\CountersItem
Could not find legacy class CountersItem after converting to MODX\Revolution\CountersItem
Could not find legacy class CountersItem after converting to MODX\Revolution\CountersItem
Could not find legacy class CountersItem after converting to MODX\Revolution\CountersItem
Could not find legacy class CountersItem after converting to MODX\Revolution\CountersItem
Could not find legacy class CountersItem after converting to MODX\Revolution\CountersItem
Could not find legacy class CountersItem after converting to MODX\Revolution\CountersItem
Could not find legacy class CountersItem after converting to MODX\Revolution\CountersItem
Could not find legacy class CountersItem after converting to MODX\Revolution\CountersItem
Could not find legacy class CountersItem after converting to MODX\Revolution\CountersItem
Could not find legacy class CountersItem after converting to MODX\Revolution\CountersItem
Could not find legacy class CountersItem after converting to MODX\Revolution\CountersItem
Could not find legacy class CountersItem after converting to MODX\Revolution\CountersItem
Could not find legacy class CountersItem after converting to MODX\Revolution\CountersItem
Could not find legacy class CountersItem after converting to MODX\Revolution\CountersItem
Could not find legacy class CountersItem after converting to MODX\Revolution\CountersItem
Could not find legacy class CountersItem after converting to MODX\Revolution\CountersItem
Could not find legacy class CountersItem after converting to MODX\Revolution\CountersItem
Could not find legacy class CountersItem after converting to MODX\Revolution\CountersItem
Could not find legacy class CountersItem after converting to MODX\Revolution\CountersItem
Could not find legacy class CountersItem after converting to MODX\Revolution\CountersItem
Could not find legacy class CountersItem after converting to MODX\Revolution\CountersItem
Could not find legacy class CountersItem after converting to MODX\Revolution\CountersItem
Could not find legacy class CountersItem after converting to MODX\Revolution\CountersItem
Could not find legacy class CountersItem after converting to MODX\Revolution\CountersItem
Could not find legacy class CountersItem after converting to MODX\Revolution\CountersItem
Could not find legacy class CountersItem after converting to MODX\Revolution\CountersItem
Could not find legacy class CountersItem after converting to MODX\Revolution\CountersItem
Could not find legacy class CountersItem after converting to MODX\Revolution\CountersItem
Could not find legacy class CountersItem after converting to MODX\Revolution\CountersItem
Could not find legacy class CountersItem after converting to MODX\Revolution\CountersItem
Could not find legacy class CountersItem after converting to MODX\Revolution\CountersItem
Could not find legacy class CountersItem after converting to MODX\Revolution\CountersItem
Could not find legacy class CountersItem after converting to MODX\Revolution\CountersItem
Could not find legacy class CountersItem after converting to MODX\Revolution\CountersItem
Could not find legacy class CountersItem after converting to MODX\Revolution\CountersItem
Could not find legacy class CountersItem after converting to MODX\Revolution\CountersItem
Could not find legacy class CountersItem after converting to MODX\Revolution\CountersItem
Could not find legacy class CountersItem after converting to MODX\Revolution\CountersItem
Could not find legacy class CountersItem after converting to MODX\Revolution\CountersItem
Could not find legacy class CountersItem after converting to MODX\Revolution\CountersItem
Could not find legacy class CountersItem after converting to MODX\Revolution\CountersItem
Could not find legacy class CountersItem after converting to MODX\Revolution\CountersItem
Could not find legacy class CountersItem after converting to MODX\Revolution\CountersItem
Could not find legacy class CountersItem after converting to MODX\Revolution\CountersItem
Could not find legacy class CountersItem after converting to MODX\Revolution\CountersItem
Could not find legacy class CountersItem after converting to MODX\Revolution\CountersItem
Could not find legacy class CountersItem after converting to MODX\Revolution\CountersItem
Could not find legacy class CountersItem after converting to MODX\Revolution\CountersItem
Could not find legacy class CountersItem after converting to MODX\Revolution\CountersItem
Could not find legacy class CountersItem after converting to MODX\Revolution\CountersItem
Could not find legacy class CountersItem after converting to MODX\Revolution\CountersItem
Could not find legacy class CountersItem after converting to MODX\Revolution\CountersItem
Could not find legacy class CountersItem after converting to MODX\Revolution\CountersItem
Could not find legacy class CountersItem after converting to MODX\Revolution\CountersItem
Успешно установлен пакет counters-1.0.2-pl

Ошибка в плагине

В версии 1.0.2 изменил способ получения объектов в плагине на getCollection, который возвращает массив с объектами, а в итерации обращаешься как к массиву:

<?php
/** @var modX $modx */
if($modx->event->name == 'OnWebPageInit') {
    $modx->addPackage('counters', MODX_CORE_PATH . 'components/counters/model/');
    $counters = $modx->getCollection('CountersItem');
    foreach($counters as $counter) {
        if($counter['active'] && ($counter['all_context'] || $modx->context->key == $counter['context'])) {
            $code = $counter['content'];
            if($counter['position'] == 'Head') {
                $modx->regClientStartupHTMLBlock($code);
            } else {
                $modx->regClientHTMLBlock($code);
            }
        }
    }
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.