mawenzi,
could you place here your final variant with imageID and without many arguments?
All,
about $hist_path = "data/histo/";
There is a bug, because you need to change the histo.php accordingly.
I use the following solution:
1. Create subfolders (with 777 attributes) like in the data/media/:
data/histo/1
data/histo/2
....
data/histo/n (where n - is the last category).
2. Change details.php like this:
//--- Start Histogramm 27.02.2006 ----------------------
$hist_image = $image_row['image_media_file'] ;
$hist_file= "hist_".substr($hist_image,0,strlen($hist_image)-4).".png";
$hist_path = "data/media/".$cat_id."/";
$histout_path = "data/histo/".$cat_id."/";
$ext = substr($hist_image, strpos($hist_image, ".")+1, strlen($hist_image));
$AutorisedImageType = array ("jpg", "jpeg", "JPG", "JPEG");
if (in_array($ext, $AutorisedImageType)) {
$histogramm_image = "<img src='histo.php?hist_image=".$hist_image."&hist_file=".$hist_file."&histout_path=".$histout_path."&hist_path=".$hist_path."' border=\"1\">";
} else {
$histogramm_image = REPLACE_EMPTY;
}
$site_template->register_vars(array(
"histogramm" => "Гистограмма:",
"histogramm_image" => $histogramm_image
));
//--- Ende Histogramm 27.02.2006 ------------------------
There we added a new variable - $histout_path.
3. Replace all in the histo.php
$path.$hist_file
to
$histout_path.$hist_file
It's all.