Skip to content

Instantly share code, notes, and snippets.

View Dmi3yy's full-sized avatar

Dmytro Lukianenko Dmi3yy

View GitHub Profile

#Release 1.2 from 01.12.2016.

This release includes many changes and improvements that would make simpler of creating sites on MODX EVO.

More then 1000 commits

##On MODX Evolution 1.2 worked:

@Dmi3yy
Dmi3yy / widget.php
Created June 17, 2017 21:52
sample widgets for modx evo. 1.2.1-d9.1.6 +
//<?
$e = &$modx->Event;
switch($e->name){
case 'OnManagerWelcomeHome':
//if($_SESSION['mgrRole']!=='2') return;
//unset($widgets['welcome']);
//unset($widgets['onlineinfo']);
//unset($widgets['recentinfo']);
//unset($widgets['news']);
@Dmi3yy
Dmi3yy / evo1.3.0.md
Last active July 19, 2017 08:21
Evolution CMS 1.3

EVOLUTION CMS 1.3.0

Новый релиз EVO 1.3.0 в первую очередь интересен тем что идет уже под именем EVOLUTION CMS. А так же интересен тем что теперь не будет отдельно моей кастомной сборки которая развивалась активней основной ветки. Это приведет к тому что теперь обновления будут выходить чаще, думаю раз в месяц будет свежий релиз а не так как было последнее время что у нас 1 релиз в пол года год.

Сразу скажу пару слов про планы на будущее:

  • Начиная с текущей версии у нас будет правильная версионность: http://semver.org/lang/ru/ думаю это будет куда как удобней и правильней.
  • В ближайшее время будет закончена работа с сайтом для документации: docs.evo.im, и сниму видео как помогать с документацией так что б собрать все в одном месте. Также документация будет сразу мультиязычной.
  • Так же будут перемещены многие дополнения из ядра в репозиторий.
  • По части админки: удаление motools, перевод всего html на бутстрап.
  • Так же в планах интеграция composer и многое другое, в скором времени собираюсь н
@Dmi3yy
Dmi3yy / evo1.3.0-en.md
Last active August 27, 2017 23:53
Evolution 1.3

EVOLUTION CMS 1.3.0

The new release of EVO 1.3.0 runs under the name EVOLUTION CMS. Now updates will be released more often. About once a month there will be a fresh release instead of 1 release at half a year.

Just say a few words about future plans:

  • Starting with the current version we will have the correct versioning: http://semver.org/lang/ru/ I think this will be much more convenient and correct.
  • In the near future, work with the documentation site will be finished: docs.evo.im, and there will be a video of how to help with the documentation so that we can have everything in one place. Also, the documentation will be multilanguage.
  • Many additions from the kernel to the repository will be moved.
  • On the part of admin: removing mootools, translating them all in html and bootstrap.
  • Also in the plans of integrating composer and much more will be added soon to the roadmap.
@Dmi3yy
Dmi3yy / evo1.4.0.en.md
Created January 25, 2018 10:50
evo.1.4.0.en

Evolution CMS 1.4.0

For half a year, a lot of work has been done (more than 600 comets), this is the second major release of Evolution CMS, the first one can be read here (http://modx.im/blog/news/5311.html). The main emphasis in this release was aimed at the stability of the system, as well as updating the old snippets for new ones. What makes it possible to create sites even faster, and even work sites will be even faster. In this we are very much helped by DocLister.

Of the most important:

  • Updated demo site all old components are replaced with new ones, old components are rendered in extras and are not recommended for use.  - Ditto -> DocLister  - Wayfinder -> DLMenu  - Breadcrumbs -> DLCrumbs  - Eform -> FormLister
@Dmi3yy
Dmi3yy / evo1.4.0.md
Last active January 25, 2018 11:24
evo1.4.0

Evolution CMS 1.4.0

За пол года было проделанно много работы(более 600 комитов), это второй крупный релиз Evolution CMS, про первый можно почитать тут (http://modx.im/blog/news/5311.html). Основной упор в этом релизе был направлен на стабильность системы, а так же обновлению старых сниппетов на новые. Что дает возможность создавать сайты еще быстрее, да и работать сайты будут еще быстрее. В этом нам очень сильно помогает DocLister.

Из самого важного:

  • Обновлен демо сайт все старые компоненты заменены новыми, старые компоненты вынесенны в екстрас и не рекомендуются к использолванию.
  • Ditto -> DocLister
  • Wayfinder -> DLMenu
  • Breadcrumbs -> DLCrumbs
  • Eform -> FormLister
@Dmi3yy
Dmi3yy / laravel-valet-plugin-for-evolution-cms.php
Last active May 22, 2018 16:05
Evolution CMS + Laravel Valet
//<?php
$e = &$modx->event;
if ($e->name == 'OnWebPageInit') {
if (strpos($_SERVER['DOCUMENT_URI'], 'laravel/valet') !== false){
$url = $modx->db->escape($_SERVER['REQUEST_URI']);
if (isset($url) && $url !== '/') {
$url = explode('?', $url);
$friendly_url_suffix = $modx->config['friendly_url_suffix'];
$base_url = $modx->config['base_url'];
$site_url = $modx->config['site_url'];
@Dmi3yy
Dmi3yy / gist:2da17345eacacbe04a89e8c1cc53f348
Created November 17, 2019 09:02
Evolution CMS Lessons: Templates part 1
1 Templates 1 part
Подключаем debug и tracy:
core/custom/config/app/debug.php
<?php return true;
core/custom/config/tracy/active.php
<?php return 'manager';
@Dmi3yy
Dmi3yy / evo3localization.md
Created October 29, 2020 16:03
evo3localization.md

Работа с мультиязычностью

Перенесли логику мультиязычности с Laravel, детальней как это в Laravel читаем тут: https://laravel.com/docs/8.x/localization, а как это в Evo читаем ниже

Основной принцып работы

В целом все очень похоже на решение bLang https://github.com/bumkaka/bLang так же можно глянуть видео как работали в более ранних версиях : https://www.youtube.com/watch?v=FVX63RRYsU4

.htaccess

Добавляем строку перед: # For Friendly URLs

@Dmi3yy
Dmi3yy / NewsController.php
Created November 6, 2019 11:30
NewsController
<?php
namespace EvolutionCMS\Odkb\Controllers;
class NewsController extends BaseController {
public function render() {
$this->data['newsmenu'] = json_decode($this->evo->runSnippet('DLMenu', ['parents' => 69, 'maxDepth' => 1, 'api' => 1]), true)[0];
$this->data['newsitems'] = $this->DocLister([
'depth'=>2,