Thank you sir..your code is working now without blur thing..also now it can be resized to smaller size.. but one more issue is still here.
i have uploaded a pdf file ..and im using my site as eductational purpose .. ppt pdf files etc..
so my download programer automatically is trying to download the pdf file i have uploaded on my 4 images site..
also files with no images should show respective icon.. i mean like if i have uploaded zip file.. it should show zip icon..etc but it instead showing the name of the file?
==============================================
Many Thanks . sir.. little change back to old code in your code ..saved the problem..
many thanks .. superb work sir...
//################################# Thumbnail small Code ########################################################
function get_thumbnail_small_code($media_file_name, $thumb_file_name = "", $image_id, $cat_id, $image_name = "", $mode = "", $show_link = 1, $open_window = 0) {
global $site_sess, $config, $site_template;
//####### Config ###############################
$maxwidth = "270"; // pixel
//####### Config ###############################
if (!check_media_type($media_file_name)) {
$thumb = "<img src=\"".ICON_PATH."/404.gif\" style=\"border:0;width:$thumb_width ; height:$thumb_height ;\" />";
}
else {
if (!get_file_path($thumb_file_name, "thumb", $cat_id, 0, 0)) {
$file_src = ICON_PATH."/".get_file_extension($media_file_name).".gif";
$image_info = @getimagesize($file_src);
$thumb_width = $image_info[0]."px";
$thumb_height = $image_info[1]."px";
$thumb = "<img src=\"".$file_src."\" style=\"border:0px;width:$thumb_width; height:$thumb_height;\" alt=\"".format_text($image_name, 2)."\" />";
}
else {
$file_src = get_file_path($media_file_name, "media", $cat_id, 0, 1);
$image_info = @getimagesize($file_src);
$thumb_width = $image_info[0];
$thumb_height = $image_info[1];
if ($thumb_width > $maxwidth){
$imageprop=$maxwidth/$thumb_width;
$imagevsize= $thumb_height*$imageprop;
$thumb_width=$maxwidth."px";
$thumb_height= round($imagevsize)."px";
}
else{
$thumb_width = $image_info[0]."px";
$thumb_height = round($image_info[1])."px";
}
$thumb = "<img src=\"".$file_src."\" style=\"border:".$config['image_border']."px solid;width:$thumb_width; height:$thumb_height;\" alt=\"".format_text($image_name, 2)."\">";
}
}
if ($show_link) {
if ($open_window) {
$thumb = "<a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$image_id.((!empty($mode)) ? "&mode=".$mode : ""))." #z1\" onclick=\"opendetailwindow()\" target=\"detailwindow\">".$thumb."</a>";
}
else {
$thumb = "<a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$image_id.((!empty($mode)) ? "&mode=".$mode : ""))." #z1\">".$thumb."</a>";
}
}
return $thumb;
}
//------------------------End Thumbnail small
in first else part i changed to $thumb_file_name, "thumb"
from $media_file_name, "media"
now pdf file is not downloading it self.. i mean idm not detecting it..its nice..
Many thanks again..