Install LivestreetCMS on MODX Revolution from a package in 10 clicks

    imageI have written more than once about my modLivestreet module for the MODX Revolution + LivestreetCMS bundle (In this topic , the idea and implementation with circuits, etc., is described in detail.
    After almost two weeks from the beginning of the development of the module, I came to the following conclusion: everything is too complicated. The idea itself is simple: fasten LivestreetCMS to MODX Revolution (which historically lacks modules for building blogs) in order to get a kind of social account with good functionality.

    I threw the first package quickly, and it completely provided forwarding requests to Livestreet and outputting content to MODX. But then I wanted to implement synchronous work with users of MODX- and LS-., Then something else ... In general, the functionality grew, the code also. The problems were manifested in the difficulties of setting up this union. If with MODX one can say that there were no serious problems at all (in any case, it was not necessary to touch a byte of the engine code), then with Livestreet everything turned out to be more complicated ... One way or another, I had to go into the code. Of course, I understand that some things can be done by overloading classes in your plugin, but this is only a private solution to the problem. Yes, and some points can not be overloaded, as for example, the case was with the Jevix class. But these are not important details. The main thing - setting up this whole thing requires a lot of manual work. When i wrotethe manual for installing and configuring this whole thing, I was completely puzzled ... It seems to be not much, but still more than nothing.

    In general, one way or another, yesterday I decided to change the policy. I decided to build such a package for MODX, which already carries in itself a fully configured Livestreet, and by installing which we already have a ready-made extension for the social network.
    Nevertheless, the module itself can be used independently (for example, by changing the Livestreet settings in the system settings for different contexts, you can get work with several Livestreet sites at once). In general, the module is quite suitable for linking with existing Livestreet sites (in this case, the rights will have to be resorted to manual tuning by manual).

    So, how is the installation going?
    1. Downloada package for MODX Revolution (for synchronous work with users, version no lower than 2.2.0 is required; if you only give content, you can use earlier versions).
    2. Fill it in / core / packages / and install it locally (sorry, until they let it into the MODX repository).
    Who are interested in pictures of the installation process, they are here

    3. After the package is installed, just insert the [[!]] snippet into the start document we need (with an empty template. Or create a template with this snippet), and that’s it.
    For those who have never done this

    That's all :-)
    We go to the page and see Livestreet :-)

    In the future, this project will develop in this direction (package with the finished Livestreet). I think this is right. Those who need it quickly and simply already have it. Do you want tuning? The module itself is completely independent, without problems, add to your Livestreet. Useful info is on the offsite .

    And finally, a small FAQ.

    And if I do not want Livestreet to hang out right on the main? If I want him somewhere in the / forum / section?
    Just go to the MODX system settings (hereinafter the modLivestreet namespace), and change modLivestreet.url_prefix / to / forum / (or whatever you need).
    Everything, this section will be basic for Livestreet. Just do not forget to make the main page with the snippet for this section.

    And if I want on a separate domain, such as
    Create a new context in MODX, in it the main page with the snippet, bind URL to this context in MODX and that’s it. If you want Livestreet links to forum., And Wayfinder, etc. formed links to the main site, then for the context set site_url - the main domain, and the modLivestreet.site_url setting specify the forum domain. True, you still need to change the Wayfinder settings so that it forms full URLs, but these are trifles and do not apply directly to the module.

    Will MODX tags work if I insert them into Livestreet templates?
    Yes they will. All Livestreet content is processed before being output by the MODX parser.

    But what about security? And if someone writes MODX tags to the topic (snippet, system settings, etc.)?
    Don’t be afraid. All safety measures have been taken. All requests to the server are cleaned, and the square brackets of MODX tags are replaced by codes, so there is someone who writes something, then they will see exactly what they wrote.
    But there is one big BUT: if you linked Livestreet with MODX, then do not display it in its pure form without a link to MODX, since the tags are cleaned by MODX, and if someone writes tags in LS, then they will be processed in MODX .
    A cleaner will be written later on the Livestreet side.

    What optimization tips would you give?
    The most important tip is to configure the Rewrite rules on your server. In the basic configuration, MODX completely drives all the Livestreet statics through itself.
    I have nginx and the rules are written like this
    location /templates/{
         		root   /www/;
    			access_log   off;
                expires      30d;
    location /uploads/{
         		root   /www/;
    			access_log   off;
                expires      30d;
    location ~/engine/.*\.js{
    			root   /www/;
    			access_log   off;
                expires      30d;
    That is, physically Livestreet can be completely outside of DOCUMENT_ROOT.
    In general, you will probably figure it out.

    And what is “Synchronous work with users”?
    In MODX, their users, in Livestreet - their own. In normal mode, Livestreet is independently working (the user has registered - he is only in Livestreet, authorized - he is on his own).
    In synchronous mode, everything works synchronously: registered - it is also in Livestreet, it is also in MODX (even if you created a user through the MODX admin panel), logged in - both the Livestreet user and MODX logged in, did the error occur somewhere? - completion of the process both there and there (that is, if the password is incorrect for at least one user, no one will be able to enter).
    By default, synchronous mode is turned off. You can enable it by changing the modLivestreet.sync_users setting .
    By the way, in the installed Livestreet admin:
    login: admin
    pass: admin

    But if ...?
    All, all other questions in the comments.

    Also popular now: