Skip to content

Instantly share code, notes, and snippets.

<?php
$from = "en";
$to = "ru";
$_lang = [];
$dir = "/home/ik/dev2/revolution/core/lexicon/" . $from;
$files = scandir($dir);
@larscwallin
larscwallin / a_readme.txt
Created November 9, 2011 09:49
SIMPLX MIRAGE
* WELCOME TO THE SIMPLX MIRAGE EXPERIMENT! *
PURPOSE:
The idea behind this little project is to hide the quite quirky MODx notion that a Resource (or document) does not
"own" its extended properties. In MODx these are called Template Variables and, as the name suggests, they are
bound to one or more Templates. This means that the normal concept that a Template conforms to the data in an Object
is reversed. As a result, in MODx a Resource potentially "looses" properties when a user changes its Template.
I want a solid way of using the current MODx Template Variable concept to quickly build custom content types
@opengeek
opengeek / recalculateURIs.php
Created April 13, 2011 14:47
Script to recalculate all unfrozen URI values for MODX Resources in 2.1.x+
<?php
include 'config.core.php';
include MODX_CORE_PATH . 'model/modx/modx.class.php';
$modx = new modX();
$modx->setLogTarget(XPDO_CLI_MODE ? 'ECHO' : 'HTML');
$modx->initialize('mgr');
$modx->setLogLevel(modX::LOG_LEVEL_INFO);