View Full Version : A new way to look at online stats.
Dygear
29th April 2006, 02:15
http://simfia.com/#Page/LFSTrackGuide.php?Track=AS1
Enjoy guys :).
Anarchi-H
29th April 2006, 05:02
The colour coded sectors are cool, but asides from that, how is it different?
Dygear
29th April 2006, 08:23
More F1 Ish. I don't like looking at a flat image, nor do I like looking at a track with no stats. :). Speaking of this, I really need to get a ms2time function that does it's job. If there is minutes, then put in minutes, don't be lazy about it and use how many seconds ... any one have a function they are willing to share in PHP?
filur
29th April 2006, 08:58
Looks really nice. :)
Speaking of this, I really need to get a ms2time function that does it's job. If there is minutes, then put in minutes, don't be lazy about it and use how many seconds.
Didn't really get this, describe it a bit more and i could give it a try.
paXton
29th April 2006, 10:18
Hi,
nice site!
Speaking of this, I really need to get a ms2time function that does it's job. If there is minutes, then put in minutes, don't be lazy about it and use how many seconds ... any one have a function they are willing to share in PHP? I don't understand exactly what you mean. It seems to look ok at your site.
Please give an example, if you still need help from another phpbeginner. 8)
paXton
NotAnIllusion
29th April 2006, 10:48
I think he means that eg on this page http://simfia.com/#Page/LFSTrackGuide.php?Track=AS7 all times are shown in seconds only. Would be nice to have it in mins:seconds.fractions for the tracks that apply to it.
filur
29th April 2006, 11:11
<?
function dispTime($time, $fraction, $noPrefixZero = false) {
$secs = floor($time / $fraction);
$time = $time - floor($secs * $fraction);
if ($time < 10)
$time = "0$time";
$ret = @date("i:s",$secs).".$time";
if ($noPrefixZero)
$ret = preg_replace("/0([1-9]):/","\\1:",$ret);
return preg_replace("/^00:/","",$ret);
}
echo dispTime(85950, 1000) . "\n";
echo dispTime(8595, 100) . "\n";
echo dispTime(85950, 1000, true) . "\n";
echo dispTime(8595, 100, true) . "\n";
?>
This function worked last time i suggested it, and it works now too. (Aston north/BF1 time in example calls).
Dygear
29th April 2006, 22:52
Thanks, I'll give a shot.
Dygear
30th April 2006, 06:37
Yea, it worked like a charm, thank you very much. Gave you a little plug on the front page for that :).
vBulletin® v3.7.1, Copyright ©2000-2008, Jelsoft Enterprises Ltd.