125 строка
public function resizeImage($file, $width, $height) {
// init vars
$width = (int) $width;
$height = (int) $height;
$file_info = pathinfo($file);
//$thumbfile = $this->app->path->path('cache:').'/images/'.$file_info['filename'].'_'.md5($file.$width.$height).'.'.$file_info['extension'];
//$cache_time = 86400; // cache time 24h
// check thumbnail directory
if (1) { // 0 - чтобы использовать старый вариант
$path = md5($file . $width . $height);
$subfolder = substr($path, 0, 1);
$cacheFolder = '/images/img/'; // относительный путь для миниатюр
$thumbfile = JPath::clean(JPATH_ROOT . "{$cacheFolder}/{$subfolder}/{$path}." . $file_info['extension']);
} else {
$thumbfile = $this->app->path->path('cache:') . '/images/' . $file_info['filename'] . '_' . md5($file . $width . $height) . '.' . $file_info['extension'];
}
$cache_time = 86400 * 365; // 365 суток, вместо 24-х часов. Нет смысла генерировать каждый раз одно и тоже
if (!JFolder::exists(dirname($thumbfile))) {
JFolder::create(dirname($thumbfile));
}
// create or re-cache thumbnail
if ($this->app->imagethumbnail->check() && (!is_file($thumbfile) || ($cache_time > 0 && time() > (filemtime($thumbfile) + $cache_time)))) {
$thumbnail = $this->app->imagethumbnail->create($file);
if ($width > 0 && $height > 0) {
$thumbnail->setSize($width, $height);
$thumbnail->save($thumbfile);
} else if ($width > 0 && $height == 0) {
$thumbnail->sizeWidth($width);
$thumbnail->save($thumbfile);
} else if ($width == 0 && $height > 0) {
$thumbnail->sizeHeight($height);
$thumbnail->save($thumbfile);
} else {
if (JFile::exists($file)) {
JFile::copy($file, $thumbfile);
}
}
$this->putIndexFile(dirname($thumbfile));
}
if (is_file($thumbfile)) {
return $thumbfile;
}
return $file;
}
-----------------------
У меня Joomla 2.5 + JBZoo 2.0.2
тьфу.... http://forum.jbzoo.c...zku-na-bd-i-fs/ в общем на такой древности попробуйте похожее найти)) в коде
Edited by CB9TOIIIA, 31 March 2016 - 15:35.