For developers /

How to extend any MODX table

This is translation of russian topic.

Once again it was necessary to change the site table, which can not be changed.

What do people usually do in such cases? As a usual, they edit a kernel or the necessary component, and lose the possibility of their updating. But this is wrong, and you can solve the problem differently.

We write the usual plugin, mark the OnMODXInit event for it and change the model for the required classes of the system or add-ons. For example, I added the manager id to the miniShop2 order:
27 august 2017, 04:54    Василий Наумкин
0    117    0 +1
Solutions /

How to remove all old versions of packages

This is translation of russian topic.

Many people knows that MODX stores a lot of old versions of packages in core/packages, so you can downgrade them at any time.

It needed not so often, but packages occupying HDD space for nothing. You can clean them manually at package manager, but it a bit tiring, so I made a simple script to clean old packages automatically.

By default script must be kept in the root of a site. It will select all installed packages except the last one, and will remove them correctly via system processor.
I strongly recommend you to run it from SSH terminal, because if you will call it via web-browser it may not be able to do all stuff in servers time limit.

As I see in the code of remove processor, it has no way to harm your system, but anyway, you doing this on your own risk!
20 june 2017, 16:29    Василий Наумкин
0    218    0 +1
News and announcements /

Hello English world!

Greetings, friends!

Today we made an important step in uniting the international MODX community and launched a separate English section of

Here you can ask questions, answer them and share success stories. Welcome!
02 june 2017, 16:52    Василий Наумкин
0    208    0 +1