We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 6038
    • 228 Posts
    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
      • 6038
      • 228 Posts
      GAH!
      somewhere, somehow, my phpthumbof cache folder had become non world writable.
      hence, phpthumbof was just returning my raw image, as it couldn’t save the thumbnail version.
      i really don’t know how that happened... perhaps during an upgrade?
      rolleyes