I’m struggling to get phpthumbof to work properly on my chunk called from a snippet
I have a snippet containing some tv values with phpthumbof output filters like so:
<div class="stageItem item1"><img src="[[+pc.image.1:phpthumbof=`w=640&h=360`]]" width="640" height="360" alt="[[+pc.image.1.caption]]" /></div>
The snippet calls the chunk something like:
$output = $modx->getChunk($chunkName, $fields);
And later in the snippet i also try to process all tags by doing this ( which I found in some forum post somewhere):
/* get the max iterations tags are processed before processing is terminated */
$maxIterations= (integer) $modx->getOption('parser_max_iterations', null, 10);
/* parse all cacheable tags first */
$modx->getParser()->processElementTags('', $output, false, false, '[[', ']]', array(), $maxIterations);
/* parse all non-cacheable and remove unprocessed tags */
$modx->getParser()->processElementTags('', $output, true, true, '[[', ']]', array(), $maxIterations);
My images are coming through in the output, but as the original image, not the phpthumbof version.
Phpthumbof is working on my site ok, I have it working fine elsewhere, but because I’m calling the chunk and parsing it from my custom snippet I must be missing something needed to get it to work.
!
I would appreciate any suggestions!
Revo 2.0.8
Apache 2.2
PHP 5.2.11