Skip to content

Instantly share code, notes, and snippets.

@pepebe
Forked from jpdevries/gist:5516772
Created April 22, 2014 07:04
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pepebe/11168024 to your computer and use it in GitHub Desktop.
Save pepebe/11168024 to your computer and use it in GitHub Desktop.
Use phpthumbof in a 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