<?php
$listPict = $modx->getOption('listPict', $scriptProperties, NULL);
if (empty($listPict))
{
return "";
}
else
{
$output = "";
foreach (explode(",", $listPict) as $image)
{
if (!empty($image))
{
$output .= "<div class=\"feedback_image\"><a rel=\"lightbox_group\" title=\"\" href=/" . $image. "><img alt=\"\" src=\"" . $modx->runSnippet('phpthumbof', array("input" => $image, "options" => "w=160&h=300&zc=1")) . "\"></a></div>";
}
}
return $output;
}
This question has been answered by ivan_sobaka. See the first response.
\core\components\phpthumbof\model\phpthumbof\phpthumbof.class.php
public function getCacheFilename() {
/* either hash the filename */
if ($this->modx->context->getOption('phpthumbof.hash_thumbnail_names',false,$this->config)) {
$inputSanitized = str_replace(array(':','/'),'_',$this->input);
$this->cacheFilename = md5($inputSanitized);
$this->cacheFilename .= '.'.md5(serialize($this->options));
$this->cacheFilename .= '.' . (!empty($this->options['f']) ? $this->options['f'] : 'png');
} else { /* or attempt to preserve the filename */
$inputSanitized = str_replace(array('http://','https://','ftp://','sftp://'),'',$this->input);
$inputSanitized = str_replace(array(':'),'_',$inputSanitized);
/*
It is a bug. cacheFilename shuldn't be the same as just 'basename'
$this->cacheFilename = basename($inputSanitized);
*/
$this->cacheFilename = str_replace(array(':','/'),'_',$inputSanitized);
if ($this->modx->context->getOption('phpthumbof.postfix_property_hash',true,$this->config)) {
if (!empty($this->options['f'])) { /* get rid of the middle extension and put it at the end */
$length = strlen($this->cacheFilename);
$extLength = strlen($this->options['f']);
$cut = $length-$extLength-1;
if (strlen($this->cacheFilename) > $cut) {
$this->cacheFilename = substr($this->cacheFilename,0,$cut);
}
}
$this->cacheFilename .= '.'.md5(serialize($this->options)).$this->modx->resource->get('id');
$this->cacheFilename .= '.' . (!empty($this->options['f']) ? $this->options['f'] : 'png');
}
}
$this->cacheKey = $this->config['cachePath'].$this->cacheFilename;
return $this->cacheKey;
}
Wow this Bug is not solved after 11 months:
http://tracker.modx.com/issues/8358