A Bunch Of MODx Revolution + LiveStreet. Part 2 (Take two)

my Last topic sacrificable due to the lack of fully documented and decorated the solution by sending me the whole thing to alter, and therefore rewrite the topic from scratch, as a solution from the ground all cut up.
Thought for an hour or two everything will draw, and eventually rewrote it all as a package, completely rethinking the logic. If so see this MODX plugin can work not only with LiveStreet, and most likely a lot, as if acting as the gateway (or nginx-and that was clear).

So, here is a complete package for MODX: goo.gl/X6HCd (Extra filled modx.com but still in moderation. As soon as they start, will update the link)

What you need to work?
Separately MODX
LiveStreet separately (can be in any internal folder in MODX (but not on the same level livestreet.url_prefix, and that difficulties may arise with the substitution of the URL-s), outside MODX_DOCUMENT_ROOT (but only on one server, and file system access)).

In General put it all (or take ready-made sites) installed on MODX data package, fix (if necessary) the system configs MODX namespace livestreet.

It's all easy.

Courtock harder this is to do:

the
/*After you install LiveStreet rename livestreet_root/config/config.stable.php.dist 
in config.stable.php
and rewrite it in the configs by type
*/
// Load only if the IP under MODX works
if(!defined('IN_MODX')) return;

// If necessary, $modx can bind to the LiveStreet, but so far we just sagopalm
global $modx; 

// Creates a new URL for LiveStreet website
$web = preg_replace('/([^:])\/\//', "$1/",LIVESTREET_WEB.LIVESTREET_URL_PREFIXE);
$web = preg_replace('/\/*$/', "", $web);
$config['path']['root']['web'] = $web;
// You can specify a new prefix for the cache, but not necessarily. 
$config['sys']['cache']['prefix'] = 'livestreet_modx_cache';
// You can overload the skin
$config['view']['skin'] = 'synio'; // template(skin)
// You can take the name of the website from MODX
$config['view']['name'] = $modx- > getOption('site_name'); // the name of the site
$config['view']['description'] = 'your site Description'; // seo description
return $config; 

/*
In General terms, everything. All references to LiveStreet (URL-s with prefix LIVESTREET_URL_PREFIXE)
will be processed by the Plugin.
And for the initial page in MODX, simply specify a blank template and as 
content specify the uncached snippet call [[!livestreet.run]]
*/

But keep in mind that this is a light version for small loads, since all the static is run through MODX.
In order to significantly reduce the load on the server, you should register the rewrite for apache or nginx (or anyone out there that is).
Then everything will be fun to work with :-)

And a small screenshot, in fact)))
Article based on information from habrahabr.ru

Комментарии

Популярные сообщения из этого блога

Monitoring PostgreSQL + php-fpm + nginx + disk using Zabbix

Templates ESKD and GOST 7.32 for Lyx 1.6.x

Customize your Google