UBB.Dev
Posted By: delfo2000 load page time - 02/20/2002 8:15 PM

Hi,

is there way insert page load time ?

D
Posted By: JustDave Re: load page time - 02/20/2002 10:16 PM
I don't know... what's it look like?
Posted By: delfo2000 Re: load page time - 02/20/2002 10:46 PM
Hi,

see here http://www.sitofox.it/forum/ this is snitz forum and in footer there is load time (page)
now see here http://www.sitofox.com/ubbthreads/ubbthreads.php
I want insert load time in this forum

Regards

D
Posted By: JustDave Re: load page time - 02/20/2002 10:49 PM
ohh... I thought you had the code and wanted to know where to place it.

hmmm.. I'm not realy sure about how to set this one up...
Posted By: razvan Re: load page time - 02/20/2002 11:51 PM
You mean page generation time?
Posted By: delfo2000 Re: load page time - 02/20/2002 11:59 PM
Hi,

yes, in how many time server need.

Regards

D
Posted By: razvan Re: load page time - 02/21/2002 12:31 AM
edit ubbt.inc.php:

- insert this at the beginning (before the includes):
// start time
$stime = explode(' ', microtime());
$stime = $stime[1] + $stime[0];

- find function send_footer() { and insert
// end time
$etime = explode(' ', microtime());
$etime = $etime[1] + $etime[0];
$rtime = number_format($etime - $stime, 5);

echo '<div align="center" style="font-size: 10px;">' . $rtime . '</div>';
after the $html -> close_table(); line.


- change the "global $config, $theme, $thispath, $VERSION, $ubbt_lang, $timea, $querycounter;" line to:
"global $config, $theme, $thispath, $VERSION, $ubbt_lang, $timea, $querycounter, $stime;


PS. The vars in the original global line above hints that the functionality for this may be already included in the program (timea and querycounter) but it's either not enabled or the actual lines required to display it are not included.
Posted By: delfo2000 Re: load page time - 02/21/2002 1:11 AM
Hi,

many thx, but there are problems control please
http://www.sitofox.com/ubbthreads/ubbthreads.php

my file ubbt.inc.php has this line
global $config, $theme, $thispath, $VERSION, $ubbt_lang, $timea;

I'm using ver 5.5

D
Posted By: razvan Re: load page time - 02/21/2002 1:44 AM
From the number displayed on your page I'd say you didn't add the $stime to the "global..." line. I don't have neither 5.5 nor 5.5.1 installed so what I've told you above is from one of my scripts and the instructions/line numbers are from looking inside ubbt.inc.php. I used ubbt.inc.php from 5.5.1 as reference so this may explain why yours is slightly different. Regardless of that, if you change 'global $config, $theme, $thispath, $VERSION, $ubbt_lang, $timea;' to 'global $config, $theme, $thispath, $VERSION, $ubbt_lang, $timea, $stime;' it should work.
Posted By: delfo2000 Re: load page time - 02/21/2002 3:11 AM
Hi,

thx again, but I'm sure does't work.
If you want download my ubbt.inc.php

sitofox.com
anonymous

i have uploaded ubbt.inc.php

Regards

D

P.S i thin best solution is update to 5.5.1

© UBB.Developers