From: <sf...@us...> - 2006-06-08 07:34:03
|
Update of /cvsroot/blackboxwm/website/tavi/parse In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv31741/tavi/parse Modified Files: macros.php Log Message: Nice format for visitor totals. Added support for visitor/day calculation. Index: macros.php =================================================================== RCS file: /cvsroot/blackboxwm/website/tavi/parse/macros.php,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** macros.php 8 Jun 2006 07:17:53 -0000 1.15 --- macros.php 8 Jun 2006 07:34:00 -0000 1.16 *************** *** 124,132 **** { global $CounterMissingDisplayThreshold, $CounterAllowMissingPages; ! global $CounterBarImage, $CounterBarLength, $CounterBarHeight; $CounterMissingDisplayThreshold = abs((int)$CounterMissingDisplayThreshold); $CounterBarLength = abs((int)$CounterBarLength); $CounterBarHeight = abs((int)$CounterBarHeight); // init --- 124,134 ---- { global $CounterMissingDisplayThreshold, $CounterAllowMissingPages; ! global $CounterBarImage, $CounterBarLength, $CounterBarHeight, $CounterStart; $CounterMissingDisplayThreshold = abs((int)$CounterMissingDisplayThreshold); $CounterBarLength = abs((int)$CounterBarLength); $CounterBarHeight = abs((int)$CounterBarHeight); + $CounterStartTS = strtotime($CounterStart); + $CounterDays = (int)((time()-$CounterStartTS)/(60*60*24)+1); // init *************** *** 171,183 **** $text .= '</table>'; ! $text .= '<hr /><strong>Total: '.$total.'</strong>'. ($hidden_p ! ? ' (of which <strong>'.$hidden_v.'</strong> hits for <strong>'.$hidden_p. ! '</strong> missing pages below the <strong>'.$CounterMissingDisplayThreshold. ! '</strong> threshold.)' : '' ). '<br />'; return $text; } --- 173,188 ---- $text .= '</table>'; ! $text .= '<hr /><strong>Total: '.number_format($total,0,'.',',').'</strong>'. ! ' ('.sprintf('%.2f',$total/$CounterDays).' per day) '. ($hidden_p ! ? ' (of which <strong>'.number_format($hidden_v,0,'.',',').'</strong> hits for <strong>'. ! number_format($hidden_p,0,'.',',').'</strong> missing pages below the <strong>'. ! number_format($CounterMissingDisplayThreshold,0,'.',',').'</strong> threshold.)' : '' ). '<br />'; + $text .= 'Counting since: <strong>'.date('F j, Y', $CounterStartTS).'</strong><br />'; + return $text; } |