SourceForge has been redesigned. Learn more.
Close

#808 Average values are zero (3) - ID: 2992336

open
nobody
5
2014-11-10
2010-05-30
No

Again the same issue.... AWStats still shows zero values in version 1.962. In my installation as well well as in the public demo at: http://www.nltechno.com/awstats/awstats.pl?config=destailleur.fr (is now vthe latest ersion too).
when I check the code I think there need to be one little change around line 13154:

    $average_v = sprintf( "%.2f", $average_v );
    $average_p = sprintf( "%.2f", $average_p );
    $average_h = sprintf( "%.2f", $average_h );
    $average_k = sprintf( "%.2f", $average_k );

replace with the following and move up before line 13135:
(so these values are available for the monthly averages)
$average_v = sprintf( "%.2f", $AverageVisits );
$average_p = sprintf( "%.2f", $AveragePages );
$average_h = sprintf( "%.2f", $AverageHits );
$average_k = sprintf( "%.2f", $AverageBytes );
# Show average value cell

Show the alt text nice formatted, starting from line 13160:
if ( $ShowDaysOfMonthStats =~ /V/i ) {
print
"[10]: " . Format_Number(int($average_v))) . " />";
}
if ( $ShowDaysOfMonthStats =~ /P/i ) {
print
"[56]: " . Format_Number(int($average_p))) . " />";
}
if ( $ShowDaysOfMonthStats =~ /H/i ) {
print
"[57]: " . Format_Number(int($average_h))) . " />";
}
if ( $ShowDaysOfMonthStats =~ /B/i ) {
print
"[75]: " . Format_Bytes(int($average_k))) . " />";
}

I hope this can help to improve the fantastic statistics program.
Kind regaeds, Stefan

Discussion


Log in to post a comment.