📜 ⬆️ ⬇️

A bunch of MODx Revolution + LiveStreet. Part 2 (Take Two)

My last topic was criticized because of the lack of a fully documented and documented solution, sending me to redo the whole thing, so I am rewriting the topic from scratch, since the solution is from scratch, everything is redone.
I thought for an hour I would draw everything up, but in the end I rewrote everything in one package, completely rethinking the logic. If you look at it like this, then MODX can work with this plugin not only with LiveStreet, but most likely it’s a lot to do with, as if playing the role of a gateway (or nginx, so that it would be clearer).

So, here is a ready package for MODX: goo.gl/X6HCd (Extra uploaded on modx.com, but for now on moderation. As soon as they launch, I will update the link)

What is required for work?
Separately MODX
Separately, LiveStreet (can be in some internal folder in MODX (but not on the same level as livestreet.url_prefix, or there may be difficulties with changing URL), it is possible outside of MODX_DOCUMENT_ROOT (but only on one server and access to the file the system was)).
')
In general, we put all of this (or take ready-made sites), install the package data on MODX, and rule (if necessary) the MODX configs of the livestreet namespace.

It's all simple.

It's a little harder to do this:

/*  LiveStreet  livestreet_root/config/config.stable.php.dist  config.stable.php        */ //    - MODX  if(!defined('IN_MODX')) return; //  ,  $modx     LiveStreet,       global $modx; //     LiveStreet- $web = preg_replace('/([^:])\/\//', "$1/",LIVESTREET_WEB.LIVESTREET_URL_PREFIXE); $web = preg_replace('/\/*$/', "", $web); $config['path']['root']['web'] = $web; //      ,   . $config['sys']['cache']['prefix'] = 'livestreet_modx_cache'; //    $config['view']['skin'] = 'synio'; // () //      MODX $config['view']['name'] = $modx->getOption('site_name'); //   $config['view']['description'] = 'Description your site'; // seo description return $config; /*    .    LiveStreet (-   LIVESTREET_URL_PREFIXE)   .      MODX             [[!livestreet.run]] */ 

But it should be borne in mind that this is the light version for small loads, since all the static is driven through MODX.
In order to significantly reduce the load on the server, you should register rewright for apache or nginx (or whoever it is worth).
Then everything will be fun to work :-)

And a small screenshot of the essence)))

Source: https://habr.com/ru/post/154757/


All Articles