Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Issues in IE + Firefox

Issues in IE + Firefox

Views: 863

Results 1 to 6 of 6
1 Nov 2011, 7:47 PM
#1
tweezy avatar

tweezy

New Zenner

Join Date:
Oct 2011
Posts:
27
Plugin Contributions:
0

Issues in IE + Firefox

Hi, my zencart theme is having an issue with IE and Firefox, whenever somebody clicks "View larger image" it opens up a new window, but no scroll bars come up, if anyone can tell me where I can find the stylesheet I can edit it;

Example
http://tubebackgrounds.co.uk//index.php?main_page=product_info&cPath=3&products_id=6

If you click "View Larger image" you shall see my issue.

Now, I have two ideas on fixing but I have no idea where to find the necessary files...

  • Open the image in a new tab
  • Scroll bars

Thanks.:P

1 Nov 2011, 8:17 PM
#2
tweezy avatar

tweezy

New Zenner

Join Date:
Oct 2011
Posts:
27
Plugin Contributions:
0

Re: Issues in IE + Firefox

(Unable to edit OP?)
EDIT:
Managed to find this;
define('TEXT_CLICK_TO_ENLARGE', 'larger image');

Guess I'm on the right tracks, kinda hit a stump... I don't know any PHP... There must be something I can do to open the image in a new tab...

1 Nov 2011, 9:10 PM
#3
tweezy avatar

tweezy

New Zenner

Join Date:
Oct 2011
Posts:
27
Plugin Contributions:
0

Re: Issues in IE + Firefox

I would edit my posts but I'm unable too...

Just wanted to say I found it, if anyone else has this issue here is how to fix it;

includes/modules/pages/product_info

Open the - jscript_main.php

Then,

scrollbars=no,
to
scrollbars=yes,

Sorted.

2 Nov 2011, 12:29 AM
#4
rstevenson avatar

rstevenson

Totally Zenned

Join Date:
Nov 2006
Location:
Dartmouth, NS Canada
Posts:
2,400
Plugin Contributions:
0

Re: Issues in IE + Firefox

There is only a seven-minute window in which you can edit a post.

I can see why you had to add scrollbars, but... those images are WAY too large! The pop-up window opened up to the full size of my 20" monitor and still did not contain the entire image. Why so large?

Rob

2 Nov 2011, 8:10 AM
#5
tweezy avatar

tweezy

New Zenner

Join Date:
Oct 2011
Posts:
27
Plugin Contributions:
0

Re: Issues in IE + Firefox

rstevenson:

There is only a seven-minute window in which you can edit a post.

I can see why you had to add scrollbars, but... those images are WAY too large! The pop-up window opened up to the full size of my 20" monitor and still did not contain the entire image. Why so large?

Rob

yeah, my 21 inch can't even fit them on -_-

There just designed to be that large, so when you use them as a YT channel background the background doesn't screw up.

13 Nov 2011, 11:38 AM
#6
kevinoneil68 avatar

kevinoneil68

New Zenner

Join Date:
Sep 2011
Location:
Upstate, NY
Posts:
48
Plugin Contributions:
0

Re: Issues in IE + Firefox

You could create a php thumbnailer and call the image as

img src="thumb/image.jpg" then you don't even need to create thumbnails for all your images and it displays them as smaller sizes for sake of our monitors. I will show a basic code for jpg, gif and png. You can add bmp and such if you need.

example:
https://www.yoursite.com/images/thumb/filename.jpg

.htaccess (This tells your server to force 'thumb' to act as 'thumb.php' without the .php extension)

<Files thumb>
ForceType application/x-httpd-php
AcceptPathInfo On
</Files>
<?php

	$server = $_SERVER['REQUEST_URI'];
	
	$url_array = explode('/',$server);
	
	$image = $url_array[3]; 
        // adjust the url array by changing the '3' to point to the actual image filename


// This is added in case of 404 errors:
$fullimageurl  = 'http://www.yoursite.com/images/' .$image;
$fullimageurl2 = 'http://www.yoursite.com/images/noimagefound.jpg';



    $c = curl_init($fullimageurl);
    curl_setopt($c, CURLOPT_RETURNTRANSFER, true);
    curl_exec($c);
    $http_code = curl_getinfo($c, CURLINFO_HTTP_CODE);
    curl_close($c);
//  var_dump($http_code);
//	exit();

	if ($http_code == 404) {
	$imagesurl = $fullimageurl2;
	} elseif ($http_code == 302) {
	$imagesurl = $fullimageurl;
	} else {
	$imagesurl = $fullimageurl;
	}


// set the max width and height in pixels

	$width  = 120;
	$height = $width;


// this grabs the extension

	$info = pathinfo($imagesurl);
	$extension = $info['extension'];
	$extension = strtolower($extension);

	if(($extension==="jpeg")||($extension==="jpg")) {

			list($width_orig, $height_orig) = getimagesize("$imagesurl");

				if ($width && ($width_orig < $height_orig)) {
				$width = ($height / $height_orig) * $width_orig;
				} else {
				$height = ($width / $width_orig) * $height_orig;
				}

			$image_p = imagecreatetruecolor($width, $height);
			$image = imagecreatefromjpeg("$imagesurl");
			imagecopyresampled($image_p, $image, 0, 0, 0, 0, $width, $height, $width_orig, $height_orig);
			header('Content-type: image/jpeg');
			imagejpeg($image_p, null, 100);
			imagedestroy($image_p);
			exit();
	}
	
	
	if($extension==="gif") {

			list($width_orig, $height_orig) = getimagesize($imagesurl);

				if ($width && ($width_orig < $height_orig)) {
				$width = ($height / $height_orig) * $width_orig;
				} else {
				$height = ($width / $width_orig) * $height_orig;
				}

			$image_p = imagecreatetruecolor($width, $height);
			$image = imagecreatefromgif($imagesurl);
			imagecopyresampled($image_p, $image, 0, 0, 0, 0, $width, $height, $width_orig, $height_orig);
			header('Content-type: image/gif');
			imagegif($image_p, null, 100);
			imagedestroy($image_p);
			exit();
	}
	
	
	if($extension==="png") {
	
			list($width_orig, $height_orig) = getimagesize($imagesurl);

				if ($width && ($width_orig < $height_orig)) {
				$width = ($height / $height_orig) * $width_orig;
				} else {
				$height = ($width / $width_orig) * $height_orig;
				}

			$image_p = imagecreatetruecolor($width, $height);
			$image = imagecreatefrompng($imagesurl);
			imagecopyresampled($image_p, $image, 0, 0, 0, 0, $width, $height, $width_orig, $height_orig);
			header('Content-type: image/png');
			imagepng($image_p);
			imagedestroy($image_p);
			exit();
	
	}

?>

Not sure if it's what you are looking for, but my 2cents.

Thanks,
Kevin