enigma1, on Oct 5 2005, 04:03 PM, said:
Yes thats right.
But if I use ../images/ in configure.php osC tries to find my pictures in domain.se/images when the shop is actually at domain.se/devstore/images.
Posted 05 October 2005 - 04:39 PM
enigma1, on Oct 5 2005, 04:03 PM, said:
Posted 05 October 2005 - 05:09 PM
Edited by Fredrik.r, 05 October 2005 - 05:11 PM.
Posted 05 October 2005 - 10:13 PM
Posted 06 October 2005 - 09:56 AM
Edited by Fredrik.r, 06 October 2005 - 09:57 AM.
Posted 06 October 2005 - 04:05 PM
$contents[] = array('text' => '<br>' . tep_info_image($pInfo->products_image, $pInfo->products_name, SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '<br>' . $pInfo->products_image);
function tep_info_image($image, $alt, $width = '', $height = '') {
if (tep_not_null($image) && (file_exists(DIR_FS_CATALOG_IMAGES . $image)) ) {
$image = tep_image(DIR_WS_CATALOG_IMAGES . $image, $alt, $width, $height);
} else {
$image = TEXT_IMAGE_NONEXISTENT;
}
return $image;
}
define('DIR_FS_CATALOG', 'full path here'); // absolute path required
define('DIR_FS_CATALOG_IMAGES', DIR_FS_CATALOG . 'images/');
define('DIR_WS_CATALOG_IMAGES', '../images/');
Posted 07 October 2005 - 11:07 AM
mloeffen, on Aug 19 2005, 06:15 PM, said:
Posted 08 October 2005 - 05:41 PM
Posted 08 October 2005 - 06:25 PM
Posted 09 October 2005 - 10:40 AM
Giacomo79, on Oct 7 2005, 01:07 PM, said:
// Output the image:
if ($image[2] == 2 || ($image[2] == 1 && $gif_as_jpeg))
{
if ($tn_server_cache)
{
$thumbnail = modify_tn_path($_GET['img'].'.thumb_'.$_GET['w'].'x'.$_GET['h'].'.jpg');
imagejpeg($tmp_img,$thumbnail, 100);
//http_headers($thumbnail);
http_headers($_GET['img']); [b]<----- I HAVE TO ADD THIS CODE TO MAKE IT WORK[/b]
See above the new code...Edited by Giacomo79, 09 October 2005 - 10:41 AM.
Posted 09 October 2005 - 05:18 PM
Edited by xty, 09 October 2005 - 05:21 PM.
Posted 09 October 2005 - 10:06 PM
enigma1, on Oct 6 2005, 04:05 PM, said:
$contents[] = array('text' => '<br>' . tep_info_image($pInfo->products_image, $pInfo->products_name, SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '<br>' . $pInfo->products_image);
function tep_info_image($image, $alt, $width = '', $height = '') {
if (tep_not_null($image) && (file_exists(DIR_FS_CATALOG_IMAGES . $image)) ) {
$image = tep_image(DIR_WS_CATALOG_IMAGES . $image, $alt, $width, $height);
} else {
$image = TEXT_IMAGE_NONEXISTENT;
}
return $image;
}
define('DIR_FS_CATALOG', 'full path here'); // absolute path required
define('DIR_FS_CATALOG_IMAGES', DIR_FS_CATALOG . 'images/');
define('DIR_WS_CATALOG_IMAGES', '../images/');
Posted 09 October 2005 - 10:58 PM
Posted 11 October 2005 - 11:03 AM
Posted 11 October 2005 - 11:18 AM
Giacomo79, on Oct 11 2005, 01:03 PM, said:
Posted 11 October 2005 - 07:32 PM
Edited by enigma1, 11 October 2005 - 07:32 PM.
Posted 11 October 2005 - 10:02 PM
enigma1, on Oct 11 2005, 09:32 PM, said:
Posted 13 October 2005 - 10:00 AM
Giacomo79, on Oct 11 2005, 10:02 PM, said:
Posted 13 October 2005 - 11:47 AM
thessrtech, on Oct 13 2005, 10:00 AM, said:
function tep_image($src, $alt = '', $width = '', $height = '', $parameters = '') {
if ( (empty($src) || ($src == DIR_WS_IMAGES)) && (IMAGE_REQUIRED == 'false') ) {
return false;
}
// "On the Fly" Auto Thumbnailer using GD Library, servercaching and browsercaching
// Scales product images dynamically, resulting in smaller file sizes, and keeps
// proper image ratio. Used in conjunction with product_thumb.php t/n generator.
function tep_image($src, $alt = '', $width = '', $height = '', $params = '') {
// Set default image variable and code
$image = '<img src="' . $src . '"';
// Don't calculate if the image is set to a "%" width
if (strstr($width,'%') == false || strstr($height,'%') == false) {
$dont_calculate = 0;
} else {
$dont_calculate = 1;
}
// Dont calculate if a pixel image is being passed (hope you dont have pixels for sale)
if (!strstr($image, 'pixel')) {
$dont_calculate = 0;
} else {
$dont_calculate = 1;
}
// Do we calculate the image size?
if (CONFIG_CALCULATE_IMAGE_SIZE && !$dont_calculate) {
// Get the image's information
if ($image_size = @getimagesize($src)) {
$ratio = $image_size[1] / $image_size[0];
// Set the width and height to the proper ratio
if (!$width && $height) {
$ratio = $height / $image_size[1];
$width = intval($image_size[0] * $ratio);
} elseif ($width && !$height) {
$ratio = $width / $image_size[0];
$height = intval($image_size[1] * $ratio);
} elseif (!$width && !$height) {
$width = $image_size[0];
$height = $image_size[1];
}
// Scale the image if not the original size
if ($image_size[0] != $width || $image_size[1] != $height) {
$rx = $image_size[0] / $width;
$ry = $image_size[1] / $height;
if ($rx < $ry) {
$width = intval($height / $ratio);
} else {
$height = intval($width * $ratio);
}
$image = '<img src="product_thumb.php?img='.$src.'&w='.
tep_output_string($width).'&h='.tep_output_string($height).'"';
}
} elseif (IMAGE_REQUIRED == 'false') {
return '';
}
}
// Add remaining image parameters if they exist
if ($width) {
$image .= ' width="' . tep_output_string($width) . '"';
}
if ($height) {
$image .= ' height="' . tep_output_string($height) . '"';
}
if (tep_not_null($params)) $image .= ' ' . $params;
$image .= ' border="0" alt="' . tep_output_string($alt) . '"';
if (tep_not_null($alt)) {
$image .= ' title="' . tep_output_string($alt) . '"';
}
$image .= '>';
return $image;
}
Posted 14 October 2005 - 04:01 PM
Posted 15 October 2005 - 05:43 AM