PDA

View Full Version : Feature request: Don't specify window size on open pic


GrimJack
11-01-2005, 07:56 PM
When you click a thumbnail to open a full size version of the picture, the new window is automatically resized to the picture.

This works great in IE, however, in FireFox if you open the link in a new tab, it automatically resizes the current window. :(

Greg
11-01-2005, 08:52 PM
To disable it, remove from template vbpicgallery_popup...


<if condition="($vboptions[vbpgpopups] && !$bbuserinfo[userid]) || $bbuserinfo[userid]">
<script type="text/javascript">
<!--
function SizeFrame() {
if (parseInt(navigator.appVersion)>3) {
if (navigator.appName=="Netscape") {
top.outerWidth=$result_data[width];
top.outerHeight=$result_data[height];
}else{
top.resizeTo($result_data[width],$result_data[height]);
}}}
-->
</script>
</if>


And...

onload="SizeFrame()"

GrimJack
11-02-2005, 12:54 PM
noppid, you rock. Thanks again!

Greg
11-02-2005, 01:47 PM
Glad that helps ya out. The function could be made to only operate on FF too. If that is what you want.

GrimJack
11-02-2005, 04:13 PM
Yes... now that you have pointed me to the appropriate code location, I can change it easily if I want to. :)

Greg
11-03-2005, 01:00 PM
Try this block of code and tell me what you think. This is in vbpicgallery_popup.


<if condition="($vboptions[vbpgpopups] && !$bbuserinfo[userid]) || $bbuserinfo[userid]">
<script type="text/javascript">
<!--
function SizeFrame()
{
if (parseInt(navigator.appVersion)>3)
{
if (navigator.appName=="Netscape")
{
top.outerWidth=$result_data[width];
top.outerHeight=window.screen.height;
}
else
{
top.resizeTo($result_data[width],window.screen.height);
}
window.moveTo(0,0);
}
}
-->
</script>
</if>


Don't forget... <body onload="SizeFrame()">

GrimJack
11-03-2005, 03:53 PM
Errr.. that last one works very odd. It works ok in IE, but Firefox still gets the main window resized, plus it gets moved to the top left corner of the screen when opening the links in a new tab.

Greg
11-03-2005, 04:50 PM
That's right, tabs. I'll try to detect tabs and then not resize.

EDIT:

On mine the new window breaks out of the tabs and goes to the top left corner. The main window it comes from is not resized, neither when full frame or down.

EDIT AGAIN: I get it now. :D It breaks the close button too.

I dunno what to do yet. I'll get back to ya.

GrimJack
11-03-2005, 09:18 PM
No worries at all. For the moment deleting the code works great, not a rush by any stretch of the imagination.

Gizmo999
04-26-2006, 03:13 AM
That's right, tabs. I'll try to detect tabs and then not resize.

EDIT:

On mine the new window breaks out of the tabs and goes to the top left corner. The main window it comes from is not resized, neither when full frame or down.

EDIT AGAIN: I get it now. :D It breaks the close button too.

I dunno what to do yet. I'll get back to ya.

Any progress on fixing the Firefox tab resizing problem, it resizes the whole window to the image size , closing leaves window at that smaller size :(

Greg
06-29-2006, 09:42 PM
The resizing window code is gone. Let me know if it works for you.