Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / How do you increase the large image pop-up window when you have an image border?

How do you increase the large image pop-up window when you have an image border?

Locked

Views: 2,408

Results 1 to 13 of 13
This thread is locked. New replies are disabled.
12 Apr 2009, 3:15 AM
#1
sawhorse avatar

sawhorse

Zen Follower

Join Date:
Oct 2007
Location:
Kentucky - USA
Posts:
425
Plugin Contributions:
0

How do you increase the large image pop-up window when you have an image border?

If you have an image border the pop-up window for the large image (my large image is 640x480) is a bit too small. I believe the generated pop-up window is 640x480 and does not expand to compensate for the additional length and width that is added when you place a border around the image.

The question is: How can we make the large image pop-up window large enough to include the image border?

Sawhorse

12 Apr 2009, 3:01 PM
#2
rstevenson avatar

rstevenson

Totally Zenned

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

Re: How do you increase the large image pop-up window when you have an image border?

In a general sense, you would add a number of pixels to the calculated value for both horizontal and vertical window size, in the script which is setting the window parameters. I don't have time at the moment to track that down for you, but that will do the trick I think.

Rob

12 Apr 2009, 10:05 PM
#3
sawhorse avatar

sawhorse

Zen Follower

Join Date:
Oct 2007
Location:
Kentucky - USA
Posts:
425
Plugin Contributions:
0

Re: How do you increase the large image pop-up window when you have an image border?

Hi rstevenson,

 Yep, that is what I would like to do.  It is my understanding that ZC ADMIN does not have the LARGE image formatting and that the window size is dynamic. 

 The file that we may be looking for may be  includes/modules/pages/prouduct_info/jscript_main.php  but I am not sure.  What do you think?

Sawhorse

12 Apr 2009, 10:26 PM
#4
sawhorse avatar

sawhorse

Zen Follower

Join Date:
Oct 2007
Location:
Kentucky - USA
Posts:
425
Plugin Contributions:
0

Re: How do you increase the large image pop-up window when you have an image border?

I do not think it is includes/modules/pages/prouduct_info/jscript_main.php I played with it and it did not seem to change anything.

Sawhorse

12 Apr 2009, 11:17 PM
#5
sawhorse avatar

sawhorse

Zen Follower

Join Date:
Oct 2007
Location:
Kentucky - USA
Posts:
425
Plugin Contributions:
0

Re: How do you increase the large image pop-up window when you have an image border?

**May be we should look at /includes/templates/template_default/popup_image/tpl_main_page.php but I am not sure how to adjust.

Sawhorse

**

13 Apr 2009, 12:45 AM
#6
rstevenson avatar

rstevenson

Totally Zenned

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

Re: How do you increase the large image pop-up window when you have an image border?

Sawhorse:

The file that we may be looking for may be includes/modules/pages/prouduct_info/jscript_main.php but I am not sure. What do you think?

Close. It's more likely includes/modules/pages/popup_image/jscript_main.php

That file has code in it ( function resize() ) to calculate various window sizes. So you can add perhaps 25 to each spot where it puts in a value for a particular browser -- if, that is, your border is 25px wide.

Rob

13 Apr 2009, 1:05 AM
#7
sawhorse avatar

sawhorse

Zen Follower

Join Date:
Oct 2007
Location:
Kentucky - USA
Posts:
425
Plugin Contributions:
0

Re: How do you increase the large image pop-up window when you have an image border?

rstevenson:

It's more likely includes/modules/pages/popup_image/jscript_main.phpRob

Yes, that is it!! Go to about line 40 and you will see:

    frameWidth = imgWidth;

    frameHeight = imgHeight+i;
```You need to change that to add (as needed) additional window area.  I did the following:

```php
    frameWidth = imgWidth+5;

    frameHeight = imgHeight+40+i;
```Thanks for your help.

OH - it might be a good idea to do ****includes/modules/YOUR_TEMPLATE/pages**/popup_image/jscript_main.php**

Sawhorse
13 Apr 2009, 1:44 AM
#8
sawhorse avatar

sawhorse

Zen Follower

Join Date:
Oct 2007
Location:
Kentucky - USA
Posts:
425
Plugin Contributions:
0

Re: How do you increase the large image pop-up window when you have an image border?

For some reason the Override System does not seem to function here. I needed to place the correction in the main file.

Any reason you would know why the Override System is not working here?

Sawhorse

13 Apr 2009, 11:24 PM
#9
sawhorse avatar

sawhorse

Zen Follower

Join Date:
Oct 2007
Location:
Kentucky - USA
Posts:
425
Plugin Contributions:
0

Re: How do you increase the large image pop-up window when you have an image border?

Ok, for all that are reading this. The Override System structure does not include this possibility. Thus, you must use the main ZC file to make any adjustments.

Sawhorse

14 Apr 2009, 2:02 AM
#10
rstevenson avatar

rstevenson

Totally Zenned

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

Re: How do you increase the large image pop-up window when you have an image border?

I always have an unmodified copy of Zen Cart here on my hard drive for reference, as well as a full working copy of my site. In the working copy I colour code any folder that is not an override folder in which a file has been modified, and then colour code the file too. That makes it easy to track them down later if I want to do an upgrade.

Rob

14 Apr 2009, 2:45 AM
#11
sawhorse avatar

sawhorse

Zen Follower

Join Date:
Oct 2007
Location:
Kentucky - USA
Posts:
425
Plugin Contributions:
0

Re: How do you increase the large image pop-up window when you have an image border?

rstevenson I too have an unmodified copy of Zen Cart on my local drive for reference. So I guess we think alike on this.

I like the color coding process you use to indicate that a non Override System file has been modified on your active web system. My question is: How do you color the files?

Oh, I just learned about another way to override ZC files not using the standard ZC Override system. **TShooters **http://www.zen-cart.com/forum/showthread.php?p=714977#post714977 told me about Read the read_me_onload.html file in the docs folder of the downloaded Zen Cart distribution files. See also http://www.zen-cart.com/wiki/index.php/Customisation_-_Templates_-_Javascript for additional information.

Again, how do you color code the file?

Sawhorse

15 Apr 2009, 10:42 AM
#12
rstevenson avatar

rstevenson

Totally Zenned

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

Re: How do you increase the large image pop-up window when you have an image border?

My question is: How do you color the files?

Mac OS X. :smartalec:

Actually all the Mac OS versions for the last 15 years or more have allowed colour labelling of files on your drive. It's just a selection in a menu or context-sensitive pop-up menu. Since I don't use Win for anything except checking sites in IE, I've never tried to use colour labelling in that OS.

Rob

15 Apr 2009, 5:03 PM
#13
sawhorse avatar

sawhorse

Zen Follower

Join Date:
Oct 2007
Location:
Kentucky - USA
Posts:
425
Plugin Contributions:
0

Re: How do you increase the large image pop-up window when you have an image border?

rstevenson:

Mac OS X. :smartalec:

Thanks for giving me just another reason why I love :no: Win OS

Sawhorse