PDA


View Full Version : body$onload in adv_portal template


Marris
08-01-2005, 07:58 PM
I am testing out a java "auto resize huge images" hack to preserve the formatting of my forum and portal with overly large images. I am running CMPS 2 and vB 3.0.8.

http://www.vbulletin.org/forum/showthread.php?t=90208

It didn't work on the portal until I made the following change to the adv_portal template:

replaced:

<body$onload>

with

<body onload="$onload; fiImageResize()">

Will this change break anything? The vBulletin default showthread template uses the following line:

<body onload="$onload">

So, I'm wondering if the adv_portal template $onload value is different from the variable used in showthread. And if so, is there a better location to add fiImageResize() to $onload for the script to work on the portal?

Brian
08-01-2005, 08:33 PM
I would suggest this instead:
<body onload="<if condition="$onload">$onload; </if>fiImageResize()">
Mostly just to remove the ; if it's not necessary.

Marris
08-01-2005, 11:15 PM
Thanks for your help. :) I just made the change. I wanted to be sure I wasn't creating any problems.