problema con nome file immagine prodotto
Moderatore: mod Generali
problema con nome file immagine prodotto
salve a tutti
ho un versione di os commerce 2-2 ms2
il mio problemino è che tutte le volte che carico on line una foto(foto.jpp) ad esempio metto un nuovo prodotto e quindi carico la foto
la realativa foto nella cartella image non ha il nome foto.jpg ma un nome alfanumerico tipo 4829406fc26a6e042439ea146f71e264.jpg
come mai?
ai fini del posizionamente è negativo
ma anche quando devo fare una ricerca io personalmente delle foto caricare.
esiste qualche cosa che devo sbloccare per far si che la foto non cambi nome?
resto in attesa
grazie
ho un versione di os commerce 2-2 ms2
il mio problemino è che tutte le volte che carico on line una foto(foto.jpp) ad esempio metto un nuovo prodotto e quindi carico la foto
la realativa foto nella cartella image non ha il nome foto.jpg ma un nome alfanumerico tipo 4829406fc26a6e042439ea146f71e264.jpg
come mai?
ai fini del posizionamente è negativo
ma anche quando devo fare una ricerca io personalmente delle foto caricare.
esiste qualche cosa che devo sbloccare per far si che la foto non cambi nome?
resto in attesa
grazie
Re: problema con nome file immagine prodotto
nessuno sa aiutarmi?
Re: problema con nome file immagine prodotto
Ciao,
io non ti so aiutare....ma cmq ai fini del posizionamento è molto importante il seo-url non il nome delle immagini
io non ti so aiutare....ma cmq ai fini del posizionamento è molto importante il seo-url non il nome delle immagini

