Thanks to a good bloke called Digerati, not only did he tell request i fix a few bugs in the theme he also gave me the code which will fix it saving me some time.
Posted by Digerati Quote:
My site is http://www.acasylum.com
You won't be able to register, so you'll have to see what you can as a guest
It's for an Asheron's Call allegiance (clan), so I've replaced the images on the top, side, and bottom with ones more relavent to the game =)
I also changed the header and footer tpl files to allow the page to expand to the full width of the browser window (this required making the header and footer images fade into the page background image, separating the logo from the top image, and smudging the edges of middle1.jpg so it looked ok when tiled). I rewrote the tables too, since yours were pretty hard to figure out
One other change that i made fixes the problem where the background of the footer image sometimes didn't line up with the page background by adding the following to the page:
> in overall_header.tpl, in the <body> tag:
[code:1:43a0abf059]onload="spacer.height=(3-(document.body.scrollHeight)%3);" [/code:1:43a0abf059]
(you may need to change the first 3 to either 4 or 5 depending on your footer image)
> in overall_footer.tpl, right after the copyright information:
[code:1:43a0abf059]<!-- Spacer to make the background of the footer line up with the main page's background (Resized in the header during body.onload) -->
<br><img id="spacer" src="images/spacer.gif"><br> [/code:1:43a0abf059]
This works in IE6, but I haven't changed it for cross-browser compatibility (i think document.body.scrollHeight isn't the same in netscape).
If you'd like to see the header and footer files, they're in http://www.acasylum.com/forums/templates/Darkness/
And likewise the images are in http://www.acasylum.com/forums/templ...rkness/images/
Note that I defined the {T_TEMPLATE_PATH} and {T_TEMPLATE_IMAGES} variables in the tempate's .cfg file, so that I could use the eXtreme styles mod to use subSilver's .tpl files for all but overall_header and overall_footer.
|
Quote:
Just realized another problem with it. When a page is "short" like the logon page, the little 0-2 pixel spacer image does nothing lol. Here's a fix -- you'll have to call the initDoc() function in body onload.
[code:1:43a0abf059]<script language="Javascript" type="text/javascript">
<!--
function initDoc()
{
//
// Fix for "short" pages that don't fully fill
// the space created by the side image
//
maxHeight = document.body.scrollHeight + 1;
while (document.body.scrollHeight < maxHeight)
spacer.height++;
//
// Align bottom image's background with the rest of the page
// NOTE: You may need to change footer_offset to 4 or 5
// depending on the footer image
//
var footer_offset = 3; //Should ONLY be 3, 4, or 5
spacer.height += (footer_offset - (document.body.scrollHeight)%3);
}
//-->
</script>
...
<body onLoad="initDoc();" ... [/code:1:43a0abf059]
and
[code:1:43a0abf059]<br><img src="images/spacer.gif" width="0" height="0" id="spacer"><br> [/code:1:43a0abf059]
|
I will be fixing this problem along with a few more with Darkness 1.2, but for the time being u can use this code.
Thanks again Digerati.