CMS MADE SIMPLE FORGE

Album

 

[#2942] Album ignores configuration of ImageManager for thumbnail path and thumbnail prefix

avatar
Created By: Georg Busch (nan)
Date Submitted: Mon Jan 26 15:46:08 -0500 2009

Assigned To:
Version: None
CMSMS Version: None
Severity: None
Resolution: None
State: Open
Summary:
Album ignores configuration of ImageManager for thumbnail path and thumbnail prefix
Detailed Description:
When changing the thumbnail path in the configuration of the ImageManager
(lib/filemanager/ImageManager/config.inc.php) e.g. from
$IMConfig['thumbnail_dir'] = ''; to $IMConfig['thumbnail_dir'] = 'thumbs'; no
thumbs will be displayed in frontend.
This is because the album refers not to the thumbnail path of the ImageManagers
configs but always to the same path of the image:

Example of action.addpicture.php lines 30 - 50:

---
$dbpictures = $this->GetPictures($albumid);
	$oldimages = array();
	foreach ($dbpictures as $dbpicture)
$oldimages[] =
substr($dbpicture->picture,strlen($config['image_uploads_url']));
	$picturenumber = count($oldimages);
	
	sort($images);
	foreach($images as $imagename)
	{
		$imagepath = &$imagename;
		if (in_array($imagepath,$oldimages)) continue;
		$the_path = dirname($imagepath);
		$pos = strpos ($the_path, '/', strlen($the_path) - 1);
		if ($pos === false)
		{
			$thumbpath = $the_path.'/thumb_'.basename($imagepath);
		}
		if ($pos !== false)
		{
			$thumbpath = $the_path.'thumb_'.basename($imagepath);
		}
---

The configuration of the ImageManager is not used when creating the thumbnail
path or the thumbnails prefix (last one is hardcoded).


History