Skip to content

Instantly share code, notes, and snippets.

View aletoropov's full-sized avatar
🏠
Working from home

Alexandr aletoropov

🏠
Working from home
View GitHub Profile
@aletoropov
aletoropov / adduser.php
Created July 9, 2023 09:04 — forked from eivko/adduser.php
Создание Super User-а для MODX
<?php
$username = 'vasya';
$password = 'qwerty';
$email = 'vasya@yandex.ru';
$sudo = true;
require 'config.core.php';
require MODX_CORE_PATH . 'model/modx/modx.class.php';
$modx = new modX();
if ((!$modx) || (!$modx instanceof modX)) {
@aletoropov
aletoropov / head.modx.html
Created July 9, 2023 09:03 — forked from eivko/head.modx.html
Заголовок в MODX (если не пустой, вставляется longtitle
<title>[[*longtitle:isnot=``:then=`[[*longtitle]]`:else=`[[*pagetitle]]`]]</title>