Re:Imagenes de Virtuemart

#84457
Anónimo
Invitado

Simplemente sutituyes el codigo copiando el el codigo en un espacio, del codigo ;
// Tell the user agent to cache this script/stylesheet for an hour
$age = 3600;
header( ‘Expires: ‘.gmdate( ‘D, d M Y H:i:s’, time()+ $age ) . ‘ GMT’ );
header( ‘Cache-Control: max-age=’.$age.’, must-revalidate’ );

if( file_exists( $fileout ) ) {
/* We already have a resized image
* So send the file to the browser */
function rpl_readfile($file){
$handle=@fopen($file,”r”);
echo @fread($handle,filesize($file));
@fclose($handle);
}
switch(strtolower($ext))
{
case “.gif”:
header (“Content-type: image/gif”);
rpl_readfile($fileout);
break;
case “.jpg”:
header (“Content-type: image/jpeg”);
rpl_readfile($fileout);
break;
case “.png”:
header (“Content-type: image/png”);
rpl_readfile($fileout);
break;
}
}
else {
/* We need to resize the image and Save the new one (all done in the constructor) */
$neu = new Img2Thumb($filename,$newxsize,$newysize,$fileout,$maxsize,$bgred,$bggreen,$bgblue);

/* Send the file to the browser */
switch($ext)
{
case “.gif”:
header (“Content-type: image/gif”);
rpl_readfile($fileout);
break;
case “.jpg”:
header (“Content-type: image/jpeg”);
rpl_readfile($fileout);
break;
case “.png”:
header (“Content-type: image/png”);
rpl_readfile($fileout);
break;
}
}
?>

Esta web utiliza cookies propias y de terceros para su correcto funcionamiento y para fines analíticos y para mostrarte publicidad relacionada con sus preferencias en base a un perfil elaborado a partir de tus hábitos de navegación. Contiene enlaces a sitios web de terceros con políticas de privacidad ajenas que podrás aceptar o no cuando accedas a ellos. Al hacer clic en el botón Aceptar, acepta el uso de estas tecnologías y el procesamiento de tus datos para estos propósitos. Ver
Privacidad