Skip to content

Instantly share code, notes, and snippets.

@davidpede
davidpede / xpdo-where
Last active October 11, 2023 20:49
pdoResources where examples
&where=`{ "template:IN" : [ 1,2,3 ] }
&where=`{ "template:NOT IN" : [ 1,2,3 ] }
&where=`[{"alias:LIKE":"foo%", "OR:alias:LIKE":"%bar"},{"OR:pagetitle:=":"foobar", "AND:description:=":"raboof"}]`
@jpdevries
jpdevries / gist:7c17dce93df93ca932e2
Last active November 23, 2020 11:39
Duplicate MODX User Group from Command Line
<?php
/**
* Duplicates a MODX User Group
* USAGE:
* php duplicateusergroup.php 1 New\ Group
* php duplicateusergroup.php 1 New\ Group newuser [email protected] password
*/
$tstart = microtime(true);
set_time_limit(0);
@chrisdempsey
chrisdempsey / 00 MODX Plugins Collection
Last active November 23, 2020 14:07
Collection of MODX Plugins.
01-autoResizeOnUpload.php - Plugin to automatically resize images uploaded via MODX that are larger than the dimensions specified
in the config within the plugin code. This should be considered experimental but has been tested
successfully on MODX Revolution 2.3.2-pl (traditional) running on Windows Server 2008.
02-set-expires-headers.php - Sets expires headers to value defined in plugin
@christianhanvey
christianhanvey / modx object examiner
Created July 22, 2012 11:25
modx revo object debug helper snippet
<?php
/**
* File viewRevoObjects.php (requires MODx Revolution 2.1)
* Created on: 9/17/11 at 9:49 AM
* Project shawn_wilkerson
* @elements
* @version 1.0
* @category
* @author W. Shawn Wilkerson