Forums / Templates, Stylesheets, Page Layout / "larger image" opens in tiny window

"larger image" opens in tiny window

Locked

Views: 2,192

Results 1 to 15 of 15
This thread is locked. New replies are disabled.
11 Mar 2010, 6:22 PM
#1
mzimmers avatar

mzimmers

Zen Follower

Join Date:
May 2008
Posts:
453
Plugin Contributions:
0

"larger image" opens in tiny window

Hi -

As the title says, when I click on the "larger image" text below my image, I indeed get a larger image...in a really tiny new window. Can I control the size of the new window? It's kind of silly that it opens a new window that's smaller than the original image.

Thanks.

11 Mar 2010, 6:51 PM
#2
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: "larger image" opens in tiny window

Looks OK to me. When you first click on 'larger image' a little box opens, but if you wait for the image to load, it's big.

11 Mar 2010, 6:56 PM
#3
mzimmers avatar

mzimmers

Zen Follower

Join Date:
May 2008
Posts:
453
Plugin Contributions:
0

Re: "larger image" opens in tiny window

Hmm...not for me. I'm running FireFox on a Mac; what's your environment?

11 Mar 2010, 7:06 PM
#4
mzimmers avatar

mzimmers

Zen Follower

Join Date:
May 2008
Posts:
453
Plugin Contributions:
0

Re: "larger image" opens in tiny window

And, in Chrome, it works fine, just as you said.

So, I guess the question is, is there a way to "force" the desired behavior? Or, is this even a good idea to try?

Thanks.

11 Mar 2010, 7:40 PM
#5
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: "larger image" opens in tiny window

I use XP, and it works OK for me in IE6, 7 and 8 and Firefox, Chrome and Safari.

I'm thinking it works the way it does because Zencart doesn't know how big the window needs to be until the image loads.

If all your large images are the same size, you could probably change some code to open the window to that size. I'll study on it.

11 Mar 2010, 7:53 PM
#6
mzimmers avatar

mzimmers

Zen Follower

Join Date:
May 2008
Posts:
453
Plugin Contributions:
0

Re: "larger image" opens in tiny window

I'd appreciate that. I can play with it, too, if you can point me to the file that contains the new window directive.

11 Mar 2010, 8:14 PM
#7
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: "larger image" opens in tiny window

Actually, I'm just stalling until Glenn shows up and tells us how to do it :smile:.

11 Mar 2010, 8:19 PM
#8
mzimmers avatar

mzimmers

Zen Follower

Join Date:
May 2008
Posts:
453
Plugin Contributions:
0

Re: "larger image" opens in tiny window

Ahem..."stalling" is a tactic confined to politicians and other vermin. We developers merely engage in "creative procrastination."

11 Mar 2010, 11:35 PM
#9
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: "larger image" opens in tiny window

First Are all of your large images matted to exactly the same size?
If not do that
Then in a copy of /includes/templates/template_default/popup_image_additional/tpl_main_page for your template change

<body id="popupAdditionalImage" class="centeredContent" onload="resize();">

To

<body id="popupAdditionalImage" class="centeredContent" onload="">

Than - and this is not overridable so maintain an original
/includes/modules/pages/product_info/jscript_main.php file change the sizes to the size of your large image

function popupWindow(url) {
  window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,left=150')

Zen-Venom Get Bitten

11 Mar 2010, 11:45 PM
#10
mzimmers avatar

mzimmers

Zen Follower

Join Date:
May 2008
Posts:
453
Plugin Contributions:
0

Re: "larger image" opens in tiny window

Thanks, Kobra. Can I safely assume that if my images aren't all the same size, I can pick values that are fairly close and live with it?

(I'm just asking out of academic curiosity; I can make all my images the same size.)

11 Mar 2010, 11:52 PM
#11
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: "larger image" opens in tiny window

Can I safely assume that if my images aren't all the same size, I can pick values that are fairly close and live with it?
Have not tried that but assume that you will end up with white space for smaller images - preferable versus a stretched/distorted image

Suggest you use a graphic editor like Photo Shop and mate them ans do in batch with an action script other editors have similar capabilities by different names

Zen-Venom Get Bitten

11 Mar 2010, 11:59 PM
#12
mzimmers avatar

mzimmers

Zen Follower

Join Date:
May 2008
Posts:
453
Plugin Contributions:
0

Re: "larger image" opens in tiny window

Oh yeah, there's certainly no problem making all my pics the same size. This brings up another question: I notice that most of the default picture sizes seem to be multiples of 5x4 or 4x5, not the more traditional 3x4/4x3. Is there a reason for this? Again, I'm just curious.

Thanks.

12 Mar 2010, 12:01 AM
#13
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: "larger image" opens in tiny window

Leagacy code???

Change them to a ratio you prefer

admin > config > images

Zen-Venom Get Bitten

23 Aug 2010, 3:04 PM
#14
oberheimer avatar

oberheimer

Zen Follower

Join Date:
Feb 2009
Posts:
108
Plugin Contributions:
0

Re: "larger image" opens in tiny window

it does'nt work for me i think it is set in the template but cant seem to find it the rezise thing worked but not to set the size of the image can you help me out