VHosting Solution
Web Hosting Da 26 Euro Annuo
OsCommerce Hosting 144 Euro Annuo
15% di sconto con il codice: OSC-Member su WebHosting - OSC Hosting
http://www.vhosting-it.com
info@vhosting-it.com
Web Hosting Da 26 Euro Annuo
OsCommerce Hosting 144 Euro Annuo
15% di sconto con il codice: OSC-Member su WebHosting - OSC Hosting
http://www.vhosting-it.com
info@vhosting-it.com
- lavoriamopervoi
- membro Senior
- Messaggi: 405
- Iscritto il: 14/12/2007, 18:32
- Contatta:
Re: problema con nome file immagine prodotto
usi qualche contribution per rimpicciolire le immagini?shop155 ha scritto:nessuno sa aiutarmi?
Re: problema con nome file immagine prodotto
credo che ci sia qualche contribuition attiva per rimpicciolire le immagini
ma non so in quanto vedo solo che la stessa immagine è chiamata small , medium , large e thumb...
vi viene in mente qualcosa?
ma non so in quanto vedo solo che la stessa immagine è chiamata small , medium , large e thumb...
vi viene in mente qualcosa?
Re: problema con nome file immagine prodotto
se ci fosse questa contribution come si chiama?
como posso fare per non farle cambiare il nome alle immagini?
como posso fare per non farle cambiare il nome alle immagini?
- lavoriamopervoi
- membro Senior
- Messaggi: 405
- Iscritto il: 14/12/2007, 18:32
- Contatta:
Re: problema con nome file immagine prodotto
questo dipende appunto dalla contribution installata...shop155 ha scritto:se ci fosse questa contribution come si chiama?
como posso fare per non farle cambiare il nome alle immagini?
posta la funzione tep_image()...
presente in includes/functions/html_output.php
per vedere di cosa si tratta...
Ciao
Antonello
Re: problema con nome file immagine prodotto
eccola.fatemi sapere come posso fare o modificare questa funzione affinche' non mi cambi piu' il nome.grazieeee
Codice: Seleziona tutto
function tep_image($src, $alt = '', $width = '', $height = '', $parameters = '', $image_format_type = 'small', $absurl = false) {
if (empty($src)) {
return false;
}
if (!(strpos($src,'http://') === false)) {
$substring_lengt = strlen($src) - strlen(DIR_WS_IMAGES);
$src = substr($src, -$substring_lengt);
$image = '<img src="' . $src . '" border="0" alt="' . tep_output_string($alt) . '"';
if (tep_not_null($alt)) {
$image .= ' title=" ' . tep_output_string($alt) . ' "';
}
if (tep_not_null($width)) {
$image .= ' width="' . tep_output_string($width) . '"';
}
if (tep_not_null($height)) {
$image .= ' height="' . tep_output_string($height) . '"';
}
if (tep_not_null($parameters)) $image .= ' ' . $parameters;
$image .= '>';
return $image;
} else {
//Get file info
$pathinfo_array = pathinfo($src);
$file_name = $pathinfo_array['basename'];
$file_extension = $pathinfo_array['extension'];
//Set $file_ws_path for images files
$file_ws_path = $pathinfo_array['dirname'];
if (substr($file_ws_path, -1) != '/') $file_ws_path .= '/';
//Set $file_fs_path for images files
if (substr($file_ws_path, 0, 1) == '/') {
$file_fs_path = DIR_FS_CATALOG . substr($file_ws_path, strlen(DIR_WS_CATALOG));
} else {
$file_fs_path = DIR_FS_CATALOG . $file_ws_path ;
}
$image_ws_path = $file_ws_path . $file_name;
$image_fs_path = $file_fs_path . $file_name;
if (($file_fs_path == DIR_FS_CATALOG_IMAGES) || ($file_fs_path == DIR_FS_CATALOG_IMAGES_EXTRA)) {
$file_name_prefix = substr($file_name, 0, -(strlen($file_extension) + 1));
switch ($image_format_type) {
case 'thumb':
$resize_image_ws_path = $file_ws_path . $file_name_prefix . '_thumb' . '.' . $file_extension;
$resize_image_fs_path = $file_fs_path . $file_name_prefix . '_thumb' . '.' . $file_extension;
break;
case 'small':
$resize_image_ws_path = $file_ws_path . $file_name_prefix . '_small' . '.' . $file_extension;
$resize_image_fs_path = $file_fs_path . $file_name_prefix . '_small' . '.' . $file_extension;
break;
case 'medium':
$resize_image_ws_path = $file_ws_path . $file_name_prefix . '_medium' . '.' . $file_extension;
$resize_image_fs_path = $file_fs_path . $file_name_prefix . '_medium' . '.' . $file_extension;
break;
case 'large':
$resize_image_ws_path = $file_ws_path . $file_name_prefix . '_large' . '.' . $file_extension;
$resize_image_fs_path = $file_fs_path . $file_name_prefix . '_large' . '.' . $file_extension;
break;
default:
$resize_image_ws_path = $file_ws_path . $file_name_prefix . '_small' . '.' . $file_extension;
$resize_image_fs_path = $file_fs_path . $file_name_prefix . '_small' . '.' . $file_extension;
}
if (file_exists($resize_image_fs_path) && is_file($resize_image_fs_path)) {
if ($image_size = @getimagesize($resize_image_fs_path)) {
$width = $image_size[0];
$height = $image_size[1];
/*
switch ($image_format_type) {
case 'thumb':
if ( !(($width == PRODUCTS_THUMB_IMAGE_SIZE) || ($height == PRODUCTS_THUMB_IMAGE_SIZE)) ) {
$ratio = $width / $height;
if ($width >= $height) {
$width = PRODUCTS_THUMB_IMAGE_SIZE;
$height = round($width / $ratio);
} else {
$height = PRODUCTS_THUMB_IMAGE_SIZE;
$width = round($height * $ratio);
}
}
break;
case 'small':
if ( !(($width == PRODUCTS_SMALL_IMAGE_SIZE) || ($height == PRODUCTS_SMALL_IMAGE_SIZE)) ) {
$ratio = $width / $height;
if ($width >= $height) {
$width = PRODUCTS_SMALL_IMAGE_SIZE;
$height = round($width / $ratio);
} else {
$height = PRODUCTS_SMALL_IMAGE_SIZE;
$width = round($height * $ratio);
}
}
break;
case 'medium':
if ( !(($width == PRODUCTS_MEDIUM_IMAGE_SIZE) || ($height == PRODUCTS_MEDIUM_IMAGE_SIZE)) ) {
$ratio = $width / $height;
if ($width >= $height) {
$width = PRODUCTS_MEDIUM_IMAGE_SIZE;
$height = round($width / $ratio);
} else {
$height = PRODUCTS_MEDIUM_IMAGE_SIZE;
$width = round($height * $ratio);
}
}
break;
case 'large':
if ( !(($width == PRODUCTS_LARGE_IMAGE_SIZE) || ($height == PRODUCTS_LARGE_IMAGE_SIZE)) ) {
$ratio = $width / $height;
if ($width >= $height) {
$width = PRODUCTS_LARGE_IMAGE_SIZE;
$height = round($width / $ratio);
} else {
$height = PRODUCTS_LARGE_IMAGE_SIZE;
$width = round($height * $ratio);
}
}
break;
}*/
} else {
return 'Getimagesize error in virtual thumb/small/medium/large resize';
}
$new_src = $resize_image_ws_path;
} elseif (file_exists($image_fs_path) && is_file($image_fs_path)) {
if ($image_size = @getimagesize($image_fs_path)) {
$get_width = $image_size[0];
$get_height = $image_size[1];
switch ($image_format_type) {
case 'thumb':
$ratio = $get_width / $get_height;
if ($get_width >= $get_height) {
$width = PRODUCTS_THUMB_IMAGE_SIZE;
$height = round($width / $ratio);
} else {
$height = PRODUCTS_THUMB_IMAGE_SIZE;
$width = round($height * $ratio);
}
break;
case 'small':
if ( (CONFIG_CALCULATE_IMAGE_SIZE == 'true') && (empty($width) || empty($height)) ) {
if (empty($width) && $height) {
$ratio = $height / $image_size[1];
$width = round($image_size[0] * $ratio);
} elseif ($width && empty($height)) {
$ratio = $width / $image_size[0];
$height = round($image_size[1] * $ratio);
} elseif (empty($width) && empty($height)) {
$width = $image_size[0];
$height = $image_size[1];
}
}
break;
case 'medium':
$ratio = $get_width / $get_height;
if ($get_width >= $get_height) {
$width = PRODUCTS_MEDIUM_IMAGE_SIZE;
$height = round($width / $ratio);
} else {
$height = PRODUCTS_MEDIUM_IMAGE_SIZE;
$width = round($height * $ratio);
}
break;
case 'large':
$ratio = $get_width / $get_height;
if ($get_width >= $get_height) {
$width = PRODUCTS_LARGE_IMAGE_SIZE;
$height = round($width / $ratio);
} else {
$height = PRODUCTS_LARGE_IMAGE_SIZE;
$width = round($height * $ratio);
}
break;
}
} else {
return 'Getimagesize error in virtual thumb/medium/large resize';
}
$new_src = $image_ws_path;
} else {
return false;
}
} elseif (file_exists($image_fs_path) && is_file($image_fs_path)) {
if ( (CONFIG_CALCULATE_IMAGE_SIZE == 'true') && (empty($width) || empty($height)) ) {
if ($image_size = @getimagesize($image_fs_path)) {
if (empty($width) && $height) {
$ratio = $height / $image_size[1];
$width = round($image_size[0] * $ratio);
} elseif ($width && empty($height)) {
$ratio = $width / $image_size[0];
$height = round($image_size[1] * $ratio);
} elseif (empty($width) && empty($height)) {
$width = $image_size[0];
$height = $image_size[1];
}
}
}
$new_src = $image_ws_path;
} else {
return false;
}
// 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="' . (($absurl) ? tep_output_string(HTTP_SERVER . '/' . $new_src) : tep_output_string($new_src)) . '" border="0" alt="' . tep_output_string($alt) . '"';
if (tep_not_null($alt)) {
$image .= ' title=" ' . tep_output_string($alt) . ' "';
}
if (tep_not_null($width)) {
$image .= ' width="' . tep_output_string($width) . '"';
}
if (tep_not_null($height)) {
$image .= ' height="' . tep_output_string($height) . '"';
}
if (tep_not_null($parameters)) $image .= ' ' . $parameters;
$image .= '>';
return $image;
}
}
Re: problema con nome file immagine prodotto
fatemi sapere vi prego..
Re: problema con nome file immagine prodotto
non mi abbandonate vi prego e scusate se insisto!
- lavoriamopervoi
- membro Senior
- Messaggi: 405
- Iscritto il: 14/12/2007, 18:32
- Contatta:
Re: problema con nome file immagine prodotto
potresti installare un'altra contribution per creare il ridimensionamento automatico delle immagini...shop155 ha scritto:non mi abbandonate vi prego e scusate se insisto!
tipo: 'On the Fly' Auto Thumbnailer using GD Library
Ciao
Antonello
Re: problema con nome file immagine prodotto
ho dato un occhiata alla tua contribution
grazie!
ma dovrei anche toccare il database?
grazie!
ma dovrei anche toccare il database?
- lavoriamopervoi
- membro Senior
- Messaggi: 405
- Iscritto il: 14/12/2007, 18:32
- Contatta:
Re: problema con nome file immagine prodotto
noshop155 ha scritto:ho dato un occhiata alla tua contribution
grazie!
ma dovrei anche toccare il database?
Re: problema con nome file immagine prodotto
ok allora lo provo...
speriamo bene!
speriamo bene!
Re: problema con nome file immagine prodotto
ho provato ma non mi fa vedere le immagini dal lato cliente e mi genera tanti errori...
ma non esiste un modo per capire dove siia la funzione che mi cambia il nome delle immagini che carirco?
ma non esiste un modo per capire dove siia la funzione che mi cambia il nome delle immagini che carirco?