rejetto forum

Template bug in 2.0 beta44

0 Members and 1 Guest are viewing this topic.

Offline help420me

  • Occasional poster
  • *
    • Posts: 16
    • View Profile
I don't know if this has been fixed in the latest updates, so I'll try on those soon.  When using the template variable %build-time% to indicate how long a page took to generate, the number comes up in normal pages.  However, on any of the Error pages, the number doesn't come up and only the %build-time% is displayed.  I've tried different things to get it to work, but it doesn't come up at all.  Tried wrapping it in a js file, changing the css, terminating it with /n, adding it to the individual error secctions (like [not found]) but nothing works.  I've edited the [error-page] to look like this:

Code: [Select]

[error-page]
<html><head><title>ERROR</title>
<script type="text/javascript"><!--
function get_random() {var ranNum=Math.floor(Math.random()*5);return ranNum;};function getaBackground(){var whichBack=get_random();var back=new Array(5);back[0]="/american.gif";back[1]="/fatalerror.jpg";back[2]="/crack.jpg";back[3]="/saderror.jpg";back[4]="/warcraft.jpg";var BG=back[whichBack];return BG;}document.write('<img src=' + getaBackground() + ' height=100% />');//-->
</script><style>\n%style%\n</style></head><body>
%content%
<hr>
<div style="text-align:center;font-weight:bold;"><a href="http://www.rejetto.com/hfs/">HttpFileServer %version%</a><br>Serve Time: %timestamp%<br>Uptime: %uptime%<br>Page Generation: %build-time%<br>Server Connection Speed: 30KB/s for all %number-addresses% computers connected<br></div></body></html>


It's just a random array with possible images for the error background image with some server info at the bottom. But even leaving it at default and adding the %build-time% var doesn't work either.

Regards.


Anonymous

  • Guest
I don't think the build time variable is designed to work in the error pages.


gees

  • Guest
...right! The build-time variable is only valid in main section of the template:
http://rejetto.com/wiki/index.php?title=HFS:_Template
No bug at all.
_______
~GeeS~


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13510
    • View Profile
anyway consider upgrading to the last stable version (2.0a)