Skip to content

Instantly share code, notes, and snippets.

@jpdevries
Last active December 16, 2015 23:50
Show Gist options
  • Save jpdevries/5516772 to your computer and use it in GitHub Desktop.
Save jpdevries/5516772 to your computer and use it in GitHub Desktop.
Using phpthumb in a MODX CMP
$modAuth = $this->modx->user->getUserToken('mgr');
$thumbQuery = http_build_query(array(
'src' => $image['urlAbsolute'],
'w' => 360,
'h' => 270,
'HTTP_MODAUTH' => $modAuth,
//'f' => $thumbnailType,
'q' => 80,
'wctx' => 'mgr',
'zc' => 1
//'source' => $this->get('id'),
));
$thumb = $this->modx->getOption('connectors_url', null, MODX_CONNECTORS_URL).'system/phpthumb.php?'.urldecode($thumbQuery);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment