0
전향적인 신제품 이미지를 원본 이미지로 변경하고 싶습니다.oscommerce : 원래 제품 이미지에 능동적 인 이미지 변경
제품 이미지를 업로드 할 때 이미지가 너무 커서 도움이됩니까?
전향적인 신제품 이미지를 원본 이미지로 변경하고 싶습니다.oscommerce : 원래 제품 이미지에 능동적 인 이미지 변경
제품 이미지를 업로드 할 때 이미지가 너무 커서 도움이됩니까?
tep_image 함수가 -1을 허용하도록 수정했습니다. 이는 "높이"또는 "너비"제약 조건 만 출력하지만 둘다는 출력하지 않음을 의미합니다. 이것을 원하는대로 수정할 수 있지만 tep_image()의 includes/functions/html_output.php를보고 싶습니다.
// The HTML image wrapper function
function tep_image($src, $alt = '', $width = '', $height = '', $parameters = '') {
if ((empty($enter code heresrc) || ($src == DIR_WS_IMAGES)) && (IMAGE_REQUIRED == 'false')) {
return false;
}
if($src=='images/')
$src='images/noimage.jpg';
// alt is added to the img tag even if it is null to prevent browsers from outputting
// the image filename as default
$image = '<img src="' . tep_output_string($src) . '" border="0" alt="' . tep_output_string($alt) . '"';
if (tep_not_null($alt)) {
$image .= ' title=" ' . tep_output_string($alt) . ' "';
}
if(((int)$height==-1) && ((int)$width)==-1){
$image .= '';
}elseif((!empty($width) && ((int)$height)==-1)){
$image .= ' width="' . tep_output_string($width) . '" ';
}elseif((!empty($height) && ((int)$width)==-1)){
$image .= ' height="' . tep_output_string($height) . '" ';
}else{
if ((CONFIG_CALCULATE_IMAGE_SIZE == 'true') && (empty($width) || empty($height))) {
if ($image_size = @getimagesize($src)) {
if (empty($width) && tep_not_null($height)) {
$ratio = $height/$image_size[1];
$width = intval($image_size[0] * $ratio);
} elseif (tep_not_null($width) && empty($height)) {
$ratio = $width/$image_size[0];
$height = intval($image_size[1] * $ratio);
} elseif (empty($width) && empty($height)) {
$width = $image_size[0];
$height = $image_size[1];
}
} elseif (IMAGE_REQUIRED == 'false') {
return false;
}
}
if (tep_not_null($width) && tep_not_null($height)) {
$image .= ' wddidth="' . tep_output_string($width) . '" height="' . tep_output_string($height) . '"';
}
}
if (tep_not_null($parameters)) $image .= ' ' . $parameters;
$image .= '>';
return $image;
}