Diseño y Posicionamiento Web con Joomla › Foros › General › Joomla en General › Imagenes de Virtuemart › Re:Imagenes de Virtuemart
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;
}
}
?>